Go Down

Topic: Diode for reverse current protection but voltage drop? (Read 1 time) previous topic - next topic


Nov 15, 2012, 09:58 pm Last Edit: Nov 15, 2012, 10:01 pm by fungus Reason: 1

Hi guys, I was wondering if you could help me out on a little circuit problem.  I want to start moving towards the ATTiny chips for some of my smaller projects.  However, being clumsy as I am, sometimes I do the pinout backwards when there's Dsub's involved since the pinouts are in reverse when looking from the back compared to the front...  In any case, I wanted to idiot-proof my PCB so that the chip will be protected when I reverse the leads by adding a diode.  However, if my understanding is correct, it will create a voltage drop on the line, so my chip will no longer be getting the correct voltage.

Am I right about my assumption?  And are there any ways around this?

What are you connecting to the dsub? Power+serial comms (like FTDI)? Anything else?

There's lots of unused pins. Design it so that +5V connects to an unused pin on the opposite connector if you get it backwards.

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Nick Gammon

Nov 15, 2012, 09:18 pm Last Edit: Nov 15, 2012, 09:21 pm by Nick Gammon Reason: 1
Afrotechmods explains an elegant way of reducing the voltage drop here:



Am I right about my assumption? 


And are there any ways around this?

Increase the input voltage accordingly.


Another approach is to place a big beefy diode (1N4001 or bigger?) backwards across the supply rails - this will
conduct hard if the power is applied in reverse, and then the power supply itself has to deal with the problem
(current limited supply?  fuse?).

The advantage of this protection circuit is that it doesn't have any impact on correct behaviour.

The disadvantage is that it assumes the power supply will back off gracefully (for instance a lead-acid battery won't).
Best to include a fuse too.
[ I won't respond to messages, use the forum please ]


I assume you mean protection against the power supply being reversed. Yes, the diode will drop around 0.7V. This probably doesn't matter unless you are using the supply voltage as the ADC reference.

On their motor drivers, Pololu uses a mosfet to isolate the chips if the motor supply is connected the wrong way round. You could do the same thing using a small P-channel mosfet to switch the positive supply of the ATtiny. Note that the source and drain need to be connected the opposite way round from usual (i.e. source to ATtiny's Vcc pin, drain to the incoming positive supply), due to the presence of the body diode.

Either way, you will need resistors in series with any connections from the Dsub to the inputs and outputs of the ATtiny as well, to limit the current flowing into the internal pin protection diodes when the polarity is reversed.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up