Everyone who's seen or heard of a Tachikoma wants a Tachikoma. They're a prime example of a robot which isn't trying to mimic a human to achieve complex tasks. They are super agile, can bounce off of buildings and pack impressive weaponry.
So if you can't get one, why not make one?
This is my rudimentary Tachikoma rendition using an Intel Edison as the main controller and a whole bunch of servos (whole bunch = 12). My main goal was to make a robot that can walk as well as roll based on what the situation demanded. To reduce the number of servos, due to weight and cost, the legs are 2DOF with a continuos rotation servo at the bottom for wheeled movement. I decided to use a servo instead of a DC motor cause you don't need additional drive circuitry and a DC motor with all it's gearing and power requirements would just add to the weight of the leg, making it impossible to lift.
Most of the parts are 3D printed and I stuck to the simplest design possible to reduce the complexity of the prints and to be able to make spares in case of failures. I am deeply indebted to the GeorgiaTech Invention Studio and all it's PIs for helping me with the 3D printing as this was my first attempt at anything 3D printed. Without the vast resources of the Invention Studio, I would never have been able to complete this in my wildest dreams. Many thanks!
Step 1: Parts Required
1 X Intel Edison
1 X Intel Edison Mini Breakout board
1 X 3A Hobbywing BEC for 3-6s LiPo
1 X 3s LiPo (only for testing, will use a 2s LiPo for the final design as a 3s LiPo is pointless and heavy)
8 X MG995 Emax Metal Gear servos
4 X Generic full size continuous rotation servo
4 X Servo wheels
1 X I2C 16 channel servo driver
Berg Strips or male headers in the hundreds
My designs have been adapted from some standard designs on Thingiverse. I will post the links to those designs below. I modified and integrated different designs using Sketchup and used a rotary tool for final modifications to ensure a good fit.
8 X Leg joints
8 X Servo holders
2 X 2 servo brackets
2 X Mounting Plate
1 X DJI 450 bottom plate
2 X standard size pencils
Miscellaneous mounting hardware
- A Dremel or some kind of rotary tool
- Soldering Iron
- Hot glue gun and lots of hot glue sticks
- A laptop or a computer with Windows (for installing the Intel drivers and configuring the Edison)
- Safety glasses (Google throws them at you at any Maker event, go get some and give 'em away to anyone and everyone)
- Wire strippers
STL files to build your own or to modify are attached in the next step
Step 2: 3D Printing
3D printing is both a boon and the bane of my existence. As this was my first time 3D printing anything, I had to go through a lot of iterations before the parts came out exactly as I wanted. Add to that, the prints themselves kept failing due to the finickiness of the printers. But, thanks to the PIs at the Invention Studio, I was able to get all the parts done and then some.
The parts were printed on Afinia and UP 3D printers. The were solid models with the print quality set to normal, with the highest fill level. The prints for the leg joints took about 4-5 hours for a set of 2. The servo holders were faster, about and hour for 4 of them. The 2 servo holders took about 3 hours for both of them as I set the print quality to fine, they are small but need to take the joint forces of two servos.
The STL files are attached.
Step 3: Building the Legs
On to the meat and bones of the project, the legs. Each leg consists of three servos, two for the leg movement and one for the wheel, and two leg joints Each servo needs to sit inside the leg joint and will use a servo holder to ensure that it can rotate smoothly, as can be seen in the pictures. The holes in the joints are too small to take the servo holder and the servo arm, hence they need to be widened using a rotary tool. The servos also need to be slightly modified as the screw brackets in the side prevent them from fitting in the joints. I chopped them off with a pair of cutting pliers and then sanded them smooth with the sanding head.
Before starting, ALWAYS CENTER YOUR SERVOS! I used an RC receiver to ensure they were centered. If you don't center them, the range of movement will be irregular as they will be able to rotate to different extents in each direction and you might not get a proper walking motion. The continuous rotation servos need not be centered, cause they don't have a center (ba-dum-tiss).
The widening needs to be done incrementally, you don't want the joint to be too loose or too tight. I used tool heads shown in the pictures successively until they parts fit. Also, don't run the tool at too high a speed as the heat generated may melt the plastic and cause it to deform. Once you attach the 'knee' joint, i.e. the servo joint which gives the up and down motion, do not attach the 'hip' joint as it needs to be passed through the 2 servo bracket and then attached to the joint. The servo arms are hooked up to the holes in the joints using the screws that came with the servo. The bottom of the servo holder and the servos themselves are hot glued to the plastic of the joints. The hot glue forms a surprisingly good bond with the plastic.
When you're done with the two arms individually, modify the continuous rotation servo and insert it into the bottom servo bracket at the end of the knee joint, with the gear end towards the bottom. The wheels will be attached at a later stage.
When both the legs are done, test it to ensure they move as expected. For testing, I hooked up an RC receiver to the servos so that each of the control inputs maps to one servo. I powered the whole setup using the BEC and the LiPo and tested that the leg moves smoothly as seen in the video.
Finally I attached both the legs to the 2 servo bracket to get one unit as seen in the picture. Hot glue to the rescue again.
The above procedure needs to be followed again to get another set of two legs.
Step 4: Complete Assembly of Platform
The base subframe needs to be built first. The two base plates are connected using the two pencils as shown in the picture. The pencils are aligned to ensure they're parallel, and sitting snugly in the slots for them, and then glued using any cyanoacrylate based superglue. Wait for it to dry and then check if it's set and the frame is stiff to ensure it doesn't twist or warp. Next glue the DJI center plate to the pencils using superglue again. Put a thin layer of glue on the pencils, line the plate up and then press lightly. Let it set for 5 mins and then test it again to see if the bond is strong. Voile, you have a base! The base subframe can be made however you like it, but I was trying to reduce the number of new parts that I have to completely design. My main focus was making the legs and the frame took a backseat. Hence, my frame has been cobbled together with what I had lying around.
The legs are then attached to the frame using a combination of 3M foam adhesive tape (industrial strength, used for indoor construction), cardboard and zip ties. I used double sided tape to stick the leg frame to the base plate and then strengthened it using zipties. I chose not to use a permanent adhesive, like superglue, as I want to be able to dismantle the legs and the frame if I want to transport the robot. It is critical that everything lines up before tying all the parts together. In my design for the base plate, the back support ended up being to wide, hence the legs couldn't pivot. I had to use the cutting disc of the rotary tool to chop a bit of the end off to free up the legs.
So now you have a base, with a huge area to add your electronics and sensors! The DJI base plate even has wiring pads to route power and ground through the plate so that the wiring becomes simpler and less cluttered. The I2C servo driver will be attached to the underside of the plate to allow connections to the servos easily. When you need to connect the servos, you just flip the whole bot upside down and wire them up.
Step 5: Setting Up the Intel Edison
I used this guide for setting up the Intel Edison for the first time.
There is also a wealth of information on how to setup different aspects of the Edison right here on Instructables! A good compilation of all things Intel is located here:
I used the Arduino breakout board when I was getting started but later switched over to the mini breakout board as it's smaller and can be powered off of a 1 cell LiPo.
All the controlling code is written in Python using the MRAA interface library which gives you access to all the pins and communication protocols, mainly the I2C which I am using in this project.
The Github repository for the MRAA is located here https://github.com/intel-iot-devkit/mraa
Step 6: Wiring
The servos need to all be connected to the I2C driver, which is attached to the underside of the base. Each leg has three servos, two for the leg movement and one for the rolling movement. I decided to group the pins by legs and wheels. The "hip" servos are all connected first followed by the knee "servos".The wires are threaded through the rectangular holes in the base plate and then connected to the driver, so that they are grouped according to the leg and helps tidy up the wiring a little. I didn't want to make them too tight as then it would restrict the movement of the legs. The wheel servos are connected last. For a proper ordering of pins, the code should help. The numbering given to the servo pins matches their order of connections. The servos can be connected in any order but grouping them helps make them easier to manipulate in code.
The I2c driver is powered directly from the BEC through it's own power connector. The Edison does not provide power to drive the servos, only to power the driver itself.
After all the servos were plugged in and the BEC connected to the driver, I attached the driver and the BEC to the underside of the robot using the double sided tape.
I then connected the I2C, Vcc and ground ports to the corresponding ports of the Edison Arduino Breakout. This was for testing only, as I will thread the wires through the base while attaching the breakout board to the top of the robot. The SDA pin goes to pin A4, SCL to A5, Vcc to 5V or 3.3V and Gnd to Gnd.
I then attached the Edison to the top of the robot after flipping it the right way up.
I plan to power the Edison with a 5V line drawn from the BEC but for testing I just powered it off of the wall wart or USB.
Step 7: Code and Stuff
The initial plan was to use the Intel mini breakout board as it was smaller but the MRAA library for I2C proved problematic, hence the Arduino breakout ended up being used instead. The code was just arduino code which made use of the Adafruit 16 channel PWM servo driver library to control the servos
A simple web server hosted on the edison is used to control the Tachikoma. The simple webpage can be opened on any computer and mobile phone and will present 4 buttons that will allow us to control simple backwards and forwards motion of the robot.
The main functions that control this motion are : forwardStep(), backwardStep(), forward() and backward(). The clockwise() and antickclockwise() functions are written but haven't been used in the control function. They simply engage two of the continuous rotation servos to rotate in the forward direction while the other two rotate backward. Alternatively, you can use the legs to rotate, where you step each of the legs in sequence in one direction and then rotate the base as a whole to reorient itself in the required direction, by only moving the "hip" joints.
The ForwardStep and BackwardStep is completed by lifting each leg one at a time and moving it forward/backward, and then using all the 4 "hip" joints together to move the body forward/backward and the 4 "knee" joints to lift it back into its original position.
The forward() and backward() function allow us to control the continuous rotation servos to roll the Tachikoma forward and backward.
A lot of this code has not been tested as the robot would become unstable with raising one leg and this is something that needs looking into and we also had an issue with the I2C bus on the Edison which was being used. The I2C port which was broken out on the Arduino breakout board was not registering any devices connected to it (I2C_6) but when we tested with the mini-breakout board, the driver showed up correctly when the i2cdetect command was run in the command line.
For more info on debugging I2C on Edison, there are a lot of good resources here:
Alternatively moving two legs diagonally opposite to each other will allow for a more balanced movement. There is still a lot to do with regard to getting a full range of motion and to use the Legs and the drive train in tandem to extend the mobility of the Tachikoma.
Step 8: So Long and Thanks for All the Fis.....Edisons
In the end, I wasn't able to make it move as I wanted it to, hence no video :(
But I will continue working on this and adapting the design as I go along. One problem that I encountered was the centering of the servos. They never seemed to return to their original positions as coded in the program. With the RC controller, I manually set the trims or gave a little opposite control to center them, but when they were controlled programmatically, that never happened!
The solution to this might be using inverse kinematics to calculate exactly what the position of the leg was at a given movement and give control signals based on that. More mechanical knowledge is required is required.
Also, the weight and size of the final robot proved detrimental to it's movement. The whole body used to flex when one leg was lifted. Hence, while placing the leg back down, it wouldn't be able to lift the robot back up. The whole body should have been level while the leg was moving. The fix for this is pretty simple, I'm going to reduce the height of the legs and and make the body more compact. So the two or three legs on the floor should be able to support it when a leg is in motion.
Finally, I want to incorporate some hybrid movement mechanisms, such as:
1. Add a bunch of sensors like a gyro, accelerometer and infrared to give some orientation awareness and obstacle avoidance capability. The orientation awareness should help in performing complex motions.
2. Moving in a spiral, kind of like a cool handbrake 180-degree maneuver in a car. The robot should be able to continue moving forward while it rotates and points in the opposite direction.
3. A 'banking' kind of movement, where all the legs alter their angle of tilt at the same time and the robot banks. This might help when it's travelling on a sloped surface.
4. A lowering movement, where all the legs lower to allow the robot raise or lower and look up or down by changing the height of the front or the back.
5. Interface it to a PS2/PS3 controller so that all these movements can be mapped to different buttons/analog joysticks to give the user a full range of motion.
I will also try to work on the MRAA for the I2C so that I will be able to use the mini-breakout board, thereby reducing the need for space on the robot.
All in all, I now have a almost-working platform for future robotic endeavors and got a whole load of experience in 3D printing, CAD, the Edison platform and why cheap servos suck :P (all muscle, no finesse).
It ended up looking like a prototype for a future/past MARS rover rather than a cute and friendly/deadly Tachikoma but I have no problem with that :)
Thank you instructables for liking my idea and giving me an Edison and other sensors and devices to work with! Thanks also to GeorgiaTech Invention studio to live of their 3D printers for weeks on end and letting me fail multiple times giving rise to a load of weirdly deformed plastic parts!
Thanks to SM for helping me with the build, especially with the code and parts acquiring. Lots of brainstorming and rubber-duckying is attributed to him!
Also thanks to AR & AR for helping out with the various part modifications and random poking around!
Hope you like my project! If you do like it, please vote for me in the Intel IoT Invitational contest!
The Net is truly vast and infinite! (hint hint)