Diode for reverse current protection but voltage drop?

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?

floatsinwater:
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?

That is correct all diodes have some forward voltage drop value. A schottky diode is a good choice for your case.

When current flows through a diode there is a small voltage drop across the diode terminals. A normal silicon diode has a voltage drop between 0.6–1.7 volts, while a Schottky diode voltage drop is between approximately 0.15–0.45 volts. This lower voltage drop can provide higher switching speed and better system efficiency.

Lefty

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.

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.

Am I right about my assumption?

Yes.

And are there any ways around this?

Increase the input voltage accordingly.

Afrotechmods explains an elegant way of reducing the voltage drop here:

floatsinwater:
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.