Measuring power usage over time? What kit is that? #1527
Replies: 21 comments
-
Posted at 2016-01-26 by @gfwilliams I think in general people would say to use an Oscilloscope. Take a 1 Ohm resistor and connect it in series with the power, then put the oscilloscope across that. If you have an oscilloscope that can log, you could export that log and then add up all the values. I guess an easier method is to get a big capacitor (supercapacitor) and to charge it up to a known voltage. Power Espruino off that, and you should be able to see the voltage lowering over time. The discharge should be more or less linear, so working out the average power draw from that would be pretty easy. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-26 by @gfwilliams In fact to make it easier, you could go to this page Say you take a capacitor of a known size, charge it up to 5v, then time how long it takes to discharge to 4v. You'll get a |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-26 by @gfwilliams Quick example that I just tried here... Put a 0.33uF supercapacitor between Gnd and 5v on the Espruino, and measure the voltage across it. When charged up and after I unplug USB power, I get 4.35v, so I put
So on a 700mAh battery that's |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-26 by AkosLukacs 5V supercaps have significant internal resistance, IIRC in the 10-100Ω range. Radio transmission would most likely cause a brown out. Don't know if espruino and the radio runs at 2.5V... Actually a couple of uC vendors have tools for power measurements, just for inspiration: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-27 by @gfwilliams Yes, the internal resistance is pretty nasty - I guess you could stick a more sensible capacitor across it as well. I wonder whether you could just use one of those other boards as an Ammeter for the Pico? Might be worth a look - but if they don't do average consumption they're not going to be much use. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-27 by CoffeeCups Thanks for the ideas and discussion. I am certainly no electronics engineer but it gives me an idea. Maybe I could just find the smallest LIPO possible (like this 20mah, retired) and see how long before it gives up. Neither appreciating, nor understanding how the different battery types discharge, I could at least compare LIPO to LIPO, and as a bonus I could stick it in the freezer to see how it copes in low temperatures. I'd be opening and closing the fridge door every hour to check it. I say this mindful that if I am going to get serious about this iot stuff, an Oscilloscope will be the right way to go. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-27 by @gfwilliams Yes - it's not going to be very accurate, but it'll give you a rough idea how long you might expect it to last. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-28 by AkosLukacs Honestly, no idea. Theoretically you can remove the IDD measurement jumper, and connect to a different board. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-02-17 by jonreid I have a similar application where I was looking at using a Pico as a remote temperature node. It needs to wake up every 30s, take a measurement from 2x DS18b20 temp sensors then transmit the values using a nrf2401. I was looking to run it off a single 18650 battery - but my theoretical calcs say it wont last the 18months I would like it too. I am making the assumption that the full Pico run current is used while waiting for the DS18b20 to convert and return - or is that not the case ? Gordon - I saw in another post you mentioned it could be possible to slow the STM clock to save power in run mode - is that something that is implemented/quantified as to the savings ? I know I should probably also do some practical measurements here, but dont want to spend that time if this is never going to fly. I have found another little Arduino board setup for this kind of thing which has a 5mA run current - but would prefer to use a Pico as the other half of the project is also Pico based. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-02-17 by @gfwilliams If Espruino is in the middle of a function then it'll be using the full 'run' power, but if it's waiting on a high-res timer it'll be using the non-deep-sleep power (10mA?). The current DS18B20 module actually cheats - it returns the last sensor reading and kicks off new one, so as a result the Pico won't actually be awake for very long at all. I'm afraid there's no clock slowing implemented at the moment. You could probably do it with I'm actually be quite careful with 18650s - they'd be normal Lithium Ion? I'm not sure what the self-discharge would be like over 18 months. You can get non-rechargeable Lithium cells that are rated for 10 years though, and they could be a good bet? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-02-17 by jonreid Good point re 18650, I had not considered the self discharge rate so will cross them off the list ! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-02-17 by @gfwilliams Well, don't take my word for it - look them up and see what it is :) It might be ok if you get decent ones. Something like this could be good though. 9000mAh, and <1%/year self discharge! I could be wrong, but that'd handle Espruino being on for 18 months, 2% of the time. So that's if it were awake for 0.5 sec, every 30 seconds - which seems like serious overkill. I'd prototype something and do some power consumption tests though :) non-rechargeable, but hey - £5 every 18 months isn't a disaster |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-02-17 by jonreid Yes I was having a look at those type of cells last night. In my application the sensor/pico/nrf are going to be located inside a fridge and at those temperatures the voltage drops to around 3.2V, so I would probably need to use a couple of smaller cells. The DS18b20 have a min of 3V and the NRF a max of 3.6V hence probably need to use the regulator, unless I protected the NRF at room temperature. But in principle these look like the right kind of battery to be using. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-02-17 by DrAzzy Good quality 18650 battery will have 2000-3000mAh and should have similar discharge to that larger cell. But you need to get good ones, not the cheap crappy ones - there are a lot of very cheap, super crappy, 18650's on the market - the usual tell is a blatantly inaccurate capacity claim). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-18 by ClearMemory041063 **This is a strange way to measure Coulombs ** A bit more modern. and what I had in mind if you can find the gadget on the surplus market. The last time I saw some was in the late 1980's. They were a couple of dollars each. [https://www.youtube.com/watch?v=Cxj399LuX1M](https://www.youtube.com/watch? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-19 by ClearMemory041063 A practical solution |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-19 by @gfwilliams Looks good - I wonder how accurate it is though - it goes up to 5A, but you'll be measuring almost 1 million times less than that when the Espruino is asleep. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-19 by ClearMemory041063 Accuracy? My experience tells me that trying it in a freezer is prudent. The cold can affect the battery. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-20 by ClearMemory041063 Another method |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-21 by ClearMemory041063 More ideas Another method if E.getTemperature() is available. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-04-21 by ClearMemory041063 Correction |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-26 by CoffeeCups
Hi,
I have a simple project in which my Espruino wakes up every 2 seconds and takes a reading from a magnetometer, if the conditions are right, it wakes up an nfr2401 radio and sends a signal.
All OK and is very good, but I am trying to estimate how long a LIPO battery will last.
I put my multimeter into the correct mode, and put it in-line (?) (measure current ftw) between the LIPO and the Espruino, and fair enough I can see the numbers change as the current surges when the reading is taken and the radio is required to TX, i.e. from almost nothing to a jump then back down again in a blur.
What is the name of the equipment I would need to monitor and log this usage properly, say over a 5 minute period? (some expensive piece of kit no doubt)
What is the poor man's version of that?
I imagine this must be a common practice, how do you set up your workbench to monitor current use as you work?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions