pressure sensor - externally powered

Hi all

I would like to measure the pressure change due to a change in volume of a fluid inside a sealed enclosure through a pressure sensor. The following sensor has the characteristics that I need:

[Gems pressure sensor][/http://uk.rs-online.com/web/p/pressure-sensors/4554624/?searchTerm=4554624&relevancy-data=636F3D3126696E3D4931384E525353746F636B4E756D6265724D504E266C753D656E266D6D3D6D61746368616C6C26706D3D5E5C647B367D247C5E5C647B377D247C5E5C647B31307D2426706F3D313426736E3D592673743D52535F53544F434B5F4E554D424552267573743D343535343632342677633D4E4F4E4526]

but so far I've never connected to Arduino (Uno) a sensor which require a supply voltage higher than 5V, and therefore wanted to double check with you if the connections shown in the attached image are going to work or to ruin the sensor or the Arduino. Any feedback is really welcome.

Regards

Mauri

DON'T DO IT. You will kill your arduino.
Are you trying to power the sensor and the arduino from the power supply or just power the sensor and the arduino is powered from USB or separate PSU?
Also what voltage output do you get from the sensor? If it's AC or greater than 5V DC then you will again damage/destroy your arduino.

Hi!

The sensor outputs 4-20mA.
You need a 250ohm resistor to convert the current to 1-5v.

Check out this tread for a circuit: http://forum.arduino.cc/index.php/topic,19613.0.html

thanks for the quick response.

Riva: I am just trying to power the sensor, Arduino is powered by USB.

olof_n: thanks for the link and for the hint about the resistor, but looking at the circuit from RuggedCircuits it is still not clear to me how to connect the 5V and/or GND of the Arduino to the sensor. I have 4 pins from the sensor: 1 is N/C, 2 is +IN, 3 is PE, and 4 is 0V.

Mauri

I've tried looking at the datasheet to determine the output voltages of the sensor but it's not very concise. Maybe someone else will have more luck.
Basically you start with two isolated systems, use the PSU to power the sensor and the USB to power the arduino, then you connect the ground (only ground, not the V+) between the two systems.
Then you need to ensure the sensor output will never go outside of the 0-5 volt range and connect this to the arduino analogue pin.

Riva: The output from the sensor is 4-20mA.

Riva, olof_n: I've refined the circuits according to your two replies, see attached.
If a well understood from other sources, I can further refine it by substituting a LM107 op-amp to the 220 Ohm resistor.

If you think I've placed the two resistors correctly, I will give it a try, and further work on it depending on the measured signal.

Thanks

Mauri

Looks like you have the power and ground the wrong way round on the sensor and I'm assuming +IN is VCC?

Sorry, my fault. I updated the figure.

Yes, +IN is VCC, I am just using the nomenclature of the sensor.

Do you think it will work now?

Mauri

That looks better but I'm still concerned about the voltage your getting out of the sensor. I know it's output is between 4-20mA but at what voltage?

Hi!

The resistor controls the voltage (ohms law).

4mA = 1V
20mA = 5V

You can add some extra protection (if the sensor malfunctions or something) to the Arduino.
Add a 5,1V Zener diode from the input pin to GND.
The 10K resistor controls the current and the Zener diode protects from overvoltage.

I have a pressure sensor with 3 wires. Red (+), yellow (shield) and blue (signal).

Ok, I have tested it. Forget my previous schematics, they are totally wrong. I attach the working circuit. As you can see, only +IN and 0V are used on the sensor. Can somebody explain me the role of PE (potential earth?) and N/C (not connected?)?
So far I have tested it only at ambient pressure. Therefore, output from the sensor should be 4mA, and voltage over R1 0.88V. In reality, my resistor is 216Ohm, and measured voltage over R1 is consistently 0.86V. This is independent from the external power supply if it provides more than 8V. This is again consistent with datasheet.
On the Arduino side, when the external power supply is ON, pin A0 is measuring 160, but I expected a different value. In fact, if 5V is 1023 and 0V is 0 at the analog pins, 0.86V should be 176. 160 correspond to 0.79V. Do you think this is inside the measuring error of such a circuitry? How can I improve it?
In the next days I will test it and let you know the output at higher pressures.
Thanks for your suggestions.
Mauri

There could be some margin of error in the sensor, arduino analogue read or ambient air pressure (how are you reading this?) You can over sample the reading and average/decimate it to reduce noise and then use this value to calibrate the sensor to known pressure(s).

Thanks, I will do it and come back when I calibrate it.

Regarding the sensor, it measures gauge pressure, so basically the difference between the environment it is plugged in and the surroundings (there is a little hole on top of it). As I tested it in open space, there is no difference between the two sides of the sensor.

R1 voltage is measured with a multimeter so I am quite sure that the sensor is working fine. I will try to use a different Arduino to see if a different value is shown

Mauri

mauz81:
Ok, I have tested it. Forget my previous schematics, they are totally wrong. I attach the working circuit. As you can see, only +IN and 0V are used on the sensor. Can somebody explain me the role of PE (potential earth?) and N/C (not connected?)?
So far I have tested it only at ambient pressure. Therefore, output from the sensor should be 4mA, and voltage over R1 0.88V. In reality, my resistor is 216Ohm, and measured voltage over R1 is consistently 0.86V. This is independent from the external power supply if it provides more than 8V. This is again consistent with datasheet.
On the Arduino side, when the external power supply is ON, pin A0 is measuring 160, but I expected a different value. In fact, if 5V is 1023 and 0V is 0 at the analog pins, 0.86V should be 176. 160 correspond to 0.79V. Do you think this is inside the measuring error of such a circuitry? How can I improve it?
In the next days I will test it and let you know the output at higher pressures.
Thanks for your suggestions.
Mauri

That is not the correct way to power and interface with a "loop powered sensor". The following drawing shows the correct method. The size of the resistor will determine what voltage range of the measurement value can be, and 250 ohms is a popular 'standard' that will generate a 1-5vdc range for 0 to 100% of sensor range, but you can lower that if you wish for less then full ADC resolution.

http://www.diskusjon.no/index.php?app=core&module=attach&section=attach&attach_rel_module=post&attach_id=410121

Lefty

Lefty: you are right about the resistor, 250 Ohm would result in a range from 1 to 5V, 220 Ohm from 0.88 to 4.4V. But that is what I had available at the moment. I don't agree with your comment about the circuit. Actually, they are the same except for R2 and C1 that, as pointed out by the link posted by Olof_n, are not required but might be useful as an additional protection. I saw no difference in the readings with or without R2 and C1. But I am not an expert, so If you can explain why the circuit I show is not correct, I am here to learn.

Mauri

mauz81:
Lefty: you are right about the resistor, 250 Ohm would result in a range from 1 to 5V, 220 Ohm from 0.88 to 4.4V. But that is what I had available at the moment. I don't agree with your comment about the circuit. Actually, they are the same except for R2 and C1 that, as pointed out by the link posted by Olof_n, are not required but might be useful as an additional protection. I saw no difference in the readings with or without R2 and C1. But I am not an expert, so If you can explain why the circuit I show is not correct, I am here to learn.

Mauri

You are correct, your drawing is OK. I was in error and should have studied your drawing more carefully. Sometimes just the way a schematic drawing is laid out can make it easier to be seen as incorrect when in fact it is correct.

Sorry;
Lefty