loading

Servos going crazy?

So, I made this

https://www.instructables.com/id/Make-A-Simple-Bidepal-Humanoid-Robot/

and after uploading the code for walking, instead of walking, the robot goes crazy

https://vimeo.com/209730331

I have attached some pins a bit different from the original code but have adjusted that in the code by changing the attach commands. What do you guys think is the problem? I attached the horns to the servo using this guide

https://www.youtube.com/watch?v=nOCagSi1OOU

The other codes provided also don't appear to be working. Could it be that I have attached the servos to arduino the wrong way? I considered the right motor to be the motor which appears at the right when  the robot is viewed from the back (white part of arduino).

sort by: active | newest | oldest
-max-1 month ago

Double check that you connected the servos' signal wire to the correct arduino. After that, triple check it again. If it still checks out then you may have a power supply issue.

When I was interning at nasa, a co-worker / intern was having problems with getting a project to work away from USB power. The mechanism seemed to work fine (although at reduced torque and power) with the 5V supplied from the USB. However when connected to a 5V 10A power supply we had all sorts of problems with the servos jittering and not settling to a location smoothly. It turned out to be a result of foldback current limiting in the power supply. The servo's would attempt to move, which caused a spike in current, which triggered failsafe measures in the power supply which temporarily cut power to the stuff for a few milliseconds. The result was that everytime the voltage recovered, the servos would jerk and cause the 5V rail to sag back down to <1V. Try using a "brute" transformer unregulated power supply instead of a SMPS type.

shahryar.adil.3 (author)  -max-1 month ago

Yeah they are connected right. I'm powering it using the USB cable that is used for programming the guy that made the instructable powered it like this too. I have tried different usb ports. I don't havew that kind of a power supply :/ when there are problems with the supply atleast the servos go in the right direction unlike my case. And in the code, at the first it sets all the servos to 90 degrees. Not sure why he did that because the makes the robot fall over. IT should have caused problems for him too but it didnt. I removed that part and tried but it still didnt work :/

the construction of his looks a lot neater and better made. Yours has floppy cardboard feet as I can see. Cardboard is less heavy, less rigid, and therefore may be throwing off the balance of it. I would adjust the position of the servo arms as he did.

To prove it's not the USB power supply, write up a sketch of your own which actuates the servo in a predictable way and see if it does what it's supposed to. Try adding additional servos and code to make them move and see if by addition additional ones, all start to become erratic. a USB is not a suitable power supply for 4 servo's. Really, it's not enough for 1.
shahryar.adil.3 (author)  -max-1 month ago

He has used cardboard for the feet of his robot too. I tried my own sketch but the usb cable was causing a problem in the balance of the robot. I am going to try and solder the power wires directly to the back of the arduino today and then try my code and see if it works. The problem is that mine is going in a weird motion as compared to his.

Try modifying his code to invert the numbers going to the servo. so that 180* maps to 0*, and 0* maps to 180* and check each servo to ensure it rotates the correct way. There is no promise that the servo's rotate the same way given the 1000uS to 2000uS pulses.

shahryar.adil.3 (author)  -max-28 days ago

alright, if that doesn't work ill just write another code

thanks :)

iceng1 month ago

Your Vimo did not run for me.. Steve is correct servos generate electrical chatter that can upset a uP if wiring ground to a common Node is not followed and all ICs have a 0.01 to 0 .1 uF bypass cap at the power pins of the IC.. -.-. . --. -.

shahryar.adil.3 (author)  iceng28 days ago

Thanks for your help :)

shahryar.adil.3 (author)  iceng1 month ago

I wired it like it said in the instructables. All servos connected in parellel with the 5v and gnd pins of arduino. Seemed to work alright for him. The problem Im having is that the motors first go to 90 degress which makes the robot fall over then they go in a weird pattern which is different from that in the video of the instructable. Thanks :)

How have you connected power to everything ? My guess is probably a noise issue.

shahryar.adil.3 (author)  steveastrouk1 month ago

Everything is connected to the power pins on the arduino as the author said. The servos can be seen moving in the video.

Thanks for your help :)

1+ Assuming all really is wired and programmed correctly.
Best place to ask would be in the comments for this Ible or to send a PM to the author.

shahryar.adil.3 (author)  Downunder35m1 month ago

The author isnt active since years from the look of it. The instructable also looks dead.