Skip to the content
PCBKitNew board
2 layers94 × 44 mmFuelGauge, the printed circuit board in 3D

An Open Source Hardware and Software device to provide a linear fuel gauge for cars with oddly shaped fuel tanks.

Size
94 × 44 mm
Copper layers
2
Thickness
1.6 mm
Parts
28
Nets
18
Pads
82
Tracks, vias
169, 23
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20190331)
Created
16 May 2019
Updated
5 Oct 2021

Overview

FuelGauge is an open-source printed circuit board by davefiddes, from the davefiddes/FuelGauge repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 94 × 44 mm with 28 parts on 18 nets, routed with 169 tracks and 23 vias.

It is built around the BC547. Its parts include 7 diodes, 6 capacitors, 6 resistors, 3 ICs and 2 transistors. It belongs with the PIC boards of this library.

Main components

1

README

README.md

Linear Fuel Gauge

This project allows an accurate linear fuel readout to be created for vehicles with unusually shaped fuel tanks and/or mismatched fuel senders.

Why?

I built this for my Ultima GTR kit car which uses a conventional VDO fuel gauge and vertical float sender unit. The fuel tank on the car is a very unusual shape so it can get as much fuel as possible into a small space. This combination means that with a thirsty V8 the fuel quickly drops from 100% to 25% but takes a lot longer to go from 25% to empty. It's easy to run out of fuel!

To illustrate the scale of the problem here is a rendering of the fuel tank with 15 litres of fuel in a 34 litre tank:

Cutaway render of Ultima GTR fuel tank

Other Ultima owners have solved the problem by using their ECU or an intelligent dashboard. I have neither and wanted to preserve the original look of the Ultima branded instruments.

How?

The Linear Fuel Gauge box sits between a standard resistance fuel sender and a hot-wire fuel gauge. The device:

  • measures the resistance of the sender (0-100 ohms)
  • maps that resistance to a linear fuel level value
  • maps the fuel level to a particular gauge output value
  • emulates the resistance value needed to achieve the required gauge output value

Hardware

The gauge is built around a simple 8-pin PIC12F1840 micro-controller. The resistance of the sender is measured using a 10mA current source built from an LM317L regulator. The gauge output is achieved by feeding a PWM signal from the MCU into a high-current MOSFET driver (currents are typically around 100mA for 100%). A simple NPN-transistor driver is provided for low fuel indication. Configuration of the gauge is achieved with a 3-wire TTL serial connection to the MCU.

The project contains the full Kicad schematics and a PCB layout designed to fit in a small Hammond Manufacturing 1591ABK ABS plastic case.

Fuel Gauge PCB 3D render

Fuel Gauge assembled unit

Details:

Software

Build status

The gauge is implemented in C as a platform neutral core with a small hardware abstraction layer for the MCU. A full set of unit tests is provided for the core allowing easy testing and debugging to be carried out on a PC before building for the MCU. The MCU firmware is built using the Microchip MPLAB X IDE v5.15 and xc8 v2.05 compiler (Free Version).

The gauge has two 9 bin maps that allow fine grained mapping of:

  • the input resistance to a linear fuel level
  • the linear fuel level to a PWM gauge output value

The calibration of the two maps is achieved using a serial connection. The core implements a command processor allowing values in each of the maps to be modified and saved to EEPROM. During calibration the gauge output can be tested and the resistance of the fuel sender measured independently.

The Calibration And Programming Guide details how to set up the fuel gauge which should mostly be a one-time exercise.

License

The device hardware and software is covered by the GNU General Public License v3.

Parts

28
QtyValueFootprintReferences
41N4001Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD1, D2, D4, D6
1100nFCapacitor_THT:C_Disc_D3.4mm_W2.1mm_P2.50mmC6
110KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR6
110RResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR4
1120RResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1
112V 1WDiode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD5
11KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR3
11nFCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC2
11nF 100VCapacitor_THT:C_Rect_L7.0mm_W6.0mm_P5.00mmC1
11uFCapacitor_THT:C_Rect_L7.0mm_W6.0mm_P5.00mmC3
122V 1WDiode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD7
122V MOVVaristor:RV_Disc_D7mm_W3.4mm_P5mmRV1
122uF 25VCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC4
12K2Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2
147uFCapacitor_THT:CP_Radial_Tantal_D6.0mm_P5.00mmC5
14K7Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR5
15V1Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD3
1BC547Package_TO_SOT_THT:TO-92_InlineQ1
1Conn_01x06Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ2
1Conn_01x10Connector_Molex:Molex_KK-254_AE-6410-10A_1x10_P2.54mm_VerticalJ1
1LM317L_TO92Package_TO_SOT_THT:TO-92_InlineU1
1LM7805_TO220Package_TO_SOT_THT:TO-220-3_Horizontal_TabDownU2
1OSHW-Logo2_7.3x6mm_SilkScreenSymbol:OSHW-Logo2_7.3x6mm_SilkScreenLogo1
1PHB55N03LTPackage_TO_SOT_SMD:TO-263-3_TabPin2Q2
1PIC12F1840-IPPackage_DIP:DIP-8_W7.62mmU3

Questions

How big is the FuelGauge PCB?

It measures 94 × 44 mm and has 2 copper layers, 1.6 mm thick.

What parts does the FuelGauge use?

28 parts, built around the BC547. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the FuelGauge KiCad files?

From the davefiddes/FuelGauge repository on GitHub, at the commit this page was made from: the board is hardware/FuelGauge.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the FuelGauge design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers83.3 × 65.3 mmSimonShield, the printed circuit board in 3D

    SimonShield

    github-linguist/linguist

    Language Savant. If your repository's language is being reported incorrectly, send us a pull request!

    46 parts14kMIT
  • 2 layers56 × 65 mmSeaTalk1, the printed circuit board in 3D

    SeaTalk1

    dotnet/iot

    This repo includes .NET Core implementations for various IoT boards, chips, displays and PCBs.

    24 parts2.4kMIT
  • 2 layers132.1 × 45.7 mmIPoS, the printed circuit board in 3D

    IPoS

    peterheinrich/InternetOverSpaghetti

    Transmitting IP packages over a pair of spaghetti thus demonstrating how media independent IP really is.

    42 parts342
  • 2 layers99.1 × 99.7 mmRC6502 General Video Adapter, the printed circuit board in 3D

    RC6502 General Video Adapter

    tebl/RC6502-Apple-1-Replica

    An expandable SBC-version of the Apple 1 computer, easy to get started with and lot of cool stuff that can be added to it!

    80 parts193GPL-3.0
  • 2 layers55.9 × 38.6 mmMega Amp, the printed circuit board in 3D

    Mega Amp

    theacodes/genesynth

    A Sega Genesis inspired synthesizer

    40 parts178Apache-2.0
  • 2 layers40 × 100 mmBack pcb, the printed circuit board in 3D

    Back pcb

    ZeroPhone/ZeroPhone-PCBs

    PCB files for ZeroPhone - for gerbers and schematics, go to "Releases" tab!

    118 parts148GPL-3.0
  • 2 layers100 × 100 mmCANBuster, the printed circuit board in 3D

    CANBuster

    GBert/misc

    miscellaneous stuff / unsorted

    182 parts99