## Voltage divider , protecting ADC

14 posts / 0 new
Author
Message

Guyzz i have an app , where i'm going to measure 3 voltages on a solar charger.

1: SolarCell output voltage
2: Battery voltage
3: Output voltage

The charger makes sure the battery is within limits 11.6 .. 14.1v , but the "unloaded" solarcell can output 21v.

If i set up the AD range on a M8 (VCC = 5V) , to 0..15v , what do i do to protect the adc if i accidently disconnect the solarcell from the charger , and 21v comes out/in there.

I was planning on using a 3 resistor voltage divider using 100K 1% resistors.

This would make the current around 100uA.

If i put a 5v1 Zener from ADC to GND would that work .. I mean still allow adc to function , and make sure it would survive a 25..30v input ??

/Bingo

This is a nice little free tool http://www.miscel.dk/MiscEl/misc...

Put a small Schottky diode between the processor Vcc and the tap of the voltage divider souced by the solar panel. Cathode to Vcc.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Jim does tap mean top ??

I'll just attach the voltage divider , from misc-el

Oopz .. just added upper pic. with 1% resistors selected

Btw: Is 100K (100uA) a reasonable ADC range , or should one go for 10 or 20K ??

/Bingo

## Attachment(s):

100k for voltage-divider is fine, but a capacitor of 10nF over the ADC-input will give you more stable readings. I assume that you don't want to use a high sampling-rate; the 10 nF will slow the response.
As for the Schottky: anode of Schottky to ADC-input of solar-voltage (after the divider), cathode to Vcc. The schottky will prevent current flowing into the ADC-pin. (Jim used the word "tap" with which he points to Vout in your pictures. Right Jim?)

Nard

They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Right -

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Quote:

Is 100K (100uA) a reasonable ADC range , or should one go for 10 or 20K ??

Be careful about sampling time on the ADC since 10K is the max recommended source impedance. If you run a too high of a sampling rate you can get into trouble.

John

John, if Bingo adds 10 nF caps across each ADC-input, I think that the 100k's are OK. Agree?

Nard

They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

I agree.

The whole issue about 10K source impedance is due to current the ADC input uses during the sample interval. If there is a capacitor there, then it serves as a "charge reservoir" and reduces the voltage change during that time interval.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Thanks Jim :)

Btw Bingo, a 5.1 V zener will ruin the linearity of the ADC. Better go for Jim's schottky.
And since we're at it: for the Vref-pin: just a capacitor of 47 - 100 nF to Agnd. If you wish to use AVcc as reference, select so in the ADC-register. There is no need to connect Vref to AVcc externally.

Nard

They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Quote:

John, if Bingo adds 10 nF caps across each ADC-input, I think that the 100k's are OK. Agree?

Yes I agree, as Jim said it would serve as a charge resevoir but if the sustained sampling rate is too high then I think there would be an error introduced. Just as a note, I have done a similiar thing using 82K resistors and had no problems. I was sampling at 500SPS in bursts of 4 samples every 10ms.

Quote:

Better go for Jim's schottky.

Simple, elegent and effective :)

John

Thanz Guyzz :-)

Why a schottky ??? , would a 1N4148 work as well or ??

/Bingo

The Vf of the Schottky is lower and it will keep you below the max allowable voltage on a IO pin.

Exactly !

For these purposes I use schottky's like BAT45 or BAT86. Same size as 1N4148.

Nard

They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

I think you could actually rely on the built-in protection diodes (M8 datasheet figure 21) to protect you from over-voltage as you will have resistor limiting the current. There is event an Atmel application example (zero crossing detector) where this is used for zero crossing detection in a 220V circuit.

Besides this I'd be tempted to size the voltage divider for the biggest possible voltage (21V) and use the same for each voltage. You'll loose a small bit of precision for the lower voltages, but the values will be in 'sync' for all channels.

Markus

Markus