E-Bike Fuel Gauge

NRG

Esteemed Pedelecer
Oct 6, 2009
2,592
10
Full credit for the idea goes to Jeremy Harris over on ES, a very clever, helpful and all round decent chap. ES thread:

Endless-sphere.com • View topic - Simple ebike 'fuel gauge'

This sounded such a good idea and something I’ve been looking for on my Peugeot, so I decided to give it a try.
The display is a 9 segment LCD ‘analogue meter’ set to give a visual readout of remaining battery capacity and instantaneous current draw readout. Full scale meter deflection (FSD) is set for 30amps and total battery use is set for 10Ah batteries. The unit utilises a Picaxe-08m microprocessor and Jeremy has provided the code / program needed to make it all work. The code can be tweaked to support other capacities up to about 18Ah. Max voltage is around 65v. A reset switch is included to reset the Ah accumulated counter.
Using Jeremy’s cct diagram I laid everything out on some copper strip board, the layout worked first time to my surprise but the board is a little big, as you will see later it only just fitted inside the controller...I did consider fitting it externally but managed in the end to squeeze it in.


The display mounts on the handle bar in a neat small box from Maplin and includes a switch to flick between the two display modes. A small resistor network (potential divider) is needed to limit the meter input voltage to just under 1v for FSD, I ended up with 58K in line and 18K to ground


Just 4 wires are needed to connect the meter and I used the USB cable form an old Microsoft Mouse! I drilled the cable hole off-centre to miss the handlebars and the meter itself was also off set in the box to proved room.

 
Last edited:

NRG

Esteemed Pedelecer
Oct 6, 2009
2,592
10
In use the meter looks like this:





The cct board itself looks like this:



On the board I included a programming port in case I need to change the code at a later date. Programming proved a bit tricky as it needs an RS-232 connection to the PC, I had a number of USB to RS-232 converters available but found that only one of them would work. The s/w to program these little Picaxe devices is free to download and very easy to use.

 

NRG

Esteemed Pedelecer
Oct 6, 2009
2,592
10
On test:



The unit utilises the shunt link already present in the controller so the sense lines just need to be connected to a convenient solder pad either side of it, apart from the meter and mode switch wiring, the other connections are for a reset switch to the battery voltage, a +5v pickup off the board and a 0v connection.
Getting it to fit into the controller case was problematic and if I make another I would try optimise the board a bit better and maybe drop the programming port.



The meter mounts on the handle bars using a couple of tie wraps and those stick on mounting pads.





I don’t know how accurate the meter is yet for battery capacity but the instant current readout seems to be close with a 2/3 scale deflection for 21 amps drawn from the battery. If it proves to be a long way out I can tweak the program to give a more accurate reading.
 
Last edited:

wurly

Esteemed Pedelecer
Aug 2, 2008
501
9
Yeovil, Somerset
That is very neat. I usually have a turnigy meter cable tied temporarly to the handlebars with a few feet of heavy cable.
I also have a spare shunt resister that would do for a project like this or i guess i could connect it to the shunt in my controller.
Is the meter waterproof do you think? Can you forward the circuit details or do you think i should contact Jeremy myself?
 

NRG

Esteemed Pedelecer
Oct 6, 2009
2,592
10
Hi Wurly, the meter is water proof, well it's supplied with a rubber mounting gasket that sticks down and the meter sits into it. The LCD part seems to be bonded to the metal surround. The cct is on the ES link in the first post, Jeremy didn't post a layout diagram so I just worked it on to the strip board as best I could.
 

wurly

Esteemed Pedelecer
Aug 2, 2008
501
9
Yeovil, Somerset
Where did you buy the meter NRG? the link on the ES thread suggests you can buy them for $12, shipping came out at $30 though:(
 

NRG

Esteemed Pedelecer
Oct 6, 2009
2,592
10
Ah, yes, I bought mine from Farnell...not the lowest unit cost but with free shipping over £20 it was easy to add on a few more components to make it worth while. The Picaxe-08m came from Rapid Online via Ebay, the rest of the bits from my spares or Farnell.
 

Orraman

Pedelecer
May 4, 2008
226
1
In Post #5 manuka shows how to use a cycle computer to measure Amps and Amphours using a Pixaxe Micro.
It uses a separate current sensing resistor external to the controller with thin wires to the cycle computer on the handlebars.
For ebikes the important information is in the link to "for the feedback".

" In 2006 I used this with great success to drive a modified bike computer display - Amps were registered as km/hr & A.h as km. Check here for the layout, here for the schematic,here for the code & finally (!) here for the feedback.

Accessed from the Picaxe site.

Current sensing - PICAXE Forum
 

Pob

Pedelecer
Dec 12, 2010
36
0
Derbyshire
Your battery metre looks fantastic! For those of us not so clever with electronics would you make them for others? You could make a profit so it wouldn't be such a chore?

I would be very interested in one - I have a 9ah 36V Li-ion battery.

Is this something you would consider? If so I would buy one.

Pob
 

John L

Esteemed Pedelecer
Nov 23, 2007
287
6
Thanks for the post NRG - very neat work.

I remember I asked last year how ye guys knew all this stuff and as a result I have picked up a few books on basic electronics and in particular "Build your own electric bike" by Matthew Slinn. So I'm beginning to feel that I might at last make some sense of the technical side of things:)

Cheers

John
 

Pob

Pedelecer
Dec 12, 2010
36
0
Derbyshire
Thinking this through it would mean sending you my controller and subject to fitting your electronics inside etc etc I can see this may be a can of worms and maybe something that you may not want to do for fear of ruining someones controller :(
 

NRG

Esteemed Pedelecer
Oct 6, 2009
2,592
10
Guys, sorry not really interested in making these for others not only for the issues Pob has pointed out but because the cct and idea are not mine they are Jeremy's and it would not be right plus I really don't have the time. I'm quite happy though to help out if somebody wants to have a go at making one.
 

tepol

Pedelecer
Jun 9, 2008
151
0
Guys, sorry not really interested in making these for others not only for the issues Pob has pointed out but because the cct and idea are not mine they are Jeremy's and it would not be right plus I really don't have the time. I'm quite happy though to help out if somebody wants to have a go at making one.
Hi ,

Do you have part number for the little box with the switch or part name ?

I know the enclosures from Maplin but Im trying to figure our where the rest of the parts are available from ( Im new to all this ) and J seems to be in hiatus somewhere.

thanks

tepol
 

NRG

Esteemed Pedelecer
Oct 6, 2009
2,592
10
Hi tepol, the part was listed in the ES thread: N78BQ, the switch and cover came from Maplin as well.
 

tepol

Pedelecer
Jun 9, 2008
151
0
Hi tepol, the part was listed in the ES thread: N78BQ, the switch and cover came from Maplin as well.
Yeah, the enclose is N78BQ , but theres no other part numbers listed there either other than display which I have coming .

I can see your cover here

SubMiniature Toggle Switch Cover : Toggle Switches : Maplin

If that is the right cover then I'm assuming these toggles below must be the same yours ( no pic ) , I dont see any others ? :(

SubMiniature Toggle Switches : Toggle Switches : Maplin

t
 
Last edited:

103Alex1

Esteemed Pedelecer
Sep 29, 2012
2,228
67
The code can be tweaked to support other capacities up to about 18Ah. Max voltage is around 65v. A reset switch is included to reset the Ah accumulated counter.
Is a 20Ah battery going to be too big for this meter ?

Just reading through the original JH ES post it looks like the 'reset' switch is on the controller - does that mean you have to be able to access the controller for use, or could the reset switch be sited on the display instead somehow ?

Looks like a really clever piece of kit ... might be beyond me to build it though - not without a great deal of hand-holding anyhow :rolleyes:

Where is Jeremy btw ... haven't seen him on here since the Eddieo & Indalo debacle ...
 

Old_Dave

Esteemed Pedelecer
Sep 15, 2012
1,211
2
Dumfries & Galloway
I'm afraid to say that Jeremy took the moral high ground and lost the ability to post for his troubles


Sent from my iPhone using Tapatalk
 
D

Deleted member 4366

Guest
Is a 20Ah battery going to be too big for this meter ?

Looks like a really clever piece of kit ... might be beyond me to build it though - not without a great deal of hand-holding anyhow :rolleyes:
Yes, it's a nice little project and looks quite neat, but it doesn't really do very much. If you don't already have a stock of standard electronic parts, so you have to buy everything individually from Maplin, it'll work out relatively expensive. IMHO it would be better to buy a ready-made one like the Cycle Analyst, which can do a lot more.