Spherical Quadruped Arduino Robot

18,217

280

74

Introduction: Spherical Quadruped Arduino Robot

Welcome,

Two years ago, by curiosity, I ordered an Arduino starter kit without background on electronic and code. I do not know what happened to me...

I battled during the first two weeks to simply blink a led....

Weeks and months later, projects after projects, the pleasure to play with Arduino did not fade away, quite the contrary.

I made tangible progress using internet publications, now it is time for me to share my own experience.

I am pleased to present my first Instructable.

The present Instructable describes a spherical quadruped robot. The base of the robot is a quadruped platform with two articulations by leg and all integrated into a spherical frame. On standby mode, the robot looks like a sphere and transforms itself into quadruped to move. An ultrasonic sensor is used to avoid clash during motion.

  • Weight : 440 g
  • Dimensions : Ø 130 mm / 5.12 in
  • Running Time (battery life) : 15 Min
  • Programming Language : Arduino C/C++

Step 1: Parts List

Electronics :

  • 1 x Arduino Nano
  • 1 x Servo Driver : Adafruit 16-Channel 12-bit PWM
  • 10 x Right Angle Male Header
  • 10 x Servomotor : MS-12016
  • 1 x NIMH battery pack : 4.8v - 1800 mAh
  • 1 x Ultrasonic sensor : SRF05
  • 4 x NeoPixel : Adafruit breadboard-friendly RGB Smart NeoPixel
  • 1x 470 ohm resistor (for NeoPixel)

Mechanical Parts :

  • 18 x Self-tapping Phillips screw : Ø1x6 - (Servo Arm vs Structure Parts)
  • 10 x Standard screw (Servo Arm vs Servomotor)
  • 17 x Self-tapping Phillips screw : Ø1.6x6 - (Structures fixation)
  • 2 x Self-tapping Phillips screw : Ø2x8 - (Ultrasonic Sensor fixation)
  • 20 x Head screw DIN 84 : Ø2x10 - (Servomotors fixation)
  • 5 x Self-tapping Philips screw : Ø2x8 - (Electronic boards fixation)
  • 4 x Anti-slip pad
  • 4 x Cable clamp

3D Model :

All the structural parts were designed for 3D printing.

Download the files from Thingiverse

Step 2: Doors

Functionality :

The doors hide the legs when in retracted position as well as the free space area for the legs motion. So when the robot is in standby mode with the doors closed, it looks like a sphere.

Principle :

All the doors are piloted by one servomotor placed in central position. The doors are actuated by means of an extension cross. The doors are guided with two pins engaged in rails on the body. The rails impose a double motion to the door, one for retracting inside the body and a second one for turning it.

The servomotor speed is too fast leading to sudden movement, the speed is reduced by means of loop with delays on the code.

Step 3: Legs

Functionality :

Obviously the legs are used for walking but they must also permit to raise & lower the robot.

The legs must be invisible in standby mode.

Principle :

  • Design

There are several possible concepts for the legs. Due to little space available in the retracted area (Inside the body) the solution with 2 servomotors by leg was preferred. One for the forward & backward motions and one for the up & down motions.

To compensate for the missing third servomotor (the “classic” quadruped has three servo per leg, Hip, Knee, Ankle) and to ensure the lifting motion of the robot without legs sliding, a parallelogram kinematic motion was added to the up & down servomotors i.e. two functionalities with one servomotor, the up & down motion and the legs parallelism.

In order to optimize the space, the tibia structure is part of the head shape in retracted position.

  • Electronic

Two servomotors per leg and 4 legs mean 8 servomotors, plus one for the head and one for the doors = 10 servomotors. To minimize the number of Arduino board pins used & cables, the servomotors are controlled by a servo driver with I2c interface i.e. only two pins used.

Tutorial on the Adafruit Servo Driver

  • Walk

There are several walking patterns, one leg after another, two opposite legs at the same time, four legs at the same time and several parameters like the motion amplitude & the movement speed. Conclusion : many possibilities.

This Instructable describes only one solution (it is up to you to explore others), two opposite legs at the same time. The walking diagram can be seen below.

The legs motion are not complex, there are no transformation matrices. Constant variables impose the position of each servomotors.

Special attention must be paid to the legs sliding effect, good friction between the legs and the ground is essential to ensure a regular walking. To minimize this phenomenon some anti-slip pads were added on legs bases.

Step 4: Head

Functionality :

The head supports the ultrasonic sensor and allow its rotation in order to enlarge the inspection zone.

The head is also the robot lid. The head is easily removable and give access to the electronics, Arduino connections & battery recharging.

Principle :

The shape of the servo arm is replicated on the head, so it is simply embedded on it with a minimum gap. The head turns at the same time as the servomotor. Just lift it to give access to the electronics.

The ultrasonic sensor is connected by means of JR connectors to the Arduino board to ease the dismantling.

Again, to avoid a sudden movement of the servomotor, a delay loop is added in the code to slow down the rotation.

Step 5: Lights

Functionality :

That clearly is not an essential functionality so this is why it is indispensable. Lights simply mean more fun.

Principle :

4 RGB leds are equally spaced all around the body. The lights are visible between the gap of the bottom fixed part and the top rotating part (head). The RGB leds allow to create some light animations by color changing or blinking during the robot events.

Tutorial on the Adafruit NeoPixels

Step 6: Ultrasonic Sensor

Functionality :

The ultrasonic sensor is used to check if there is an obstacle in front of the robot and to avoid it.

The sensor is also used as a switch to start and stop the robot.

Principle :

  • Obstacle Detection

The sensor emits an ultrasound which travels through the air and bounces back to the sensor if the signal meets an obstacle. The sensor provides the travel time of the signal. With the signal speed (know value) it is possible to calculate the distance to the obstacle.

If an obstacle is detected, the robot stops, turns its head to right side to measure the free distance and repeats the measurement on the left side. The robot rotates towards the side with the greatest free distance.

You can find on the diagram below the robot legs strategy for the rotation, again it is only one possibility among many others.

This Instructable does not detail the ultrasonic sensor operation, there are already so many details on the internet.

Tutorial on SRF05 Ultrasonic sensor

  • Switch

To keep a spherical aspect, there is no physical switch on the robot, so the ultrasonic sensor is used as such. If an obstacle is detected very close in front of the sensor, the robot will start or stop.

The ultrasonic sensor do not switch off electrically the robot. To shut off the power you need to lift up the lid (Head) and disconnect the battery.

Step 7: Assembly

Nothing complicated, no traps. The pictures speak for themselves.

Minor comments :

  • Do not forget to give some slack to the leg servomotor cables, the servomotors must be free to move. Same for the ultrasonic sensor cables.
  • Some cable clamps were added to ensure that all the cables are locked on the central structure of the robot and do not disturb the motions.
  • Right Angle Male Headers are used with the servo motor driver board. There is not enough space available vertically so the connections are orientated horizontally.

  • For the legs articulations, the functional gaps are 0.1mm axially & 0.1mm radially. You could obtain these values directly with the FDM 3D printers. You may need to update them depending on your own 3D printer performance/accuracy.

  • The structural parts were assembled together by means of self-tapping screws.

Step 8: Wiring

The servo driver board I2C interface impose to connect the SDA & SCL ports to A4 & A5 pins on Arduino Nano. No more constrains.

Otherwise, follow the lines.

Step 9: Source Code

The code is structured as a state machine.

The servomotors are piloted with constant variables. All these variables are in the global.h file which must be placed on the same folder than the Spherical Quadruped Robot.ino file.

All the servomotors must be calibrated and the displacement/rotation values must be redefined according to your settings.

Step 10: Conclusion

At project end, there are always some satisfying things and some things that could have been done differently. Assessing the pros and cons or the project success is not relevant. The aim is to enjoy yourself while doing it.

I truly hope this Instructable will inspire you & give you the desire to be creative.

Special thanks to the French Arduino community, the French Arduino blog from Eskimon & the Instructable publications.

Do not hesitate to contact me if you have any questions.

ENJOY !

First Time Author Contest

First Prize in the
First Time Author Contest

1 Person Made This Project!

Recommendations

  • Toys & Games Contest

    Toys & Games Contest
  • Big vs Small Challenge

    Big vs Small Challenge
  • Fix It Challenge

    Fix It Challenge

74 Comments

0
patelh13
patelh13

2 months ago

I am having trouble understanding which screws are required and the description of them are not very clear. When I search it up on the internet the random types of other screws come up but not the ones we need. Could you please add a close up image of what they look like or add a link to where you got it from.
Thanks

0
Greg06
Greg06

Reply 2 months ago

A self-tapping screw is used for soft materials (like plastic, wood). The particularity, you do not need a thread hole to use them, the screw will thread he hole during the tightening.
You could find them to this link : https://www.amazon.com/Tapping-Phillips-Metric-Ass...
It is only an exemple.
All self-tapping screw will do the job.

Self-Tapping-Screw-Phillips.jpg
0
patelh13
patelh13

Reply 8 weeks ago

Thank you for your help with the self tapping screws, however I am still struggling to find the appropriate standard and head DIN 84 screws as there are multiple different kinds of standard and head screws. Would you please send a picture or unit of measurement(cm or inches)so I can find the correct ones.
Thanks


0
Greg06
Greg06

Reply 8 weeks ago

Hello, I hope this picture will help you.

Capture.JPG
0
patelh13
patelh13

Reply 7 weeks ago

Thanks

0
crellinb
crellinb

Question 2 months ago

hello,
i'm trying to build this as a school project, are u able to link were to find the electronics and screws that you used.
thanks

0
Greg06
Greg06

Answer 2 months ago

Hi,
You have all the references to the step 1 of the
Instructable. You can find all these items easily to internet.


It is difficult to recommend a specific shop.

0
patelh13
patelh13

Reply 2 months ago

could you provide us with a link to the shop/place you got the screws from... I am having trouble finding the right screws as specified online.

0
WaiCol
WaiCol

Question 2 months ago

I too have a problem understanding the screw size and types. Across the world they may be referred to differently. Please can you add some images of the screw types, indicating their size exactly. I do not follow what your sizes mean sorry. Some images would do it please. For instance - Self-tapping Phillips screw : Ø2x8, does this mean a screw that is 2mm in diameter and 8mm long? If so, is this the one - https://www.amazon.co.uk/sourcing-map-Phillips-Sta...

0
laiae
laiae

Question 3 months ago on Step 1

Hello,
I love your design and would like to build one, but I'm trying to use less expensive materials. Could you tell me the dimensions of the servo motors, so I can try to find cheaper ones.
Than you

0
Greg06
Greg06

Answer 3 months ago

Hi, you can find below the servomotor dimensions
Width = 12 mm
Height = 23 mm
Length = 23 mm

Following the Palingenesis suggestion into the discussion forum, it is a good improvement to put a hinge at the lower end of the hip movement.

0
DaddyFixIt2
DaddyFixIt2

9 months ago

I love how compact it is, but any chance you can include a TP4056 chip in there for charging the battery? That way you never need to open it to replace/charge the battery.

I've got a ton of 18650 batteries. Can you suggest how to replace the battery with this type/size battery also?

Also, I don't seem to see an on-off button. How do you turn it off and on? even a tiny slider switch would be fantastic.

I'm always looking for projects to do with my kids using material I already have. I think i have everything for this except the servo board, your type of battery and enough screws.

0
Gc2598
Gc2598

Question 10 months ago

Is there any way that I can use regular alkaline batteries for this project?

0
ben102
ben102

Question 10 months ago

What sort of power do i need going to all the parts is it the 4 triple a batteries like in the diagram or is it 1 x NIMH battery pack : 4.8v - 1800 mAh?

0
Greg06
Greg06

Answer 10 months ago

Hi, it is a NIMH battery pack. The pictogram on the wiring diagram can be confusing, I will update it.

4
Palingenesis
Palingenesis

1 year ago

Fantastic, I love it.
You mention FDM 3D printers, is that what you used to print the parts?
And which material are they made from?
As it does not have to see further than a meter, I would be tempted to swop out the sonar for a VL53L0X.
Great work.

2
Greg06
Greg06

Reply 1 year ago

Thanks for your comment.
I used PLA material for the frame and ABS for legs parts. You right for the sonar but I will not have obtained the eyes design... :)

0
Palingenesis
Palingenesis

Reply 1 year ago

I thought it may have been the eye thing.
The reason I asked about which printer, I guess support is needed for the middle part?

0
Greg06
Greg06

Reply 1 year ago

Yes, I used a double heads printer, with soluble support material. But it is easily to split the part and glue the different pieces.

0
Palingenesis
Palingenesis

Reply 1 year ago

Ah, that explains a lot of my queries :)
I have decided to redraw some of the parts, so I can print something similar that my printer can handle easier.
I am thinking of adding Bluetooth as well, so I need to make room for that module s well. I still may find the top dome a little challenging without support. (I may make a false piece to print over)

Thank you for the reply, I need to look into this 2 heads, one for a soluble support.
This is new to me. I though it was just for two colours. It makes me want to upgrade.