Sugru + Servos = Robot
Build a robot using a bag of Sugru and 5 mini-servo motors.
Motivation:
Build a robot using very few parts and very cheap servo motors.
Steps:
Motivation:
Build a robot using very few parts and very cheap servo motors.
Steps:
- Parts list
- Build
- Wire
- Program
- Play!
- Robot with 5 joints
- Arduino Code which is expandable
- Control and wiring setup
Parts
Parts used:
- 5 mini hobby servo motors -- 9 Gram Micro-servos
- about 8 packets of Sugru -- or one big puch
- Arduino Uno - with a Screw Shield
- Battery pack - 4 AA bats
- Servo proto-shield -- from 'Wendell' Robot
- Controller -- from Giant Crane Game
Build -- Bottom of Robot
The bottom servo will twist the whole robot side-to-side.
The next servo is the waist -- it will bend.
Use Sugru as glue and supports -- pack Sugru around the servo arms.
NOTE:
Pay attention to the positions of the servo arms as you build.
To determine servo arm/horn position do this:
The next servo is the waist -- it will bend.
Use Sugru as glue and supports -- pack Sugru around the servo arms.
NOTE:
Pay attention to the positions of the servo arms as you build.
To determine servo arm/horn position do this:
- What joint is the servo?
- Snap on the servo arm -- DO NOT ADD SCREW
- Turn the servo arm all the way to one side -- this is either 0 or 180 deg
- Then pull of the servo arm
- Re-align the servo arm so it is how you would want it to be when turned all the way, and stick it on (ex - body twisted all the way to the right)
- Now -- Turn the servo arm all the way to the other side -- hopefully it will be in the opposite side (ex - body twisted all the way to the left)
- If it is good, then add the screw
- If it is not where you had expected, pull of the arm and re-position halfway to the ideal position
- Turn the servo all the way to the other side
- If the servo is now in an okay spot at both extremes -- add the screw.
- Now -- it should be like this: 0deg = all the way to one side; 90deg = in the middle; 180deg = all the way to the other side
Build -- Arms and Head
Using 3 servo motors you can get:
But for now - No jumping jacks are 'YMCA'
Steps:
- Head back and forth
- Both arms up and down
But for now - No jumping jacks are 'YMCA'
Steps:
- Position and attach servo arms
- Cover the servo arms in Sugru
- Use Sugru to stick the motor bodies together
- Add some more Sugru for support
- Cut down the servo arms for the 'neck'
Build -- Bracket
An L-Bracket is used to connect the top and bottom sets of servos.
My go-to for light brackets is metal plumbers strap.
My go-to for light brackets is metal plumbers strap.
- Cut about 5 inches of strap
- Bend a 90deg angle towards the middle
- Layout the servos and bracket to make sure it will all fit together
- Trim or bend bracket to adjust
- Press Sugru onto both sides of the bracket
- Assemble the parts as shown in photos
Let It Dry
Lay out the robot so that the servos are in the correct positions. This is a little tricky. Check on it every 10min or so until it starts to set-up, tweak as needed.
Letting it cure overnight worked well.
Letting it cure overnight worked well.
Photo Shoot
Here is what it might look like at this point.
Wire It Up to Arduino
There are many ways you could wire the servos up to the Arduino. I'll list exactly what I did here. The important thing is that your Arduino code matches the actual pin connections.
I am using a servo adaptor board made in another instructable -- here.
It brings the digital pins on one side, then the power supply; and ground is last.
******
On the servo connectors: orange - communication; Red = power; Brown = ground.
Servo power is supplied by a 6Volt battery pack -- this should be able to power the arduino too, but for now the USB is fine.
'Negative' side of battery pack should be connected to the arduino ground.
The controller is also from an old project --- here.
Here is the wiring to the buttons on the controller and to the Arduino -
Wire the Buttons - Arduino Analog/Digital:
Blue - Up (joystick) - A0 / D14
Blue/white - Down (joystick) - A1 / D15
Orange - Left (joystick) - A2 / D16
Orange/white - Right (joystick) - A3 / D17
Green - Left button (arms) - A4 / D18
Green/White - Right button (head) -A5 / D19
Brown - Ground (Arduino) - Ground
Brown/White - 5V (Arduino) - 5V
(note: the analog pins on the Arduino can be used as digital pins)
I am using a servo adaptor board made in another instructable -- here.
It brings the digital pins on one side, then the power supply; and ground is last.
******
*This is from the Arduino code. Read 'servoHead.attach(11);' as -- connect the communication wire (orange) from the servo that controls the head to digital pin 11 on the Arduino board.
SERVO PIN ASSIGNMENTS
// attach servos //
servoHead.attach(11);
servoArmR.attach(10);
servoArmL.attach(9);
servoBend.attach(6);
servoTwist.attach(5);
// attach servos //
servoHead.attach(11);
servoArmR.attach(10);
servoArmL.attach(9);
servoBend.attach(6);
servoTwist.attach(5);
On the servo connectors: orange - communication; Red = power; Brown = ground.
Servo power is supplied by a 6Volt battery pack -- this should be able to power the arduino too, but for now the USB is fine.
'Negative' side of battery pack should be connected to the arduino ground.
The controller is also from an old project --- here.
Here is the wiring to the buttons on the controller and to the Arduino -
Wire the Buttons - Arduino Analog/Digital:
Blue - Up (joystick) - A0 / D14
Blue/white - Down (joystick) - A1 / D15
Orange - Left (joystick) - A2 / D16
Orange/white - Right (joystick) - A3 / D17
Green - Left button (arms) - A4 / D18
Green/White - Right button (head) -A5 / D19
Brown - Ground (Arduino) - Ground
Brown/White - 5V (Arduino) - 5V
(note: the analog pins on the Arduino can be used as digital pins)
Arduino Code
The Arduino code translates the button actions into the signal for the servos position.
The code is long, but I think it is readable. Nothing fancy.
It is in the attached zip file. You can either unzip this to your Arduino/sketch folder -- or unzip anywhere, open with Arduino IDE, and then you can save it to your sketch folder.
NOTE: you can also test the servos and buttons using this Firmata Test program
The code is long, but I think it is readable. Nothing fancy.
It is in the attached zip file. You can either unzip this to your Arduino/sketch folder -- or unzip anywhere, open with Arduino IDE, and then you can save it to your sketch folder.
NOTE: you can also test the servos and buttons using this Firmata Test program
Downloads
Play With It
With the Arduino code loaded onto the board -- hook up the power supplies (grounds first).
Now it should work.
Troubleshooting:
Now it should work.
Troubleshooting:
- Did you try turning it off and on again?
- Loose wires?
- Check ground and power with a meter, where ever you know that there should ground and power
- Reload the Arduino code
- If it still does not work -- or does not work the way you expected -- then take a look at all the pin assignments, make sure the pin in/outs match between the code and the actual wires.
- Errr... if it still doesn't work then something is probably wrong -- probably something simple but hidden or cryptic. When this happens try to get one motion working from begining to end. I like to copy parts of the code into another sketch and test one piece at a time.
- Good Luck!!
- Have fun!!
Videos
Here are some videos.
Video: Demo of all controls;
The Kids: first few tries --- this might only be interesting if you know us....
Video: Emma First Try
Video: Emma second try; Molly first try
Video: Molly second try
Video: Demo of all controls;
The Kids: first few tries --- this might only be interesting if you know us....
Video: Emma First Try
Video: Emma second try; Molly first try
Video: Molly second try