TMF1901 wrote: ↑
Wed Apr 10, 2019 10:55 am
It would need to display rev fuel level and speed.
Speed is the tricky one. If you're plannig to use the vehicle on public roads your speedometer will need to be accurate within any margin required by the law in your territory. Last time I checked in the UK that was within 10%. Your dashboard as a whole will likely have to comply with whatever additional regs apply for accuracy, number and type of instruments etc.
Old school speedos (i.e speedos from pre engine management system cars) took a mechinal feed from the gearbox's output shaft to turn a pointer against a spring in the speedo. Gearing in the mechanism was used to correct for the final drvie ration (i.e. further changes in rotation between the gearbox output and the wheels). You'd need to duplicate that.
To complicate things further, the ratio between output shaft revolutions and wheel revolutions (hence speed) is affected by wheel and tyre size as well as gearing in the differential(s).
If you know all the ratios, the gear the car is currently in, and the engine RPM it should be possible to calculate speed from that. Calculating speed from GPS updates is also possible but won't work in arteas of poor/no signal so may not be legal as the vehicle's sole speedo.
Fuel tank level should be easy. I'd expect it to be just an analogue float sensor feeding the gauge. It'll just be a matter of scaling it's ouput to a suitable range and feeding it to an ADC.
As for engine RPM, if the vehicle had a rev counter it will likely have been driven in a similar manner to the speedo: a mechanicle cable from the engine's output stage to the gauge. If it didn't you're into counting spark pulses (which are very
high voltage) or rigging up some sort of sensor on the flywheel.
Lastly, don't forget that any car is a hostile environment for electornics and you'l need to find some method of performing a safe shutdown and fast restart for the Pi. It's probably not a good idea to have to wait two minutes after you start the car before your dashboard comes online, or if your dashboard goes down while driving.
If the above sounds negative, that's because it is. You're talking about systems that are critical to the safety of the driver, passengers, and other road users. As such this shouldn't be undertaken lightly.
Attempts to contact me outside of these forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters