Hey guys, this is my first project with Arduino. I have an 80's Toyota which uses an analog fuel sender which read from 0-110 ohms. 0 being full and 110 being empty. The analog dash cluster is an ammeter. I have recently installed a digital dash cluster which uses voltage instead of resistance for a reading. The digital cluster uses 0-5v, 0 being empty and 5 being full. I sketched a diagram and I'm unsure if its even correct. Do I need to change anything? Any tips on writing the code?
One problem you will have is that a car battery often goes over 12v, in fact a starter battery at 12V is almost dead. At the very least you need a buck converter to drop it to 8 volts so if the battery briefly drops below about 9-10V like on start or A/C on it will continue to power the UNO. I actually would drop the buck output to 6V. The next big issue is noise. Rather than me telling you just google reducing noise spikes in a dc power circuit. Also, the Led will need a resistor, 220ohms should be ok.
Did the analog gauge have two or three wires?
The sensor is 3 wires, ground, fuel level, and low fuel light. The gauge has one connection for each including the rheostat ground
I'm not familiar with that set-up but 12V must be involved somewhere otherwise the gauge would not work.
The gauge is powered and is itself an ammeter and the fuel sender is the potentiometer
What are you trying to accomplish exactly.
You have digital gauge and analog gauge is out of play?
Role of arduino is what? To translate?
The car came with an analog gauge in the U.S.. In Japan the car came with a digital gauge. I am installing the digital gauge into the car. The Arduino is translating the resistance reading to a voltage reading then sending that to the digital gauge.
As a "permanent solution"?
You need to use a SEPIC converter as several manufacturers specify a minimum of 6V for start one I know of goes to 5V.
I would assume you do not want the UNO powered during crank. When the starter disengages you can get a big transient.
Valuable Resources for Automotive Electronics:
- STMicroelectronics Application Note AN2689:
This application note provides guidelines on protecting automotive electronics from electrical hazards, focusing on design and component selection. Reading this will greatly enhance your understanding of automotive circuit protection.
Read AN2689 - Analog Devices: Automotive Electronics Design:
This article distills key insights into designing automotive electronics, offering practical advice for engineers.
Read the article - Diodes Incorporated: Transient Voltage Suppression in Automotive:
Learn about techniques to protect automotive circuits from transient voltage, which is critical for ensuring reliable operation in harsh conditions.
Read the article - AEC-100 Standards Webinar:
This webinar from Monolithic Power Systems provides a detailed overview of AEC standards, essential for understanding automotive electronics requirements.
Watch the webinar - Understanding Automotive Electronics, An Engineering Perspective by William B. Ribbens:
This comprehensive book offers an in-depth look into automotive electronics from an engineering perspective, making it an invaluable resource.
Access the book
Why do you think a "digital" gauge will respond to a voltage? And if so, what voltage range?
Please post a link to the gauge data sheet.
You will find instruments such as fuel guages are run via ( mostly) a 5 v regulator just for stability reasons so the op's approach should not present any problem.
I think you have a misunderstanding of how gauges work.
First there is no such thing as a gauge that "reads resistance" both of your gauges are volt meters(definitely not an ammeter) that read voltage through a voltage divider.
The fuel sending unit is one half of the voltage divider and inside the gauge is a resistor that forms the other half of the divider. The fact that one has an analog display and the other a digital display makes no difference they both take an analog input.
Does the Japanese version of this car use a different fuel sending unit?
If not then you can likely just connect the digital gauge and it should work.
otherwise buy the Japanese sender.
It would be extremely unusual that they would change the base configuration just to change gauges. That would be cost prohibitive.
yes it is a different fuel level sensor. The Japanese sender is ridiculously expensive because of its rarity.
Being an '80s car I can believe that. They were just starting to figure out the digital thing back then.
My next question is what makes this sender special?
You say it is a 0-5v signal which is analog and indicates a resistive sensor.
But then it wouldn't be expensive as the aftermarket could easily reproduce it.
A digital sender would be unusual at least I've never heard of one. Pretty harsh environment. but if it were it most likely would put out a PWM signal (which can look like a 0-5v signal on a multimeter) as converting to analog and back doesn't make much sense.
If the gauge truly does take a analog 0-5v signal the solution is simple.
Find the correct size resistor to form a voltage divider to produce a 0-5v signal.
Note that to reach the full 5 volt you need to start with a regulated voltage greater than 5v.
To avoid damaging the gauge I highly suggest circuit protection as outlined in the links in post #10 above.
However I doubt that it is that easy and more research into that sender and it's signal is needed.
You could wire it from arduino 5V pin and make a voltage divider with for example 110ohm resistor. That would give you nice 2.5V range on arduino analog input.
The current through sender would be 22mA at 2.5V, dissipating 55mW. But you probably don't know for what dissipation it was designed.
If you still have the original circuit, you could measure voltage drop across the sender.