Kawasaki KLR Forum banner

1 - 20 of 24 Posts

·
Registered
Joined
·
71 Posts
Discussion Starter #1
Here's a quick look at my gas gauge.




Besides showing how much gas is in the tank, it also tells me how far I can go on that gas.




I always like to know the temperature, so I included it.




The unit works by measuring the pressure of the gas. Here's the pressure sensor.




The sensor in place.




There needed to be a way to get gas to the sensor. I made an extension plate for the oem petcock. It's 5/8" thick which allowed enough room to drill and tap for a 1/8" pipe fitting.




The extension plate with auxiliary petcock installed.




A PIC micro-controller is used to handle the computing chores.

Ron
 

·
Registered
Joined
·
203 Posts
Ron,
Way too cool!
How accurate is your gas gauge?
Did you have to gasket the extension plate?
How do I read more about the PIC micro-controller?

I really like this submission.
Great job, great pictures.
Jack
 

·
Registered
Joined
·
71 Posts
Discussion Starter #3
Ron,
Way too cool!
How accurate is your gas gauge?
Did you have to gasket the extension plate?
How do I read more about the PIC micro-controller?

I really like this submission.
Great job, great pictures.
Jack
Thanks, Jack!

The gauge is accurate to 1/10 of a gallon (12.8 oz).

I made a gasket for the tank side of extension plate. The oem o-ring/gasket works on the petcock side.

The PIC's are made by Microchip. If you Google PIC you can see a number of tutorials of various levels - from beginner to pretty complex.

Ron
 

·
Administrator
Joined
·
8,264 Posts
Ron -

Neat shit, Maynard.

Would it be possible (which is way beyond my capability) to use a PIC to build a muti-gauge that would read two or three pressure sources and oil temperature?

This is a rhetorical question, see the parenthetical comment...

What I would like to be able to do is read, seqeuntially, the oil pressure at the head, the middle banjo, the oil filter cover, and the oil temperature.

I have an IMS 10, so no need for a gas gauge. That thing always has another gallon in it, somewhere...

Tom
 

·
Registered
Joined
·
71 Posts
Discussion Starter #5
Ron -

Would it be possible (which is way beyond my capability) to use a PIC to build a muti-gauge that would read two or three pressure sources and oil temperature?
Tom
For sure. That's the kind of thing they are made for.

The PIC I'm using for the gas gauge (a 18F2685) has eight separate inputs for the A/D module. I'm just using two of those for this project, one for the pressure sensor and one for a temperature sensor.

Ron
 

·
Administrator
Joined
·
8,264 Posts
I awoke this morning with a defined set of tasks to do.

Now I'm off to Google PICs.

"How will I ever get my chores done?", Tom asked lazily.

Tom
 

·
Administrator
Joined
·
3,564 Posts
You should market those.
 

·
Registered
Joined
·
203 Posts
Ron,
As a developer in my work life, I see a chance to have fun in my recreational life. I would like to look more into the PIC because with 8 possible inputs / functions it would be possible to code in:
1. Clock
2. Temperature (OAT-Outside Air Temperature-for non-pilot types)
3. Temperature (Head)
4. Gas
5. Mileage remaining estimate
6. On board timer, (but I don't know really how useful this is)
7.
8.

What little I read, the PIC accepts ANSI C code. This is an automotive standard and a very basic OOP language. I think this will make a great winter time project and I would like to open up suggestions for the #7 & #8 slots.

Ron - You are the man!
 

·
Administrator
Joined
·
8,264 Posts
Jack -

Oil temp and pressure, perhaps.

This sensor might work for pressure and it's cheap enough. Not positive, as the Honeywell .pdf site is down.

I think an analog temperature probe could easily be made to work, too.

Tom
 

·
Registered
Joined
·
6,659 Posts
This what we all like to see, collaboration at work.

Go Guys, Go!

Thanks for showing us your work Ranger Ron.
 

·
Registered
Joined
·
71 Posts
Discussion Starter #12
Ron,
As a developer in my work life, I see a chance to have fun in my recreational life. I would like to look more into the PIC because with 8 possible inputs / functions it would be possible to code in:
1. Clock
2. Temperature (OAT-Outside Air Temperature-for non-pilot types)
3. Temperature (Head)
4. Gas
5. Mileage remaining estimate
6. On board timer, (but I don't know really how useful this is)
7.
8.

What little I read, the PIC accepts ANSI C code. This is an automotive standard and a very basic OOP language. I think this will make a great winter time project and I would like to open up suggestions for the #7 & #8 slots.

Ron - You are the man!
I use C for the PICs. A compiler (XC8) and integrated development environment (MPLABX) is free from Microchip.

There are a bazillion different PICs. Some have more A/D inputs, some less. I'm not sure what you meant about the timer (#6). Almost all the PICs have at least one built in timer.

Ron
 

·
Threadjacker
Joined
·
6,768 Posts
Wow! Well done. I don't understand the magic involved, but I understand enough to know that I wish I did.

VERY cool. :WellDone:
 

·
Registered
Joined
·
117 Posts
I agree with Lockjaw- i don't understand it, but it's cool. If somebody was to sell a ready to insall kit, i would definitely buy it!
 

·
Registered
Joined
·
203 Posts
Ron,
Maybe not use the term "timer" but add stopwatch feature.
So I know if my elapsed time is improving across a course.
(Big talk for a 60 year old on a Dual Sport!)
Jack
 

·
Registered
Joined
·
203 Posts
Big Red,
I would try to build something this winter. Then what I build, (the plans), belong to the forum! Anything I learn along the way would be public knowledge.
Sort of like the wiring diagrams that Normk and Tom did!
I think the real value of this forum is the willingness of the members to openly share information!
Jack
 

·
Registered
Joined
·
117 Posts
Jack, i agree. People's willingness to share info is definitely one of the best things about this group. I look forward to seeing how it goes for you! I am great at pretty much all things mechanical, computers are not my strong point however. And this sounds like it involves programming or some such magic.
 

·
Registered
Joined
·
203 Posts
Thanks for your feedback. At work they tell me that my strength is the"Black magic of the Black Box".
The opportunity to build a device and get to programming it to be functional is a challenge that I look forward to. Whatever I do, I will document it to share with all.
 

·
Registered
Joined
·
93 Posts
New to KLR's, but not new to electrical and add-ons to bikes.

Genius man, genius! Everything looks really clean with the install, too! Really impressed. Glad to see people out there trying their own tech on their bikes. I would love to have a gauge on mine!
 
1 - 20 of 24 Posts
Top