Measuring e-bike power consumption - Page 1
Forum section: electronics / beginners

author: Axk
author_rank: Regular Contributor
timestamp: November 08, 2018, 10:30:03 pm
content: If I want to measure power consumption of an electric bicycle with a circuit connected in between the battery and controller.Would a naive approach using a 2 channel ADC for measuring instantaneous current (measuring the voltage across a shunt) and voltage and then approximating consumed power between 2 successive instantaneous V*I values (area of the trapezoid) and summing it all up work?Any gotchas with this naive approach?

author: thm_w
author_rank: Super Contributor
timestamp: November 09, 2018, 12:00:03 am
content: That will work, shunt will need to be capable of taking the high current without changing much value. You may need a differential amplifier depending on range/resolution/shunt resistance.You can find two versions here if you are looking for ideas:https://www.aliexpress.com/item/50A-New-TK15-Professional-Precision-Battery-Tester-for-LiFePO-Coulomb-Counter-Free-Shipping-with-Tracking-Number/32702066121.htmlhttps://www.aliexpress.com/item/1-Pcs-Digital-Wattmeter-High-precision-Power-Meter-DC-60V-100A-RC-Watt-Meter-Checker-Balance/32852997968.html

author: spec
author_rank: Frequent Contributor
timestamp: November 09, 2018, 08:01:19 am
content: + AxkSounds like a reasonable approach to me.To measure the current I would suggest, though, that you use a high-side current sense amplifier which is made for your job.This would implement thm_w's technique, but all the work is done for you.The MAX4080 is an example:https://datasheets.maximintegrated.com/en/ds/MAX4080-MAX4081.pdfFURTHER THOUGHTSDo you really want to determine current, power or energy or all three?I suggest that you measure, the instantaneous voltage and current and from these two parameters, plus time, you can derive all three of the above values.In any case, your best bet is to use one of the Arduino microcontrollers, which have an on-board 6 channel (or more) 10 bit ADC.Arduinos are dirt cheap and only minimal programming would be required.If you have no experience with Arduinos or programming, still go for this approach and have fun learning- it's dead easy these days with all the support that is freely available on the net.https://www.arduino.cc/en/Guide/IntroductionPS: I haven't checked but I believe you can get DC current sensor modules (called shields in the Arduino world) for the Arduino. If so you could be up and running with little hardware work. Maybe the popular ASC712 AC current senor shield would do your job, perhaps with a couple of modifications.

author: Axk
author_rank: Regular Contributor
timestamp: November 09, 2018, 09:07:39 pm
content: Thanks, guys!Might do a custom board with the atmega uC ultimately, will try with an Arduino first.Have done one atmega custom board before, so shouldn't be too difficult I suppose.One thing I was not sure of about atmega 328P is if it had a true 2 channel ADC or all the channels weremultiplexed. Will look it up.

author: spec
author_rank: Frequent Contributor
timestamp: November 10, 2018, 05:10:17 am
content: No probs from meNice project: let us know how it goes.The ADC is multiplexed.;