StromTrooper banner

1 - 20 of 58 Posts

·
Registered
Joined
·
199 Posts
Discussion Starter #1
I never liked that fact that the fuel gauge was so non-linear. To my way of thinking, a measuring device should be reasonably accurate. So, I decided to see if I could make it better.

Considerations:
1. My tank (2011 DL650A) holds a little over 5 1/2 gallons.
2. There are five solid bars on the fuel gauge.
3. Each bar should represent one gallon. As each successive gallon is used, the associated bar turns off.
4. After the fifth gallon is used the bottom bar is no longer solid, but starts flashing indicating reserve.

I decided the project would best be done with a micro-controller. I designed a circuit built around the PIC16F688 and wrote a program to operate it. Essentially, the micro-controller reads the resistance from the sending unit and determines which bars on the gauge to turn on/off.

The micro-controller has the ability to be reprogrammed while it is still installed in the circuit. That enables me to modify the program as necessary and reprogram the micro-controller while it is still on the bike. This was very convenient during development.

Installation:
Completely plug & play. The fuel tank connector is unplugged and the circuit board is plugged into the two connectors.

Results:
The modification works very well, given the constraints of the tank sender. These are twofold. First, the sending unit doesn't start moving until a little over one gallon is used. Secondly, the sender stops moving before the fifth gallon is completely used. This causes the first bar to stay on longer and the last bar to start flashing sooner that I would have liked. Unfortunately, this is unavoidable. Even given those two minor issues, the project was an overwhelming success.

Ron :mrgreen:
 

·
Registered
Joined
·
111 Posts
Did you get a PCB made or did you just use a perf board? Either way you should open source it! This would be an awesome project to make myself.

I know basic building of micro controllers but not enough to do something like what you did with developing it.
 

·
$tromtrooper
Joined
·
2,378 Posts
:hurray: Me, me, me! I'd like one of those. :hurray:
I don't need it (use the trip meter), but I would like it.
 

·
Premium Member
Joined
·
8,025 Posts
I don't need it (use the trip meter), but I would like it.
Yeah, but some tanks take me 300 miles and some tanks take me half of that. :headband:

I'd buy a plug and play kit.
 

·
$tromtrooper
Joined
·
2,378 Posts
Yeah, but some tanks take me 300 miles and some tanks take me half of that. :headband:

I'd buy a plug and play kit.
Yeah, I guess I do use the gauge - 250 miles or when something starts flashing, whichever comes first. Never even close to 300. So, even more reason to want a gauge corrector.
 

·
Registered
Joined
·
199 Posts
Discussion Starter #9
Did you get a PCB made or did you just use a perf board? Either way you should open source it! This would be an awesome project to make myself.

I know basic building of micro controllers but not enough to do something like what you did with developing it.
For these kinds of things I hand draw the circuits on the copper clad boards then etch them. I wasn't trying to conserve a lot of space on this board and it came out to be about 2 1/2" x 4". A "real" printed circuit board would probably be about half that size.

Ron
 

·
Registered
Joined
·
199 Posts
Discussion Starter #10
For those that asked about selling...

The unit is plug and play. My (prototype) circuit board is sealed in heat shrink and cable tied to the relays in the cavity behind the tank. The tank connector is disconnected from the main harness connector and the two cables from the circuit board plug in to each of those connectors.

For production purposes, my concern would be about repeatability between tank sending units. If they differ much then accuracies would vary and plug and play would go out the window. Each board would have to be programmed specifically for each bike in that case. But, who knows. The senders may all be consistent. :eek:rig_confused: If so, then production could be feasible.

Ron
 

·
$tromtrooper
Joined
·
2,378 Posts
...
For production purposes, my concern would be about repeatability between tank sending units. If they differ much then accuracies would vary and plug and play would go out the window. Each board would have to be programmed specifically for each bike in that case. But, who knows. The senders may all be consistent. :eek:rig_confused: If so, then production could be feasible.

Ron
I could see the problem. My own gauge is highly variable. Sometimes the top bar doesn't come on. Other times it stays on for a hundred miles.
 

·
What Kinda Bike Is That?
Joined
·
5,520 Posts
I never liked that fact that the fuel gauge was so non-linear. So, I decided to see if I could make it better.
Ron,
You live in sunny Arizona. There is no way that you got the snow that plastered parts of the East coast. What I am saying is, you really couldn't have been that bored, "with nothing to do", with all of that sunshine beaming down on you, instead of snowflakes, could you?

This is how I did it:

Here is what the sending unit looks like that is mounted inside the fuel tank.


With a hand full of assorted resistors......


...and trial-and-error "trimming"..... (soldering..., and unsoldering...., and soldering groups of different resistors.)


I came up with this set up. A cheap, marine grade fuel gauge. (It was in the clearance bin with a pile of other stuff.).


Not bad for a little "Yankee Ingenuity", huh?

Anyone else want to jump on board with this highly reliable alternative?

Free shipping.

(I will go back to shoveling snow now.).

B.L.
 

·
What Kinda Bike Is That?
Joined
·
5,520 Posts

·
Registered
Joined
·
2,485 Posts
I never liked that fact that the fuel gauge was so non-linear. To my way of thinking, a measuring device should be reasonably accurate. So, I decided to see if I could make it better.

Considerations:
1. My tank (2011 DL650A) holds a little over 5 1/2 gallons.
2. There are five solid bars on the fuel gauge.
3. Each bar should represent one gallon. As each successive gallon is used, the associated bar turns off.
4. After the fifth gallon is used the bottom bar is no longer solid, but starts flashing indicating reserve.

I decided the project would best be done with a micro-controller. I designed a circuit built around the PIC16F688 and wrote a program to operate it. Essentially, the micro-controller reads the resistance from the sending unit and determines which bars on the gauge to turn on/off.

The micro-controller has the ability to be reprogrammed while it is still installed in the circuit. That enables me to modify the program as necessary and reprogram the micro-controller while it is still on the bike. This was very convenient during development.

Installation:
Completely plug & play. The fuel tank connector is unplugged and the circuit board is plugged into the two connectors.

Results:
The modification works very well, given the constraints of the tank sender. These are twofold. First, the sending unit doesn't start moving until a little over one gallon is used. Secondly, the sender stops moving before the fifth gallon is completely used. This causes the first bar to stay on longer and the last bar to start flashing sooner that I would have liked. Unfortunately, this is unavoidable. Even given those two minor issues, the project was an overwhelming success.

Ron :mrgreen:
Could you please provide some design details?
Is the sender unit just sending a DC voltage level? (@BlackLab: Can you please explain your findings while experimenting with the resistors etc.?)

If it is a DC to DC voltage converter, I guess your microchip is reading analog in and outputting another analog out based on some mapping table/logic/equation?

I'm very interested in this solution - Winter is here and I'm finally starting to work on my MK 1B project. If you could please provide any technical details that would be very much appreciated.
Adding a fuel gauge fixer to that project, would be awesome!
Thanks!
 

·
$tromtrooper
Joined
·
2,378 Posts
Good lord! Microchips, resistors, various craft and fabrication skills demonstrated elsewhere. There is enough collective knowledge and experience here to completely rebuild civilization after an apocalypse ... If we could find each other after the web went down...and a few more wimmins. :thumbup:
 

·
Registered
Joined
·
2,485 Posts
So, I did some research.. (no answers to my questions so far)
The fuel sending unit seems to be a variable resistor:
HowStuffWorks "How Fuel Gauges Work"

The ECU is not getting voltages directly, but gets a varying current as gauge float height changes.

I guess from an MCU solution perspective it means:
1. Input - The sending unit is sampled by an analog to digital conversion, with some resistor in series (to limit the current)
2. Output - The ECU/Gauge (receiving unit) gets a different resistance value, which can be digitally produced by using another digital potentiometer IC

A few more questions:
1. Where is the fuel sending unit connector?
2. What is the resistance range (in ohms) that the sending unit is using? (min and max). I guess I can measure it on my own with my bike (once I know where the connector is), but it would be interesting to get some input from riders who have measured it already.
 

·
FORUM GODFATHER.....R.I.P. PAT
Joined
·
38,047 Posts
The connector is shown here. The sender hot lead is Yellow/Black on the bike side and Red/Black on the tank side. Pre 2007 Wees are BLack/Light Green on the tank side. Y/R is the pump motor hot and B/W is ground.


 

·
Registered
Joined
·
3,879 Posts
A few more questions:

2. What is the resistance range (in ohms) that the sending unit is using? (min and max). I guess I can measure it on my own with my bike (once I know where the connector is), but it would be interesting to get some input from riders who have measured it already.
Haven't measured it, but this might help get you started.
 

·
Registered
Joined
·
2,485 Posts
The connector is shown here. The sender hot lead is Yellow/Black on the bike side and Red/Black on the tank side. Pre 2007 Wees are BLack/Light Green on the tank side. Y/R is the pump motor hot and B/W is ground.
Thank you. I guess you mean the white connector on the left side?
Does the connector connect outside of the tank 'enclosure'? I mean, do I have to lift the tank to access it, or is it accessible without any special action?


Haven't measured it, but this might help get you started.
Wow - great link!!

I did expect low ohm values, because the receiving unit probably puts some higher resistor value in series in order to limit the current, but also sample the voltage in between the resistors.
I'm not sure about the last point - if the OP can comment on how he exactly connected his MCU to the sending unit resistor that would be very valuable.
 
1 - 20 of 58 Posts
Top