I would like to read the fuel level gauge input using my Teensy Arduino, and the input should be 0-5v. To protect the Arduino in case it isn't for some reason, what's the simplest/most effective method? I'm thinking a zener & small cap to clamp at say 5.5v, is there a recommended way of doing this?
Well, if the auto is going to output between 0.0V and 13.8V, clamping the voltage level at 5V will not allow one to produce an accurate reading.
Using a voltage divider like http://www.ohmslawcalculator.com/voltage-divider-calculator would allow you to get a proportional signal. I’d use 15V as the source and try 100K as R1 and afterwards, you go on a resistor hunt.
I suppose not, I was hoping though that the signal would never rise above 5.5v if it's a 0-5v sensor... Maybe just chop it by 1/3 then with a voltage divider?
If you are only doing one it will not be to bad however familiarize yourself with Load Dump and other nasty transients your system will see. As for the A/D do a voltage divider where your max voltage will be close to 5V. Then use a 10K to 50K resistor between the voltage divider and the analog input pin. This will protect the analog input. If your gauge output is rated at 4.5V maximum then just use a series resistor in the 30K range to the analog input. The protection secret is in the resistor connected to the analog input pin.
Have Fun & Good Luck!
Ok so I actually have a few 0-5 sensors to read:
Sensors Already in the car that output a 0-5v signal:
- Fuel Level
- Oil Pressure
Sensors I need to add:
- Ambient Temperature
- Intake Temperature
- Coolant Temperature
The first two I it sounds like then I could just plug them straight into the arduino via a 30k resistor each?
The temp sensors, I guess it depends how I wire them (2 wire type). Sounds like the easiest method would be to supply them with 5v and read in the same way as above via a 30k resistor?
Is this correct? It feels too simple to be safe....
Is this correct? It feels too simple to be safe…
Do the math implementing the worse case Load Dump and let me know if I made a Mistook! It is assumed the arduino is already protected.
I suppose one might wonder why you don’t measure the signals before designing an interface circuit ?
Are you against knowing what voltages you
are trying to measure or what ?
Sadly the engine is in a crate in the UK, the chassis hasn't been built yet and I'm in Malaysia so no chance to test...
I'm thinking actually that for the majority of these sensors, I can run them in the same configuration as this.
In which case maybe I do just need an input resistor?