Friday, August 25, 2017

Getting started with the D1 Mini ESP8266

This is how to get started with the D1 Mini NodeMcu 4M Bytes Lua WIFI Development Board ESP8266 ESP-12F

Firstly - you have to buy one!
I purchased mine from here: https://www.amazon.com/gp/product/B01N3P763C

Once you've acquired this little wafer of awesome you will want to get ahold of the Arduino IDE from here: https://www.arduino.cc/en/Main/Software

You will also need to download and install the driver for this thing. I found the following drivers:
After installing both of these you will need to configure the IDE to recognize this board. In the IDE preferences add this url to the "Additional Boards Manager URLs":  http://arduino.esp8266.com/stable/package_esp8266com_index.json


Now in the "Board Manager" you should be able to search for the "esp8266" generic module and install the latest version.


Next select the appropriate port (for me, the driver added this weird port):





Then change the "Reset Method" to "nodemcu":


Now you should be able to upload a simple script to the board:


If you have no errors and the board plugged into your computer you should see a 1-second flashing LED on your board!

Happy Makering!

Wednesday, May 25, 2016

Taking Shape

In the previous post I demonstrated how to model a custom fitted insole that can be 3D printed. I am going to continue right where I left off and proceed to turn this insole into the base of a high-heel shoe. Make sure to remove the "Solidify" modifier if you have it before continuing.

The first thing to do here is to raise the heel. This isn't as simple as editing the edges and lifting them up along the Z axis (blue arrow). Doing that would end up effectively stretching the length of the shoe. Instead the insole shape needs to be bent upwards. To do this I first need to create a "Curve": Add->Curve->Bezier



After adding the curve get into edit mode and drag the ends of the curve until they reach the toe and heel of the foot. Next angle the view so you can see more of a profile of the insole object and drag the heel end of the curve up using the blue translation arrow. The "curve" handles can also be dragged to change the shape of the curve. Additional points can be added in the middle of the curve by selecting two points and using the "Subdivide" command: Curve->Segments->Subdivide



Once the curve looks good get out of "Edit Mode" and select the insole shape again. Add a "Curve" modifier and select the curve object you just created. Depending on how things are oriented this may cause some weird results. Blender sometimes has some oddness to it that just needs to be worked around. Rotate and move the insole object until it appropriately takes the shape of the curve. You might need to change the "Axis" that the curve modifier is using. For the image below I needed to set the axis to "-Y" and rotate the insole object 180 degrees around the Z axis.


The order that modifiers are applied can also cause different results. For this I want the "Curve" modifier to be applied before the "Subdivision Surface" modifier. Use the up/down arrows on the modifier to alter its order


Make one last pass to make sure everything looks right and then go ahead and "Apply" the curve modifier. Doing this will permanently change the objects shape meaning the next time this object is put into edit mode it will reflect the curve modification. So now that the curve has been applied there is no longer any need for the curve object so go ahead and delete it. To do this right-click the curve in the object list to the right and choose "Delete".


Now select the insole object and add a "Solidify" modifier, adjust the thickness to about 2cm, and apply it. The result will be the base shape of the shoe.


Enter "Edit Mode" again and angle the view until the bottom of the shape is visible. Holding down the shift key, right-click each point surrounding the area where a heel should be coming out. This should select a portion of the shape's surface.


Extrude this section (Mesh->Extrude->Region) and hit escape (instead of dragging the extruded surface). Take care not to de-select the selected region and add a "Scale" transform (Mesh->Transform->Scale) and hit "Enter" to apply it. Note that the resulting scale transform parameters will appear in the toolbar to the left.


By setting the "Z" parameter to 0 and leaving the "X" and "Y" parameters at 1 the selected section will effectively be flattened. Now drag this section down until it is even with the bottom of the toe of the shape. Alternatively in the "Transform" section of the toolbar to the right the "Z" value of the "Median" section can be set to 0.


Now it's time to shape the heel. If you haven't already, explore some of the "Mesh Tools" to the left on your own. You can press "CTRL-Z" to undo anything you don't like and then try something different. I will be using "Loop Cut and Slide" to add mid sections, "Scale" to size the sections, and probably a little manual dragging of points to shape my heel. Yours won't need to look exactly like mine.



So now I have this kind of blobby looking heel. The next thing I want to do is flatten out the bottom of the heel and to do this I want to go over a couple of techniques.

Selecting multiple points can be more easily achieved by holding down the CTRL key and tracing a line around the points you want selected. Select the bottom of the heel using this technique.


As you can see the "Subdivision Surface" modifier is making this more rounded. I want it to be more flat, but I don't want to get rid of the modifier. The way to do this in Blender is to add another set of points very close to these ones effectively defining a micro curve. An easy way to accomplish this is to simply "Extrude" this surface here (Mesh->Extrude->Region) or just press "E" if you don't want to navigate through the menus. Be sure to hit the escape key to keep the extrusion from being dragged. Note how much flatter the bottom of the heel is now:



There are also different ways to select the faces you want to flatten. The three buttons pictured below allow you to select by point (Vertice), line (Edge), and surface (Face). Try toggling these three modes and see how they affect selecting.


The button right next to these to the right will toggle allowing selections to occur on the back side of the model from the side you are viewing. Try toggling this mode on and off and see how it affects selecting.


Keep in mind after flattening a surface like this there will be duplicate points surrounding the flattened area. This means in order to drag any of these points their doubles will likely also need to be selected.

One last tool I want to demonstrate is "Remove Doubles". If you ever want to un-flatten something you can use this tool to combine back together any selected points that are "touching". This tool can be found on the left toolbar. Go ahead and try this out by selecting the bottom of the heel with a CTRL-drag select. You can re-extrude the heel to flatten it again or just hit "CTRL-Z".


Use these techniques to give the shoe a little more definition. Feel free to add extra structure using the "Knife" tool (learn about this tool here). The "Knife" tool can cut additional surface detail to be either extruded or flattened. I will be adding some handles to my shoe using "Extrude" around some of the edges for straps. This will make the shoe wearable after printing. I will be using the "Knife" tool down the top center of the shoe to better define an arch and make rests for the heel and ball of the foot. Finally I am going to also drag the toe of the shoe out a bit to bring it to a point.

The end result of my shoe looks like this:



This is certainly not the nicest looking shoe in the world but I wanted to start simple for this tutorial. I can now print this myself or send it to a printing service. 3DHubs and SD3D are a couple of great places to go that can get you connected with a local printing service.

Keep in mind before printing that this shoe was designed with little to no wiggle room for my foot. Be sure to scale the entire shoe up just a tad for comfort. Once I get this printed I will get another post up about what you need to know to get a good print.

The finished shoe can be found and downloaded from Thingiverse at: http://www.thingiverse.com/thing:1587947

Monday, May 23, 2016

The Perfect Fit


In this post I will run through creating a custom-fitted insole for 3D printing.

First I must digitize and measure a footprint. There are scanners out there you can acquire that are made specifically for scanning feet, but you can actually accomplish this simply by putting your footprint or tracing it onto a piece of paper and taking a picture with it on your phone.


Note that I traced my contact footprint and overhanging footprint. I'll use that later.
At this point you will want a graphic editor to trim this image with. PaintDotNet is a free editor that I use. I will next cut this down to just the size of the paper. I'll use my knowledge of the measurements of this paper to properly scale this outline. I know that the paper is 8.5" x 11" which will tell me the correct size of the foot I am designing to.


I will now get the footprint into a 3D format. For this you will want a 3D modeler. I'll be using Blender. First open a new, empty scene.



Next add a new "Empty" object. Add->Empty->Image:


Now go to the configuration for the Image object and load the footprint picture. Make sure to set the X and Y offsets to -0.5 to center it.



Keep in mind that Blender deals with generic coordinates and sizes. It's up to you to decide what those numbers mean. So note that the size of this image is currently set to "1.00". This means if I assume everything is in centimeters (which I am) then the length of the image is currently 1cm. Because I know the paper this tracing is on is 11 inches I want to set this length to 11 inches which would be 27.94cm.


Now that I have a to-scale outline of the foot I am designing for I can start to make a virtual foot to design around. To do this I am going to add a new "Plane" to the project: 


While in "Translation" mode use the Red and Green arrows to drag the new plane to the bottom of the heel.


Now get into "Edit Mode" and deselect all points: Select->(De)select All


Now right-click on the upper-left corner of the plane to select it and use the red arrow to drag it left to match the edge of the outline of the foot.


Repeat the last step on each corner until you have just covered the back of the heel.



Holding shift, select the top two corners. Next, extrude another segment: Mesh->Extrude->Edges Only



Doing this will leave you in a "move" mode where the new segment will move around with your mouse. Just hit the "Escape" key to cancel this movement. Instead use the green arrow to drag the segment a distance upward.


Now, just like before, move each corner until it covers the outline. Continue extruding until you have a very rough, boxy version of your outline. You want this to roughly resemble the bottom of a shoe because this will become the shape of your insole. Feel free to give it a little space around the edges for comfort and shape.



At this point hide the paper drawing and get out of edit mode.


I want to keep things very low resolution like this so it is easier to work with. Using "Modifiers" in Blender will allow me to add a "smoothing" effect without actually applying it yet. This will allow me to bounce in and out of edit mode to make adjustments at the lower resolution, but still see the higher resolution object as I work with it.

The first modifier I am going to add is a "Subdivision" modifier. This will add many "in-between" points to my insole and smooth them out. To do so select the "Modifiers" toolbar and add a "Subdivision Surface" modifier. (Make sure to have your "Plane" object selected before adding this modifier).


Set the "View" and "Render" values to 4. The higher this number the more points will be inserted. 4 should be enough for good print quality. Observe now that the insole is much more smooth.


I now have a base shape and size from which I can build customized designs to fit my foot. I will use this base in future posts as I move toward making a complete shoe ready for 3D printing.

For this post I will simply demonstrate how to turn this into a printable insole. Go ahead and add a "Solidify" modifier. Change the angle at which you are looking at your insole by holding down your middle mouse button and dragging your mouse in the view area. Adjust the "Thickness" setting on the Solidify modifier to 1 and the offset to 1. You should now see a centimeter of thickness has been added to your shape. If you were to export this to an STL file you would be able to print it with a rubber material and put it in your shoe for extra comfort.


This is about the ugliest insole you'll ever see but it is a pretty good start especially if you are completely new to 3D modeling. In my next post I will move directly into turning this into a base for a wedge shoe.