Intro!
What's more fun than a six-legged robot, walking around, doing your bidding? Maybe...if you have it do your bidding from anywhere you have web access? Yeah! Let's get started!
This is what you'll make
Here's the Walkiebot running its commands sent from Pinoccio HQ. You could control this guy anywhere you have access to a web browser.
Let's solder up the Walkiebot protoboard
First you'll want to cut or snap the 0.1" header pins three pins at a time. You'll want four of these three-pin headers. Solder them at the wide end of the prototype board, like such:
Next, solder on the SparkFun 5V boost converter on the far header.
Now turn the prototype board over
Once the board is turned over, solder the 5V boost converter's ground pin to the three headers closest to the edge. This is a bottom view illustration:
Also solder this ground pin to the GND pad on the bottom of the prototype backpack:
Next, solder the boost converter's 5V pin to the middle pin of the three headers:
And solder the boost converter's VIN pin to the VBAT pad on the bottom of the prototype backpack:
Lastly, solder up the three control signals to each of the three header pins. D3 goes to the signal pin on the bottom header, D4 goes to the signal pin on the middle header, and D5 goes to the signal pin on the top header:
Now solder on the prototype backpack headers and attach your Scout to the backpack:
I cut the black plastic off of the headers with some wire cutters, as I wanted the Scout to be tucked up under the servos. You can do the same, or leave them there--up to you!
Tie-wrap together the servos
For this bot, we want two servos with their arms on the top of the bot, with one servo's arm facing forward:
Take a tie-wrap and wrap it around the servos horizontally. Then take another tie-wrap and wrap it around the servos vertically:
Now trim the two tabs on the front side of the two outer servos. These tabs will get in the way of our middle legs later:
Lastly, attach the three servo plugs to the three servo headers you soldered onto the prototype board. Be sure to get the polarity right: the brown ground wire should be towards the back of the board and yellow should be closest to the servos themselves:
Attach your Scout to the servos
You can attach the Scout/protoboard to the servo body a couple of different ways. You can use dual-lock or velcro. You could use double-stick tape or foam-tape, or you could use additional tie-wraps.
It's up to you, but somehow attach the Scout and protoboard to the bottom of the servos, with the Scout nose facing forward:
Now let's make and attach the legs
This is the fun part--where you get to bend the legs and make them any size or length you want.
Four Corner Legs:
First, you'll want to bend four corner legs. Cut four pieces of wire about 8" long. Take these and bend the wire at a 45 degree angle about 2" from one end.
At the end of the short side, bend a short "U" at the edge.
Take the X servo control arm and cut two sides off to leave only two arms, 90 degrees from each other:
(Note, some versions of the Turnigy servos don't come with X control arms, but only long main arms with short side arms. That's okay, just cut the remaining long arm down to match the short one.)
Now slide the wire into the hole of the control arm of one servo. You may need to drill out the hole a bit based on how thick your baling wire is.
Work the other side of the "U" into the remaining hole and then once set, crimp down the wire with some pliers to lock it in place. You can also wrap some sugru around this joint if you want to make it look better, and don't mind letting it cure overnight.
Two Middle Legs:
Now cut two more pieces of wire, about 6" long each. Take these and bend the wire at a 90 degree angle about 2" from one end, then 90 degrees back again, and down 45 degrees.
At the end of the short side, bend a short "U" at the edge.
Feed each of these legs into the long control arm for the middle servo. Here's what it looks like attached to the servo:
Work the other side of the "U" into the remaining hole and then once set, crimp down the wire with some pliers to lock it in place. As before, you can use Sugru here if you don't mind waiting for it to cure. Also, make sure it doesn't rub against the outer servos when the servo control arm turns.
Flash your Scout with a servo-friendly Bootstrap sketch
In order to control servos, you'll need to flash a custom Walkie sketch onto your Pinoccio Scout.
It's quite simple. just download this library and put it in your Arduino IDE sketchbook's library directory. Then download the Walkiebot.zip file below and flash it to your Scout.
If you don't have the Arduino IDE set up to flash Scouts, please take a look here, then try flashing the Walkiebot.ino sketch.
Walkiebot Sketch and ScoutScript commands
Load the code and center the servos
Now it's time to load up the code for Walkiebot. There are just a few ScoutScript commands to get the bot to walk correctly. (These can also be found in the Walkiebot.ss file in the zip file you downloaded above.)
function startup { wb.centerall; }; function stepforward { wb.stepforward }; function stepbackward { wb.stepbackward }; function walkforward { stop 0; run stepforward, 600 }; function walkbackward { stop 0; run stepbackward, 600 }; function stopwalking { stop 0; wb.centerall };
Once these commands are entered and saved via the IDE, we can center the servos and finalize the leg attachment. While the Pinoccio's Serial Monitor is still open, run the following commands:
wb.centercenter; wb.leftcenter; wb.rightcenter;
This will center each servo so we can attach the legs at the right servo position. Go ahead and attach all three control arms to the servos--making sure you get them as centered as possible.
Final calibration
Calibration
So now you should have all the legs attached to servo control arms, and all servo control arms attached to the Walkiebot. If you do, congratulations! You've completed the most difficult part of this project!
Now it's just fine-tuning and polish.
First, with all the servos having been centered, set the bot down on a flat surface. All six legs should be touching the surface. If they are not, slightly bend the legs until all six legs are touching the table evenly.
Note: I already added the Sugru feet onto the legs at this point, you can add them whenever, but it takes overnight to cure, so do it before you go to bed, after you're done playing with the bot!
You may find you need to slightly trim the length of one or more legs. This is fine, but remember that the larger the difference in leg lengths, the more your Walkiebot will drift when it walks, instead of walking in a straight line.
Drive Walkiebot!
Now you're ready to walk!
If your Scout is already a part of your troop, and you can see it in your https://hq.pinocc.io dashboard, you're ready to go! If not, add this Scout to your troop at Pinoccio HQ.
To walk forward:
walkforward
To walk backward:
walkbackward
And to stop walking:
stopwalking
Comments