## Introduction: 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:

1. First of all the ankles motors would be activated briefly to tilt the robot to one side
2. Then the foot motors would rotate about 45 degrees to pivot the robot forward on the foot that the ankles are tilted on
3. Then the the ankles motors would be activated again briefly to tilt the robot to the other side
4. 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 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.

## Step 1: 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 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 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.

## Step 2: 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:

1. Click on the links below (this will take you to the libraries GitHub page)
2. Click the green button that says Code
6. Copy the unzipped library folder
7. Paste the unzipped library folder in to the Arduino library folder (C:\Documents\Arduino\libraries)

Libraries:

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

2. Open it in Arduino IDE
3. Select Tools:
4. Select Board:
5. Select Arduino UNO
6. 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.

1. Plug the Arduino UNO in to your computer via USB cable
2. Click the upload button (Right arrow button)

If all goes well you should get a message at the bottom that says Done Uploading.

## Step 3: Assembling Cogsy

All the assembly steps are depicted in the assembly video above:

1. Secure the Arduino UNO to the MAIN BODY with 2 screws diagonally
2. Secure the MG90S servo to the MAIN BODY with 2 screws
3. Secure the Digital Compass to the MAIN BODY with 2 screws
4. Insert the CIRCULAR PIN SMALL into the MAIN BODY
5. Insert a COG SMALL CIRCULAR over the CIRCULAR PIN SMALL
6. Insert the SQUARE PIN into the COG BIG SQUARE
7. Insert the SQUARE PIN into the MAIN BODY
8. Insert the COG SMALL SQUARE over the SQUARE PIN
9. Insert the 8.5° WEDGE over both the SQUARE PIN and the CIRCULAR PIN SMALL
10. Secure all in place with 2 CIRCULAR CLIPS
11. Insert CIRCULAR PIN DUAL into COG DUAL LEFT
12. Insert CIRCULAR PIN DUAL into the left side hole of the MAIN BODY
13. Secure in place with 1 CIRCULAR CLIP
14. Insert the other CIRCULAR PIN DUAL into COG DUAL RIGHT
15. Insert this other CIRCULAR PIN DUAL into the right side hole of the MAIN BODY
16. Secure in place with 1 CIRCULAR CLIP
17. Secure the dual servo arm into the COG MG90S SERVO
18. Secure the dual servo arm on to the MG90S servo with the small metal threaded screw
19. Clip the ULTRASONIC SENSOR into the HEAD
20. Clip the HEAD into the MAIN BODY
21. Clip the BATTERY HOLDER into the MAIN BODY
22. Insert CIRCULAR PIN LEG into one of the two designated holes in the LEG
23. Insert COG SMALL CIRCULAR over the other side of the CIRCULAR PIN LEG
24. Secure in place with 1 CIRCULAR CLIP
25. Insert another CIRCULAR PIN LEG into the other of the two designated holes in the LEG
26. Insert COG SMALL CIRCULAR over the other side of the CIRCULAR PIN LEG
27. Secure in place with 1 CIRCULAR CLIP
28. Insert one of the SQUARE PIN FOOT in to the bottom of one of the FOOT
29. Insert one of the COG SMALL SQUARE FOOT over the SQUARE PIN FOOT
30. Insert the SQUARE PIN FOOT in to the remaining hole in the LEG
31. Secure in place with 1 CIRCULAR CLIP
32. Repeat last 10 Steps for the other leg and foot
33. Slide the pin on the RIGHT LEG through the bottom right hole in 8.5° WEDGE
34. Place a COG SMALL CIRCULAR between bottom right hole in 8.5°WEDGE and bottom right hole in MAIN BODY
35. Continue sliding the RIGHT LEG pin through the COG SMALL CIRCULAR and the MAIN BODY hole
36. Slide a LEG SUPPORT over the back of the pin on the RIGHT LEG
37. Secure in place with 2 CIRCULAR CLIPS
38. Repeat last 5 Steps for the other leg and foot

## Step 4: Wiring Cogsy

All the wiring instructions are depicted in the image above:

1. Wire up the servo to the arduino UNO using the 20cm male to male dupont cables
2. Wire up the Magnetometer and Ultrasonic sensor to the arduino UNO using the 20cm female to male dupont cables
3. Make sure to check the wiring is correct before proceeding to the next step

## Step 5: 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:

1. Plug the battery jack into the robot
2. Turn the robot around in all directions to calibrate the digital compass you have 10 seconds to do so
3. 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!

Participated in the
1000th Contest