So i made this quadruped robot and the code, whenever executed, starts and sometimes ends when the robot is not touching any surface like if i hold it it will sometimes do just fine and at other times restart the sequence. Whenever its on the ground however it will restart immediately after the sequence starts. Its like the servos have a timer set or whtver but it doesn't seem to be the case please help.
It’s the problem of your power supply. When there’s load on servo, the current draw will be larger than moving in the air. Your battery will experience a voltage drop and cause the control board to restart.
RzLi:
It’s the problem of your power supply. When there’s load on servo, the current draw will be larger than moving in the air. Your battery will experience a voltage drop and cause the control board to restart.
Use batteries with higher discharge rate. Search for “high c rated LiPo battery”. Make sure the voltage regulator also support the high current. Add a capacitor in parallel with servos will help too. I also suggest you to separate power supply for control and motion.
To easily validate my assumption, you can double the power supply in parallel configuration to double the current allowed.
I also made a quadruped in cat shape. I’m going to post it on project hub recently.
As other's have mentioned, it sounds like it may be a problem with power. How are you powering the motor controllers? Never rely on the +5V regulator of the arduino to go past 500mAh, without browning out. (drawing more than the regulator can provide, result shuts-down, and causes a full reset). are they being powered by a separate regulator? are the prop motors drawing enough amperage trying to get up to speed, that they're drawing more amperage, it may not even have enough to handle the arduino as well (not a likely, but still possible, the arduino has a rather lite diet.)