I am (want to be) reading a bunch of automotive sensors (Oil pressure sender, fuel gauge, brake pressure SWITCH an low oil pressure switch) and knowing that I couldn't just chuck 12 (or 14.7 under charge? see below) I built a back of the envelope voltage divider board using 12k and 5k resistors, giving a 5/17ths reading. (12v = 3.53v)
I didn't do this with any real method because when I built it I only really wanted the oil pressure SWITCH and brake SWITCH, so I just wanted a safe, sufficiently non-zero number when the signal went from 12->0v or 0->12v. Of course as soon as I got the dash off I put a multimeter over the fuel gauge and the oil pressure gauge as well. They are resistive type senders and even at good oil pressure the raw voltage I am getting is only about 5V (before the divider). I THINK this is because the sender has specific bounds for the resistance (that I don't know)...
However when I did this, I chose 5/17th because that would bring worst case charging voltage (about 14.7v) down to a safe (for 5V!) 4.3V. At the time you see it completely escaped me that the analog inputs on the Teensy are 3.3v, not 5v.
The happy accidental situation is that the 12v signals for the brake switch and oil light are 12v only (even with engine on) and it appears that the two gauges will never read 12v (I'll need to fill the fuel tank to be sure 100% though).
This brings me to my actual question, hopefully having given enough background.
I believe the Teensy 3.5 Analog input pins A0-A9 are 5v tolerant, meaning that my input worst case scenario (which I WILL SEE for the 2 switches) will see 3.53v presented. I have read that this isn't an issue except obviously the reading will max out for any input from 3.3v to 5V (and beyond if I choose to explode things). Is my understanding correct?
Is it safe to present a 3.53V signal to pins A0-A9, understanding I'll see 2^12 as the result only?
If either gauge ends up presenting the full 12v to my slightly inappropriately sized divider array, is the only issue that I'll lose any resolution above 3.3V and get 100% readings?
Or am I going to blow things up?
Cheers - Neil G
ps. I did all my testing on a Mega2560R3 so I was able to observe the behaviour so far without going beyond any design parameters. I literally sat down to add the code into my Teensy app and realised when I googled for Teensy 3.5 analog in sample that I had forgotten about 3.3!
I didn't do this with any real method because when I built it I only really wanted the oil pressure SWITCH and brake SWITCH, so I just wanted a safe, sufficiently non-zero number when the signal went from 12->0v or 0->12v. Of course as soon as I got the dash off I put a multimeter over the fuel gauge and the oil pressure gauge as well. They are resistive type senders and even at good oil pressure the raw voltage I am getting is only about 5V (before the divider). I THINK this is because the sender has specific bounds for the resistance (that I don't know)...
However when I did this, I chose 5/17th because that would bring worst case charging voltage (about 14.7v) down to a safe (for 5V!) 4.3V. At the time you see it completely escaped me that the analog inputs on the Teensy are 3.3v, not 5v.
The happy accidental situation is that the 12v signals for the brake switch and oil light are 12v only (even with engine on) and it appears that the two gauges will never read 12v (I'll need to fill the fuel tank to be sure 100% though).
This brings me to my actual question, hopefully having given enough background.
I believe the Teensy 3.5 Analog input pins A0-A9 are 5v tolerant, meaning that my input worst case scenario (which I WILL SEE for the 2 switches) will see 3.53v presented. I have read that this isn't an issue except obviously the reading will max out for any input from 3.3v to 5V (and beyond if I choose to explode things). Is my understanding correct?
Is it safe to present a 3.53V signal to pins A0-A9, understanding I'll see 2^12 as the result only?
If either gauge ends up presenting the full 12v to my slightly inappropriately sized divider array, is the only issue that I'll lose any resolution above 3.3V and get 100% readings?
Or am I going to blow things up?
Cheers - Neil G
ps. I did all my testing on a Mega2560R3 so I was able to observe the behaviour so far without going beyond any design parameters. I literally sat down to add the code into my Teensy app and realised when I googled for Teensy 3.5 analog in sample that I had forgotten about 3.3!