Monday, November 18, 2013

Arduino Powered Vertical Garden

I started setting up a Vertical Garden in the back yard using PVC and landscape timbers. I plan to grow romaine lettuce and a few herbs for starters. At the moment there are just some plants I picked up at Home Depot for testing, I didn't bother to transplant them from the containers they came in for now. Eventually I plan to use net pots or net cups in the system and have a semi-hydroponic setup going. By semi-hydroponic I mean starting plants in small extremely fertle bundles of organic matter, wrapped in a mesh that's strong enough to keep the organic matter in place but weak enough to let roots grow out into a medium in the net pots. My plan is that the small amount of organic matter will be enough for water sprinkled on the system to leach out into the pipes and feed the rest of the roots. So all I'll have to do is setup watering automation and harvest once growth stunts.

Here's a couple of photos of the system at the moment. I originally went with foggers and a 12 port drip irrigation manifold, but there was not enough pressure in my house spigot to push the foggers. I experimented with some sprayers I had and they're wasting a lot of water because the spray pattern is too large. I have one basket mister on the system and it looks like the way to go. I'm thinking a 6 port manifold and 6 of those misters will work fine.

Now, the title does say "Arduino Powered" vertical garden, so I suppose I should get to the Arduino part. I haven't actually started on that part yet, though here are my plans with it. I'm going to hook at solar cell scavanged from a solar powered deck light to the analog input of the Arduino for use as a sun meter. The more voltage I see on that analog input, the brighter it is outside. I live in Florida, so it's always humid... The brighter it is, the more water I need to hit the plants with.

I was originally going to use a simple garden hose timer to water everything, but given I have the yard sprinklers on another Arduino Mega in the house anyways, I might as well hook this up as well.

Anyways, I'm having a tough time finding local suppliers of 3 3/4" net pots to fit in my 3 1/2" holes. So I'll have to order them online and wait for a bit. On the bright side, my Home Depot had Dig brand drip irrigation supplies on sale for about 80% off! 50ft rolls of 1/4" microtube for $0.99 instead of $4.99, score!

Sunday, November 17, 2013

RHT03 / DHT-22 Temperature / Humidity Sensor Housing

I have been using the DHT-22 temperature and humidity sensors
throughout the house for monitoring temp/humidity with an Arduino Mega. They're kind of awkward to place though. I discovered with a couple of snips with an exacto knife however, the DHT-22 fits quite nicely in a one port single gang wall plate, which in turn can be mounted to a single gang cut in box in the wall to protect connections.

Here's some photos of how it turned out.

Saturday, November 16, 2013

Arduino Solar Sensor

I'm thinking about taking this cheap 1.2VDC solar powered garden light's solar cell and making something I can hook up to my Arduino mega to record how much sun I get where I'm at. In theory I should be able to monitor the voltage coming from the solar cell on an analog input pin of the arduino. I don't anticipate the cell ever producing the 5VDC limit on the Arduino, but maybe I should add a voltage regulator as a protection measure, say if the cell short circuits.

What to do with the voltage, albeit tiny current, generated from the solar cell though? I could charge a backup battery for the house's Arduino Mega.

Sunday, January 20, 2013

auth.log Service Restart

I tried to incorporate my auth.log file into logrotate and didn't use copytruncate in my logrotate.d configuration file, so I ended up with a missing auth.log file. I tried to recreate auth.log by copying auth.log.0 and chown'ing it syslog:adm, but I ended up with an auth.log that wasn't being updated because the authentication daemon no longer had a handle to the file.

Rather than reboot the whole server, I wanted to restart the service that writes to auth.log. I found a reference to rsyslog, but I was a couple of versions of Ubuntu later than the 10.04 mentioned in that conversation. (Ubuntu 12.04 LTS) so I ended up getting "rsyslog: unrecognized service" when I tried that.

I ran "service --status-all" to get a list of services on the machine and "sysklogd" looked promising so I tried restarting it.

user@server:~# service sysklogd restart
 * Restarting system log daemon...                                       [ OK ]

Then I exited SSH and logged back in, to find that my auth.log file was getting written to again.

Saturday, January 19, 2013

regex capture $1 refers to no regex

I discovered this warning in my Apache log after adding a command via mod_include which utilized awk. When I placed backslashes before the dollar signs in my html page, the error disapeared.

To

awk '{print \$1\"/\"\$2\"/\"\$3}'

From

awk '{print $1\"/\"$2\"/\"$3}'