Saturday, December 28, 2013

Miniature Hydroponic Test Drive

Acquired some exciting hydroponic supplies and decided to give it a go on a small scale to start testing out some ideas.

I filled my 10 gallon fish tank with 2 gallons of tap water, put in the aquarium heater and a small aquarium (80 gallon per hour) submersible pump. I used a thin plastic piece (was originally intended to be a plastic cutting board) to create a trough that the water could flow down. I used some plastic tubing to direct the water from the pump to the trough. I had planned to use two troughs which is why you see the Y splitter in the tubing, however I did not have enough seeds, and thought I would test one trough out first, especially given some worries I had about the flow rate of the small pump I was using.  The trough is supported by red plastic cups and the plastic tubing is fastened to the trough with twist ties. 





Working in a lab we have these thin plastic cards with different whole sizes in them that are trashed after the pipette tips they hold are all used up. I cut some of the orange ones up to use as water baffles in between each row of cups. 




I then cut up some plastic cups and cut slits in their bottoms so that water can flow through. I filled the cups up with perlite and added some seeds. Some of you may recognize the little brown cups, these are seed pods from an old Aerogarden kit I had. The other 6 pods can some other herb seeds. I put the top on the tank and turned its lights on! As soon as the cups were put in the water flow the perlite immediately soaked up a bunch of water. Finally I added 4 teaspoons of liquid fertilizer to the tank. (2 teaspoons per gallon was the recommendation on the bottle)





Here is a short movie showing the flow rate of the pump I am using. 




Hopefully I will have some pictures of sprouting plants in a week or two! 



Raspberry Pi File System Corruption Issues - Upgrade to an External USB hardrive

I hit the first hardware road block of using such a cheap computer like the Pi. Its SD card is great for some things and a very cheap source of memory, however it doesn't do so well if you are constantly writing it, like I was every hour with the MySQL database.

The problem was I would come in to check on the Pi, because I noticed it had stopped tweeting, and the Pi had crashed. When I tried to reboot it I ran into tons of file system corruption things when the Pi was trying to boot back up. I went through all the system checks and even tried wiping the SD card clean a few times and reinstalling everything, AND tried using a new SD card. After a week or two, every time, the Pi would crash. My problem was probably exacerbated by the poor wiring in my apartment and big users of power such as my dishwasher, combined with the AC or microwave can cause the lights to dim. These power fluctuations could have also contributed to the crashing and improper shutdown linux. 

A quick search on the google showed that the file system corruption I was experiencing is a not so rare problem people have with using a MySQL database on the SD card of the Pi. The solution is to move the whole file system over to an external USB drive. The Pi need to keep the booting program on the SD card but everything else can be moved to the USB drive and you can rewrite the boot program to tell it to boot form the USB drive and not the SD card. I also used this as an opportunity to get a lot more space and bought a 160gb USB drive. 

Since I installed this, the Pi has run uninterrupted for almost 60 days and counting. I unfortunately have lost the exact recipe I followed to transfer the file system from the SD card to the USB drive but a quick google search will give you plenty of options. I used a few different pieces from several websites. There is lots of information out there about this issue and how to utilize an external USB drive. 

Here is the Pi sitting on my table connected to the USB drive and its breadboard with all the current sensors. The drive and the Pi are powered from a powered USB hub.