I have this basic circuit with an MSP430 (The outputs go to LEDs)

I have noticed a strange (to me, not saying much though) circumstance. In this circuit, I always have to wait around 20 seconds or manually short out the capacitor (when it's off) to get it to turn back on.

First plug in :: Everything works great!

Unplug it then plug it right back in:: Nothing!

Unplug it and short out capacitors, plug it back in:: Everything works great!

I have added a 4700ohm resistor (R1) in an effort to have a load constantly on the capacitor after power off.

With this resistor (chosen only in that it's only 5mW on a 250mW resistor) the circuit appears to work as expected.

To my very limited understanding however, I would think that the MSP430 would be enough to drain the capacitor. I am very unfamiliar with brownout protection, but is this functionality preventing the micro from draining the capacitor?

Note that all capacitor sizes were chosen arbitrarily except for C1 which is called for in the data sheet of the voltage regulator.

Max draw from the micro is about 22 mA (the LEDs are driven by transistors)

I am unsure if datasheets are required for the regulator and micro

I am highly inexperienced but very interested in these things. My goal is to learn and I thank you for your help


simulate this circuit – Schematic created using CircuitLab

  • 2
    \$\begingroup\$ This is a great example of a good question. \$\endgroup\$ – Passerby Jul 29 '13 at 0:56
  • \$\begingroup\$ What happens when you replace C2 with a smaller 10uF cap? \$\endgroup\$ – helloworld922 Jul 29 '13 at 1:33
  • \$\begingroup\$ I don't know enough about this microcontroller to answer specifically, but there are power supervisor ICs that will make sure the microcontroller is reset if the input voltage goes below a threshold, instead of being left in some inconsistent state, which may be what's happening here. \$\endgroup\$ – Phil Frost Jul 29 '13 at 2:05
  • \$\begingroup\$ @helloworld922, I tried 10uF and 100uF too. Same results (shorting required) \$\endgroup\$ – Dan Jul 29 '13 at 2:20
  • \$\begingroup\$ @PhilFrost no, I meant C2=10uF instead of C2=470uF. Theoretically the LM1117's quiescent current (along with the MCU's current draw) should deplete it fast enough, so probably not a big concern. \$\endgroup\$ – helloworld922 Jul 29 '13 at 3:11

You have identified your issue correctly.

I couldn't figure out exactly what is the maximum current MSP430 can draw on its P1 pin. I found a parameter named "maximum diode current" in the datasheet, which is 2mA, and it is the best guess I can make. However, it is not that this is the current which will be drawn in practice: once the regulator's input voltage will get below ~4.3V, it is hard to predict the rate of discharge.

You can minimize the discharge time by taking smaller capacitors for regulator's input. Why did you add 470uF in the first place? I see in this datasheet (which is the one you should use according to part number in the schematic) that 100nF should suffice.

If the natural discharge is still too slow, you can add bleeding resistor as you did. You can even consider adding pull-down resistor in parallel to P1 pin. If the active power consumption is of high importance, there are more power effective techniques of pulling the voltage down.


The usage of bleeding resistors is very common for safety reasons. For example, there are SMPS which utilize huge output capacitors. If you disconnect the load and expose the output pins, these caps can (sometimes) store their charge for minutes. The amount of charge is such that a human touching the outputs can die. In cases like this one, there is common practice to add a bleeding resistor (usually power resistor) in parallel to the output capacitors.

  • 4
    \$\begingroup\$ "maximum diode current" sounds like the maximum current through the protection diodes on the inputs. If so, that would have nothing to do with the current draw of the microcontroller under normal operation. \$\endgroup\$ – Phil Frost Jul 29 '13 at 11:34
  • \$\begingroup\$ @PhilFrost, I agree. These 2mA are the only upper bound I could find in the spec, therefore it was my best guess. \$\endgroup\$ – Vasiliy Jul 29 '13 at 11:42
  • \$\begingroup\$ There is no reason for the 470uF, my thinking was: "A big capacitor before the regulator will take care of any drops that may happen in the wall wart 5V SMPS" I'm perfectly fine with using any size capacitor. Thanks for your input \$\endgroup\$ – Dan Jul 29 '13 at 12:33
  • \$\begingroup\$ I have removed the 470uF capacitor and kept only the 100nF capacitor. This works great! (The bleeder resistor is removed too) Thanks! \$\endgroup\$ – Dan Jul 29 '13 at 12:56

You have a fairly high cap before the regulator (470µF). Please measure the voltage behind the regulator while plugging off. See if the voltage drops fast or only within seconds to a level below the required voltage for the MSP.

I guess that the controller only sucks in very little power and it takes some time to drain the cap. After the cap is drained (or below some level), you can successfully start again.

Brownout protection is something different. It's actually a protection for the processor from entering an undefined state due to the voltage being at a level where it isn't able to operate within specs anymore, thus leading to potentially undefined states.

  • \$\begingroup\$ Yes you are right, not enough voltage. However when I plug it back in (without draining the caps) there is the expected 3.3V across the capacitor and the micro (but it does not work) I'm going to use a much smaller capacitor and also a bleeder. \$\endgroup\$ – Dan Jul 29 '13 at 12:35

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.