Setup your own hydroMazing

Setup and Use hydroMazing

  • The Controller ( Arduino Nano Expansion Board with nRF24L01 and DHT sensor ) uses 433MHz Transmitter to send codes to remote-controlled AC Outlets or can connect directly via a transistor, MOSFET, or relay.

 

  • Raspberry Pi Web Services Module ( with nRF24L01 ).

 

  • Optional The Advanced Controller ( Arduino Nano Expansion Board with nRF24L01 and uses 433MHz Transmitter to send codes to remote-controlled AC Outlets or can connect directly via a transistor, MOSFET, or relay.  Supports additional sensors:  E.C., pH, Light Intensity, more floats and flow-rate sensors.

 

  • Optional Web-Camera using Raspberry Pi ( with USB Web-Camera ).

 

  • Optional Zone/Node Controller(s) ( Arduino Pro-Mini with nRF24L01 connects directly via a transistor, MOSFET, or relay.  These units are solar-powered with a battery backup.  Also, supports additional soil-moisture sensors.

 

  • Optional The Monitor (Arduino Nano Expansion Board with nRF24L01 ) connected to an Arduino Uno with LCD w/ Buttons Shield.

Each module requires a standard 5 volts power source such as USB.

Setup hydroMazing

Plug-in appliances to their corresponding remote controlled AC switch units:

  1. Intake Ventilation Fan
  2. Exhaust Ventilation Fan
  3. Humidifier / Other
  4. Heater / Additional Lighting
  5. Pump(s)
  • Install the hydroMazing Controller Unit inside the growing area.
  • Provide power to the controller and monitoring devices.

hydroMazing’s default sensors:

  • DHT ( Temperature and Humidity ) Sensor
  • Dallas Temperature Probe Water Temperature Sensor
  • Flow Rate Sensor
  • Float Switch – Low water level
  • Float Switch – High water level

The hydroMazing controller is designed to operate ventilation fans for air circulation, water pumps, occasionally a humidifier, heaters, or any other appliance that is necessary to maintain an ideal environment for plants to grow.  Monitoring and controlling the system is mostly done for us, but when the hydroMazing needs to alert us to a problem it can by using the Raspberry Pi.

Using float switches:

  1. Top float switch used to indicate vessel is full of liquid.
  2. Middle float switch provides warning or triggers a pump to refill.
  3. Bottom float switch turns off pumps and notifies attendant that vessel is out of liquid.

Using the flow sensor’s data we can determine the flow rate of the liquid being pumped.

Hook Up Your Raspberry Pi

Connecting all your devices to the Raspberry Pi is very easy, but you want to do it in a specific order so it can recognize all your devices when it boots up. First, connect your HDMI cable to your Raspberry Pi and your monitor, then connect your USB devices. If you’re using an ethernet cable to connect to your router, go ahead and connect that as well.  Finally, once everything is connected, go ahead and plug in your power adapter. The Raspberry Pi does not have a power switch, so once you connect the power adapter, it’ll turn on all by itself.

Connect to Your Wi-Fi Network

Connecting to your Wi-Fi network works the same in Raspbian as it does it any modern operating system.

  • Click the network icon (it’s the one with two computers) in the top right corner.
  • Select your Wi-Fi network name, and enter your password.

That’s it, you’re now connected to Wi-Fi. This will work in both the command line and in the graphical interface, so you only need to set it once. If you have an older Pi and you’re using a Wi-Fi adapter like this, the process is the same.

You have several devices connected to your WiFi router, so how can you tell the outside where you are serving-up Raspberry Pi?

Getting Online

The following section assumes you have an updated and upgraded Raspberry Pi 3 or equivalent, and installed L.A.M.P. (Linux.Apache.MySQL.PHP.)  Excellent article for getting started and RaspberryPi.org’s installing LAMP.

You have several devices connected to your WiFi router, so how can you tell the outside where you are serving-up Raspberry Pi?  Let’s get familiar with our router’s advanced settings in your router manufacturer’s configuration tool.  Most home networks use one of these common IP addresses for their gateway to the Internet:

place-wifi-router

You will need to login to your router’s configuration tool.  The username and password should have been assigned at the time of setup.  First, we need to reserve an IP address for our Raspberry Pi to use on a regular basis.  Typically, the router will have a DHCP (Dynamic Host Configuration Protocol) Settings section, List and Bindings, etc.  The Raspberry Pi and all other devices on your LAN should be listed here.  Hopefully, your router will have a somewhat intuitive interface that will make sense as to how to assign an IP address to a device or MAC address.  If all else fails, consult your manufacturer’s instructions.

decapi-slider-raspberry-pi-casenetwork-782707_1280-980x637

The default port for web requests is 80.  You can leave the default unless your Internet Service Provider doesn’t allow port 80.  Next step in your router’s configuration is to have the router forward all incoming requests on port 80 to the Raspberry Pi.  Typically referred to as, Port Forwarding or Port Range Forwarding.  You will want to associate the Raspberry Pi’s IP address so that it will receive all incoming requests on port 80 or whatever port you find most appropriate.  (The most secure web server is one that is not connected to the Internet 😉  The default port for SSL is port 443.  Next step in your router’s configuration is to have the router forward all incoming requests on port 443 to the Raspberry Pi.  Motion Web-Cam Streaming:  The default port for motion is port 8081.  Next step in your router’s configuration is to have the router forward all incoming requests on port 8081 to the Raspberry Pi.

You could also allow Telnet, FTP, SSH, VNC, etc but I do not recommend unless you are familiar with the security risks associated with such services.

Get Yourself A Domain Name

http://www.YOUR_CUSTOM_DOMAIN.ddns.net

Check for the DDNS ( Dynamic Domain Name Service ) Setting in your Router’s advanced configuration settings.  Most routers will support one or more of the following, http://www.dyn.comhttp://www.noip.com, many others search Google for “Dynamic DNS”.  The service will offer the ability to register a domain name to associate with the Dynamic IP address that is assigned to you by your Internet Service Provider.  Typically, your router or a software plugin that you download and install will update the Dynamic DNS service’s database when your assigned IP address changes.

Secure Socket Layer

https://letsencrypt.org/

Let’s Encrypt our connection with the Raspberry Pi.

Install

Rather than apt-get Cerbot, I download the latest version directly from its repo:

sudo git clone https://github.com/certbot/certbot /etc/letsencrypt

Easy SSL through Automation

Certbot has a fairly solid beta-quality Apache plugin, which is supported on many platforms, and automates both obtaining and installing certs:

sudo /etc/letsencrypt/certbot-auto

 

Your domain name for your hydroMazing should now be secure.

hydroMazing Nutrient Controller

hydroMazing outside the box
hydroMazing outside the box

The hydroMazing smart garden system is designed to monitor and manage your growing environment by automatically controlling fans, heaters, lights, water pumps, and now, the nutrient solution.

The nutrient solution level of the hydroponics container system must be monitored.

As the nutrient solution level decreases it needs to be replenished with fresh water, otherwise the nutrient solution becomes more concentrated and some plants won’t respond well.  The hydroMazing Nutrient Controller can activate a pump that adds fresh water to bring the concentration back to the level it was when started, often referred to as “topping-off.”  The hydroMazing Nutrient Controller will also monitor your pH and EC, activating pumps to manage the solution, and notifying you when you need to make changes.

There is no need to adjust your pH or EC until it is necessary.

This is a big one!  There is a lot of misinformation out there about keeping the pH and EC regulated.  If I were paranoid, I’d say it was a conspiracy from hydroponics manufacturers and retailers who want to sell more consumable product.  Don’t get me wrong, proper pH and EC is important, even critical, to the success of a plant.

The pH of water is an important measurement whether you are gardening indoors or outdoors, soil or soil-less, because it affects whether a plant can properly take in nutrients.  Even though hydroMazing monitors your pH and EC, I still recommend a handheld pH tester such as the Oakton EcoTestr pH 2 Waterproof pH Tester, which is excellent for the home gardener and has been proven time and again to be accurate.

The electrical conductivity (EC) of water estimates the total amount of solids dissolved in water, or TDS (Total Dissolved Solids). TDS is often measured in ppm (parts per million). In hydroponics, this measurement is used to determine the approximate concentration of nutrient solution to water. There are many hand-held EC devices available as well.

When do I need to adjust the pH?

Only under the following conditions:

pH is at or below 5.0 or above 6.5

AFTER at least 30 minutes from the time of topping-off or changing the nutrient solution.

How to adjust?  I highly recommend using pH Up and pH Down from General Hydroponics sparingly and only when necessary.

Flushing

Flushing means to literally flush empty the nutrient solution from the hydroponics system and replace it with fresh “good” tap-water.  Then return the nutrient solution back to what it should be for the phase of growth.

When in doubt, flush the system and refresh the nutrients.  Otherwise, it’s recommended to flush your recirculating system every 7 – 14 days.  When I grow, I try to keep the nutrient solution working as long as possible, however, salts build-up over time and it is good to flush with fresh water from time to time.

What’s Next?

Using a Web Cam to Monitor Your Grow

What is a Smart Garden?

Control

The hydroMazing controller is designed to operate ventilation fans for air circulation, water pumps, occasionally a humidifier, heaters, or any other appliance that is necessary to maintain an ideal environment for plants to grow.  Typically, we DIY’ers would hook-up some relays to a microcontroller to achieve control.  However, with hydroMazing, the system uses remote controlled wireless AC outlets, ensuring safer control than traditional relays.  hydroMazing uses low-cost open-hardware modules and the ubiquitous microcontroller, the Atmega328, on an Arduino Nano*, offering the flexibility of customization and expansion. The sensor choices are endless, but I’ve narrowed it down to a few important and relatively inexpensive modules.  A temperature and relative-humidity sensor, moisture sensors for soil, liquid temperature probe for hydroponics, a simple photocell.  There are many other optional additions including the float switch or switches and flow-rate sensors.

The wirelessly controlled outlets proved to be a etekcity_outletsreliable method of controlling the fans using the Arduino to send the signals depending on the temperature sensor’s readings.  It didn’t take long for the source-code to evolve into a beast.  The Arduino family of microcontrollers is limited in how many instructions it can run and hitting the program size limit doesn’t take very long when you want to control more than a few blinking LEDs.  I have found that the size limitation has forced me to write better, more efficient code than I initially do.  Even with creative variable handling and custom libraries, eventually, there is a need for another microcontroller or to move to a larger one.

Wireless Monitoring w/o Internet

There are several ways that the microcontrollers can communicate with each other.  The least expensive wireless method I could find is the nRF24L01 wireless radio transceiver. The module is a low-power, lightweight variety of bluetooth giving hydroMazing the ability to communicate with a monitoring unit.fpzexmwi7vqs7mr-medium

I decided to add another Arduino Uno with an Liquid Crystal Display shield so that I could display what the sensors were reading, the state of appliances, and alerts with notifications.

frv8uq9i800wgat-medium

mmexport1472732631987

I made my own open and adaptable platform that can be custom tailored to a wide variety of gardening needs and conditions; yet, also a self-contained wireless system.  The open-architecture of the system allows for ease of integrating Internet connectivity and web services.

Internet Monitoring

Enter the Raspberry Pi connected with an nRF24L01 module.

I was able to modify much of  my Arduino Source code to listen for incoming transmissions and then write that data out to a few files.  First, a log file that captures all communications between the Pi and the hydroMazing Monitor.  Next, I have the program write out the current state of all sensor objects and a file for all of the appliance objects.  When an alert occurs the progrhydromazing-liveam will create a file containing that alert.

I then added a PHP script to read in the data object’s from their respective files and display live on the Pi’s Apache server.

hydromazing-alert

Next, I wrote a Python script to read the directory for the alerts file and if it exists, read the file, parse out the pertinent information and then email or through SMS text the user.  In addition to sending an email or text alert, the python script moves the alert file into position for the PHP script to read and display.

Using the log files that are created, I am able to import the data into a database.  Once the hydroMazing’s data is recorded into a database residing on the Raspberry Pi we can start performing analytics and generate some reports.

Monitoring and controlling the system is mostly done for us, but when the hydroMazing needs to alert us to a problem it can now by using the Raspberry Pi.

 

img_20161001_145206012

With the hydroMazing smart gardening system, you can grow healthy, happy plants anywhere!

Contact us today for more information!