ADC to measure battery voltage

Thread Starter

champ1

Joined Jun 4, 2018
136
I have a question regarding little bit maths,

If I want to measure the voltage with adc and voltage range is between 0 - 30 V DC

For example

I have 8 bit adc and adc working with 5v DC

8 bit adc can count 2^n = 0 - 255

How can I measure voltage range 0 - 30 V DC with 8 bit ADC ?
 

ericgibbs

Joined Jan 29, 2010
18,766
hi,
Usual way is a resistive voltage divider, when the top of the divider is at 30V the junction is at 5V.
Can you calculate that OK,? keep the resistor values less that 10K
E
 

KeithWalker

Joined Jul 10, 2017
3,063
I have a question regarding little bit maths,

If I want to measure the voltage with adc and voltage range is between 0 - 30 V DC

For example

I have 8 bit adc and adc working with 5v DC

8 bit adc can count 2^n = 0 - 255

How can I measure voltage range 0 - 30 V DC with 8 bit ADC ?
Use resistive divider to drop the 30 v to 5 v and then divide the output from the ADC by 8.5.
adc.jpg
 

Thread Starter

champ1

Joined Jun 4, 2018
136
V2 = V1 * R2/R1 + R2

where R1 = 50000 ohms , R2 = 10000 ohms

if V1 = 30 V DC

V2 = 30 * 10000 / 60000 = 5 V DC

if V2 = 15 V DC

V2 = 15 * 10000 / 60000 = 2.5 V DC

Calculation prove if the battery voltage is 30 v DC then ADC will get 5 v input signal and if the battery voltage is 15 v DC then ADC will get 2.5 v input signal

It means we can measure voltage range 0 - 30 v between range of 0 to 5 V DC
 
Last edited:

Thread Starter

champ1

Joined Jun 4, 2018
136
In case if we want to measure 0 to 30 A DC,

then How can we measure current

I don't think ADC will read current signal
 

ericgibbs

Joined Jan 29, 2010
18,766
hi,
The usual way is to have a very low value resistor in which the current flows thru, you get a small voltage drop across the resistor.
The small voltage has to be amplified to say 5V for a 30A current OK.?
E
 

Thread Starter

champ1

Joined Jun 4, 2018
136
hi,
The usual way is to have a very low value resistor in which the current flows thru, you get a small voltage drop across the resistor.
The small voltage has to be amplified to say 5V for a 30A current OK.?
E
so we measure the voltage drop across a resistor then use an op-amp to scale this up to 0-5V for the ADC

there are current sensor available in market to measure current

let's take example if I use one current sensor or circuit that can measure current between 0 to 30 A

current I = V / R

We need to know voltage and resistance

How do we calculate load current with 8 bit adc ?

What's formula needed to calculate load current using adc ?
 

ericgibbs

Joined Jan 29, 2010
18,766
If you had a 5V signal from the amplifier when the current was 30A, then 5V would represent 30A,,,, 2.5V =15A and so on.
Say you used a 0.01R series resistor, with a current of 30A that would give a voltage drop across the resistor of V= 30A * 0.01R = 0.3V

You would amplify that by 5V/0.3V = 16.6 times, so the input to the ADC would be 5V at 30A.

Do you follow that OK.?
E

EDIT:
Simple LTS image.
 

Attachments

Last edited:

dendad

Joined Feb 20, 2016
4,452
To measure current, have a look at ACS712 chips.
https://www.ebay.com.au/itm/5A-20A-...hash=item41c9afd40d:m:mudhcL9ercx9TGlLtfoejGQ
These sense the magnetic field of the current and produce a voltage out that you read with the ADC.
The advantage of these is you do not need a sense resistor. And they can be placed in the hot side of the supply if you want as there is no electrical connection to the current path.
A trick too, placing a magnet near then will alter the offset.
 
Last edited:

danadak

Joined Mar 10, 2018
4,057
Questions -


1) What range of current you want to measure ?
2) Resolution of current measurement ?
3) Accuracy of current measurement, relative or absolute ?
4) Current unipolar, or one sign ?
5) Measure high side or low side of load ?

To measure current use a processor with differential input, DelSig type
converter, and a low valued R, like 1 Ohm.

Note just drag and dropping a mux for front end to DelSig will
allow it to do the V measurements as well.


An example -


upload_2018-10-7_12-15-40.png


Regards, Dana.
 
Top