What I need for my project?

Hey all,

I want to build a quick prototype, and a friend told me I should be able to use Arduino products to make it happen.

The system will have two pressure sensors, and I need a light to come on when the difference between those two sensors reaches one threshold, and then the ability for another light to come on with the differences between those sensors reaches another preset threshold.

Also, I would like to be able to send alerts or emails when the lights comes on. The ability to log the results would also be helpful.

It should be pretty simple, just need to know what kit I need to buy to get started. Also, all my stuff is Mac, so I need something that is compatible.

Thanks in advance for any help.

Chris

“It should be pretty simple,”

Sounds like you have both software and hardware experience, is this true.

RealHousewifeofIdaho:
I want to build a quick prototype, and a friend told me I should be able to use Arduino products to make it happen.

Yes, an Arduino can be used to build a quick prototype IF you are already familiar with programming Arduinos and with interfacing them to the appropriate sensors and other peripheral hardware needed for the task.

If you don't have that familiarity then expect to need at least a couple of months to acquire the necessary knowledge and experience.

...R

I have some coding experience, and as far as hardware, I have very little. I have done simple stuff with breadboards, and have wired sensors for automotive jobs, but that is about it.

What pressures, of fluid or air, will be sensed?

I have seen differential pressure sensors with two inputs. Using a single sensor unit instead of two separate units would simplify the project a bit.

RealHousewifeofIdaho:
Also, I would like to be able to send alerts or emails when the lights comes on.

What sort of network interface do you want to use? The primary choices would be WiFi or Ethernet. GSM may be another option. You could also use a variety of communication interfaces (e.g. Bluetooth, serial) to communicate between an Arduino and a computer or phone, which then handles the network processes.

RealHousewifeofIdaho:
The ability to log the results would also be helpful.

How much data do you need to store? What is the sampling frequency?

RealHousewifeofIdaho:
all my stuff is Mac, so I need something that is compatible.

That shouldn't be an issue. The Arduino IDE and Arduino boards are all compatible with Mac and I can't think of any other part of the project which has any chance of incompatibility.

What time frame have you in mind when you say "quick prototype"?

For me that conjures up a time frame of a few days definitely not more than 2 weeks.

...R

jremington:
What pressures, of fluid or air, will be sensed?

Water, at about 60-75psi.

pert:
I have seen differential pressure sensors with two inputs. Using a single sensor unit instead of two separate units would simplify the project a bit.
What sort of network interface do you want to use? The primary choices would be WiFi or Ethernet. GSM may be another option. You could also use a variety of communication interfaces (e.g. Bluetooth, serial) to communicate between an Arduino and a computer or phone, which then handles the network processes.How much data do you need to store? What is the sampling frequency?
That shouldn't be an issue. The Arduino IDE and Arduino boards are all compatible with Mac and I can't think of any other part of the project which has any chance of incompatibility.

The location of the sensors will end up being about 10" apart. I was thinking I would write a simple if statement? Something like if input 1 has delta > 7 psi than input 2, output light. Not exactly sure how to write the code on that. I would like to use a computer with wifi connection to talk to the arduino, due to the fact the system will be outside, but not out of range of wifi. I plan on putting the board in something like a pelican cigar case to protect it from weather. I am not familiar with storing data, but I would to just store when an event happens, so one could look back see when an output happened from the board, not necessarily the sensor outputs of the water pressure. Does that make sense to everyone?

The location of the sensors will end up being about 10" apart.

In what, a pipe? Please be more specific.

Water pressure sensors are terribly inaccurate if the water is flowing (called the Bernoulli effect).

Using two separate sensors shouldn’t be a problem.

The most popular boards with WiFi are the ESP8266 and the ESP32. The official Arduino board MKR WiFi 1010 is also a good option.

The ESP8266 only has one analog input so that would be an issue if you’re using two sensors with analog output. You can always add additional hardware to add multiple analog input channels but that does add a bit more complexity to the project vs. using a board that already has as many analog channels as you need. Of course, if your sensors don’t use analog output then that’s not even an issue.

As for logging data, you could immediately send the data to the computer and log it there. That relies on the computer being on in order to receive the data. You could store up multiple readings in the dynamic memory of the Arduino board but this is limited to the relatively small amount of free memory on your Arduino and data stored in the dynamic memory will be lost in the event of a power outage. You can store the data in the non-volatile flash memory and this will persist through power outages but the flash memory is only rated for 10000 writes so you would need to evaluate whether that’s a problem for your application. You could connect an SD card module to the Arduino board and store the data there, which will provide a good deal of storage capacity. There are some other options for external hardware to store data.

jremington:
In what, a pipe? Please be more specific.

Water pressure sensors are terribly inaccurate if the water is flowing (called the Bernoulli effect).

Yes in 1’’ pipe. Dang I did not know about the bernoulli effect causing water pressure readings to be inaccurate. Is this due to water turbulence? Is there anyway around it?

No, there is no way around it. Water pressure, as measured by a gauge fixed in a pipe, is dramatically reduced by flow; the faster the flow the less the pressure.

Why would you expect a pressure difference along 10" of pipe? Please describe the actual physical situation.

The system will be for the well waters here in SW Idaho. Depending on your well depth, pumps tend to pull sand and a bunch of other nasty stuff up. The system I want to build will begin with a sediment filter with a drain port on the bottom, then to a 10" whole house filter. With whole house filters, my wound polypropylene filter will sometimes last 4 weeks, and other times it will last 16 weeks before the filter is completely full. The plan is put a sensor before and after the whole house filter and use the arduino board to measure pressure drop in the filter housing, once a threshold is reached, it notifies the homeowner. Even with a clear housing like I have, it is impossible to know how far the sediment has penetrated into the filter diameter.

Another part of this is pain point my neighbors have with sand. They have a pre filter (also just a 10" whole house wound polypropylene filter) for their irrigation. Taking the sand out of the water saves their thousands of dollars of sprinklers, but as the sand fills the filter housing, the pressure drops, sometimes requiring the filter housing to be cleaned of sand 3-4 times a day!!

So, why can't the whole system be automated? Even the sediment filter with the drain port on the bottom could be commanded open from the arduino, either based on a timer or pressure drop, right?

OK, that makes sense, and I think your idea will work. Since the water flow has to be the same on both sides of the filter, the Bernoulli effect will be similar for both pressure sensors.

A 5V sensor like this should work, although if you want really long term reliability, these are what I use for tank level monitoring.

With the Arduino, just use the built in ADC to read the valve output voltage, which you can convert to pressure.

That is true, of course it will be similar on both sides of the filter head. I was looking at a sensor just like the one you posted. I imagine I would just need to know the formula of how to convert the volts to psi.

Like I mentioned above, I need to open a valve on a sediment filter. Would I be able to operate a normally closed valve off the arduino?

Now that I have explained exactly what I am doing (I apologize about beating around the bush), what Arduino product would work best of me?

Also, thank you for everyone's input. This board is awesome.

Something like if input 1 has delta > 7 psi than input 2, output light. Not exactly sure how to write the code on that.

To get the difference between two numbers you subtract. That's basic math.

if(reading1 - reading2 >= someThreshold)

I imagine I would just need to know the formula of how to convert the volts to psi.

The formula is simple, but you don't need it to know if there is a large pressure difference. That will produce a large difference in the voltage output by the sensors, which is just as easy to test.

However, the formula (for the 100 psi gauge) is;

float psi = (adc_reading*5.0/1024. - 0.5)*25.;

Any 5V Arduino will work, even these $3 Pro Minis.

Would I be able to operate a normally closed valve off the arduino?

Yes, but how you do that depends on the valve. If it is a 110VAC valve, a relay board is required.

Yes the valve is a 110AC

So I could use a relay board like this to open it, yes?

That relay board should work.

RealHousewifeofIdaho:
Yes the valve is a 110AC

So I could use a relay board like this to open it, yes?

Well, yes, probably but there are a lot of complications people encounter using such relay boards to control valves that you will have to work through.

As previously pointed out, this is very much a non-trivial enterprise.