Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Measuring current and/or wattage with Arduino

  1. #1
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default Measuring current and/or wattage with Arduino

    I've been trying to figure out how to set this up. I want to be able to read current or wattage of 3 different DC lines (3v, 5v and 12v) and displaying them to an LCD screen.

    This will be used in conjunction with my LCD voltmeter and project Power house. I want to be able to push a button and switch the display between volts and current or volts and amps or maybe even all 3.

    I've been looking into precision resistors and also hall effect sensors. what would be the best way to go about hooking this up?

  2. #2
    Will YOU be ready when the zombies rise? x88x's Avatar
    Join Date
    Oct 2008
    Location
    MD, USA
    Posts
    6,334

    Default Re: Measuring current and/or wattage with Arduino

    What you want to do is get a current sense resistor (also called a shunt). It will have a very, very low resistance. Then, measure the voltage drop across the shunt, apply I=V/R, and you're done. Also, if you want to show power use, just multiply the voltage by the current (P=IV).

    EDIT:
    If you want to do it really cheaply or need to pass a very large amount of current, you could also just drop in a length of large-gauge wire. Just measure the resistance and use that in your calculations. High current shunts are just sheets of metal of a known resistance, so it's basically the same thing and doesn't require you to buy more components.

    EDIT2:
    Quote Originally Posted by SXRguyinMA View Post
    volts and current or volts and amps
    Same thing. Current == phenomenon. Amps == unit.
    That we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously.
    --Benjamin Franklin
    TBCS 5TB Club :: coilgun :: bench PSU :: mightyMite :: Zeus :: E15 Magna EV

  3. #3
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default Re: Measuring current and/or wattage with Arduino

    ok so that will work for the 3.3v line as it's well within the Arduino's reading range. According to this guy, I'll need an opamp stage or two for both the 5v and 12v sections (as I needed voltage dividers for both) to get the readings within spec. Off to Google I go lol

    This is all the stuff I'll be learning once I get my prerequisites out of the way and actually get into my Electrical Engineering course

    oh and I meant volt and amps or volts and watts, but ideally, be able to cycle through all 3

  4. #4
    Anodized. Again. Konrad's Avatar
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    1,060

    Default Re: Measuring current and/or wattage with Arduino

    Opamp stages for what? Preamp? Sorry, I'm not familiar with Arduino parts ... aren't these functions built into the ADC inputs?
    My mind says Technic, but my body says Duplo.

  5. #5
    Will YOU be ready when the zombies rise? x88x's Avatar
    Join Date
    Oct 2008
    Location
    MD, USA
    Posts
    6,334

    Default Re: Measuring current and/or wattage with Arduino

    The link was saying that the voltage drop on the heftier rails probably won't be enough for the arduino to pick up, thus the signal amplification.
    That we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously.
    --Benjamin Franklin
    TBCS 5TB Club :: coilgun :: bench PSU :: mightyMite :: Zeus :: E15 Magna EV

  6. #6
    Anodized. Again. Konrad's Avatar
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    1,060

    Default Re: Measuring current and/or wattage with Arduino

    Ah. Choosing a better Arduino part (or a better non-Arduino part) isn't an option?

    If you're gonna stick a bunch of extra logic in there anyhow then maybe cannibalize an inexpensive DMM instead ... achieving basic DCV accuracy of <±0.5% across the full DMM range is easy for even the lousiest cheap DMM, plus you get the display and whatever logic is needed to drive it (and some other cool parts like the rotary lock switch and probes and jacks) ... check out this cheap beauty ($18 at Wal-Mart, $12 at Amazon) or even this ultra-cheap Shenzhen special ($3.49) ... these would probably work well for this application and might cost less than proper Arduino parts. Then again, an LM324 (or whatever) probably only costs two bucks ... still, if you've got an old junkmeter lying around ...
    My mind says Technic, but my body says Duplo.

  7. #7
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default Re: Measuring current and/or wattage with Arduino

    well I'm going to be integrating a multimeter into the project (see Power House in my sig), but I would like to have a real-time readout on the LCD of exactly what is being used by each output without having to probe them. The Arduino components are the easiest for me, as it's the only thing I'm familiar with at the moment

  8. #8
    Will YOU be ready when the zombies rise? x88x's Avatar
    Join Date
    Oct 2008
    Location
    MD, USA
    Posts
    6,334

    Default Re: Measuring current and/or wattage with Arduino

    This could be a cool addition to this. 640x200 monochrome display, $2 at Electric Goldmine.
    http://www.goldmine-elec-products.co...?number=G14876

    I did some searching the other day and found a guy who wrote an AVR driver for it...unfortunately it needed, iirc, 32KB of SRAM to drive the whole display, so you would need to figure something out with a display buffer. I'm planning on picking up a few of them in a week or two to see how they work out.
    That we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously.
    --Benjamin Franklin
    TBCS 5TB Club :: coilgun :: bench PSU :: mightyMite :: Zeus :: E15 Magna EV

  9. #9
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default Re: Measuring current and/or wattage with Arduino

    awesome idea but I'm already cramming everything in spacewise lol

  10. #10
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default Re: Measuring current and/or wattage with Arduino

    well I think I've found a simple and inexpensive current monitoring device

    http://www.goldmine-elec-products.co...?number=G16976

    I'll pick up 3 of these and hook them to the arduino, and run one power supply line through each

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •