Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

measure Voltage and Current using 8051

Status
Not open for further replies.

ifithegr8

Member level 1
Joined
Jan 26, 2009
Messages
34
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Pakistan
Activity points
1,485
Hi every 1.
I want to make Multimeter capable of reading max of 30 V DC and also make current meter capable of reading 15A Max.
I have never worked on AVR or PIC.so far i have managed to make voltmeter using AT89C51 and ADC 0831 using voltage divider ckt that reads max upto 15 V. Please suggest me a solution.

there is a ckt in ADC0831 datasheet by the name Digitizing Current Flow that has max of 2A should that work for current and can it be made to reach my required current??
 

you can easily use voltage divider to sense voltage below 5V.
For current, you may use a shunt resister or transformer (also good for voltage sensing).
 

Regarding the current measurement circuit, are you going to power the multimeter from a battery so that your ground is floating? If not, i.e. if your multimeter and load share a common ground, you'll have to scale the voltage dividers at the input of the "Digitizing a Current Flow" circuit so that the ADC inputs don't go above 5V relative to ground. Maybe some zeners would be good here for additional protection.

Then just scale the 0.1 ohm current sense resistor. Looks like you need about 13 mohm for 15A using the suggested voltage reference. Watch out though because you will dissipate a lot of power (about 3W) at that current. You can make the sense resistor smaller of course, but then your circuit has to be more accurate, so there's a tradeoff.

Regards,
Chris
 

i am implementing it to hardware an i was wondering that what is its min level will it detect 0.1 A??
 

I'm not sure what you mean. Are you asking what the minimum detectable current is?

If you keep the ~0.25V reference and use a 13 mohm sense resistor, then the resolution with an 8-bit ADC will be 0.25/(.013 * 256) ~= 75mA. So not very good. You might want to generate the reference with a DAC in order to measure current over different ranges, although you could run into accuracy problems unless you design carefully. Maybe somebody knows a better way to do this.

Regards,
Chris
 

you can use current sense amplifiers
MAX472 -Maxim
TSC1001 - STmicro

or you can make your own amplifier using 2 OPAmps and 1 transistor.

if measured current by MAX472 is converted in voltage 2,5 V and you are using 10 bit ADC (1 step = 4,8mV) you can detect without any error currents above 100mA
 

I'm in doubt for what charlyking says. I don't think transformer would work for DC signal as what ifithegr8 requires. Better use a shunt resistor, few opamps to amplify the voltage across this shunt, with multi-turn resistors (feedback + offset) to calibrate the output accurately. 0.1A resolution will be acheivable as 15/0.1 = 150 steps which is much less than 255 steps of 8-bit ADC ADC0831 the one ifithegr8 is using. But here u'll face one problem..... If polarity gets reversed....in that case you require 300 steps for which this ADC wont work.
 

you should use a SAR 16 bit a-d and some sort of switched in divide by stage
then over sample and switch in the needed divisors using analogue switches
using the sample and resample function

as long as the resample frequency = 16 X 2 + ins depth and any needed lag

your quids in to get a 32 bit value as a decadanal resultant /32 bit value

youll get easily 100,000 volts or current or both to 1v or 1amppervolt
or you can apply divisors to V=/32/=I in a linear fashon as decadanol steppings



using 0- 10v as a sweep range = decade true results when digitising
adding switched in shunts and V &| I dividers is the way

a digital R2R and I2I ladders spring to mind using resistors

same way any really 32bit accurate lcd volt or current meter works

even 128bit values in v and i are possible but take 16 sar cycles X2

basicaly unless you want to wait 1 second
then an 8051 doest have the balls

better to use a dsp @ 400 mhz some fpga or something as the core
i remember 8051 is a synth core and runs at up to 1ghz on fpga??

im sure im right
this way you can have multiple r2r and i2i on say 4 or 8 or 16 a-d
and get a .0000 0000 0000 0001v or amp or 1000,0000,0000,0000 accruacy

here http://mondo-technology.com/super.html
is a pic unit called a super probe
i built one and its hand for computer work and low voltate
but im sure you can extend the senario in your mind
and seek the libs and code you needs
together with adding some ideas from the above text
to conduce your project

if i can help let me know

:D
 

charlyking said:
you can easily use voltage divider to sense voltage below 5V.
For current, you may use a shunt resister or transformer (also good for voltage sensing).


HIIIIIIIII
I am also doing the same application.
I have to only monitor the voltage level of car battery and give the low voltage alarm signal. Also monitor the startup voltage for the engine?

Please help me regarding that........
 

Hello all,
Always calculate least digit to measure i.e. if 30V = 30.0V or 30.00V? accordingly choose ADC. Higher resolution ADC will give more resolution but costs more. Current can be read with shunt resistor. scale resistor such that it should not load your circuit.
ideally Voltmeter should have infinite input impedance and current meter should have zero input impedance.
example:
voltage range is 0 - 30.0V
for 30V range minimum voltage is 0.1V = 100mV.
with 7107 you can easily implement 30.0V full scale range.
But make sure that your input impedance should be as high as possible >10M
for current range is 0 - 2A = 0.000A to 1.999A
then use shunt
V = I*R
R = V/I
V = 2.00V full scale
I = 2 A
R = 2/2 = 1 Ohm
note that this resistor is added into series with load. reducing resistor to 10 times is R = 0.1Ohm will need differential amplifier of X10.
Always design such way that your inputs both high and low should be floating with your supplies.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top