Introduction: Tyree--the Smiling, Tail Wagging, Sensor Less 3d Printed Robot

About: I am an author and a maker. My current project is Santa's Shop. I'm working on a science fiction type book--more later. @EngineerRigsby

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
2n2222a transistor
Toggle switch
Two 1K resistors
Diode, 1N4004
Three 9 volt batteries and battery snaps
Seven  AA batteries and holders
One breadboard
Jumper Wires
Heat Shrinkable Tubing

Body--For printable part list:

Step 2:

He evolved as the design process started.

Step 3:

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.

Step 4:

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.

Step 5:

The side panels get more tricky--they need to fit the bottom piece and support the motor.

Step 6:

Screw the motor to the side panel.

Step 7:

Solder wires to the motor while it is easy to do so.

Step 8:

Print the front piece--with the bow tie raised.

Step 9:

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.

Step 10:

Paint the bow tie (my wife took care of this).

Step 11:

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.

Step 12:

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.

Step 13:

Push the colorful tubing onto the shaft.

Step 14:

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.

Step 15:

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.

The smile solenoid and tail wagging are controlled by a relay operated by pin 7 of the Arduino.

int valm=0;
int valm1=0;
const int pwmA=3;
const int pwmB=11;
const int brakeA=9;
const int brakeB=8;
const int dirA=12;
const int dirB=13;
const int relay=7;

void setup() {

pinMode(dirA, OUTPUT);
pinMode(brakeA, OUTPUT);

pinMode(dirB, OUTPUT);
pinMode(brakeB, OUTPUT);
pinMode(relay, OUTPUT);

digitalWrite(dirA, HIGH);//forward A
digitalWrite(brakeA, LOW);//release brake A
analogWrite(pwmA, 255);//full speed A

digitalWrite(dirB, HIGH);
digitalWrite(brakeB, LOW);
analogWrite(pwmB, 255);
digitalWrite(relay, LOW);

delay(1000);//get past startup current

void loop() {

digitalWrite(dirA, HIGH);//forward A
digitalWrite(brakeA, LOW);//release brake A
analogWrite(pwmA, 255);//full speed A

digitalWrite(dirB, HIGH);
digitalWrite(brakeB, LOW);
analogWrite(pwmB, 255);

if(valm>45 or valm1>45) {

digitalWrite(brakeA, HIGH);
digitalWrite(brakeB, HIGH);

digitalWrite(dirA, LOW);//forward A
digitalWrite(brakeA, LOW);//release brake A
analogWrite(pwmA, 255);//full speed A

digitalWrite(dirB, LOW);
digitalWrite(brakeB, LOW);
analogWrite(pwmB, 255);


digitalWrite(brakeA, HIGH);//stop one wheel

digitalWrite(brakeB, HIGH);//stop other wheel

digitalWrite(relay, HIGH);//smile and tail on
digitalWrite(relay, LOW);//turn smile and tail off

//start both wheels forward
digitalWrite(dirA, HIGH);//forward A
digitalWrite(brakeA, LOW);//release brake A
analogWrite(pwmA, 255);//full speed A

digitalWrite(dirB, HIGH);
digitalWrite(brakeB, LOW);
analogWrite(pwmB, 255);

delay(1000);//get past startup current


Step 16:

Solder a 1K resistor to the led.  Cover all exposed metal with heat shrinkable tubing (shrink it), and add jumper pins.  Push the led into the front bow tie hole and insert the jumper pins into the breadboard.

Step 17:

Attach the battery clips--we're getting ready to close it up.

Step 18:

This is the top piece.  The indentation in the back is not clever design, it is to avoid conflict with the inward facing bow tie (which was laziness on my part--reusing the front design).  

Step 19:

It should look pretty neat at this point.

Step 20:

Thread the solenoid into the front face piece.  The front face piece should be printed at 50% infill (not too hollow) for strength.  Put the little pin on the end of the solenoid.

How do you make a piece like this in 123d software?

Start by selecting a cylinder.  Set the radius, mouse click; then thickness (6mm), mouse click.  Go to a top view (you'll see a circle).  Select the "draw" tool and choose "draw rectangle."  Starting at the center of your circle, draw a rectangle that covers the entire bottom right quadrant of the circle.  Choose extrude.  Select the bottom right quadrant, and choose -6mm (minus goes down, positive extrudes upward).  Select "cut".  Now, draw a rectangle starting in the center of the circle that takes out the bottom left quadrant.  Choose extrude, select that quadrant, -6mm, cut.  Now you have a semicircle.

Draw a rectangle where you want the piece that holds the solenoid to be.  Choose extrude.  Select your rectangle.  Choose 20mm (positive 20) and choose add.  Extrude.  Now, go to view (upper right) and choose right.  You'll see the side you need to "drill" for your solenoid hole.  Choose "draw," then "circle."  Set the center of the circle where you want it; mouse click.  Choose the radius, mouse click.  Extrude, select the circle, -10 mm (doesn't seem to matter if you are cutting holes in thin air, just get through the material if you want to), cut.  Save and you're done.

Step 21:

Drill two holes to support the rubber tubing smile.  Tie the tubing with fishing line.

Step 22:

Drill holes on the inside upper extent of the smile.

Step 23:

Using a needle and fishing line, tie line to each end of the rubber tubing smile.

Step 24:

Thread the fishing line through the front of the face and into a hole (which you just now drilled).  The two pieces of line should go through the tip of the solenoid plastic.

Step 25:

When the tension is right for the smile, use duct tape to hold the fishing line down.

Step 26:

Add a connector and heat shrinkable tubing to the smile assembly.

Time for a small confession.  This 12 volt solenoid doesn't have enough muscle to make a smile, so I put three 9 volt batteries in series.  This gives me 27 volts on the solenoid (really more like 22 volts under load)--and that's fine as long as it's intermittent.  Notice that in the software, the smile is enabled for two seconds, but quite a bit of run time occurs before it is enabled again.  If you want to smile a lot--get a bigger solenoid.

If you prefer to use servo motors to create a smile, I did that here:

Step 27:

Place a dome up front.  Put velcro on the dome and on the top plate.

Step 28:

Use a long piece of velcro to tie the dome to the top plate.  Do this on the other side and anywhere else you think it is needed.

Step 29:

Insert the front face with Velcro and install batteries.  Secure the batteries with Velcro or they'll slide around.

Step 30:

Screw the toggle switch (master power on/off) into the back face.  Secure everything with Velcro or clear packing tape.

Step 31:

Flip the switch on--and your happy little robot will explore his world.

Robot Challenge

Grand Prize in the
Robot Challenge

Wheels Challenge

Participated in the
Wheels Challenge

Make It Real Challenge

Participated in the
Make It Real Challenge