# Pool Pressure Sensor

• Ok Time to build a sensor to measure my pool filter pressure. This is what I will be using.
http://www.amazon.com/dp/B00RCPDPRQ

Connect Pressure Transducer to filter with a little plumbing.

Now time to make the board and set the code. I need a little help with the code I have some sample code I found online here.

``````

void loop() {

int psi = ((sensorVoltage-95)/204)*50; //change to *25 for 100PSI Transducer I think
Serial.println (psi);

delay (1000);
}
``````

I think the Transducer I have is 25 psi per 1V.

But how to send `Serial.println (psi);`
into MySensors I need the help that, type of unit? Same as the barometer?

Thanks in advance for any help!

### Eyourlife Universal 100PSI Pressure Transducer Sender Solenoid for Oil Fuel Gas Air Water E5

\$17.98
1 available

• Nice one - this is one sensor I haven't yet got around to adding.
Out of interest, Why do you want to know this data?
For my I was thinking that it could prompt me to backwash the filter or alert if there was a problem.

Yes - I guess you would use the BARO type for pressure

I would assume the units shown will be dependant on your controller or interface.

Ill be interested to see how this works for you!

• @DrJeff
That sensor is a generic pressure transducer used widely in the Automotive industry and widely copied and repackaged by third party vendors, in your case an amazon vendor who sells both costume jewelry and autoparts. Good Luck finding a datasheet for it.

Those transducers usually output a voltage linearly scaled to the pressure spec. How accurate the pressure spec is anyone's guess. The good thing is they typically output 0.5V at 0psi and 4.5V at their rated spec, in your case 100psi (?). You can map the analog output from the transducer:

psiRead = map(psiRead, 102, 921, 0, 100); // where the analog reading of 102 is 0.5V and 921 is 4.5V if the transducer is fed 5V.

Depending on your controller and what you plan on doing with this data, I would send the data to your controller as a simple number using V_LIGHT_LEVEL or V_VAR1 and not mess with atmospheric pressure with V_PRESSURE.

I assume that is a mechanical pressure gauge on the top. You could test the analog read against the mechanical gauge reading at various pressures to confirm your mapped values, although neither value will necessarily be accurate.

Interesting project, do you plan on using the sensor data for monitoring or automation?

• @Dwalt
Yes I plan on monitoring pressure rises. I assumed the accuracy would not be perfect, I'm not concerned with perfection just changes. After I set a baseline then the automation begins. Currently I use a spreadsheet to keep track of when the filter is cleaned (reading the mechanical gauge PSI) and that is missed sometimes manual entering data is not my forte. Then after checking the gauge to see increase in pressure I know it's time to clean the filter. If I wrote the data into the spreadsheet then I know how long till it needs it again, well sort of. The automation part will be sending alerts when necessary action is required not some spreadsheet Voodoo even though adding the data automatically to the spreadsheet will be nice. I already have the rest of the pool automated Lights, Pumps(5), Pump speeds, Valves for Solar, Waterfalls, spill overs, water fill lines, and the list continues. I even have some temp sensors and hysteresis for gas heater and solar heating. All this currently runs on an Arduino with a serial connection via XBee into my Mac with XTension Home Automation Software from http://machomeautomation.com. I have been rallying James over there to add XTension as controller for MySensors and I think he is almost ready to do it!
`psiRead = map(psiRead, 102, 921, 0, 100);`
I think I get how this works so I will be trying to implement this. what would be the advantage to the code above and this way?
On sending this just as a number I think you are smart about that, for now it goes to Vera but hopefully soon XTension.

• @DrJeff said:

...what would be the advantage to the code above and this way?

The sensor is supposed to be linear from looking at other similar sensors online, the sensor should return a voltage between 0.5v and 4.5v based on its design spec. The analogRead from the sensor should be linear from 102 (at 0 psi) and 921 (at 100 psi). Mapping the readings from 0 (102 analogRead) to 100 (921 analogRead) should match your desired 0-100psi linear scale. You could test it with no load and your analog reading should be close to atmospheric pressure or 14.7psi (222 analogRead). I would test it at various pressures and record the analog reading compared to the mechanical gauge and extrapolate it to create a scale range for your sensor.

Hope this helps.

• @Dwalt said:

Depending on your controller and what you plan on doing with this data, I would send the data to your controller as a simple number using V_LIGHT_LEVEL or V_VAR1 and not mess with atmospheric pressure with V_PRESSURE.

or just use the temperature device...

you can attach logic a lot easier with controller-friendly device types. Vera knows temperature, for example.

## 85.9kPosts

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.