Showing posts with label Garden. Show all posts
Showing posts with label Garden. Show all posts

Saturday, December 19, 2020

Tomato Cage Repurposed as a Greenhouse

Winter is coming to Northern California, and with it comes the potential for plant-killing hard freezes. To protect frost-sensitive potted plants, I turned this summer's tomato cage into a greenhouse.

I had made a 5 foot high, 7 foot wide and two foot deep tomato cage frame out of PVC irrigation pipe and strung twine back and forth to support the tomatoes. Now that tomato season is over, I repurposed it as a green house. For the walls I used 20 mil plastic sheeting. The door has a flap in the front that rolls up. It's held in place by adhesive-backed Velcro. To keep rain from pooling on top, I made a support for a peaked roof out of PVC pipe.

This is the result at night with a flashlight inside. Looks kinda cool, huh?

Unfortunately the greenhouse wasn't really getting warm inside. At the time I was listening to Prof. Richard Pogge's Astronomy 161 lecture on the planet Venus and its runaway greenhouse effect. I realized that the sunlight was just passing through my greenhouse. I needed something to capture the visible light entering the greenhouse and convert it to infrared which couldn't escape though the plastic sheeting. I reworked the peaked roof into an angled roof, and along the back wall of the greenhouse I hung some black shade cloth. 

Now it was getting up to 120 degrees at the ceiling! So I took a small solar panel, a motor from an old cassette player, and a propeller from a Cox model airplane and made a fan to mix around the air when the sun was shining.


I had used strips of adhesive backed Velcro to keep the front closed, but in someplaces where the sheeting was slightly damp, the adhesive didn't stick at all. And, in other places where it did stick well the strip was too wide and the sheeting was going to tear before the Velcro released. To fix these two problems, I got some plastic plumbers strapping, some pop-rivets, and washers to securely fasten the Velcro. If I had had some on hard, I would have used narrower Velcro strips to make easier to open the front flap. Instead I just covered half the width of the strap with duct tape.



Now, how well does it work? Enter the return of the garden logger.

I added a DHT22 temperature/humidity sensor and three DS18B20 "one wire" temperature probes. These probes are waterproof so I used them for both outside air and soil temperature measurement. Note that I used one data pin per DS18B20 sensor, even though they are designed to all connect to a single wire. This allowed simpler software at the expense of more complex hardware. If I ever start running low on data pins, I can reclaim the two wires I wasted and re-write the software. You can find the current Arduino sketch on Github.


 
I mounted the logger inside a Japanese bento box, and ran the wires to an Euro-style terminal strip mounted on the lid. The light sensor and DHT22 temperature/humidity sensor were glued to the lid with epoxy.



I put the garden logger on a bench inside the greenhouse, powering it up from a USB power supply connected to an extension cord. I let it run for a couple days. Here's what the temperatures look like.

When the sun was shining, it was much warmer in the greenhouse. Then as temperatures dropped, everything seemed to equalize, and it really wasn't much warmer inside. Then at 2:00 am there was a sudden temperature drop outside, and the temperature inside stayed about 5 degrees warmer. I'm not sure why that happened, but I think I need to improve the insulation by adding another layer of plastic sheeting. 

Just for fun, I've plotted all data channels. You can see that in November when these measurements were taken, the greenhouse gets only 6 hours of maximum sun, and as soon as things start to cool off, humidity hits 100% and water starts condensing inside.



I've been thinking that perhaps I could better measure the performance of the greenhouse -  eliminating day to day weather variations, by convolving the inside temperature history with the outside temperature history. The goal would be to determine the thermal analog of electrical impedance for the greenhouse. I've Googled this and found a few scholarly papers on the subject. However, that will have to be a subject for another blog post.

Saturday, July 4, 2020

Garden Logger

How many hours of sun does each raised bed in the garden get? How moist is the soil? How fast does it dry out, and how does that correlate with the air temperature?  And, how does all of that correlate with the productivity of a given crop type?

The first step towards finding those answers is to collect data. I'm starting simply with just measuring the hours of full sun and logging it to an SD card once per minute. The circuit consists of a CdS photocell in a  half bridge configuration connected to one of an Arduino's analog inputs. The resistance of the photocell is calculated in the Arduino sketch which was probably isn't a great idea, since it's going to need to be post-processed anyway. I have yet to figure out how to calibrate the photocell so that the results can be displayed in units of luminous intensity, but, regardless I should have just logged the output in raw A to D bits.

The date and time of day is stored in a Real Time Clock (RTC), which is part of the logger that I got from Amazon. The RTC had to be programmed once before loading the logger sketch.

Arduino sketch reads the resistance of the photocell and the time and date on the clock, and stores it to the SD card. After sitting all day in the sun, covered by a piece of cardboard (except for the photocell), I bring the card in and add a description of the logged location to the last line of the file, using a tag "Title:".




The log file looks like this:

2020/06/23T20:10:14, 395.9
2020/06/23T20:11:14, 406.5
2020/06/23T20:12:14, 417.1
2020/06/23T20:13:14, 449.0
2020/06/23T20:14:14, 449.0
2020/06/23T20:15:14, 470.3
Title: Bed 2

To get plots of the solar intensity, I wrote a Python script that uses matplotlib. The brighter the sun, the lower the resistance. Full sun is about 25 ohms. As each location is plotted, the number of hours of full sun is calculated. Full sun is assumed to be when the resistance is less that 75 ohms. The number of full sun hours is often less than the stop time minus the start time. This is because the trees or other objects sometimes obscure the sun over the course of the day.



For each plot I mark the total hours of sun on a diagram of our garden.


This is the hardware:
  • Arduino Uno
  • HiLetGo data logger shield
  • CdS photocell
  • 10 Kohm Resistor

This is the software:



I have some soil moisture and temperature sensors that I'll integrate into the next phase of the project.