4 ms·
What is the simplest circuit to accurately measure power use?
by amelius 4y ago
What is the simplest circuit to accurately measure power use?
- oddlama 4y agoJust a battery would be the simplest option. Just measure time until empty. If you want higher time resolution, there are several fully integrated hall effect current measurement ICs out there, like for example the ACS723. If you need even better accuracy or resolution and you can spare 100 bucks, just buy one of the Nordic Power Profiler Kits.
- ilyt 4y agoThat is the way. Once you get into actual measurement there is plenty of hard problems, like your device might only wake up for 10ms, take few hundred mAs of current and go to sleep.
- mungoman2 4y agoYou can place a small resistor in series with the supply, and measure the voltage drop over it. From this and using Ohm's law you can calculate the current. Then the power is trivial. There are special resistors for this purpose that are very low in resistance.
- amelius 4y agoHow accurate can you make this approach? What if I wanted to make sure that the load was not stealing even a dollarcent of energy per year?
- Nextgrid 4y agoI wonder if you could rely on a capacitor charging over time, that you discharge every time you poll? That way you delegate the real-time "counting" to the capacitor and can read it at approximate times (as long as it's frequent enough to avoid fully charging the capacitor since it can't count beyond that)?
- ilyt 4y agoPretty much. Just need to be very stable source and a lot of generic engineering around to not incur error. Hell, that's actually very easy way to make ADC, just start counting, charge cap to pre-determined value then trigger counter stop. There are few improvements to that technique (like dual slope ADC, where you use reference voltage to discharge the cap to get the ratio between reference and input signal) but in general it can be very accurate way to measure.
- ilyt 4y agoAs accurate as resistor and measurement circuit. The data acquisition is kinda a bitch if you want to measure accurately over long time, small IoT device can take microamps when idle and tens of even hundred+ mA when transmitting and that's 4-5 orders of magnitude of dynamic range and that's kinda hard to deal with accuracy https://www.joulescope.com/ https://www.joulescope.com/ handles most of that edgecases but it's a pricy piece of kit if you just want to do some measurements and are not using it to make actual product.
- xxs 4y agomeasure the current, e.g. an ampmeter in series; voltage in parellel. W=V.I Most of the time you care about the current only. Now if you actually want power over time, that is energy. in that case you would need some logging, and sampling
- ilyt 4y agoThe sampling is the problem here. If you sample at say 1s and the chip is using say 100mA for 50ms to send some data, you might completely miss it, you might overcount that pulse
- xxs 4y agowell yeah, of course, if you care about transients, you may switch to an oscilloscope. Alternatively have a multiplemeter that records min/max, and/or has a rs-232 interface. However with enough sampling, even 1Hz frequency should be sufficient.
- ilyt 4y agoOscilloscopes also have a dead-time. If you want to judge the power usage accurately you pretty much have to go to dedicated stuff like https://www.joulescope.com/ https://www.joulescope.com/ althought you might get close enough with using some tricks. Or the ye olde analogue way of integrating the current usage via Like, if you know your device is on 50ms and off 10 seconds you can just record both states power usage and calculate based on ratio, most scopes memory is probably enough for 50ms with enough resolution and idle power usage will most likely be the same over the period. > Alternatively have a multiplemeter that records min/max, and/or has a rs-232 interface. Min/max ain't going to do you much, some WIFI-enabled devices can spike to like 500mA for few us so even if it captures it the max doesn't tell you much.
- dragontamer 4y agoA current-controlled power supply will often tell you the current-usage. Obviously, it depends on your power supply, but even a $50 one these days has this feature. If you're off of battery power or USB power instead, you'll need to build a current-sense circuit. Analog wise, its very simple: a small 0.01 ohm resistor (called a "current sense resistor") is placed in series, and you measure the voltage drop across it. 0.0001 V across a 0.01 ohm resistor -> V / R -> 0.0001 / 0.01 == .01 Amps == 10 mA being drawn. Now the question is "how do I measure 0.0001V accurately" ?? And that's a trivial op-amp problem. So trivial, that people sell cheap chips that already do this for you, called current-sensing amplifiers. They just multiply the voltage by 200 accurately. (so 0.0001V into the amplifier comes out as 0.02V), and 0.02V can be measured by pretty much anything. https://www.digikey.com/en/products/detail/ohmite/MCS1632R010FER/2003858 https://www.digikey.com/en/products/detail/ohmite/MCS1632R01... https://www.digikey.com/en/products/detail/onsemi/NCS199A3RSQT2G/9169780 https://www.digikey.com/en/products/detail/onsemi/NCS199A3RS... Voltage-multipliers though are a trivially easy OpAmp circuit, and I'd recommend that beginners actually try to build their own current-sense amplifiers from scratch. Its good to learn how to use OpAmps, and learn all the issues (ex: Rail to Rail, positive / negative voltages, etc. etc.). I'd recommend you do a 9V project with the LM358.
- amelius 4y agoI think you might want to wire that opamp as an integrator, in this case.
- dragontamer 4y agoAn integrator should be in the circuit "somewhere", but there's a lot of creativity available where I left off. Staying in the analog world alone, you can output the voltage into a 555 Timer, and then have it flash an LED every time the capacitor filled up (and the discharge would also dump the capacitor). For example. Or you could just wire it up to a microcontroller and busy-loop ADC-convert the input. So you can perform the "integral / summation" in microcontroller / in C-code rather than circuit magic. The important tidbit is that we've turned 10mA current into a value we can "touch" and use. Hell, maybe the easiest solution is to just hook up a wire somewhere and shove an oscilloscope there to finish things off, depending on how lazy you wanna get. ------- I know one professional chip did Opamp Integral -> Comparator (if integral is full, dump the charge to ground. If +V, do register++. If integral was full of negative voltage, do register--). Then, whenever the register overflowed, it'd generate an interrupt edge on its output (for both overflow or underflow). Alas, I forgot which chip did this. But this way, you could build all your stuff out of 100kOhm resistors, 10nF capacitors, tiny digital logic circuits with micro-amps of power usage that wakes up your microcontroller out of sleep for just a "Current_Reading++" statement on overflow and you go back to sleep. (or current_reading-- on underflow) But that's all advanced stuff that probably doesn't matter for a student making their first practical OpAmp circuit :-)
- swamp40 4y agoWe charge a capacitor up and time its discharge to a certain level while running the circuit. Then we repeat it using resistors instead, until we match the discharge rate exactly. Then measure the resistor and do I=V/R, using the midpoint V. That accounts for all the surges and eliminates most error sources, giving you a nice and extremely realistic average current draw.
- dekhn 4y agoI dunno if you want to use a simple circuit; but, you can use a voltmeter in series ampmeter mode. However, I just use one of these: https://www.amazon.com/gp/product/B00FPU6G4E https://www.amazon.com/gp/product/B00FPU6G4E which has the advantage of being able to tune the voltage and current to be either constant current or voltage.
- eande 4y agoI am not sure what your search for "simplest circuit" is as there are many defintions I would need to know first, e.g AC vs DC, power level, etc. to narrow it down. Like others mentioned it is a about measuring voltage*current. I found this video for low power DC measurements helpful as well https://www.youtube.com/watch?v=LUB8RWzzLWc&t=15s https://www.youtube.com/watch?v=LUB8RWzzLWc&t=15s or for AC Power Meter https://www.youtube.com/watch?v=QXNlsawaYEg&t=868s https://www.youtube.com/watch?v=QXNlsawaYEg&t=868s
- antoniuschan99 4y agoI have an Otii Arc and Nordic PPK 2. Ppk2 is cheaper and the Otii is more accurate.