Choosing correct resistors in voltage divider

Thread Starter

dandy1

Joined Sep 30, 2017
178
I am looking at the best way to implement a voltage divider.

voltdiv.JPG
The circuit reads the voltage of 12v LA battery. As I understand it, there will be accuracy loss with higher value resistors - at the same time
lower values will consume more power.

The circuit is read via atmega 328pb chip. The system will sleep a lot of the time and whilst sleeping the current draw is approx @4.2v :
0.3uA : 328pb - power down mode
250uA : Buck converter
1200uA : Sim800 - sleep mode

approx 1.5mA

So adding a 10k/2k divider will add a further 350uA to the system - with a resolution about .025v, which is fine as im only looking for 0.1v
What are the implications for say 100k/20k divider, will this pose accuracy issues with the analog reads?
 

dl324

Joined Mar 30, 2015
16,845
The MOSFET is backwards. What is its purpose? If it's always on, it serves no function.

The highest resistances you can use depends on the current drawn by whatever is connected to A0. The rule of thumb is that the current in R2 needs to be at least 10 times the current supplied to its "load".

EDIT: added "at least" qualification.
 
Last edited:

Thread Starter

dandy1

Joined Sep 30, 2017
178
The MOSFET is backwards. What is its purpose? If it's always on, it serves no function.
..its for reverse polarity - accidental RP.


The highest resistances you can use depends on the current drawn by whatever is connected to A0. The rule of thumb is that the current in R2 needs to be 10 times the current supplied to its "load".
So A0 is analog input pin with 100Mohm input resistance - so:
2v/1,000,000 = 0.000002A or 2uA
R2 = 2uA*10 = 20uA

then 510k/47k will give approx 21uA thru R2??
 

DickCappels

Joined Aug 21, 2008
10,153
@dl324 With your drive current being 10x the load you are probably thinking about transistor circuits.

The ADC in the ATMEGA328 prefers a source impedance of somewhere of 10K or less, so you can start with that value for your lower resistor (R2)
From 24.6.1 in the ATMEGA328 datasheet:

1585847216862.png

1585847510331.png
 

schmitt trigger

Joined Jul 12, 2010
868
There are many web based resistor calculators, which will give you the resistor pairs based on real world resistor values. And will calculate the actual error for non-exact ratios.
The better ones will allow you to choose either E24 or E96 series.
 

crutschow

Joined Mar 14, 2008
34,281
Another way to look at it is that the output divider Thevenin resistance is 0.833 times the lower resistor value, so as long as that value is no more than about 1% of the atmega input resistance you should be okay.
From 24.6.1 in the ATMEGA328 datasheet:
A small capacitor (say 1nF) can be added at the atmega input to minimize it's sampling time without requiring a low resistance source as long as the sampling interval is slower than the about 5 RC time-constants.
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
@dl324 With your drive current being 10x the load you are probably thinking about transistor circuits.

The ADC in the ATMEGA328 prefers a source impedance of somewhere of 10K or less, so you can start with that value for your lower resistor (R2)
From 24.6.1 in the ATMEGA328 datasheet:

View attachment 203266
so in your experience does this mean we should NOT sample with higher impedance (without extra circuitry) or simply the sampling time will be longer?
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
Another way to look at it is that the output divider Thevenin resistance is 0.833 times the lower resistor value, so as long as that value is no more than about 1% of the atmega input resistance you should be okay.
A small capacitor (say 1nF) can be added at the atmega input to minimize it's sampling time without requiring a low resistance source as long as the sampling interval is slower than the about 5 RC time-constants.
thank you - ties up with what DickCappels is saying
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
So i think i'll go with 100k/10k solution which will give me

22 divisions/volt about .05v resolution

and 12v/110k = 109uA. considering the overhead of the sim800 and the buck i think this looks like a likely trade off - about 7% of the total power consumption.

It will give me 46v allowed on the divider input - way more than can be produced.

Thank you everyone for your input
 
Top