General Category > General Bonsai Discussion

Raspberry Pi Intermittent mist system v2.0


In response to another topic, I detailed an earlier attempt at my mist system:

The old system required an x10 module to operate wirelessly, ...but since I was playing with temperature sensing, the Raspberry Pi was in the greenhouse anyway.  It ended up getting wet when I didn't winterize and one of the fittings busted loose.  When I tried connecting to the $35 computer (Raspberry Pi) it did nothing.  No output.  I saw that as a sign to buy one of the new Raspberry Pi 2's, which solved another issue of too few USB ports.  (The Raspberry Pi 3 was released days after I'd ordered the Raspberry Pi 2.)  After taking possession of the new RasPi2, turns out the SD card was fried in the old RasPi ...and that a new SD card resulted in a working RasPi.

I decided to make a few design changes.  The primary one (and I've mentioned this somewhere, but haven't gone back to check) is that keeping that small tank full of water and pressurized was too time-consuming and I can't be relied on to do that so I opted to connect the solenoid to the hose from the spigot.  That eliminated the only interaction necessary to keep this system functioning.

The x10 module had created some issues and I wondered how long it would hold up (though it was still functional).  The reason I'd chosen to go that route was that it meant I didn't have to figure out how to wire up and control a relay (since the RasPi is too anemic to control the solenoid itself).  At the time, I just wanted something that worked.  It turns out that there was some intermittent interference that led to the x10 module not being entirely reliable.  I'm not sure the source of the interference ...or whether one of my neighbors is using an x10 module.  (I was able to choose a non-default setting on the x10 module ...and ended up pointing out a software bug to the "bottlerocket" maintainer who was quick to patch it and provide me a patch and instructions.)  My new system I wanted to get away from x10 and the software necessary to drive it (and its vulnerability to interference).  I found some resources and set about reading up on driving the RasPi's GPIO (general purpose input output) 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 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 (some flavor of Linux, I forget). 

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, 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'll be happy to provide details if anyone's interested.  I doubt many folks have gotten this far in the post anyway.

I'm hoping to buy some furrowing strips of 1x at the big box this week and build a propagation chamber covered in plastic in my greenhouse ...though there's nothing else in my greenhouse at the moment so I'm tempted just to use the whole thing.  I have pvc-coupling mist nozzles arriving today and will hopefully get things cemented in place soon.  I'm going to make sure to put as much of the brains in a project box to hopefully protect it from any water issues.  I don't know how it'll handle any heat that builds up.

Wish me luck.  If anybody's interested and something's not clear, let me know.

Pictures or it didn't happen.

Still no pics, but its 99% complete.  I need to fasten the pvc so it doesn't move (and always points down), but I **CAN** use it now.  Also, I've got the electronics in a project box, and a fan in it to hopefully keep everything from overheating.  I ended up getting 2 dht22 temperature and humidity sensors.  Since I have those, I opted to operate this based on humidity level, rather than time.  Brent Walston mentioned that a humidistat controlled propagation chamber is preferred over traditional intermittent mist.  Mine is set up so that if humidity levels are low, it mists for longer.  My times are arbitrary right now, but it probably won't take much manipulating to get it right.

Every 10 minutes I check.  If humidity is:
<55% : 45 seconds of mist
<70% : 30 seconds
<90% : 15 seconds

I'm going to let that run tomorrow and see how it does.  If it isn't doing anything strange, I might start some A.palmatum Sango kaku cuttings sooner than later.


[0] Message Index

There was an error while thanking
Go to full version