PDA

View Full Version : Help scaling voltage...



sirvo
- 30th July 2007, 17:37
Hello.
I'm trying to measure my car fuel level and something is wrong. The fuel sensor scale is 0 - 6V and, of course, I would like to read from 0 - 5V. The image attached shows the schem I've down till now.
The thing is that the sensor value is 4.95V (now) and 4.12V is expected in PIC. It is getting 3.6V.
I suppose that there can be 2 mistakes:
1) LM324 VCC must be more than 6V.
2) There is a voltage divider between POT and LM324 output impedance causing voltage in POT be less than fuel sensor signal.

Hope you can help..

Thanks in advance AGAIN!

Sylvio

mackrackit
- 30th July 2007, 18:58
ADC might be your solution. A few days ago a battery voltage monitor was discussed. http://www.picbasic.co.uk/forum/showthread.php?t=6744

Look it over and see if you what you think. If I am on the wrong track let me know.

sirvo
- 30th July 2007, 19:08
ADC might be your solution. A few days ago a battery voltage monitor was discussed. http://www.picbasic.co.uk/forum/showthread.php?t=6744

Look it over and see if you what you think. If I am on the wrong track let me know.

I think you are on the worng track. I'm using ADC to measure the fuel level but the sensor range is from 0 to 6V. It is necessary to scale down from 0 to 5V so that PIC can 'read' it. My problem is on the lm324 (opamp as a buffer).

Thanks.

mackrackit
- 30th July 2007, 19:20
Forget the opamp. The thread was talking about using a simple voltage divider to scale the signal voltage down to PIC level. If you have 6 volts use a 1 to 1 voltage divider to make 3 volts. Set the ADC reference voltage to see full scale (apply 6 v to divider ADC out put 255) and you should be good to go.

sirvo
- 30th July 2007, 19:30
Forget the opamp. The thread was talking about using a simple voltage divider to scale the signal voltage down to PIC level. If you have 6 volts use a 1 to 1 voltage divider to make 3 volts. Set the ADC reference voltage to see full scale (apply 6 v to divider ADC out put 255) and you should be good to go.

I totally agree with you. But maybe I forgot to explain something that, unfortunatelly, I am not sure. My car fuel sensor is a voltage divider, I think. The sensor is a variable resistor and its range is from 40 to 280 ohms and it turns that the voltage range, as I said, is from 0 (1,66V) to 6V. If I use a simple voltage divider in this fuel signal, will not it change the signal that is being send to the car? That is the reason why I am using the opamp as a buffer..

Thanks again..

Darrel Taylor
- 30th July 2007, 20:32
The LM324 can only reach VDD -1.5V. So with 5V powering it, the most you can get out is around 3.5V.

If you power it with 7.5 V or more, it'll give you the full range.
<br>

sirvo
- 30th July 2007, 20:35
The LM324 can only reach VDD -1.5V. So with 5V powering it, the most you can get out is around 3.5V.

If you power it with 7.5 V or more, it'll give you the full range.
<br>

Thanks Darrel. You are so correctly! i have just experimented that and it worked!

Thanks again.

Sylvio