Customer Happiness Check-In
I want to do a daily check in with the plants that I am growing. After all, while I am giddy with all this tech stuff the goal is to grow really happy plants.
Here’s today’s peek at what they look like:
So far not much to see. The rock wool looks wet enough. The heat mat is keeping the humidity and temperature up.
Thanks To Those That Went Before
- Adafruit / Bill Earl – Adafruit’s data logging shield with the exceptional documentation/libraries provided by Bill Earl make prototype with an SD card and RTC as part of the experience super easy. Thank you!
- Paul Stroffregen for the excellent time library (GitHub location). Thank you!
I got notice from Digikey the CS811 will be back in stock February 28th. I thought it would be a fun time to build a PCB that attaches to a µCU via I2C that measures CO2 (and can tell when the light is on), temperature, and humidity. So OH YEAH I get to play with (um I mean work with) Kicad to design the PCB. The design will cumulate into the Grow Chamber sensor puck. This puck like looking thing that will have a PCB with the CS811, and other sensors with cables for I2C and power. And – just because – I will make it so this puck works with MicroPython…YIPPEE..AM I RIGHT? I’m going to start the design now as a background process to finishing up the Grow Chamber V1.
Grow Chamber Sensor Puck Design
The Grow Chamber Sensor Puck will include:
- the CS811 chip for measuring CO2 levels.
- a temperature/humidity SMT chip that has an I2C interface for measuring temperature and humidity.
- a photoresistor to determine whether the LED is on or off.
Temperature/Humidity SMT chip
Out of the many chips out there, what criteria do I want to use to choose? My priorities in order:
- widely used.
- well written data sheet.
- highly available
- in general I prefer Digikey. Price is ok, shipping is quick. The support has been great. I am assuming all employees are paid a wage that allows them to support their families and to enjoy life. Hmmm, I’m assuming this.
- low cost.
- I can solder it.
I’m choosing the Si7006. Because:
- Digikey has 2,233 in stock. The availability is there.
- The data sheet looks to be well written.
- The cost for one is relatively inexpensive at $2.06.
- There is a GitHub (ControlEverythingCommunity) with code to access this chip from an Arduino or through a python script. I do not know if the code is robust. But I am grateful for this starting point.
I’m not sure how my soldering will go with a 3 x 3 mm DFN package. We’ll see. The video, How to Solder QFN MLF chips Using Hot Air without Solder Paste and Stencils, seems to give worthwhile advice on the soldering techniques to use on a DFN/QFN…Also, there is a video Dave made – EEVblog #346 – MLF/QFN SMD Reflow Soldering – that I think I watched awhile back. I’ll come back to these links when it is time to solder.
I’ll use a photoresists to figure out if the LED is on. Seems like the GL5528 (data sheet) is very popular and perhaps the best place to get it is on eBay….although the delivery time frame is interesting :-).
Now that I have parts picked out for the sensor puck, time to get back to the Grow Chamber’s code.
Code for The Grow Chamber
I’m starting with the code to turn the LEDs on for 20 hours. I might change this based on what happens with the DLI given the height of the COB LEDs from the plant leaves. If the DLI should be higher, I’ll raise the number of hours the LED is on. I’ll probably not lower from 20 hours because the photoperiod is not a concern for the plants I will be growing.
I could just use Dr. Monk’s timer functions but this doesn’t accommodate the time of day. What if the Arduino keeps booting up? The light turning on and off would not work. I will get the time of day from the RTC that is part of the hardware on the SD card shield.
- Test the RTC clock with simple test code. From the test, understand how the RTC code works and make sure the RTC circuit on the SD card shield functions correctly.
- Code turning the LED off for four hours in the middle of the night (based on the current local time).
- Test the code.
I am using an Adafruit data logger shield. Under the post “Using the Real Time Clock”, Bill notes: “If you have an Adafruit Datalogger Shield rev B, you will be using the PCF8523 – this RTC is newer and better than the DS1307. Look on your shield to see if you see PCF8523 written above the chip.” PCF8523 is not written on my shield. This tells me the RTC I am using is the DS1307. Bill states the PCF8523 “is newer and better…” A brief look at the PCF8523 data sheet shows this chip is set to handle alarm interrupts. That would be very useful. So here’s what I learned about RTC chips…I think the GitHub for Adafruit CircuitPython PCF8523 states it well: The PCF8523 is simple and inexpensive but not a high precision device. It may lose or gain up to two seconds a day. For a high-precision, temperature compensated alternative, please check out the DS3231 precision RTC. If you need a DS1307 for compatibility reasons, check out our DS1307 RTC breakout.
For now, I’ll make due with the DS1307. Running the DS1307 example code:
the RTC tests OK.
Adding LED DLI Code
The next step is to add the code that turns the light on and off. I’ll program the code so the LED is off from 12AM until 4AM. Given what I want to do, I am going to use Paul Stroffregen’s Time and DS1307 RTC libraries. He does such great work! I ran TimeTest.ino (GitHub location) to test out how his library works. Ooh – then I found Paul’s TimeAlarms library (GitHub location).
…I started this but didn’t get as far as I like…looking forward to a beautiful tomorrow.