mercmobily
Posts: 1
Joined: Sat Apr 27, 2019 12:30 am

Sensors and switches

Sat Apr 27, 2019 12:43 am

Hi,

Disclaimer: I am a software engineer, and know very little about hardware. This means that the software side won't be a problem for me. However, my knowledge about robotics and sensors is absolutely 0. However, please note that I am not after hand-holding solutions -- I am after general guidance.

I need to automate the working of a small pond (around 100 Litres). I need to make sure that there is always the right amount of water (which could be too much with rain, or too little with evaporation), and that the PH is always absolutely correct. So, I need to connect my Pi to:

* A sensor that "knows" it's been touched by water (to see if I need to add more)
* An on/off switch to turn off a pump on or off (to take water out)
* An inline on/off switch, which will allow water to come in (to fill it up)
* A device able to drop 10 drops of PH adjustment into the pond. I will need two, one for PH up and one for PH down
* Two more devices able to drop solution into the pond
* An on/off switch to turn on a pump within the pond, to "stir" the water up after adjusting the PH (so that there is a correct reading)

So, questions:

How do you connect this stuff to the Pi?

Question 1:
Is there some kind of 'magic board" that I can connect to it (maybe via USB?) which will allow me to send signals to it, like "send 5v to port 1", "send 2v to port 2"? Or even "read port 3", so that I could connect something like this to it: https://au.element14.com/dfrobot/dfr009 ... dp/2946107

Question 2:
Where would you buy the actual devices? I found the PH tester. What about on/off switches? What about a device that will drop 1ml of liquid when required? Where would I even look for this stuff?

Thanks a lot,

Merc.

User avatar
omegaman477
Posts: 148
Joined: Tue Feb 28, 2017 1:13 pm
Location: Sydney, Australia

Re: Sensors and switches

Thu May 02, 2019 11:33 am

mercmobily wrote:
Sat Apr 27, 2019 12:43 am
So, I need to connect my Pi to:

* A sensor that "knows" it's been touched by water (to see if I need to add more)
* An on/off switch to turn off a pump on or off (to take water out)
* An inline on/off switch, which will allow water to come in (to fill it up)
* A device able to drop 10 drops of PH adjustment into the pond. I will need two, one for PH up and one for PH down
* Two more devices able to drop solution into the pond
* An on/off switch to turn on a pump within the pond, to "stir" the water up after adjusting the PH (so that there is a correct reading)

So, questions:

How do you connect this stuff to the Pi?

Question 1:
Is there some kind of 'magic board" that I can connect to it (maybe via USB?) which will allow me to send signals to it, like "send 5v to port 1", "send 2v to port 2"? Or even "read port 3", so that I could connect something like this to it: https://au.element14.com/dfrobot/dfr009 ... dp/2946107

Question 2:
Where would you buy the actual devices? I found the PH tester. What about on/off switches? What about a device that will drop 1ml of liquid when required? Where would I even look for this stuff?

Thanks a lot,

Merc.
There are a multitude of RPI 'hats' or plug on top interface cards for everything you describe. You can stack these hats from various suppliers, mix and match. Or you can build all the electronics by hand on your own hat, but I think thats not what your seeking. I will give you some ideas on the sorts of interfacing you need to look at for each requirement.

* A sensor that "knows" it's been touched by water (to see if I need to add more)
---DIGITAL INPUT, best use a FLOAT SWITCH rather than a water sensor, as they are more reliable and rugged. Either direct 3.3V signal into the RPI GPIO, or via a Opto Isolator input hat. Two if these for High water and Low Water

* An on/off switch to turn off a pump on or off (to take water out)
--DIGITAL OUTPUT, controlling a electric pump. Depending on the pump size, power and supply voltage, you will either need at least a suitably rated RELAY output, or a more complex SSR or contactor for higher power motors.

* An inline on/off switch, which will allow water to come in (to fill it up)
--DIGITAL OUTPUT, controlling a solenoid valve. Again Depending on the solenoid size, power and supply voltage, you will either need a suitable rated RELAY output,

* A device able to drop 10 drops of PH adjustment into the pond. I will need two, one for PH up and one for PH down
--DIGITAL OUTPUT, controlling a small DC peristaltic metering pump valve. Again Depending on the pump motor size (probably very small DC) size, power and supply voltage, you will either need a suitable rated RELAY output. You would switch the pump on for a defined period of time (say 5 seconds) as it pump 5ml of DILUTED pH buffer into the pond. This would be the case for a pump that delivers 60ml per minute.

* Two more devices able to drop solution into the pond
As above, another relay

* An on/off switch to turn on a pump within the pond, to "stir" the water up after adjusting the PH (so that there is a correct reading)
--Same as the water take out pump

So I count;
2 digital inputs
6 relay outputs

So look for a 4-8 digital input (opto isolated preferred) PLUS 8 relay output Hat or I2C module,

Also consider water temperature (use I2C), and maybe a dedicated pH module for I2C, available off the shelf. pH correction calculations can be VERY temperature sensitive.
..the only thing worse than a stupid question is a question not asked.

Return to “Automation, sensing and robotics”