When designing a board, power is always a concern. Not matter if the power supply is batteries or a wall wart, you have to consider how the user is going to attach the power supply. Given the opportunity, we have to assume that power will be hooked up wrong. This brings up the discussion of 'reverse power protection'.
How would you design a circuit to withstand having the power applied backwards?
If you've ever plugged in a chip backwards, a wallwart backwards, or shorted VCC to GND, you know what we're talking about. And if you haven't hooked something up backwards, you're not human.
Chris Anderson recently brought up this discussion with me over the ArduPilot. This small board is a good example of the different options available. You can see the small BAS16 diode highlighted in the above Eagle PCB layout. This small diode is designed into the product to protect against reverse polarization. If someone hooks power up backwards, the diode fails to forward bias and the board simply doesn't turn on, protecting it from damage.
1) Inline protection diode: The problem is the forward voltage drop of the diode.
D1 is an 'inline protection diode'
Cheap diodes have a theoretical 0.7V drop. So if you hook 5V up to the board, you'll get 5-0.7=4.3V delivered to the board. In practice, the forward drop of the diode is actually a bit lower (0.5V) and there are specialty diodes available that have even lower forward drop (germanium?). This all works great if your incoming power is 2-3 volts higher than your output, but if you're running a 5V board from a 5V source, the diode will drop the voltage to your system down significantly.
2)
No protection: This is my favorite because it's so dangerous!
No protection diode!
Do we really care? Can the electronics survive if we put the batteries in backwards? If you're designing your own board, running without any protection can very questionable. Many current electronics can survive reverse power without any ill effects, but if you're playing with any part worth more than $5, I'd get something on the board to protect my parts. The
beginning embedded electronics tutorial #1 will show you how to create a good bread-board power supply. At the very least, I recommend large, clear labels on the power pins:
Checkout the Eagle DFM tutorial for more information about labeling your board.
3) Voltage Regulator: The nice thing about many voltage regulators is that they have short circuit and reverse polarization protection built in!
LDO Voltage regulator with two 10uF tantalum capacitors
We love the Micrel part (
MIC5207). You can do some really mean things to this SOT-23 v-reg (shown above) and it will survive and protect the electronics behind the regulator section of the power supply. These regulators are better than a diode because the forward drop of the MIC5207 is ~100mV under load - much less drop than the diode option. The problem is that a voltage regulator can handle less current (180mA max), is physically larger (with required caps), and is more expensive ($0.50 vs $0.07) than a similar sized diode.
Note: Reversing the voltage on electrolytic or tantalum caps is a bad thing. A 16V rated tantalum may "pop" (explode with great force) if you apply 10V the wrong way. Electrolytic caps won't explode as violently, but may expand or puff out a bit.
4)
Polarized battery connector: Using a polarized connector like the
SMD JST 2-pin connector instead of a bare 0.1" spaced connector.
Polarized power connectors
This connector makes it more difficult for people to willy-nilly attach a battery pack or power supply. This can initially be frustrating, but it forces the person to terminate their battery or power supply correctly. Once terminated, the user can quickly plug in the battery and not have to think about it. This works but may not provide infallible protection (the user may terminate a 12V wall wart to an intended 3.7V connector). We use this option all the time for our LiPo powered projects.
The PTC will cut off power if there is a current draw of more than 250mA. Removing the problem or short will allow the PTC to cool off and current will flow again. More info in this
tutorial. Think about this carefully as the extra peripherals may add up to 250mA causing the PTC to trip incorrectly. We love using PTCs to help protect the electronics from short-circuit failures, however many voltage regulators already have this feature built-in.
Any project will require careful thought and planning when creating a reliable power supply that can withstand regular abuse. What other tricks have you found that help protect your designs?