Berg Blog

Personal Projects

 
20190822_182821.jpg

Gas Cap Level Display

Current Gas Cap Level Design Installed on BMW R65

Current Gas Cap Level Design Installed on BMW R65

Overview:

I was looking to get into motorcycling and last year I bought a 1984 BMW R65 Airhead for a sweet deal. I am super happy with the bike and have been turning it into a cafe racer over time and have another page detailing that procedure in a later post. However I have run out of gas on this bike a total of 3 times! I learned the hard way that the "reserve" on the fuel shutoff (petcock) is not a reserve at all but a shut off. So I wanted away to at a glace check the fuel level of my fuel tank without taking off the cap and using the light on my phone to check the fuel level.

Commercial Solution

Commercial Solution

There are a couple commercial solutions to this, one is using a "sight glass" or tube such as seen to the right.

However I did not want to use this idea because it ruins the tank and cannot be un-done. I wanted a solution that fits into the gas cap but still is removable with a few simple tools. I could not find any commercial solutions to my problem that fit easily with my current look and current bike. I didn't want to change out the gas tank and I wanted the solution to be removable with the gas cap.

Using the power button to check the level

Using the power button to check the level

Sensor: The design I end up creating is one that uses the original fuel fill threads and gas cap size. The new unit threads into the gas tank just as the gas cap would allowing for easy installation and removal. The gas cap is now a “monza” flip up style that is “in style” now with cafe racer motorcycles. There is a long sensor, made by a company called MILONE Technologies. This is a pressure sensitive sensor that works on resistance change to determine the fluid level. These sensors have quite a large resistance range typically +/- 20 of the value given for the length of the sensor. So a calibration was required for each sensor to determine the correct sensor reading. I bought a few of these sensors and found that could be used for my application. However they need to be flat and not pressed against a curved surface. This is why you see a large bent piece of sheet metal towards the bottom of the gas cap level indicator. The sensor rides in this sheet metal piece as a protective cover for it and also helps increase sensor accuracy by not bending the sensor.

Circuit Board: I needed to figure out how to tell the end user the fuel level. I decided on a simple 4 LED layout, that illuminate depending on the level of fuel. To power this device I needed a small battery that had a high internal resistance so sparking could not happen. I turns out 3V lithium coin cells can work for this application, as they have a high internal resistance and low power out put. I decided on using a micro-controller as my my source of logic for the circuit board. As a discrete logic solution (op amps) was going to difficult to adjust over time and is less flexible overall. Plus I am not the biggest fan of op amp circuits, and they add a TON of parts to a design. The microcontroller I picked was an attiny85. These have low power and are also fitted with an DAC and ADC so its perfect to use with a simple voltage divider to measure voltage drop to calculate resistance.

3D printed Parts: I created the object in to different parts. The top part holds all the electronics and the top cap. The bottom part has the threads for the gas tank and threaded brass inserts to attach the two pieces together with M4 threaded bolts.

Testing: I installed this unit in November of 2018. It stayed in the gas tank until August of 2019. The unit worked all through summer and spring however the gas in the tank started to kill the sensor. There is a small pin hole leak that has caused the gas to enter the sensor and destroy it. So a new sensor has been ordered along with plenty of new sealants to reduce sensor destruction.

Testing the function with water and a glass vase. Unit has no top label.

Testing the function with water and a glass vase. Unit has no top label.

Liquid Level Sensor

Liquid Level Sensor

Schematic

Schematic

Board file from Eagle

Board file from Eagle

C02 Level Indicator

20190602_162724.jpg
20190602_162737.jpg

More Coming Soon

Website_coming_soon.jpg