Power Meter Project

LewTwo

1 MW
Joined
Apr 8, 2014
Messages
2,119
Location
Houston, Texas
I am looking at getting a new battery for my primary ebike. Before I do that I would really like to know how much power I use on a typical trip to the grocery store. I have, in the past, managed to 'magic smoke' a couple of those cheap watt hour meters. So I decided to make a DIY version. I was going base it on a Peacefair 0-100 volt 0-50 Amp PZEM-051 DC Power Meter but I got one of those and found out that the External Shunt is HUGE! Time to re-evaluate.

Known facts:
1 ) Neither of my ebikes draw more than 1200 watts from a 60 volt battery (closer to 1000 I think).
2 ) Number one means that I should not need more than a 20 Amp meter.
3 ) None of my chargers put out more than 5 Amps at 58.8 Volts.
4 ) I use XT60 on my ebikes except for the oddball Golden Motor 3.0 x 8.5mm barrel plug on the charger.
5 ) Peacefair makes a version of their DC Power Meter that is rated for 0-20 Amp at 0-100 Volts: PZEM-031
6 ) The meter retains accumulated values (watt hours) until reset.
7 ) The PZEM-031 uses a internal resistor that greatly simplifies the wiring required.
8 ) The PZEM-031 can be used between a charger and a battery or between a battery and load w/o rewiring.
9 ) The PZEM-031 is marketed by Drock, Hiletgo and others under their own brand names.
10) Available on-line documentation for the meter sucks.
11) I do not ride in the rain.

So this is what I have come up with:
Power Meter PZEM-031 Assembly (1020).jpg

Because I am lazy, I plan to use XT60 connectors pre-terminated with 150mm long 12 AWG stranded wire with silicone insulation. I am using XT60 Male connectors on both the input and output sides. Then all I need is a Female to Female XT60 adapter cable to plug it in-line with an XT60 power cable regardless of the Male/Female order. Of all the various XT60 adapters, a Female to Female does not seem to be one of them but 'tis simple enough to make. I also want a couple of 'raw' wire connectors for testing unterminated batteries or chargers or motors.

I have occasionally run into a system without a On/Off switch (my primary E-Bike for instance). I recently purchased a Jtron switch that is rated at 50 Amps at 50 Volts continuous but it has not been tested. I am going to stick it in there as well. Worst case scenario is I have to replace it with something else or remove it. Yes the switch really does read "NO" and "OFF" ... go figure.

This is NOT intended to be permanently installed but rather to be used as needed to acquire some desired information. I am thinking of putting some paracord loops through the sides to that it can be strapped or tie wrapped to a bike frame as needed.

Meter: https://www.amazon.com/dp/B079JVGRSL
Project Box: https://www.amazon.com/dp/product/B08214K51C
Switch: https://www.amazon.com/dp/product/B08612YVG9
Xt60 Cables: https://www.amazon.com/dp/B07CN2S53W
Wire: https://www.amazon.com/dp/B01ABOPMEI

Feel free to comment, tell me how badly I am screwing up, etc.

Lastly:
At 5:00 AM the temperature in Houston is 19 degrees fahrenheit ... damn but that is cold :warn: :shock: :cry:
 
:thumb:

I like to use a similar set-up to monitor charger operation...



[youtube]yNcjyf4KPx4[/youtube]




See it built here (post #47)...
https://electricbike.com/forum/foru...t-52v-11-5ah-huffy-parkside?p=72784#post72784




With a more permanent one like yours in the cockpit. POST #25.

3siWKdu.jpg



Regards,
T.C.
 
TommyCat said:
...
With a more permanent one like yours in the cockpit.
...
Regards,
T.C.

Hey I recognize that display unit :D Well done!

I wanted a KISS portable solution. If I go with something "more permanent" it will likely be a GRIN Cycle Analyst. I have been going over the CA docs and I think that I can completely replace the GM display.

P.S.
10:00 AM and it is still 18 degrees in Houston. :roll:
 
AFAICT everything looks good.

If that switch is basically the same internally as the harbor-freight removable-t-key battery shutoff switch I'm using on the trike, it'll do just fine. I've been using that thing for turning the trike on and off several times a day for years now, and it takes the initial spark and all the power of using it while riding, etc., with no apparent change in operation so far.


I've considered a few times getting the larger version of the meter you're going to use, with the external shunt (like the one you decided against, or more likely the 100A+ version), just for testing where I don't want to move the CA off to the test stuff, or setup it's menus just for that, etc.

I have a cheap "USB" power analyzer on the slowboat from China that will do some of what I want and is really small, but it can't do high voltages or currents so doesnt' work for ebike traction pack testing applications...but I need it to do USB stuff too, so it was worth trying out anyway.



LewTwo said:
10:00 AM and it is still 18 degrees in Houston. :roll:
I only lived there till I was four (which is ancient history now) but I dont' remember anything cold enough to even require clothes at any time of day or night. :lol:

When I was older, in the 1980s, and lived in north Texas about halfway between DFW and the Red River, THAT got pretty danged cold (snow covering the house past the eaves once, plenty of other frosty times). :brrrrrrr:
 
I'm using one of those blue watt meter gadgets from red china right now, and it's been good ( for $8 ) but it has an integrated shunt so has to be near the battery wiring. These do watts,amps, whr, amphrs,min volts. For the summer I'd like to make a handle bar mount display that among other things shows watts per km/hr. I have not seen this in any meter yet, but I like it to educate me on my 'gas mileage' for different speeds. I guess I would have it average for a few seconds and show the number. Data could come from Hal sensor pulses and a phase current sensor salvaged from a burnt controller. Arduino pro mini for brain. 2 line lcd like the cycle analyst or maybe a 2 color e-ink display I have, if I want to add some graphics to it. I don't carry a smart phone when I ride. Things to do while the weather is shite.
 
marka-ee said:
For the summer I'd like to make a handle bar mount display that among other things shows watts per km/hr. I have not seen this in any meter yet, but I like it to educate me on my 'gas mileage' for different speeds.
Grin Tech Cycle Analyst?
 
amberwolf said:
marka-ee said:
For the summer I'd like to make a handle bar mount display that among other things shows watts per km/hr. I have not seen this in any meter yet, but I like it to educate me on my 'gas mileage' for different speeds.
Grin Tech Cycle Analyst?
Does it show Watts per speed number ? What I call gas mileage right now as opposed to after the whole trip Whr/km.
I know it's easier to get a CA, but I enjoy doing Arduino projects anyway.
 
marka-ee said:
amberwolf said:
marka-ee said:
For the summer I'd like to make a handle bar mount display that among other things shows watts per km/hr. I have not seen this in any meter yet, but I like it to educate me on my 'gas mileage' for different speeds.
Grin Tech Cycle Analyst?
Does it show Watts per speed number ? What I call gas mileage right now as opposed to after the whole trip Whr/km.
I know it's easier to get a CA, but I enjoy doing Arduino projects anyway.

Watts per speed would depend on a lot of variables: uphill, down hill, wind etc. I doubt you find anything that can handle that.

Cycle Analyst is a good option and can use a remote shunt (can even be 'direct wired' to some controllers). If I am not mistaken it can even do bi-directional power usage but of course that would be dependent on the BMS and motor as well. You can download the full manual as a PDF to see all its capabilities.

https://ebikes.ca/documents/CycleAnalyst_V31_Web.pdf

Grin Cycle Analyst.png
 
@LewTwo, if you like I can move this OT discussion to it's own thread. :)

marka-ee said:
amberwolf said:
Grin Tech Cycle Analyst?
Does it show Watts per speed number ? What I call gas mileage right now as opposed to after the whole trip Whr/km.
I know it's easier to get a CA, but I enjoy doing Arduino projects anyway.
If you mean show you what watts it took at 20mph vs 10mph, no, not directly.

But you could use the Grin Analogger to log all the data of a trip, then the Trip Analyzer to break that down. Or you could use an arduino to read the data either from the analogger as you go, or do the logging itself, and analyze the data "live" as you go, displaying columns for different speeds, conditions, etc., and the power actually used in each speed, condition, etc.
 
Pretty cool, I didn't know about the analogger device. I like the idea of the instantaneous gas mileage reading as it would help me slow down to save energy to go further. Not hard to compute range left at current usage as well to make sure I get back without draining battery too much. SD card add-on for Arduino is about $3 last I checked.
 
marka-ee said:
Pretty cool, I didn't know about the analogger device. I like the idea of the instantaneous gas mileage reading as it would help me slow down to save energy to go further. Not hard to compute range left at current usage as well to make sure I get back without draining battery too much. SD card add-on for Arduino is about $3 last I checked.

I have always thought the analogger was overpriced. All it is doing is capturing a digital TTL signal. A $5 Chinese Nano could do the job if it had access to a bit of memory. Note that you should be able to 'tap' adequate 5 volts DC from the Cycle Analyst. Something like this for memory (includes RT clock):
https://www.ebay.com/itm/184626050374

SD-Card and Clock.jpg
 
LewTwo said:
I have always thought the analogger was overpriced. All it is doing is capturing a digital TTL signal. A $5 Chinese Nano could do the job if it had access to a bit of memory.
Never thought of it that way. :) I'll have an Analogger (used) soon, to see for myself "what's inside" if it's actually any more than that. (I think it might have more because it's designed to have a GPS module plugged into it to log that data, too?)

I also have a pack of 3 of those cheap Nanos
https://www.amazon.com/gp/product/B01DLIJQA2?psc=1
that I will hopefully have a bit of time and energy to start learnign how to use soon. (not for this, but once I understand them.... I got them to try out the PAS-cadence-sensor-to-analog-throttle-voltage project in a thread around here somewhere, which I want to modify to help me use the CAv3 and a THUN BB torque/cadence sensor to startup the trike from a dead stop with *only* the torque sensor (which it can't do normally), along with some other things on the trike.

I'm not really a programmer, though, so I will have some learning to do before I get there. :oops:
 
amberwolf said:
Never thought of it that way. :) I'll have an Analogger (used) soon, to see for myself "what's inside" if it's actually any more than that. (I think it might have more because it's designed to have a GPS module plugged into it to log that data, too?)

Maybe I over simplified it because all I am really interested in is the time and power.
I can see the advantage of having GPS.
Of course they make make modules for that as well.

amberwolf said:
I'm not really a programmer, though, so I will have some learning to do before I get there. :oops:
It uses a simplified version of C#. There are also lots of available 'plug ins' for various functions.
 
LewTwo said:
Maybe I over simplified it because all I am really interested in is the time and power.
I can see the advantage of having GPS.
Of course they make make modules for that as well.
I found this project
https://create.arduino.cc/projecthub/PaulTR/bike-route-data-gatherer-12a831?ref_id=bike&offset=0
that might be useful for that sort of thing, from parts of it's description. (I still know almost nothing about arduino so it might not apply :oops: ).

amberwolf said:
I'm not really a programmer, though, so I will have some learning to do before I get there. :oops:
It uses a simplified version of C#. There are also lots of available 'plug ins' for various functions.
Well, I sort of knew BASIC back in the 1980s. Does that help? :lol:

I officially started my journey...uploaded the Blink example to one and it didn't explode, so I copy/pasted the blink code 8 more times in the loop and changed the three first and last ones to 300 instead of 1000, and the last to 2000. That didn't explode either, but now the blink message is appropriate. :lol:

I started a thread of my own for my Nano stuff, to keep your thread a bit less cluttered
https://endless-sphere.com/forums/viewtopic.php?f=2&t=110497
 
@amber , The blink example is a good milestone actually. You got it hooked up, wired some stuff and got the whole computer setup properly for doing projects! The nice thing about Arduino is that there are all kinds of code examples and libraries out there to learn from and assimilate into your own projects. Parts are dirt cheap if you blow something up. Now the limit is your imagination and inventiveness to make something exactly how you want. The Arduino is the 555 timer of our times, if you know what I mean.
 
Follow Up

The best-laid schemes o' mice an' men gang aft agley (Original Irish, Robert Burns, 1785)…
The best-laid schemes of mice and men go oft awry (English translation)
Plan “A” is a loser (Tango and Cash) ...
Try, try, try again (my mother, RIP) …
I changed my mind (many people, what mind?) ...

That box is way to big to mount on a bike (famous last words). I went with a much simpler test rig for the bike: one power meter, male/female XT60 connector leads and a couple of tie wraps. Output XT60 wires are routed through the meter’s case. Not fancy but it gets the job done.
Power Meter A1 (800).JPG
For bench use I needed something with a switch. When I try to connect the cables for a 60 Volt battery they arc and spark and I jump thus breaking the connection. No way around that … I just can not suppress that reflex to jump.
Power Meter PZEM-031 Assembly V2(800).jpg
I am going to try to use that expensive, fancy rotary switch in my Shark battery pack. For my Power-meter I chose a less expensive Carling Technologies Toggle switch (16 Amps at 125 volts DC, 32 Amps at 60 volts DC). It is also double pole so it breaks both positive and negative sides of the power circuit.

https://endless-sphere.com/forums/viewtopic.php?f=2&t=110347

I also decided to use terminal blocks that incorporate both binding posts or 4mm female bullet connectors. The brass screws are 4.6mm diameter so they should be good for at least 30 Amps as well. I will have to use stub cables for XT60 and/or XT90 connectors but I have those for the battery chargers any way. Inside the wires are BNTECHGO stranded 12 AWG silicon with a inline BNTECHGO ATC/ATO fuse holder and 20 Amp fuse (which can be changed to another value).
Binding Posts (512).jpg
I printed full size (1:1) paper templates and glued them to the box with Elmer’s glue stick. I rough cut the rectangular hole out with a fine tooth coping saw and cleaned it up with a utility knife. The round holes were done with a hand held cordless drill. Then I removed the paper and cleaned the surfaces with isopropyl alcohol. For the labels I used full surface water slide decals. They have three coats of acrylic lacquer to seal the ink. Then I installed the components. The case material is too thick for the snap on the meter. It and the switch are glued in place with white silicone RTV. Lastly I terminated the wires and connected everything together. Yes, it is big and bulky as well as being overbuilt but it works. Here is the end result:
Power Meter 00 (800).JPG
Power Meter 01 (800).JPG
This is primarily to be used for ‘old school’ capacity testing battery cells or batteries. So the other half of this is a “load”. I have a 5 ohm 100 watt ceramic wire wound variable resistor (actually one side of a rheostat) for single cells and 12 volt batteries. For something more demanding I just happen to have a matched pair of 12 ohm 200 watt wire wound variable resistors (the big, long, ugly, unreliable things). I really do not like the latter.
 
TommyCat said:
I like to use a similar set-up to monitor charger operation...

Regards,
T.C.

Just ran across your thread on
https://electricbike.com/forum/forum/builds/ebike-building-directions/48457-1st-build-e-bike-rider-magic-pie-v5-rear-bottle-batt-52v-11-5ah-huffy-parkside/page4

Found this bit very interesting ...
Golden Motor really does have one of the most atrocious wiring harnesses.

tD0TEkI.jpg
 
Your finished power meter test box looks vey nice and well made. Is the accuracy of the meter up to specs?


LewTwo said:
Found this bit very interesting ...
Golden Motor really does have one of the most atrocious wiring harnesses.

For my first foray into the E-bike world, I wanted something fool proof and guaranteed to work together.
To that end it works well, if you find what to do with the extra lengths of cable. :wink:

Funny thing is, after the easy motor connection mod... I've never had to take it off since. Hope I haven't jinxed myself. :D

Did you ever get around to buying a Cycle Analyst?
 
TommyCat said:
Your finished power meter test box looks very nice and well made. Is the accuracy of the meter up to specs?
H'mmm ... not sure if I really know how to verify the accuracy but it does seem to be within specs. Gives me the information I need.

TommyCat said:
Did you ever get around to buying a Cycle Analyst?
I have one sitting on the shelf but do not have any current plans for its use. My lightweight bike has no display at all and I find the GM display adequate on the other one.
 
Back
Top