Here’s what I want to do by priority:

  • start using The Leaf Spa
  • figure out how to build MicroPython and add extensions like Software Serial (teach a person how to fish and give them fishing poles like Vagrant, MicroPython forum…)
  • build a PCB with a CCS811.

I’ll do these in parallel but try to focus the majority of time on the priority order.

I’ve been caught up the last week in getting connecting to the Internet through ESP8266.  Exploring what I have and the options.  I learned from this I really like MicroPython to the point I could see myself writing extensions so that MicroPython can be used in my specific case.  I also learned I am not a fan of sensors that use UART instead of I2C.  I2C is just easier when going between software platforms.  Not all ESP8266 hardware platforms are equal.  There’s this PyBoard thing for more robust MicroPython.  Yet the more generic environment relies on just having an ESP8266.  So I’ll probably end up with the ESP8266 down the road but the PyBoard to test out stuff with MicroPython.

Priority 1: Start Using the Leaf Spa


  • Test water pump with ON/OFF every hour.  Figure out a reasonable period of time between waterings and length of time to leave the pump on.
  • Drill holes on Base as needed for cords.
  • Test turning LEDs on/off.
  • Test adjusting CO2.
  • Drill holes on the Grow Chamber as needed for cords.
  • Mount the Grow Chamber on the base.
  • TBD: Internet/LCD display/logging.

Water Pump

I’m going back to the Arduino Uno to get this stuff going. I’ll continue where I left off yesterday.


  • Run RelayTest.ino on relay 4.  OK.
  • Wire up pump to VAC side.
  • Test pump turning ON/OFF and hope to live to tell about it.
  • Set up the Base with a few rock wools and get the feeders in the right spot so the water pumped is working properly.
  • Write Arduino code to turn the pump on for two minutes every half hour.  
  • Run the Arduino code on the Base for several hours periodically checking on the moisture level of the rock wool (I guess I could set up a moisture sensor and measure but then I’d have to add logging so I’ll keep it informal for now).

…you know what?  I just remembered I have a PowerSwitch.  



So before wiring up the 4 channel relay, I’ll test stuff using the PowerSwitch.  Should be Easy Peasy.

I evolved the RelayTest.ino (version with pump on/off) to switch on every 1/2 hour for 2 minutes using Dr. Monk’s Timer library.  Note: The Power Switch is turned on when the pin is set to HIGH.  This is the opposite of the 4 channel relay.  From Timer.h:

  int8_t every(unsigned long period, void (*callback)(void));

YIPPEE!  The size of period handles 60 secs / min * 1000 ms/secs * 30 min = 1,800,000ms

Time to set up the test on the Base.

  • Get setup working without Arduino timer + power switch.  OK.
  • Add Arduino timer + power switch. OK.


YIPPEE!  Was EasyPeasy to get going and works.  Does make me start thinking about enclosures for everything.  But first, I want go get a better feel for the relays.  I know the LED one will work.  So now I need to test the CO2 amount.

To test the CO2 amount:

  • Set up the Growth Chamber so the chamber is easy to access with the WH-Z16 CO2 sensor.
  • Use a SD card Shield with the Arduino and take measurements of the CO2 as it is without adjusting.
  • Run the measurements for an hour to get a feel for the variability in readings.
  • Use the measurements to inform an Arduino sketch that measures and adjusts the CO2 to 1,200ppm.

As I was looking at the Grow Chamber, I noticed the fan holder held the fan 2” lower than ideal:

Pasted Image 1 23 17 9 58 AMI’ll adjust the model in Fusion 360 and 3D print another holder that is 2” shorter.  Wait a second.  Given that I glued the fan down and it takes time to redo, I’ll first try cutting two in. off the current one and see if I can reattach.  Might be difficult because the screw holes won’t be there.  Well, that didn’t work so I’m printing out a new fan holder.  I was able to detach the fan from all the glue I had used to attach it to the fan holder in the picture.

I updated the print profile based on Russell’s advice (MakeIt has exceptional support!):

Print setups with only 1 perimeter line are very likely to show artifacts through the final surface. This is due to the fact that infill lines must necessarily overlap some with the perimeters for proper bonding, but with only one perimeter it can have an effect of creating blobs of over-extrusion where the overlap occurs. I pretty much always use at least 2 perimeter lines unless there’s some other specific reason not to.
Also, the speeds indicated in the gcode are pretty high. An overall print speed of 5000mm/min or 85-90mm/s is OK depending on layer height and material, but it’s going to have some noticeable effects on quality going that fast. Generally speaking I run my overall speed at 60-70mm/s but use a significant drop in speed for perimeters, top/bottom, and support material. When printing at 70mm/s overall I might use 0.3 for perimeter, 0.5 for top/bottom, and 0.25 for support. I like to keep my outer perimeter line speeds below 25 mm/s on objects with tight corners, but 35-40 is OK if you’re printing mostly rounded stuff. If the high speeds are intended to speed up the overall print time it’s probably gonig to be more effective using a lower overall speed with thicker layer heights.
I might suggest trying this again with 0.3 layers, a 65mm/s max print speed, and setting the temperature to remain higher after the first layer, second layer nozzle temperature to 210 or so instead of 190.”
Print went ok:
OOPS! I made the CO2 hole a bit too large.  I should still be able to make this work. Nothing something like Gorilla Glue can’t fix.