Hi,
(This is my first post, so please forgive if I don't have the etiquette down here.) I recently assembled one of the 815 16-channel PWM boards with a 2200 uF cap and a 5V/2A power supply. I'm using it to drive 16 servos, controlling it from an Arduino Mega. The problem is that when I start the system up all the servos seem to "pulse" at one limit, and never respond to the programming from the Arduino (which is just the PWM library "servo" program for now). When I first saw the problem I disconnected all the servos, restarted the system and reconnected them one by one. And the program works. Until I turn off the power and turn it back on, then the "pulsing" resumes.
Suggestions for where to start debugging? Thanks in advance.
16 servos don't start correctly
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: 16 servos don't start correctly
16 servos may be pushing the limits of your 5v @ 2A power supply.
It's probably okay to run them 3-4 at a time, but the initial setup might be making all of them try to draw current at once. That could cause voltage spikes which keep the system from being able to come up correctly.
Have you checked the Serial Monitor to see what output the sketch produces while it's running? If you see a repeated series of startup messages, it means the voltage is falling low enough to reboot the Arduino.
It's probably okay to run them 3-4 at a time, but the initial setup might be making all of them try to draw current at once. That could cause voltage spikes which keep the system from being able to come up correctly.
Have you checked the Serial Monitor to see what output the sketch produces while it's running? If you see a repeated series of startup messages, it means the voltage is falling low enough to reboot the Arduino.
- dsehr
- Posts: 3
- Joined: Wed May 27, 2015 2:28 pm
Re: 16 servos don't start correctly
Thanks for the reply. I checked the serial console and the Arduino is not rebooting.
I should have been clearer about the hookup also. The 5V/2A power supply is just for the servos (V+). The PWM board itself is powered (Vcc) from the Arduino, which is powered separately.
And I confirmed that things work "as expected" if no more than three servos are connected to the PWM board when power comes up, so I agree it seems like there is a power issue. More suggestions for how to debug?
Thanks!
I should have been clearer about the hookup also. The 5V/2A power supply is just for the servos (V+). The PWM board itself is powered (Vcc) from the Arduino, which is powered separately.
And I confirmed that things work "as expected" if no more than three servos are connected to the PWM board when power comes up, so I agree it seems like there is a power issue. More suggestions for how to debug?
Thanks!
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: 16 servos don't start correctly
16 DC motors all firing up simultaneously is going to create a good amount of brush noise which may be enough to disrupt either the Arduno or the PCA9685 PWM chip.
- averageguy1
- Posts: 30
- Joined: Mon Oct 21, 2013 12:48 pm
Re: 16 servos don't start correctly
I have found that the servos do not actually draw any current until they are positioned, so I suggest you try to attach (servo library function) all of the servos and then position each independently with a delay in between. If the servos go to an idle state, like they are supposed to, you should see each one move. If only the first few move then your servos are like mine and don't go to idle. In that case after positioning each one, delay and detach. Monitor the current being drawn during this test.dsehr wrote:Thanks for the reply. I checked the serial console and the Arduino is not rebooting.
I should have been clearer about the hookup also. The 5V/2A power supply is just for the servos (V+). The PWM board itself is powered (Vcc) from the Arduino, which is powered separately.
And I confirmed that things work "as expected" if no more than three servos are connected to the PWM board when power comes up, so I agree it seems like there is a power issue. More suggestions for how to debug?
Thanks!
Jim.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: 16 servos don't start correctly
Behavior varies depending on the servo. Most servos will twitch a bit when first powered up - regardless of whether there is a positioning signal. That will cause a momentary current surge.I have found that the servos do not actually draw any current until they are positioned,
- averageguy1
- Posts: 30
- Joined: Mon Oct 21, 2013 12:48 pm
Re: 16 servos don't start correctly
That's right. With 16 of them twitching, it's probably enough to overload a 2A supply. I'd forgotten about that. Thanks.adafruit_support_bill wrote:Behavior varies depending on the servo. Mos servos will twitch a bit when first powered up - regardless of whether there is a positioning signal. That will cause a momentary current surge.I have found that the servos do not actually draw any current until they are positioned,
- dsehr
- Posts: 3
- Joined: Wed May 27, 2015 2:28 pm
Re: 16 servos don't start correctly
I finally got the time to spend a few minutes playing with the device again at home, with a bag of mini servos. With only ten servos attached, on startup the power supply voltage cycles between 1.75V and about 1.3V when the twitches are happening. If I reduce the number of servos to three, the voltage remains at the power supply's unloaded voltage of 5.24V. So thanks to all of you who pointed out that 2A is apparently not enough current to drive the startup of this many servos (or probably a lot of simultaneous movement).
Interestingly, at numbers between four and ten servos it sometimes twitches a small number of times and then resolves to operating correctly. I guess if the individual servos desynchronize their twitching, there's enough current to supply them, and once the voltage rises to 5.24V they stop twitching.
Interestingly, at numbers between four and ten servos it sometimes twitches a small number of times and then resolves to operating correctly. I guess if the individual servos desynchronize their twitching, there's enough current to supply them, and once the voltage rises to 5.24V they stop twitching.
Please be positive and constructive with your questions and comments.