Voltage divider , protecting ADC

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

A GIF is worth a thousend words   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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Right -

Jim

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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

Nard

A GIF is worth a thousend words   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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

A GIF is worth a thousend words   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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanz Guyzz :-)

Will add a schottky from Vout/ADCin to VCC , and a 10nF from ADCin to GND

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

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Exactly !

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

Nard

A GIF is worth a thousend words   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

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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