Building a LED fuel display

I'm working on an arduino based car monitor, but for now I need to build a fuel level display since my fuel gauge is not wanting to work right.

the fuel sender is a variable resistor that goes to ground, and its 75ohms when EMPTY and 10ohms FULL, I'm not sure if its linear or not, but I'm amusing it might be and if not I'll just write it to be linear, I'll still have an idea of whats in there so I don't run out of fuel.

I tried making a Voltage Divider but I could not get a good reading since I didn't know what resistor to pair with it. (I need help on this one)

also the arduino power regulator was getting very hot, I just plugged it in and it was already getting hot, so do I need to an external power regulator or a resistor or something?

If I can get a reading of 0-255 (EMPTY-FULL) then I can light up an LED indicator...

thanks!

Check this post, I'm sure it will help you.

http://arduino.cc/forum/index.php/topic,21614.0.html

thanks

thats what I'm wanting to do, do I use a 10k resistor?

Yes I think the 10K is a good one and with that example, you will get good readings.

Anyway you will have to make tests to see what you getting when the tank is empty and what when the tank if full. I the differences between them isn't big enough, I think that changing that 10K resistor can make you get a wider reading values (but not sure) test that on a breadboard :wink:

Ok,

I tried to use this calculator here: Voltage Divider Calculator

Vin would be 5v

I guess R2 would be the fuel sender

and R1 would be a static resistor

Right?

now if I used a...

100ohm resistor as R1 it would give me a voltage range of 0.4 to 2.1 (FULL-EMPTY)

so if I used...

float voltage= sensorValue * (5.0 / 1024.0);

I would have a range of 0.0102 to 0.0019 if I did something like this...

float voltage= (sensorValue * (5.0 / 1024.0)) * 1000;

I would have a range of 10.2 to 1.9

so....

if I have 5 LEDs I'll light from RED up until the the match on the yellow and greens..

GREEN - >10
GREEN - >7 && <=10
GREEN - >4.5 && <=7
YELLOW - >3 && <=4.5
RED - <=3

I think I did the ranges wrong, I might step them up to give me more padding, but that should be it right?

now for the arduino power getting really hot, should I use some external regulator, or will a high watt resistor also work on keeping the arduino cool?

thanks!

What is getting hot? The voltage regulator in Arduino? Or your power source?

What voltage are you supplying to the Arduino? Make sure its between 6-12V.

xkishorx:
What is getting hot? The voltage regulator in Arduino? Or your power source?

What voltage are you supplying to the Arduino? Make sure its between 6-12V.

The voltage regulator in Arduino is getting hot.

The power source is a 12v car electrical system... but the arduino was getting hot with the voltage at just 12v, while the car charging system was off....

I have ran the arduino off of a wall wart style DC power supply at 12-14v and it got warm but not hot like this and it heated up in less then a minute.

I guess I could just run the arduino off of a voltage divider and have it run at 5-8v

Did you measure the output from the battery with a Multimeter? It would be something around 13 if its a charged 12V battery. Thats too much for Arduino according to me.

xkishorx:
Did you measure the output from the battery with a Multimeter? It would be something around 13 if its a charged 12V battery. Thats too much for Arduino according to me.

The battery is not fully charged yet (just got the car running on Saturday), so its about 11.8-12.1v with the Multimeter