- 2.8″ LCD NX3224T028
- Arduino mega board
- 5psi 1/8npt pressure sensors with Delphi gt150 3 pin connectors
- RTC ds3231
- Temperature indicator, source from DS3231
- Die-cast aluminum enclosure Hammond 1550D with 3D printed lid
- Weipu SP13 connectors
- Screen sealed in with print on transparent labels Apli 01225 (gloss would be better)
- Bridge rectifier with a low impedance cap connected to LM2596 DC DC buck converter
- Dual sensors one for fuel the other for 2 stroke oil
Another fun little project to solve a real problem. I have an old motorcycle TDR125, that hasn’t got a fuel gauge and it’s a 2 stroke so any random fuel isn’t suitable it needs oil mixed in there as well. So it was asking for some modernization – digital fuel gauge based on hydro-static pressure.
- Given
- Height of fuel tank 60cm
- Density of fuel 765kg/m3
We can calculate max pressure at the bottom of the tank using this formula:
So now we know what maximum pressure our sensor would have to have. After quite a bit of searching I found only 5Psi sensor cheap enough to be used here <20eur, I did find more sensitive sensors but they were either not compatible with fuel or very expensive. So settled on these.
But having a sensor that is almost 10 times less sensitive than we would like and a 10bit ADC we may hit another problem, that our whole range will be only around a ~100 counts on the ADC
But we go ahead and continue, if it’s not enough we can always use one of these or do some messing about with voltage references of the ADC. We can make a reading with the full 5V voltage reference to check if the sensor is in correct operating range 0.5-4.5V to check for broken or shorted cables or broken sensors, and then switch to the internal 1.1V or 2.56V voltage reference to make the actual measurement.
So using the 1.1V Vref could allow us to get back ~50% instead of ~10% of our 10bit ADC resolution.
Well after writing the last sentence did the Vref trick and it works quite well. 5 times increased resolution is quite nice, because it allows me to make filtering even more aggressive.
The only real problem is with the screen, it’s rather dim 180nits however there is a newer version of the screen and it’s a little brighter NX3224F028. What makes matters worse is that the screen has no ‘first party’ way of being mounted and sealed, because it being a resistive touchscreen it needs to physically flex to function. This forces me to make the waterproofing layer flexible, durable, UV resistant but to make it look reasonably good I need it to be transparent in the center but have a nice black border to hide the ribbon cable and other uglier parts of the screen. This is rather difficult when you’re making one off thing and don’t want to custom order a very fancy sticker. Result is not very good due to my printers inability to print deep blacks and the line in the middle is due to the cut in backing paper of the label. The border is still visible because the display itself is no fully attached to the carrier PCB, so it isn’t flush all the way around the perimeter.
Yet another mistake is using a matte label, I had to clear coat it because it would scatter the already small amount of light leaving the display and make it even dimmer, yet make external light sources scatter off the screen into your eyes no matter the angle.
One of my sensors came with an interesting defect, it has an air leak in between the pins ( I assume) because it measures negative pressure for a good 10 minutes after plugging in a correctly sealed connector, it doesn’t do that with at least one seal removed from the connector.





Leave a Reply