Pages: [1]   Go Down
Author Topic: Making an accurate volt and ammeter using my arduino, am I missing anything?  (Read 1862 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 77
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi. I'm planning on building a handy little voltammeter. The result is going to be small, include a LCD display and SMD components (including perhaps 2xatmel MCU's). It's going to be plugged directly to a breadboard, be able to handle a wide range of supply voltages, no buttons or cables and it will measure voltage and current at the same time. The ideal is if it could measure current from 1uA to 10A and voltages from 1mV to 100V. Would be pretty cool, right? smiley-razz

I have an idea of how it can be done, but I'm worried about accuracy. I clearly need several measuring ranges and the MCU's has to sense when it needs to change range and then do so automatically. I'm thinking of using a precision voltage reference of perhaps 3.3V or something like that and then connect it to Vref through a resistor. I will then have resistors being connected to gnd using low Rds(on) fets that's controlled by the mcu, this will lower the Vref dramatically thus making it possible to measure uA's and mV's. The resistors will of course be SMD with a very low tolerance (perhaps I can find some 0.1% or something like that). As for the shunt resistor I guess I would have to make the MCU change this out using fets as well as the voltage drop across a 0.1Ohm resistor isn't much if 1uA goes through it, and the heat dissipation would be too much to handle if 10A goes through a 10Ohm resistor. The reason I think I need two mcu's is because I need to individually set Vref for each of them so that one handles the voltage, the other handles current. The last thing that would really top this off is if the voltage and current can be measured anywhere in the circuit, not just as ground as a referance, but I'm not sure how that is accomplished (how does a DMM do it?).

The questions I have are, can I expect this to be pretty accurate if I use many measuring ranges (so that the accuracy of the ADC won't be that much of a problem), 0.1% tolerance resistors, low Rds(on) fets and a decent voltage reference? Also, how happy will the MCU be if I connect Vref to a really low voltage (let's say 1mV)? I can't find any information about this in the datasheet.
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 361
Posts: 17262
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well you are fundementally working with a 10bit ADC converter that AVR datasheet rates as:

Quote
• ± 2 LSB Absolute Accuracy

So 8 bits of accuracy you can count on at all times? While I have no doubt that you can learn a lot in trying to design and build such an arduino project the possibility that you could even match the performance of a cheap $10 DMM is very low in my opinion. If I was to pursue such a project I would at least consider utilizing an external I2C ADC module with much better fundamental accuracy capabilities, such as:

http://www.adafruit.com/products/1085

Lefty

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 77
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That seems like a good idea, thank. Using two external ADC's I won't need two mcu's. I also have doubts that I'm going to get a decent accuracy, but it would be nice if someone could point out a couple of more flaws with this idea (as I'm sure there are).
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33373
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but it would be nice if someone could point out a couple of more flaws with this idea
well
Quote
I will then have resistors being connected to gnd using low Rds(on) fets that's controlled by the mcu, this will lower the Vref dramatically thus making it possible to measure uA's and mV's.
Is rubbish because there is a minimum size for the reference voltage of all A/Ds the arduino's is 1V. This is governed by the noise / hysteresis of the comparator.

Quote
As for the shunt resistor I guess I would have to make the MCU change this out using fets as well as the voltage drop across a 0.1Ohm resistor isn't much if 1uA goes through it, and the heat dissipation would be too much to handle if 10A goes through a 10Ohm resistor.
The FETs need to be good so that their on resistance doesn't overwhelm the shunt resistance.

Quote
The last thing that would really top this off is if the voltage and current can be measured anywhere in the circuit, not just as ground as a referance, but I'm not sure how that is accomplished (how does a DMM do it?).
By having two leads and being battery powered and so isolated from the circuit it is measuring.

Quote
The reason I think I need two mcu's is because I need to individually set Vref for each of them so that one handles the voltage, the other handles current.
No, if you do need two referance voltages then switch them.

Quote
Also, how happy will the MCU be if I connect Vref to a really low voltage (let's say 1mV)?
Not very
Quote
I can't find any information about this in the datasheet.
Table 28.7 Page 323, minimum voltage 1V.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 77
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That blows my whole idea out the window then.

I'm reading the datasheet of a "single channel low-noise, high accuracy  ΔΣ A/D converter", namely the MCP3425. It has an internal reference voltage of 2.048V with an accuracy of +-0.05%. It's 16 bits with a variable gain up to x8. I don't know much about adc's and serial communications, but if I could get this to work I think I would get pretty far.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33373
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't know much about adc
See this for the terms you will encounter.
http://www.maxim-ic.com/appnotes.cfm/appnote_number/641/CMP/WP-36

Having a low noise chip is one thing, making this into a low noise system is another.

Logged

Pages: [1]   Go Up
Jump to: