G.a.S. Matcher

G.a.S. Matcher
DSCF3686.jpg DSCF3687.jpg DSCF3689.jpg
(G)uage (a)nd (S)ender Matcher

I have been working and refining this project with the help of two of my fellow "Ham Radio" operators off and on(more off then on) for the last 5 1/2 years.

My extreme thanks goes out to Frank N7FF and Malcolm K6UAW for all of their assistance and help in making this all work.

The inspiration for this project was the need for an accurate working fuel gauge and fuel sender that could be used in the custom made aluminum fuel tank that I built for my 1967 Dodge Dart GT Convertible "Home=Brewed".

It uses a "Universal" 73/10 ohm tank sender and a Autometer Sport Comp 73/10 ohm gauge. None of the fuel level readings were accurate.

I purchased a similar device with Full, Mid Hi, Mid Low, and Empty settings. It helped, but was still not as accurate as I thought it should be.
After talking with the Gentleman that makes the unit about adding additional set points I hit a dead end, I started on this journey.

I know just enough about electronics and programming to be dangerous.

Enter my fellow Ham's Frank and Malcolm. Frank is a retired Computer programmer. Malcolm is a retired Electronic design engineer. Both volunteered to help with this project. Frank has written all the code. Malcolm provided consultation on the circuit design.

I designed the Printed Circuit Board and do all the assembly work.

The GaS Matcher (Gauge and Sender Matcher) is a hardware/software solution to correct the errors in Fuel Gauge and Fuel Senders readings due to most all aftermarket tank fuel senders being linear in design instead of being non linear as the factory units were.

The heart of this unit is an Arduino Pro Mini and the software loaded to it.

Here is a summary of how the circuit and software work.


GaS Matcher

Inspiration, Manufacturing & End User: Herb Beer, N9QEP
Arduino program design & development: Frank Fahrlander, N7FF
Consultation & Circuit Design: Malcolm Oakes, K6UAW

Summary:

This program reads a restrictive/float type fuel level sensor (sending unit) and drives
virtually any kind of fuel gauge.

It provides a means to calibrate the sensor and gauge for 9 set points from Empty to Full
in 1/8th of a tank increments as well as 2 set points for low fuel Alert and Alarm for a total
of 11 set points.

Values between these points are linearly interpolated between adjacent setpoints which
provides accurate readings across the entire gauge range.

Gauges are driven using a PWM output from a single Arduino port.

Sending units can either vary in regard to resistance value range and also as to which end the
the range represents EMPTY.

Description of Operation:

The Gas gauge sending unit is attached to the pin "PsensorIn" which has a 100 ohm resistor to
+5V. The program periodically reads the voltage at this pin several times to get an average
value for the current fuel level. This sensor value is then mapped to a number that is used
to drive the gas gauge.

To drive the gauge, the gaugeValue number is output as a pwm signal at pin 9. Pin 9 is tied to
ground through a 10K pull down resistor and the Gate of a IRF540N or 14N05L N channel
MOSFET.
The resistor holds the gate low when the arduino does not send a high signal. This is here in case
the arduino comes loose, or the wiring is bad it will default to off.
You don’t want this pin to ever be floating as it will trigger on and off.

There is a diode parallel to the device we are powering. Any time you are powering a device with a
coil, such as a relay, solenoid, or motor, you need this guy, and don’t leave home without it. What
happens is when you stop powering the coil, a reverse voltage, up to several hundred volts, spikes
back. This only lasts a few microseconds, but it is enough to kill our MOSFET. So this diode
(only allows current to pass one way) is normally facing the wrong direction and does nothing. But
when that voltage spikes comes flowing the opposite direction, the diode allows it to flow back to
the coil and not the transistor. We will need a diode fast enough to react to the kickback, and
strong enough to take the load.

A rectifier diode like the 1N4001 is used do the job.

Besides reading the sensor and driving the gauge, the main loop also:

1. checks for user inputs from a serial keyboard
2. checks for selector switch values used in programming/calibration
3. checks for push button inputs
4. controls the blinking of an alert/alarm LED (port Palarm)

The selector switch allows the user to calibrate the GasMatcher. If the switch is positioned to
any of the values 0 through A, the GasMatch is in programming (or calibration) mode.
When in this mode, the gauge is driven directly from the map table entry that corresponds to the
selector switch value: 0=empty, 1=1/8 full,...8=full, 9=alert and A=alarm. B through F are not used
and are considered be the "Normal" operation positions. (Prefferably position F)

While in programming mode, the sending unit is moved to one of the 11 positions and the UP and
DOWN
push buttons are sensed to allow value driving the gauge to be adjusted. Pressing the SAVE push
button causes the map table entry for the sending unit and the gauge to be updated and saved into
the EEPROM.

During programming (or calibration) the Onboard Arduino LED on pin 13, Pled, is used to show that
the unit is in programming mode. It will blink if there is currently an error in the mapping table.

These errors can occur easily as individual calibrated entries may not agree with entries yet to
be calibrated.

During normal operation, if the fuel level reaches the Alert level, the alert/alarm LED is lit.
If the fuel level reaches the Alarm level set in the map table, the this LED will blink.

If the UP and DOWN buttons are pressed at the same time for greater than 2.5 seconds,
the map table is restored to the default values that are stored in the EEPROM.


Herb aka "Dart67"