Tyree (he wears a tie and he has tires) actually smiles after he bumps into something (see video). Using an Arduino motor shield, he detects obstacles using the “more current into the motor means something is in the way” principle.
Tyree started out as a sketch and morphed into a real object thanks to Autodesk’s 123d software and a MakerBot Replicator 3d printer. Without the 3d tools, you can still learn how to make an active smile, tail wag, and sensor less control.
Step 1: Parts
I had to start somewhere–the wheels. I went to my local hardware and purchased two vacuum belts. I wanted these for traction–and they determined the ultimate diameter of my wheels. The shaft on my 40 rpm gear motors determined what size the hub needed to be.
Here’s the major parts:
Arduino Motor Shield
Gear motors (12 volt, 40 rpm) Jameco #253518
Tail motor Jameco #2128219
Smile solenoid Jameco #149762
DPDT 5 volt relay Jameco #139977
Two 1K resistors
Three 9 volt batteries and battery snaps
Seven AA batteries and holders
Heat Shrinkable Tubing
Body–For printable part list:
He evolved as the design process started.
For every body piece, I needed dimensions before I could design the part in software. Even if the part is made from plywood and bottle caps, knowing the critical sizes and placement of objects is important.
This is the base–could be plywood or plexiglass. Actually, this is a good starting point for design using 3d software–just a flat piece with rectangular cutouts.
The side panels get more tricky–they need to fit the bottom piece and support the motor.
Screw the motor to the side panel.
Solder wires to the motor while it is easy to do so.
Print the front piece–with the bow tie raised.
Snap the side pieces onto the bottom piece and the bow tie onto the front. Push the wheels onto the shafts. Add a set screw into the wheel collar.
Paint the bow tie (my wife took care of this).
The back piece is very similar to the front, but it has a larger hole in the bow tie. Point the bow tie inward and press fit the tail motor into the hole. Solder small (I used wire wrap wire) wire to the motor.
Use colorful rubber tubing (eyeglass retainers) for the tail (and eventually the smile). Push heat shrinkable tubing into the colorful rubber tubing. Shrink the exposed tubing onto the tail motor shaft.
Push the colorful tubing onto the shaft.
Take a needle with fishing line and push it through the colorful tubing (also through the heat shrink tubing you embedded earlier). Tie this in place.
Time to start assembling the guts. Program the Arduino and build the circuitry on the breadboard.
I started with a Randofo tutorial and used code by dougstrickland as the basis for this operation. A couple of things need to be noted. Motor current increases when the motors first start turning and when they encounter resistance (a wall). I measure the current after the motors have had a second to get going–otherwise, I’ll alway detect high current and get into trouble. If you operate on carpet, the “analogRead” values may need to be higher since more work is required from the motors.
For more detail: Sensor Less 3d Printed Robot