2

I've been an avid Bonsai enthusiast for some time, and have always wanted to automate some of the day to day tasks (and get some data logging in the process).

I'd like to be able to detect:

  • soil moisture in 4 containers
  • room humidity and temperature
  • pH in one of the containers (more finicky plant)
  • control 4 individual pumps

I've found several tutorials that deal with "connecting one hygrometer", but where I don't truly understand how the pins on the RPi work, I'm looking for some insight on how to scale this out.

Next part, I realize that the Arduino is has analog capabilities the Pi doesn't, but the familiarity with the programming languages available on the Pi are driving the decision.

Soil Moisture Detection

I've found these sensors, https://www.amazon.ca/Gikfun-Capacitive-Corrosion-Resistant-Detection/dp/B07H3P1NRM, which I understand need an ADC so that I can get percentage values out of the units.

I've also found this ADC, https://www.amazon.ca/Adafruit-PID-1085-ADS1115-16-Bit/dp/B00QIW4MGW/ref=sr_1_6?keywords=ADS1115&qid=1586561797&sr=8-6. Not sure how they get wired up, but it says 4-ch, which I imagine refers to its ability to handle 4 sensors?

Temp/Humidity

I saw this one here, DHT11, which seems simple. https://www.robotshop.com/ca/en/dht11-temperature-humidity-sensor-module.html?gclid=EAIaIQobChMI5raHo4Tf6AIVUPDACh2czgVYEAQYBCABEgIkHPD_BwE

pH Detection

I found this sensor kit, https://www.atlas-scientific.com/product_pages/kits/ph-kit.html

Water Delivery

This pump looks right! https://www.adafruit.com/product/1150

Is this enough?

Now, where I'm a great coder, I'm not an accomplished circuit board connoisseur! How to get all these pieces 'wired' to the Pi?

Thanks for any insight!

Saeven
  • 141
  • 5
  • This question is too general. You could search for A-D modules, but frankly if I wanted to do this I would use an Arduino. There is minimal processing involved, so the Pi-4 is overkill - a PiB+ would be adequate. You will also find more instructions for Arduino. – Milliways Apr 11 '20 at 00:16
  • Totally get that Arduino is the better platform, but I want to stand a Swoole server to serve as dashboard. That’ll be easier on the Pi – Saeven Apr 11 '20 at 00:45
  • 1
    For pH, the following might help: https://raspberrypi.stackexchange.com/questions/96653/ph-4502c-ph-sensor-calibration-and-adc-using-mcp3008-pcf8591-and-ads1115. – tlfong01 Apr 11 '20 at 01:46
  • 1
    For temperature, this might be useful: https://raspberrypi.stackexchange.com/questions/100203/ds18b20-temperature-sensor-rpi-3-4-driver-wiring-detection-and-python-progr – tlfong01 Apr 11 '20 at 01:51
  • 1
    For moisture, this reference should be a good starting point: https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=233311&p=1440355&hilit=moisture+tlfong01#p1429215 – tlfong01 Apr 11 '20 at 01:57
  • 1
    For pump: https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=77158&p=1381729&hilit=pump+tlfong01#p1377308 – tlfong01 Apr 11 '20 at 02:02
  • 1
    For controlling a pump, you probably need a relay: https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=77158#p1323061 – tlfong01 Apr 11 '20 at 02:06
  • 1
    For controlling solenoid valve: https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=231984&hilit=solenoid+valve+tlfong01#p1420428 – tlfong01 Apr 11 '20 at 02:12
  • 2
    For ADC of multiple sensors, you might try multi-channel ADS1115; for multiple actuators, you might need MCP23017. Of course there are many other choices, depending on your application and objectve. Eg, if your objective is to learn and start small, you might like to try 8 bit or 10 bit, ADC3008, which a much easier than 16 bit ADS1115, of course there are 24 bit ADC such as ADS1250 for you to show off – tlfong01 Apr 11 '20 at 02:19
  • 1
    For humidity, I would recommend DHT22, instead of DHT11: (1) "RPI ZW Multiple Sensors - 2019feb11": https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=233311&p=1428409&hilit=dht22+tlfong01#p1428409

    (2) "Searched query: dht22 tlfong01: Search found 53 matches: dht22 tlfong01": https://www.raspberrypi.org/forums/search.php?keywords=dht22+tlfong01

    – tlfong01 Apr 11 '20 at 02:33
  • For weighing your finky little plants, I would recommend load cell with 24 bit HX711 ADC.https://www.raspberrypi.org/forums/search.php?st=0&sk=t&sd=d&sr=posts&keywords=hx711+tlfong01 – tlfong01 Apr 11 '20 at 02:45
  • PHP Swoole server seems a bit overkill. For RDBMS newbies like me, I would prefer Rpi friendly MySqlServer and newbie friendly GUI PHPmyAdmin. References: (1) Setup a Raspberry Pi MYSQL Database - Emmet, PiMyLifeUp 2019jul04 https://pimylifeup.com/raspberry-pi-mysql/,

    (2) How to Install PHPMyAdmin on the Raspberry Pi - Emmet 2019jul04 https://pimylifeup.com/raspberry-pi-phpmyadmin/. Cheers.

    – tlfong01 Apr 11 '20 at 02:59
  • 1
    Thanks for all the links, really appreciate it. I'm an extremely strong programmer, just an absolute zero when it comes to cobbling circuits and electronics from scratch like this. If I can get the sensor readings into PHP, the rest will be a breeze! – Saeven Apr 11 '20 at 03:03
  • Ah, for electronics newbies, I always recommend to start off with AdaFurit and SparkFun's newbie friendly tutorials. ADC usually give you conversion results in binary or decimal numbers to input to mySQL which can be connected to a PHP talking guy, and so Day is done: https://www.youtube.com/watch?v=5UrunpqtcIE. Cheers. – tlfong01 Apr 11 '20 at 03:13

1 Answers1

1

For the soil sensors I would look to this ADC board as it will handle four sensors at once.

DHT11 are not my goto sensors - they can drift and are not great in the accuracy steaks either. For outdoor / wet areas I would use a DS18B20 such as these inc resistor

The humidity sensor I have is the BME -680 board but I've not deployed this live yet and would be going indoors.

Note on the Arduino style boards you can run either Micropython (e.g. UnexpectedMarkers great WiFi enabled TinoPico) or Circuit Python - it does not have to be the normal IDE and C/C++ :)

Happy to edit this with more notes - just drop a comment below with more needs...