Cogsy the 1 Servo Omnidirectional Biped Robot for 15 $, 3D Printed, Arduino
by Sebastian Coddington in Circuits > Robots
2975 Views, 28 Favorites, 0 Comments
Cogsy the 1 Servo Omnidirectional Biped Robot for 15 $, 3D Printed, Arduino
So I was wondering what the most inexpensive design of a biped robot could be.
I knew that in order to keep the design cost down to a minimum the robot would have to use as fewer servos as possible and that got me thinking is it possible to power a bipedal robot with the use of only one servo or motor?
After many hours of research on the internet I came to the conclusion that 2 servos was pretty much the set minimum to build a functional omnidirectional biped robot and the only 1 servo biped robots that I found could only walk in a straight line, which I would say doesn't technically count as a robot as it can't navigate autonomously.
However I was convinced that there must be a way of using just one servo for omnidirectional motion so after days of failed concept designs and prototypes I finally came up with a functional prototype that actually worked!
So as a robot what can Cogsy do exactly?
Well with his built in digital compass and ultrasonic sensor he is actually quite capable of fully autonomous navigation and obstacle avoidance as of right now I have programmed Cogsy with a sprint mode in which he keeps true to a specific heading as he walks forward using the digital compass, this is quite useful for the Toulouse Robot Race that I will be taking place in next year the code for Sprint mode will be included in this instructable and hopefully I will have time to write more functions for Cogsy by using data from the Ultrasonic sensor to enable Cogsy to avoid obstacles as he tries to get from a specific point A to point B on a track
How does Cogsy work exactly?
Although Cogsy only uses one servo to move he actually consists of many cogs (hence the name lol) that interconnect to make up 4 degrees of freedom: one degree of freedom in the ankles of each leg enabling him to shift his weight from one foot to the other and one degree of freedom in the feet of each leg enabling him to rotate his body forwards. The servomotor that powers the robot is a continuous rotation servo that can only rotate clockwise or counterclockwise and has no memory of which angle it is at. In order to further understand the way this robot walks let me take you through the step by step process and lets first imagine how this robot would walk forwards if it had a servo motor in each of its degrees of freedom:
- First of all the ankles motors would be activated briefly to tilt the robot to one side
- Then the foot motors would rotate about 45 degrees to pivot the robot forward on the foot that the ankles are tilted on
- Then the the ankles motors would be activated again briefly to tilt the robot to the other side
- Then the foot motors would rotate about 45 degrees to pivot the robot forward on the foot that the ankles are tilted on
this is basically how the robot achieves forward bipedal motion and if we were to vary the foot motors rotational angle this will enable the robot to turn left or right
Hopefully you got me this far, but that still doesn't explain how the robot activates all these degrees of freedom at the appropriate time with the use of only one servo, well, this is where the cogs come in to play they link all four degrees of freedom together but favoritise as would a differential on a car the degree of freedom with the least resistance thus enabling the ankles to pivot the body on to one of the feet before the feet start rotating when the ankles have reached there maximum tilt angle the path of least resistance become the feet which rotates the body of the robot forwards and when the motor turns in the opposite direction the path of least resistance becomes the ankles again until they reach there opposite maximum tilt angle on the opposite side after which the feet become the path of least resistance again and rotate the robot forwards on the other foot
Trust me the mechanism is quite simple although I don't think I did the best job at explaining it make sure you have a look at the video to further understand the way the robot walks.
However there is a down side to Cogsy unfortunately :( although I miraculously managed to find a mechanism that enables Cogsy to be an omnidirectional robot this mechanism does not allow Cogsy to walk backwards only forwards left and right this will mean that during any autonomous walking Cogsy will have no margin for error as he can not go back on his steps to avoid obstacles.
Supplies
I managed to build my robot using mostly components from an Elegoo Super Starter kit (link here)
so if you have one of these kits your already set with most of the required electronics
here is a link for all the individual electronic components needed to build this robot:
You will find two different options for where to buy the electronics, the cheap and cheerful option and the Quality fast delivery option.
If I were you and you don't mind waiting I would cheap out on everything and only buy the rechargeable 9V batteries instead of the Alkaline ones as they last much longer.
Cheap and cheerful:
1x Arduino UNO (link here) 3.50 $
1x Ultrasonic sensor HC-SR04 (link here) 1.75 $
1x Digital compass QMC5883l (link here) 2.50 $
3x male to male 20cm jumper cables (link here) 1.25 $
8x male to female 20cm jumper cables (link here) 1.25 $
1x Continuous rotation 360 servo TowerPro MG90S (link here) 2.75 $
1x 9V Alkaline battery (link here) 2.00 $
1x 9V battery connector jack (link here)1.25 $
6x Screws 2mm x 8mm (link here)
TOTAL: 16.25 $
Quality Fast delivery:
1x Arduino UNO (link here)
1x Ultrasonic sensor HC-SR04 (link here)
1x Digital compass QMC5883l (link here)
3x male to male and 8x male to female 20cm jumper cables (link here)
1x Continuous rotation 360 servo TowerPro MG90S (link here)
1x 9V rechargeable lithium battery (link here)
1x 9V battery connector jack (link here)
6x Screws 2mm x 8mm (link here)
PLASTICS:
The parts can be printed in PLA or PETG or ABS.
!! Please note a 250g spool is more than enough to print 1 Robot !!
3D PRINTER:
Minimum build platform required: L150mm x W150mm x H50mm
Any 3d printer will do.
I personally printed the parts on the Creality Ender 3 which is a low cost 3D printer under 200$ The prints turned out perfectly.
3D Printing the Parts
So now it's time for Printing...Yeay!
I Meticulously designed all of the parts to be 3D printed without any support materials required while printing.
All the parts are available to download on thingiverse (link here)
All the parts have been test printed on the Creality Ender 3:
Build Volume requirements: L 150mm x W 150mm x H 50mm
Material: PETG
Layer Height: 0.3mm
Infill: 15%
Nozzle diameter: 0.4mm
The parts list is as follows:
- 1x MAIN BODY
- 1x HEAD
- 1x BATTERY HOLDER
- 1x 8.5° WEDGE
- 1x LEG
- 1x LEG (Mirror)
- 2x LEG SUPPORT
- 2x FOOT 75MM
- 7x COG SMALL CIRCULAR
- 1x COG SMALL SQUARE
- 2x COG SMALL SQUARE FOOT
- 1x COG BIG SQUARE
- 1x COG DUAL LEFT
- 1x COG DUAL RIGHT
- 1x COG MG90S SERVO
- 2x SQUARE PIN FOOT
- 1x SQUARE PIN
- 1x CIRCULAR PIN SMALL
- 2x CIRCULAR PIN DUAL
- 4x CIRCULAR PIN LEG
- 14x CIRCULAR CLIPS
The files are available as individual parts and group parts. For fast printing simply print every single GROUP.stl file once.
Programming Cogsy
Cogsy uses C++ programming in order to function.
In order to upload programs to Cogsy we will be using Arduino IDE along with a couple other libraries that need to be installed in the Arduino IDE.
- Install Arduino IDE on to your computer: Arduino IDE (link here)
In order to install the libraries in to Arduino IDE you must do the following with all the libraries in the links below:
- Click on the links below (this will take you to the libraries GitHub page)
- Click the green button that says Code
- Click download ZIP (the download should start in your web browser)
- Open the downloaded library folder
- Unzip the downloaded library folder
- Copy the unzipped library folder
- Paste the unzipped library folder in to the Arduino library folder (C:\Documents\Arduino\libraries)
Libraries:
- DF Robot QMC5883L library (link here)
- NewPing library (link here)
And there we have it you should be all ready to go In order to make sure you have correctly set up Arduino IDE follow the following steps
- Download the desired Arduino Code below (CogsyAutonomousSprintMode.ino)
- Open it in Arduino IDE
- Select Tools:
- Select Board:
- Select Arduino UNO
- Click the Verify button (Tick button) in the left upper corner of Arduino IDE
If all goes well you should get a message at the bottom that says Done compiling.
Now it's time to upload the code to Cogsy's brain the Arduino UNO.
- Plug the Arduino UNO in to your computer via USB cable
- Click the upload button (Right arrow button)
If all goes well you should get a message at the bottom that says Done Uploading.
Downloads
Assembling Cogsy
All the assembly steps are depicted in the assembly video above:
- Secure the Arduino UNO to the MAIN BODY with 2 screws diagonally
- Secure the MG90S servo to the MAIN BODY with 2 screws
- Secure the Digital Compass to the MAIN BODY with 2 screws
- Insert the CIRCULAR PIN SMALL into the MAIN BODY
- Insert a COG SMALL CIRCULAR over the CIRCULAR PIN SMALL
- Insert the SQUARE PIN into the COG BIG SQUARE
- Insert the SQUARE PIN into the MAIN BODY
- Insert the COG SMALL SQUARE over the SQUARE PIN
- Insert the 8.5° WEDGE over both the SQUARE PIN and the CIRCULAR PIN SMALL
- Secure all in place with 2 CIRCULAR CLIPS
- Insert CIRCULAR PIN DUAL into COG DUAL LEFT
- Insert CIRCULAR PIN DUAL into the left side hole of the MAIN BODY
- Secure in place with 1 CIRCULAR CLIP
- Insert the other CIRCULAR PIN DUAL into COG DUAL RIGHT
- Insert this other CIRCULAR PIN DUAL into the right side hole of the MAIN BODY
- Secure in place with 1 CIRCULAR CLIP
- Secure the dual servo arm into the COG MG90S SERVO
- Secure the dual servo arm on to the MG90S servo with the small metal threaded screw
- Clip the ULTRASONIC SENSOR into the HEAD
- Clip the HEAD into the MAIN BODY
- Clip the BATTERY HOLDER into the MAIN BODY
- Insert CIRCULAR PIN LEG into one of the two designated holes in the LEG
- Insert COG SMALL CIRCULAR over the other side of the CIRCULAR PIN LEG
- Secure in place with 1 CIRCULAR CLIP
- Insert another CIRCULAR PIN LEG into the other of the two designated holes in the LEG
- Insert COG SMALL CIRCULAR over the other side of the CIRCULAR PIN LEG
- Secure in place with 1 CIRCULAR CLIP
- Insert one of the SQUARE PIN FOOT in to the bottom of one of the FOOT
- Insert one of the COG SMALL SQUARE FOOT over the SQUARE PIN FOOT
- Insert the SQUARE PIN FOOT in to the remaining hole in the LEG
- Secure in place with 1 CIRCULAR CLIP
- Repeat last 10 Steps for the other leg and foot
- Slide the pin on the RIGHT LEG through the bottom right hole in 8.5° WEDGE
- Place a COG SMALL CIRCULAR between bottom right hole in 8.5°WEDGE and bottom right hole in MAIN BODY
- Continue sliding the RIGHT LEG pin through the COG SMALL CIRCULAR and the MAIN BODY hole
- Slide a LEG SUPPORT over the back of the pin on the RIGHT LEG
- Secure in place with 2 CIRCULAR CLIPS
- Repeat last 5 Steps for the other leg and foot
Wiring Cogsy
All the wiring instructions are depicted in the image above:
- Wire up the servo to the arduino UNO using the 20cm male to male dupont cables
- Wire up the Magnetometer and Ultrasonic sensor to the arduino UNO using the 20cm female to male dupont cables
- Make sure to check the wiring is correct before proceeding to the next step
Using Cogsy
The CogsyAutonomousSprintMode program enables Cogsy to perform a 20 second dash in a straight line
In order to do this Cogsy uses the digital compass to maintain the correct heading.
In order to use Cogsy with this program you must do the following:
- Plug the battery jack into the robot
- Turn the robot around in all directions to calibrate the digital compass you have 10 seconds to do so
- Position Cogsy in the desired heading after 5 more seconds Cogsy will start the race
And there we have it hopefully some more programs will be available soon.
I'm working on a few that allow for autonomous obstacle avoidance
If you have any of your own ideas please let me know it would be fun to see how far we can push this robot!