Author Topic: Arduino voltmeter and ammeter  (Read 20554 times)

0 Members and 1 Guest are viewing this topic.

Offline jwbrooksTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Arduino voltmeter and ammeter
« on: November 15, 2013, 10:52:43 pm »
Hello,

I'm a little out my depth, and I was hoping I could get some pointers or in the very least a few links to relevant material.

My Objective
I need to build a "unit" that measures both voltage and current of the power passing through it, and passes these values on to my microcontroller.   I'm looking to use ICs or breakout boards instead of full multimeters.  Please, refer to the attached picture. 

Specs
The power source will be AC stepped down and rectified to ~50V DC.  The current will likely be on the order of 0.25 to 1.5 amps.  The two meters will need have a minimum of 12 bit resolution (16 would be better) and be as noise free as possible.  The sampling rate can be as slow as 1Hz.

My questions
1.  What ADCs or breakout boards do people recommend?
2.  Do these ADCs measure voltage and current directly, or do i need to build an additional circuit to support the ADCs? 
3.  Is rectified or unrectified AC easier to measure?  For my end application, it doesn't matter which I provide.  I just want the cleanest and most precise measurement. 

Thank you.  I appreciate whatever feedback you can offer. 

 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: Arduino voltmeter and ammeter
« Reply #1 on: November 16, 2013, 12:35:04 am »
1) The Arduino has built-in ADC inputs (Eight 10-bit channels on the 328P). You could double them up to improve the resolution, otherwise I'd just get a 16-bit ADC from TI and solder it onto a SOIC breakout board yourself. It may be a good idea to run the input through a high performance instrumentation OP-amp first as well.

2) Normal ADCs measure voltage. To measure current what you'll need to do is use a shunt resistor (or series resistor). If you want to "cheat" you could use something like an ACS712 current sensor, which you place in-line with what you want to measure and it outputs a voltage to measure (e.g., 1mV = 1mA).

3) You'll have to rectify the voltage to measure it with an ADC. You'll also need to attenuate the voltage down to what the ADC can handle as well. What you want to do is rectify the voltage and then run it through a voltage divider. (This is how multimeter's work, when you change ranges you're changing the voltage dividers the input goes through.)

Can you explain what you end goal is? Why can't you use a multimeter? Getting clean, noise free, precise voltage measurements at 16-bits is going to be really hard without designing a custom PCB (with separate analog and digital supplies and proper ground planes). You can buy a $30 multimeter on Amazon that has an RS-232 output, which you could bring into the microcontroller a hell of a lot easier than you're going to build this circuit.
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Arduino voltmeter and ammeter
« Reply #2 on: November 16, 2013, 01:09:48 am »
Quote
1.  What ADCs or breakout boards do people recommend?

16-bit on current measurement is quite difficult: most current sensors are good to 1% (~8 bits).

Quote
2.  Do these ADCs measure voltage and current directly, or do i need to build an additional circuit to support the ADCs? 

ADI and Microchip have some of those chips.

Quote
3.  Is rectified or unrectified AC easier to measure?

Measuring AC is generally beyond what most people are capable of doing.
================================
https://dannyelectronics.wordpress.com/
 

Offline Jon Chandler

  • Frequent Contributor
  • **
  • Posts: 539
    • Throw Away PIC
Re: Arduino voltmeter and ammeter
« Reply #3 on: November 16, 2013, 02:30:59 am »
Look at the TI TMP512/513 chips.  They'll handle up to 28 volts and have a high resolution ADC to measure current with a shunt resistor.  It's an I2C interface.
 

Offline Kappes Buur

  • Regular Contributor
  • *
  • Posts: 137
  • Country: ca
« Last Edit: November 16, 2013, 06:21:58 am by Kappes Buur »
 

Offline johnboxall

  • Supporter
  • ****
  • Posts: 652
  • Country: au
  • You do nothing, you get nothing.
    • Books, services and more:
Re: Arduino voltmeter and ammeter
« Reply #5 on: November 17, 2013, 10:13:07 pm »

Offline synapsis

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
    • Blackcow
Re: Arduino voltmeter and ammeter
« Reply #6 on: November 18, 2013, 04:58:13 am »
I used this on a programmable load project. You can read current, voltage, and power from the single device.

http://www.ti.com/product/INA226
 

Offline jwbrooksTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Re: Arduino voltmeter and ammeter
« Reply #7 on: November 19, 2013, 08:56:44 pm »
Thanks for the feedback!

I've done a bit of research on peoples suggestions, and I think I'd prefer (for the time being) to not reinvent the wheel and use one of these "power monitor" ICs.

What do people think about something like this?  I could keep the 120VAC as it is (no step down or rectification). Is the 24 bit resolution for real?
http://www.ti.com/lit/ml/slyt428/slyt428.pdf
« Last Edit: November 19, 2013, 09:57:43 pm by jwbrooks »
 

Offline jwbrooksTopic starter

  • Contributor
  • Posts: 11
  • Country: us
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7307
  • Country: nl
  • Current job: ATEX product design
Re: Arduino voltmeter and ammeter
« Reply #9 on: November 23, 2013, 10:22:06 am »
I would use the DC value.
Divide the 50 Volt by 15-20 with a resistor divider, buffer it with an opamp, connect it to ADC. Put a shunt on the high side, and connect a high side current sense amplifier to it, connect it to a ADC.
http://nandblog.com/types-current-sense-amplifiers/
If you can tell us not only the resolution, but also the accuracy, maybe we can give you more detail.
 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: Arduino voltmeter and ammeter
« Reply #10 on: November 25, 2013, 11:15:54 pm »
Thanks for the feedback!

I've done a bit of research on peoples suggestions, and I think I'd prefer (for the time being) to not reinvent the wheel and use one of these "power monitor" ICs.

What do people think about something like this?  I could keep the 120VAC as it is (no step down or rectification). Is the 24 bit resolution for real?
http://www.ti.com/lit/ml/slyt428/slyt428.pdf

The MSP430AFE won't take straight 120VAC... You need to use a resistor divider to bring it down to under 400mV (which is the range of the ADC). For current you'd need expensive current transformers or shunt resistors. You'd also need to add filtering for voltage spikes and some form of over voltage clamping.

Then you'd need to optically/magnetically isolate the data output to your PC/second microcontroller.

That's way too complex for what you want to do I think.
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: Arduino voltmeter and ammeter
« Reply #11 on: November 25, 2013, 11:17:37 pm »
Seriously, just get one of these: http://www.amazon.com/TekPower-TP4000ZC-RS232-Interaced-Ranging-Multimeter/dp/B000OPDFLM

$35 Multimeter with an RS-232 interface. The protocol is available online (I've got a copy if you need it) so you could easily interface it with a computer/microcontroller or whatever. Boom, done.
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Offline SixD

  • Contributor
  • Posts: 13
  • Country: se
    • SixDev
Re: Arduino voltmeter and ammeter
« Reply #12 on: December 16, 2013, 06:48:44 pm »
I found this page http://arduinoprojects101.com/arduino-voltmeter/
maybe it can be any help.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf