8
\$\begingroup\$

I have an ATMEGA328p-pu arduino with an LED + shift-register strip circuit attached over SPI. When it turns on, it increases a variable in EEPROM to advance the display mode.

  • We have the brownout detector set to level 1 (2.7V).
  • There is a 1500 uf capacitor attached in parallel to the power leads to, hopefully, keep the arduino from changing modes on a physical impact, since the battery terminals can disconnect slightly for a millisecond (?) or so.
  • There is a diode on the cap's positive lead to prevent the cap from discharging into the LEDs, so it only buffers the arduino.
  • There is also a 1000 ohm resistor in parallel across the cap to drain it since it was holding a voltage, which we assume was behind a problem where the chip wasn't lighting up the LED circuit sometimes on boot.
  • The arduino pro mini and strip are rated at 5v, but we routinely run them at 3.7V so they can be powered with a single Li-Ion cell.

Sometimes after sitting for 10 or 15 seconds, the circuit won't light up. Sometimes after disconnecting the battery and reconnecting it several times in a row, it will then light up.

Could anybody recommend a better way to provide a power buffer to the ATMEGA (but not to the LED strip)? Are we doing it correctly for the most part?

Diagram (sorry if it's messy, I can have my friend redo it in Illustrator if it's unclear, just might take a few hours): Circuit Diagram

\$\endgroup\$
  • 2
    \$\begingroup\$ Can you draw an circuit diagram of the situation with the AVR, power supply, resistor, capacitor, diode, ... \$\endgroup\$ – jippie Dec 28 '12 at 18:03
  • \$\begingroup\$ Is the only reason you need this "buffer" because the battery terminals can disconnect slightly if bumped? If so you should just remove the connector and solder the wires directly to the board. \$\endgroup\$ – Garrett Fogerlie Dec 28 '12 at 18:08
  • \$\begingroup\$ To echo jippie, you've started with a good written description, the addition of a schematic will help immensely. If you have problems posting there is help available. \$\endgroup\$ – placeholder Dec 28 '12 at 18:32
  • 2
    \$\begingroup\$ Your bleeder resistor is on the small side, consuming substantial power compared to typical standby needs. If you can detect brownout in software, set up a program which "counts" on the UART output starting from brownout and monitor that while pulling the power supply and see how long it runs, calculating back through he baudrate. Also beware the possibility of inadvertently powering peripherals through data lines. \$\endgroup\$ – Chris Stratton Dec 28 '12 at 19:14
  • 1
    \$\begingroup\$ Maybe you can try to give the arduino some independent output (serial, it's own discrete LEDs) so you can do a little debug indication there that the arduino has reset, distinct from it's success in talking to the LED strip. I'm assuming the LED strip doesn't even really have a reset, distinct from the ordinary progression of it's states every time you access it? \$\endgroup\$ – Chris Stratton Dec 28 '12 at 21:22
3
\$\begingroup\$

You can use a super capacitor (1F/5.5v) after the diode, connecting it directly to the VCC and GND. This will help you in buffering the power.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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