Before I begin, I think I posted about this months back, but I can't for the life of me find that thread. Alas, at the time of my supposed previous posting, this was all theoretical. The system is in place and working now so I thought I'd touch base again.
For my new system, I found some resources and set about reading up on driving the RasPi's GPIO (general purpose input output) pins
so that I could control a relay on my own. I looked in to wiring up a relay on a breadboard, ...but relay boards are cheap enough (4-way relay board for about $8) that I opted to go that route.
It turns out I can control the relay board with no extra software other than what's built in to the OS: Raspbian Linux in this case. (A previous iteration had used an inelegant and error-prone solution: x10 modules and requisite software.)
Before we go much further, a word about relay (board?)s are in order. There's a normally-open, a ground, and a normally-closed connector for each relay. Connect to the normally open side and the solenoid would be open except when you tell it to close. Connect to the normally-closed side and it'd be open only when you tell it to open. That was a snafu that seems obvious once you figure out how to correct it. Hopefully I saved you a bit of time.
After a couple of failures, I managed to get the raspberry pi to drive the relay board that in turn controlled the solenoid. I wired one lead from the 110v-to-24v wall-wart to the solenoid and the other to the normally-closed side of the relay. I wired the remaining side of the solenoid to the ground/middle side of the relay board. I then connected the appropriate gpio pins on the raspberry pi (gpio 17 (or 2), gnd, and 5v) to the relay board (in1, gnd, and vss).
The control of the relay board via linux bash commands are a bit arcane and tedious, but it's going to be scripted so that I don't have to type them directly and this keeps me from depending on an extra software package*. I have a small script that opens the solenoid, rests for however long I want mist, then closes the solenoid. I use Linux' built-in timer system, cron, to call it however often it needs to be called.
If you have any recommendations on what information would make this a useful web-based product, I'm all ears. (That's not to say I'll build your recommendations into the system, but I'm trying to decide what information is needed. Precedence goes to those changes/recommendations that are more easily completed.)
Currently, its reachable over the internet (remote command-line), but not web-controllable. That's my off-season project this winter. I plan to:
-Have a web-visible area that details the current watering schedule as well as the current statistics of the greenhouse (Temperature & Humidity). Possibly also show some of the details about what's being propagated (see below).
-Have an authenticated area where:
--edits and changes to the schedule are made.
--details about whats being propagated are entered.
---variety/cultivar/species
---# of cuttings
---Hormone type/strength
---rooting media
-Integrate an LCD screen with time, & time of/'til next misting, & Temp/Hum.
-Integrate a button whereby I'm able to initiate misting from the greenhouse.
bwaynefOriginal Author
bwaynefOriginal Author
Related Professionals
Rome Landscape Architects & Landscape Designers · Wichita Landscape Architects & Landscape Designers · Anderson Landscape Architects & Landscape Designers · Longview Landscape Architects & Landscape Designers · Des Moines Landscape Architects & Landscape Designers · Dubuque Landscape Architects & Landscape Designers · Oneonta Landscape Architects & Landscape Designers · Chula Vista Landscape Architects & Landscape Designers · Albany Landscape Contractors · Belleville Landscape Contractors · Fergus Falls Landscape Contractors · Selma Architects & Building Designers · Augusta Architects & Building Designers · Elkton Architects & Building Designers · Utica Architects & Building DesignersbwaynefOriginal Author
bwaynefOriginal Author
bwaynefOriginal Author