hey there, just finished my first really walking biped built from four servos and an arduino nano. however, i have two issues:
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).
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?
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.