Close

Wi-Fi Range Test

A project log for Hydroponic Garden Control with IUT

Monitor and control hydroponic garden using IUT.

todd-christellTodd Christell 06/12/2017 at 00:020 Comments

Since the ESP is a remote node and accessed by Wi-Fi I decided that it would be wise to do some distance tests. Although the hydroponics setup is only about 50 feet (linear distance) from my main Wi-Fi access point it is located in the (totally submerged) basement so I wanted to check for any potential problems. I found one, but it wasn’t related to distance.

I manually sent dozens of sump pump on/off commands but did not consistently receive acknowledgements. I moved the ESP closer to the basement window which did fix the problem. Since this appeared to be a range problem I added a “dash” to Node-Red which creates a web page that can be populated with buttons, gauges and graphs. I added a button to turn the pump on and off. This way I could be outside moving the ESP while triggering it from my phone. I discovered that I could actually get quite a bit farther from my access point than my hydroponics garden and get consistent results. It was only as I got closer to the hydroponics that things became erratic. Then something occurred to me. I have an electric fence charger to keep the squirrels from harvesting my tomato crop before I do. The charger doesn’t operate continuously but instead charges the fence periodically. When the fence was electrified it created interference with the ESP’s Wi-Fi. Sometimes it would get the command, but the acknowledgement was affected and other times it would not receive the on command at all.

This is definitely a problem so I will have to figure out how to guarantee the receipt of the message. I could add a relay for the fence charger and have Node-Red turn the fence off before sending/receiving commands but I still have the same problem of guaranteeing that the relay command is received. Since the ESP sends a confirmation it would be relatively easy in a normal programming environment to go into a loop, resending the command until a confirmation is received. Node-Red has a “function” node but I’ve never used it so that may be an answer. The MQTT protocol also supports three Class Of Service (COS) modes but I seem to remember reading that the SubPub library on the ESP only supports a COS of 0. Another thing that I need to research. Although most implementations of this design won't have to deal with this type of interference it does cause me to consider how to make the communications more robust.

The “real world” can really mess with a design…

Discussions