Let's Make Robots!

OddBot's Quad Bot (a Spider with 4 legs)

Used to demonstrate to students how easily a robot can be built.
AttachmentSize
Quadruped2.zip1.19 KB

This is a very simple quad bot I built to demonstrate to students how easily you can built a walking robot. DAGU is planning to hold a class on robotics for young students at the GuangZhou Science Center. Using body segments from my caterpillar robot I made some simple robot legs.

The caterpillar segments are great as they have mounting positions for the servos and 3mm LEDs plus screw holes that you can thread wires or small cable ties through.

The first video shows the robot using a gait for rough surfaces. The robot shifts it's weight from side to side and balances on 3 legs while it raises a 4th leg to move forward.

The second video show the robot using a much faster gait for smooth surfaces. In this case diagonally opposite legs are raise and moved either forward or backward depending on the direction. As the robot is trying to balance on only 2 legs one of the raised feet may still drag on the ground which is why this is only suitable for smooth surfaces. I have attached the code used in this video.

Click on the photos for full sized images:

For this project I am using a prototype of my Spider robot controller. This is basically a clone of an Arduino Mega designed specifically for running a large number of servos and sensors. As such it includes a 3A switchmode power supply and all 70 I/O pins are terminated with a 3pin, servo compatible male header as well as a female header for jumper wires. The spacing of the female headers allows custom shields to be made from a standard prototype PCB.

To drive the LEDs on the legs I could have connected them to the controller. This would have the advantage of being able to program different patterns and adjust the speed but in this case the LEDs are mainly for decoration and to ensure no one accidently stands on the robot. For this reason I decided to use a very simple LED chaser circuit.This simplifies my code.

This is surplus stock from a toy factory which I have soldered a male header pin so it can be used with a breadboard.With the header pin soldered on it was very easy to connect to the Spider controller for power using some female to female jumper wires. I used a cable tie to hold it in place but the circuit is so small a bit of double sided tape or hot glue would have worked fine.

The hardest part now is developing a good walking motion. The videos show my first attempt where the robot balances on three legs while it lifts a fourth. Although this worked it was a non-symetrical gait that causes the robot to drift to one side. I am now working on a new, symetrical gait and in the near future I want to add pressure sensors to the feet so I can teach it to climb over rough ground.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Have you had issues with the servos in the front (or back depends on the direction you are walking) kinda giving out and cause it to face plant/slide on the ground?  

Only code issues.

I have noticed in my video that the legs were not going forward / backward far enough in some cases with my original sample. Here is a check list of common problems:

  • Power cables between batteries and controller are too small in diameter. Use heavy duty cable.
  • Use NiMh or Lithium batteries. Alkaline batteries cannot deliver the peak currents required.
  • If your code is too quick then the servo can appear to loose power because they are trying to change direction rapidly
  • Ensure suitable minimum and maximum values are specified in the attach() function to protect the servo.

I have noticed that it usually happens when the batteries start to get low.  Right now the servos run off of four 1.2 AA 2500Mah NiMh batteries.  I could probably use 5 but the batteries can get up to 1.34 on a full charge and I'm worried that the ~6.5v could damage the servos.  The board I'm using is an DFRobot Romeo so the servos don't have regulated power when using seperate supplies so I've been looking for an appropriate regulator that can give me at least 3A but sadly there seem to be a lot more 2A regulators out there.  (The board itself is powered by a 9v battery) 

I have been playing with the code a bit and have slowed down the steps and changed the center positions so the legs are more... um... seperated from each other.   That's helped quite a bit.  

Ok, that is your problem, the Romeo is a nice board but as you discovered for servo control it needs a decent regulator. That is why the Spider controller has a 3A switchmode built in. Another problem is weight, especially if you have 1 battery pack for the processor and one for the servos.

The best option is to use 5 batteries and then use a 3A diode to feed power to the servo supply. The diode will drop the voltage by about 0.65V to ensure your servos are safe.

That's an excellent idea, thanks!

Ok, everything looks ok in the photos but...

With Chopsticks I had a similar problem and it turned out that the battery holder and power wires were not allowing enough power to reach the switchmode. This is where a multimeter would help because you could see if the voltage drops when the USB cable is removed.

Is your regulator getting hot? that's the chip near the battery screw terminals with 7 legs. If it's getting hot you may have a short circuit, perhaps a bad servo. Try plugging in you servos one at a time.

Since you do not have a multimeter, can you try another power source. As long as it is DC you can use any power source up to 24V. I suspect your problem is your batteries or the battery holders are giving you a bad connection.

Even try using 6x 1.5V batteries instead of 5.

No the regulator is not gettin hot.  I tried using 6x 1.5V but it did not work.

Just to test whether the batteryholders have a problem, i connected a LED to both ends of the battery setup it glowed but did not get fried(which suprised me)

Any suggestions now?

make a custom battery holder?

 

I had the same problem with my uServotino board when I was using a 4 AA battery holder, the wires were too thin to let enough current go through. There are 2 ways to solve the problem:

- solder thicker wires to the battery holder

- replace the battery holder with a NiMH battery pack for RC cars, or a 2S LiPo pack...

Ah I only wish I could get them in my hometown

i tried using 6x1.2V AA NiCd batteries to power the spider board , only the LED programs works, servos dont seem to be moving efficiently(they move but they move very very slowly and not the way I programmed them).

When I use the USB everything works like a charm, please help me OB!