I'm fairly new to this whole pressure sensor and arduino thing so please help :((
I'm trying to connect my 4-20mA to my Arduino board. I have the positive of my power supply connect with the positive wire of my pressure sensor. Then I have the negative wire of my pressure sensor connect to one side of a 250ohm resistor (R1). Then on that same node, I connect the resistor with another 250 ohm resistor (R2) in series for safety purpose, then connect the other side of R2 to pin A0. The ground from my power supply connect to the other side of R1, and on the same node, it connects to GND on the Arduino board (so one side of R1, ground of the power supply, and GND on the Arduino board all connect together on one node).
Below is my code:
const double pressureInput = A0; //select the analog input pin for the pressure transducer
const double pressureZero = 204.8; //analog reading of pressure transducer at 0psi
const double pressureMax = 1024; //analog reading of pressure transducer at 100psi
const int pressuretransducermaxPSI = 300; //psi value of transducer being used
thank you all for the responds. i don't have a datatsheet for my sensor, its range is 0-300 PSI and it produces 4-20mA output signal (it's a Prosense). i currently don't have any other resistor but i'll change it once i have some more.
when i measured the input voltage going into pin A0, it was very very small. then i measured the output amps from the sensor and it was also very small. the power supply did give out 24V to power up the sensor so i don't know why my signals were so small.
It appears that Prosense makes sensors that give outputs either as current or voltage. It looks to me as though you have one that gives current, but you're trying to measure as if it were voltage.
i don't really understand that circuit, can you explain more please.. again, i'm fairly new
it is giving out current output, that is why i have it connects with the 250 ohm resistor to convert it to voltage.
i got 0.079V when there's no pressure coming in. and it didn't change when i applied pressure either.. why did you do 40? isn't it supposed to be 20mA, so it'll give a 5V signal when it reaches max pressure?
That wiring in #5 looks totally wrong to me. The reference resistor, 250, or 270 Ohm ought to be connected to gnd, sensor + to its power supply + and the middle point to A0 via a 27 - 47 kOhm serial resistor.