connecting to power makes servos move and let my biped fall

hey there, just finished my first really walking biped built from four servos and an arduino nano. however, i have two issues:

  1. connecting to power lets the servos move randomly, obviously before the servo.attach command is executed, i guess. this is bad for a biped since it tends to fall over. has anybody a solution for that? (wiring / circuit in the link above).
  2. i'd love to have a more elegant solution to move servos slowly, but the standard servo lib only allows for setting the target angle. so usually, software seems to loop with delays and chops up the desired angle into multiple moves. this leads the servos to move not very smoothly even with really small delay. again, this is a stability killer for a biped. any solutions to this?

The most frequent servo issue is a too small power supply or trying to power servos from the arduino.

assadollahi:

  1. connecting to power lets the servos move randomly, obviously before the servo.attach command is executed, i guess. this is bad for a biped since it tends to fall over. has anybody a solution for that? (wiring / circuit in the link above).

Given that your biped is likely to experience many falls over the course of it's life (how many times have you accidentally fallen in your life?) - it might be best to just let it fall, but have it pick itself up again before moving on.

Indeed, have it start up from a prone position (like getting out of a bed, for instance), and make it get upright.

I know this isn't the answer you were probably looking for, but it does seem to me to be the most appropriate answer, as at some point your biped will fall over and have to right itself...

Besides what zoomkat mentioned, it's not uncommon for servos to glitch when power is first applied, even when you have an adequate power source, and are not even sending pulses to the servos. Also, when the batteries run down below the minimum level for the servo to operate properly, some servos zing the servo arm over to one of the mechanical stops, as the internal feedback loop goes bonkers.

Some servos are worse than others. I especially had trouble in the past with Futaba and GWS servos. On my old octopod robot [Futabas], the legs would skew in 8 different directions. With GWS, I found that every time I would apply power, the servo arm would move 30-degrees or so, till it hit the endstop.

Those cheap knock-off servos may be especially bad. You need to test them. About the only thing I say you can do is to position the robot to a stable pose before turning power off [on hands and knees??]. Then it won't glitch so badly on the next power up.

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png or pdf?

Including the power supply details, we can't give any accurate solutions until we see what you have wired up.

Tom..... :slight_smile:

  1. i'd love to have a more elegant solution to move servos slowly, but the standard servo lib only allows for setting the target angle.

Have a look at this project

I use another servo library which has some definite advantages compared to the standard one:

  • adjustable servo's speed
  • optional pause until move is complete (blocking / non blocking)

Hope this helps

BTW, I love your robot with rasta style hair :wink:

Discussion on controlling servo speed.

http://forum.arduino.cc/index.php/topic,61586.30.html

dear co-workers, thanks for all the support and suggestions, i documented the problem and fixed it with a relay, see here: preventing a robot from seizures when powering up | ramin assadollahi

here's the improved version of the biped using the relay solution: trashbot v2 - YouTube