Bloody cold tonight and didn't feel like freezing in the garage or (slightly warmer) utility room so seeing as I got a load of electronic goodies through the other day I set about doing a little bit of circuitry...
The end result being this
Which while not that impressive and a bit of a mess this is my 'mk1' fuel pump/gauge controller.
The vast majority of the circuit is the power supply, cars are rather nasty and (electrically) noisy hence an inductor, 2 regulators, 8 capacitors and a diode just to give a stable 10v and 5v and ensure the I don't blow the IC.
The IC will be an Arduino, the 'production' version will be a NANO but while I've ordered one it hasn't got here yet so it's my the old faithful UNO doing service here.
The Arduino controls an optocoupler which PWM's the fuel gauge to earth through a transistor, this will allow me to 'map' the tanks so that I can both run a single gauge with two tanks and also have a (very) accurate gauge that (for example) doesn't stay full for ages and then rapidly drop etc. In addition it'll allow me to smooth the gauge. Plus run low fuel warning lights etc.
The idea of it as a pump controller is to run two 'lift' pumps to a swirl pot with the FI pump off that, the default will then be a single pump running from the fullest tank. If the level in the swirl tank keeps dropping with pump 1 running then pump 2 will kick in as well to ensure enough petrol even at full throttle.
So far I haven't hooked up the sender, although I've bought a pair to use
I'll need to write some code for it to work but I very quickly knocked up some to get the gauge to increment every second as shown in this scintillating piece of youtube footage:
Arduino controlled fuel gauge - YouTube
Once I'm happy with the circuit I'll design a board and get a batch printed. I used to never bother and use strip board but these days you can get boards printed for almost nothing. Hardly worth doing anything else.