I feel like this belongs in the general category, but I couldn’t post to it.
I found a number of posts that I feel got me very close but I’m missing something key and I’m not sure what.
For simplicity, lets say this sensor is awesome and does what it’s touted to do (yeah right, but lets start there).
Sensor is a “5 V” 0.5v to 4.5v pressure transducer capable of measuring 0-174 PSI.
I’ve got a voltage divider to get me into the 3.3v readable range.
Worth noting that last I checked, the atmospheric pressure should be ~14.78 PSI.
Here’s what I’ve worked out so far:
Its currently reading ~1955 on my analog input. This seems a little high, but I could be wrong.
Some of this is just notes that I’ve translated from other posts that were similar:
Max Pressure = 174 psi 0.5-4.5v = 4v range @ 5v 43.5 psi per volt 0.33-2.97 V = 2.64 V range @ 3.3 V (66% of 4v range) 0.33 V = 0 PSI 2.97 V = 174 PSI (2.64-0.33=2.31) 0.013276 volts per PSI 16.4783 steps per PSI 3.3 V/4096 = 1241 steps per volt ~ 1.241 steps per mV (1241/1000) 3.3/1241=0.002659 volts per step 1241*0.33 V= 409.53 = ~409-410 @ 0 PSI 1241*2.97 V= 3685.77 = ~3685-3686 @ 174 PSI range from 0-174 PSI ~3277 (starting at 409, maxing at 3686)
Assuming my “0 PSI” is at 0.5 v (for 5v) then that should mean ~0.33v maxing out at 2.97v
I tried using some mapping functions to help me out but the results either didn’t make sense or something is not physically working. By my calculations (that are a mess), I end up somewhere between 80psi and 100psi (quite the headache I would imagine…) I’ve tried 2 of these sensor with the same rating, and one at rest gives me 1868 ish and the other 1955 ish.
I’m certain I’m missing something obvious and its driving me nuts - this is a hard topic to search for too, so if the exact answer is already posted somewhere, pleeease send me there
Semi-mostly-unrelated, I don’t think the DS18B20 likes being used next to the alternator on my jeep… but thats another topic…