Arduinos In The Grow Room: My Project

Sorry, I'm spending my time working on the blog site. I'm trying to make it easier for people to find information on individual pieces of the project, for example, the soil moisture sensor, and how to make one.

It will also allow me to ramble on endlessly on the blog, and not pile up 10 new posts here every day that aren't really conveying any useful information...

I'll try to keep my posts here as productive as possible... :)
 
Soil Moisture Sensor Corrosion

Sensor #35 is one of the new stainless steel Soil Moisture Sensors, the ones I call DIY-3 Soil Moisture Sensors.

It was built on Oct 2, 2018, and first went into service on Mar 9, 2019 until two days ago.

This particular sensor had 3,195 power cycles, for a total powered time of 1,954,623 milliSeconds, or 32 minutes and 34 seconds spending the entire time in one pot.

You can see the corrosion on the left probe.

sensor35corrosion.png



The data shows it had no effect on the sensors performance in that short time.


sensor35graph.png


I will continue to monitor the condition of sensors as they are removed from pots to determine at what point it begins to affect the readings. It will be simple enough to automatically determine the point just before failure, and prompt me to replace the sensor (or at least the probes)

This leads to a design change for any future sensors...

Right now I plug the ends of the terminal block, where the steel rods are connected, with hot glue to ensure it is waterproof. Future versions will have heat shrink applied first, then hot glue, then more heat shrink. This will keep the hot glue out of the screws and threads, allowing me to replace individual probes.
 

Attachments

  • 1558075058893.png
    1558075058893.png
    1.1 MB · Views: 190
  • 1558075167725.png
    1558075167725.png
    22.4 KB · Views: 188
This is my aeration pump from the Auto Water reservoir after about 2 weeks...

IMG_20190518_152535.jpg



So badly clogged it was barely pumping water, and no air bubbles...

I'm using liquid nutes, but I guess they still settle as a solid.

Not sure if this is because I am only auto watering one plant, and it only needs water maybe once a week at this point. That leaves plenty of time for this to happen...

If it was looking after 8 plants, as designed, the water would be replaced every week, probably topped up every couple days...

I had hoped adding the circulating pump would have prevented this.

Perhaps I need a way to add nutrients to a single dose of water at the time of watering? Sounds tricky... Something else to think of...

In the mean time, less water in the res, add a couple more plants to the auto watering schedule, maybe in the flower tent, they need watering much more often...

Another thought, I have observed the water level dropping in the res due to evaporation, this will increase the nutrient concentration... I think a Lid for the bucket is in order to prevent this evaporation...
 
I think a Lid for the bucket is in order to prevent this evaporation

Keeping a lid on it will vastly reduce your evaporation rate.

I'm using liquid nutes, but I guess they still settle as a solid.

Looks like some calcium or lime buildup as well, perhaps add a few stir cycles where your reservoir gets aerated and stirred? I have a pump on its own timer that circulates my reservoir every 30 minutes, with a venturi setup on the output, for 5 minutes total. This has really helped with the 'muck' that ultimately will appear between changeouts.
 
Looks like some calcium or lime buildup as well, perhaps add a few stir cycles where your reservoir gets aerated and stirred? I have a pump on its own timer that circulates my reservoir every 30 minutes, with a venturi setup on the output, for 5 minutes total. This has really helped with the 'muck' that ultimately will appear between changeouts.

That IS my stir pump, and it was running 24/7 :(
 
Still working on the code... Supposed to be a code review, but everywhere I look, I see things I can improve, and just go at it, making changes right there... I would just add them to a ToDo list I keep, but some of them would take longer to explain (so I'll remember what the issue was) than it takes just to make the change... Oh well, any progress forward is good.

Speaking of progress, it seems like I've had nothing but failures recently, including:

- Dual Soil Moisture sensors don't seem to work
- My corrosion-proof Stainless Steel Soil Moisture Sensors are corroding... (just slightly though, with no effects yet)
- My Automatic Watering system reservoir pumps are getting clogged with sediment from nutrients...

So three steps back, but, in the scope of the entire project, that's nothing! These can be overcome easily enough, so it's not getting me down at all.
 
Try some paint strainers as filters, they do a decent job. Or some old pantyhose. Hell, even old socks work in a pinch.

For as bad as the pump input strainer was clogged, there really wasn't any sediment on the bottom of the bucket that I noticed, although I didn't really check, the bucket is white, so is the sediment :(

The pumps, wires, air hoses, etc, were covered in a film, almost as if they had been spray painted, or the water had entirely evaporated (which it had not, this all occurred under water)

This certainly isn't a show stopper, like I said, the pumps sat in the water for almost 2 weeks without really being used, although the big pump (clogged one) was running 24/7 to keep the water stirred...

I do think a filter of some sort on the intakes (including the watering pumps) is a good idea....

I'll wait till I'm set up to water 8 plants with it before I set it up again, at which time it will use the water much faster, and I'll be replenishing it. Perhaps this problem will go away with more frequent use.

If not, then I'll have to look into adding nutrients on the go so to speak... At least that way, I won't need separate reservoirs for Veg and Flower... and it would allow me to stop nutes on the last 2 weeks... hmm... perhaps this should go on the todo list anyhow...
 
I've got both recirculating and drain to waste systems in use currently and just recently stopped using Advanced Nutrients lineup. In the DTW setup, dosing is done inline with each feeding via syringe pumps. It's only 6-10 plants under veg at any time in a 2x4, and the wastewater is sent right to the sewer drain (there isn't much "waste").

Was the 'spray painted' material perhaps lime or calcium? An RO system would reaaaallly go a long way to helping that situation, and save you money on your pumps in the long run.
 
Was the 'spray painted' material perhaps lime or calcium? An RO system would reaaaallly go a long way to helping that situation, and save you money on your pumps in the long run.

Not calcium, it was too soft, maybe lime? but I've never seen it from our water, it must be from the nutes.
 
These are the nutes I'm using, you can see the same white powder residue on the tops of the bottles.

1804926
 
One thing that's been on my ToDo list for a while, all the credentials for WiFi and MySql are hardcoded into the software on all the ESP8266 modules, and I've wanted to correct that.

My initial thought was to create a network Access Point, and let you connect with a smartphone, and using your browser, configure the credentials. That means you first need a way to get into configuration mode, and initially, I figured if I can't connect to WiFi then switch to config mode. That's no good, if your router reboots in the middle of the night, all your modules will go into config mode, meanwhile, you're fast asleep...

I ended up going with a 10 second delay on bootup to allow you to enter the C key in the Serial Monitor to enter configuration mode. A 10 second delay won't hurt anything, and if you don't hit C, then the module simply boots as usual...

The configuration is saved to, and read from EEPROM.

If you do hit C, this is what you see....

1806494


I've implemented this on the WebServer module, an ESP-01.

I'll add it to the Maintenance module, but for the Wemos Mega 2560's, it's going to be a little different, since the USB is hooked up to the 2560, not the 8266.
 
Turned the configuration code into an arduino library, now it will be so much easier to implement in other modules. I've never written a library before, but it wasn't difficult with all the examples out there...
 
I've implemented the Config Library on the Wemos Mega 2560's.

When the 8266 boots, it's exactly the same as the ESP-01, it will wait X seconds for you to hit 'C' in the Serial Monitor.

The 2560 boots, it will wait X+5 seconds for you to press 'C'.

In both cases, if you do not hit 'C', everything boots up as usual...

If you do hit C, then the 2560 sends a 'C' to the 8266 to put it into Config mode. The 2560 then goes into a loop, reading from Serial3 and writing that to Serial, for me to see, and if I type, it reads my input on Serial, and sends it to the 8266 on Serial3.

This is in an endless loop, so when you hit 'Q' to exit the configuration, and the 8266 reboots, you must manually reboot the board again, since the 2560 is trapped in its endless loop. In terminal, just disconnect and reconnect, and DTR will reset the whole board.

I have it working on the Wemos Mega that I'm using for my development board as Sensor Module 3.

As part of this code change, I'm replacing all my calls to sprintf( with the safer snprintf( allowing me to specify the maximum size of the buffer to fill, thus preventing really strange behaviour when you accidentally overwrite memory used for other things :eek:
 
From my blog...

I've always been somewhat of an audiophile... When I was in my twenties, I volunteered at a local recording studio to learn as much as I could about the art of recording music. I was working with some local bands, just basement stuff, but did a couple demo tapes for battle of the bands, nothing major, never pursued it.

Anyhow, I've always loved music, but can't play an instrument for the life of me, so best I could do was listen... My favorite band of all time is The Who. I like a lot of rock music, but never listened to Metallica until recently. I saw "Through The Never" in 3d (using my smartphone and a virtual reality 3d viewer) and have been in love with the soundtrack every since... I can listen to it 3 or 4 times a night while I'm coding away (I tend to stay up all night coding) with the ear buds in, sound cranked to 100%, VLC at 125%, rocking on...


 
This morning while I was working away at the computer, my wife walked by the grow room, and yelled down the hall that something was making a racket in there...

The noise was coming from my 4x4 tent, so it had to be the inline fan... I unzipped the tent, expecting to hear the noise from the top of the tent, but no, it was coming from lower down... The only other thing in there was the light, could it make a squealing noise? I didn't think so, but if it could, then it sounded like it would explode... I rushed and unplugged the light, but the noise persisted... so I unplugged the fan, and still, the noise persisted... That's when I noticed the little black oscillating fan clamped to the pole about a foot off the ground... Yep, it was the cheap circulating fan... gave it a smack, and it's fine...

Fast forward to tonight, ten minutes ago... My phone had been shut off and charging since dinner time, and as soon as I turned it on, it went nuts with all these notifications from the system telling me the temp was climbing in the flower tent...

WTH? How could that happen, the lights went out 3 hours ago, so even if the fan wasn't working, it shouldn't get hotter... I looked down at the duct I am using as an air intake for the tent, and can see faint light coming though... What? The lights were supposed to go out 3 hours ago?

When I plugged the fan and light back in this morning, I plugged the fan into the timer, and the light into the extension cord. The FAN shut off 3 hours ago, the 400W light, or should I call it heater, was going full blast...

It would have REALLY sucked to wake up tomorrow morning, look in the tent, and find all the plants baked and dead....


WHEW!!
 
It's been half a week, I'm continuing with my so called "Code Review" which has basically turned into "Go through all the code, and clean it up, make it more efficient, use less memory, and move more methods into the Utility library".

I've also standardized the boot up screens displayed to the Serial monitors:

Code:
=> Grow by Wire Sensor Module
=> Mega 2560 Code Compiled on Jun  1 2019 at 06:laugh:57
============================================================================
=> You have 10 seconds to enter a C to Configure credentials
=> Times Up!
============================================================================
[M??] 1970/01/01 00:00:14 > ESP8266 Code Compiled on Jun  1 2019 at 05:15:48
[M03] 2019/06/02 10:cool:42 >   Free Memory : 1.20KB
[M03] 2019/06/02 10:cool:42 >          SSID : odam2k_primus
[M03] 2019/06/02 10:cool:42 >     Host Name : SensorModule3
[M03] 2019/06/02 10:cool:42 >   MAC Address : CC:scratchinghead:E3:0C:7C:07
[M03] 2019/06/02 10:cool:42 >   IP Address  : 192.168.1.23
[M03] 2019/06/02 10:cool:42 >   Subnet Mask : 255.255.255.0
[M03] 2019/06/02 10:cool:42 >    Gataway IP : 192.168.1.1
[M03] 2019/06/02 10:cool:42 >   RSSI        : -58dBm (84%)
[M03] 2019/06/02 10:cool:42 >   Sensors     : 0
----------------------------------------------------------------------------

All modules now use the configuration screen to set and store connection related credentials so nothing is hardcoded, with the exception of the Blynk local Server IP and Port, which I will store in the MySql Database.
 
Back
Top Bottom