I've battery powered device with ATmega inside. I'd like to put a protection diode on power to protect it from me accidentially switching battery backwards. Here comes questions:
Is one diode (either on Vcc or GND) is enough? Which one to choose?
What type of diode to choose (voltage etc ratings)?
I have battery powered device with very low power consuming (most of the time MCU is in "Power down mode" -- around 1uA or less) will diode take some power?
Is one diode (either on Vcc or GND) is enough? Which one to choose?
One diode will do the job either on Vcc or GND. But a Diode to GND will shift the GND voltage so if you have another equipment powered with the same battery connected to the arduino that voltage shift can lead to some problem
What type of diode to choose (voltage etc ratings)?
Voltage : the battery voltage
Current : the current you deliver to your board
Power : the current time the voltage drop across the diode (wich is quite low)
I have battery powered device with very low power consuming (most of the time MCU is in "Power down mode" -- around 1uA or less) will diode take some power?
You should take into account the voltage drop across the diode. This voltage drop can be an issue with battery powered equipment. You should choose the diode in the Schottky family as the voltage drop is much lower than in standard diode.
will having diode on Vcc increase power consumption
Not as such, because of the volts drop the consumption will be reduced from the device but this drop will be dissipated in the diode. So back to square one.
Any current through any device will dissipate current. If you don't have it then you have more voltage across the thing in sleep mode and so more current anyway. So while a diode will dissipate power it won't dissipate extra power.
Sorry for being stupid, but I'd just want to make sure I get it right. If voltage drop is, say, 0.5V and MCU current in sleep mode is 1uA, so I can easilly compute dissipation by multiplication 0.5 * 1*10^-6, is this correct? Diode is not linear...
so I can easilly compute dissipation by multiplication 0.5 * 1*10^-6, is this correct?
Yes that is right.
Diode is not linear.
A diode's linearity is the way voltage varies with current. It is because the diode is not linear (in the way it is) that you can use it with a constant voltage drop no matter what current you put through it.
To avoid voltage drop when operating use a diode across Vin to GND. Its normally reverse biased and dissipates a trivial amount of leakage current, there is no voltage drop.
On reverse polarity the diode is essentially a short circuit to ground, so there MUST be something upstream (fuse, circuit breaker, polyswitch, etc.) to remove power.