Orangutan resetting when I drive a servo

I’ve got an analog servo, with no load, connected to PD1 on my Orangutan controller. My code displays a welcome message on the LCD, waits a few seconds, and then clears that and attempts to center the servo (using the servo module from orangutan-lib). At this point, my Orangutan appears to reset — the red “LED on I/O line” flashes, and the servo moves a bit, but then my welcome message reappears and it all starts over.

I tried adding a couple of capacitors in parallel with the servo (using the power/ground pins of PB6 and PB7, which I’m not using). One of them is a pretty hefty 220 µF electrolytic. But this has no apparent effect; the board still resets when it tries to move the servo.

I’m powering the board with a 6V wall wart. I’ve tried the power jumper for the port in both VCC and VBAT positions (this servo would work fine with either 5V or 6V).

Any ideas? Help me, Obi-wan Kenobi…

Thanks,
- Joe

Wall warts are generally pretty bad power supplies, especially for motors. Also, they can have much higher voltages at no load, which could destroy things like servos and robot controllers. Since you didn’t say anything about the current rating on your unit, I don’t know if it’s even possible to make it work for your intended application.

The Orangutan’s regulator definitely can’t power a servo, so you should have the jumper set to the VBAT position and start with a better power supply, such as a 5-cell NiMH battery pack.

- Jan

Thanks, Jan. I’m trying to avoid using a battery pack here since this application is going to be on pretty much continuously for weeks. The wall wart is rated at 300 mA, which ought to be enough for the servos, but it wouldn’t surprise me if the voltage sags under load and causes the reset.

So after sleeping on it, I was thinking of trying this: separate supplies for the servo power vs. the board power. It looks like I could accomplish this by leaving the jumper off entirely, which disconnects those four power pins from the rest of the board, and then applying a separate power supply to one of those four pins (as well as ground — so the two supplies would have a common ground).

Does that sound like a reasonable thing to do?

Thanks,
- Joe

The problems with most wall-warts goes beyond just their current rating. If you’re interested, SparkFun has a nice new(ish) tutorial on the subject.

If you want wall-power, a cheap desktop switching supply is a good way to go, and could definitely handle your Orangutan AND your servo. I would say power your Orangutan through the normal power connector and leave the jumper on VBAT, that way you don’t risk brushing the wrong pin and frying your poor Orangutan.

Take a look at these power supplies offered by MPJA. Any of the models that include a 5V output should work for you (1.5A is plenty for your Orangutan and a servo or two). Two things to keep in mind are:

  1. Figure out with a volt-meter which wires are +5V, +12V, and Gnd, and connect accordingly.

  2. Unless they say otherwise, these supplies don’t usually ship with an AC power cord. You can select a model that will work with a power cord you already have, or grab a compatible cord from MPJA (there should be one listed under the “MAY WE ALSO SUGGEST…” links at the bottom).

-Adam