I am using Trinket Pro 5V to run a simple i/o code. The input from the piezo vibration sensor is read by the Trinket and Translated into a servo position. It works fine powered through a USB connection, however as soon as I try to power it using a 9V battery (plugged into the Bat+ and G terminals), the code stops running and the red light on the Trinket starts to blink.

Is the power source not sufficient - 9V?

Has anyone faced a similar problem?

  • Adafruit has a decent forum full of people that could probably be more helpful forums.adafruit.com All I can say is that the red LED flashes when in bootloader state. You also need to provide some more info such as: Is the green LED on? Can you switch back from battery to USB and it works fine?
    – I. Wolfe
    Commented Dec 4, 2015 at 16:11
  • @I. Wolfe The red light flashes and the green LED is permanently on when the battery is connected. As soon as I connect it back to a USB it goes back to green light, and red disappears. This does not reset the Trinket, the code is still remembered by the board. I hope this helps with the detailed description. Do you have any thoughts? Do you think 9V has enough juice for the piezo/motor circuit?
    – ksenia
    Commented Dec 4, 2015 at 23:49

1 Answer 1


Please consider reading the "https://learn.adafruit.com/trinket-gemma-servo-control/wiring" tutorial.

It says

It is suggested you use an external wall or battery supply and not power the servo via the regulator. servos can draw up to 500mA and the Trinket regulator can only source 150 milliamps (USB power generally 500 milliamps).

No matter what power supply you hook to the "Bat+" battery pin, if you hook the servo power to the "5V" pin on the trinket, the trinket's on-board 5V regulator will temporarily collapse under the load of the servo, which typically causes the system to reset over and over again.

Instead, please hook the servo power directly to the battery. Alas, a typical partially-drained 9V battery has enough internal resistance that the battery's voltage will temporarily collapse under the load of the servo, which typically causes the system to reset over and over again.

Instead, use a better power source.

Many people, even when they intend to eventually run their system on batteries, start out using a wall-wart power supply, so they don't have to keep wondering "Is this glitch because of a bug in my software, or is the battery just going dead?".

The "Adafruit 16-Channel Servo Driver with Arduino" tutorial says:

Good power choices are:

You might also want to look at other Battery holders that hold lots of AA batteries in a convenient package.

Related: "How to get high current from 9 volt batteries" and "What is the max current I could draw from a 9V battery?".

  • 1
    Thanks, @david-cary. As soon as I plugged the servo to be powered directly from the battery, it worked like magic! Appreciate your answer:)
    – ksenia
    Commented Dec 10, 2015 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.