Twittering computer grow box

image

Well this is pretty much clichéd nerdiness but given it only required a couple of lines of C# I couldn’t resist.  I have updated my grow box software to “tweet” some sort of semi-humorous and not really witty comment appropriate to its current state and share its current temperature and moisture content every 2.5 hours.

For those who want to do something similar, this is how I did it.  I one of the many twitter C# libraries and for no specific reason I chose tweetsharp and after adding a reference to their DLL and just the few lines of code (below) you can be programmatically making updates via twitter.

private void UpdateStatus(string message)
{
    IFluentTwitter twitter = FluentTwitter.CreateRequest();
    twitter.AuthenticateAs("user_name", "password");
    twitter.Statuses().Update(message);
    twitter.AsUrl();

    string response = twitter.Request();
}

If you want to see it in action go to http://twitter.com/computergrowbox.

Right now I only have a handful of not so witty comments, so if you have some good zingers add them to the comments and if I like them I will add them to the list.

UPDATE: Grow box shares its own pictures

I get busy these days and sometimes can’t make it out to keep a close eye on my plants in the grow box.  Given I have everything automated the box basically takes care of them, though I thought it would be nice if I could see how they are doing so added photo sharing to the grow box’s twittering software.

I already have the software taking pictures every so often so all I really needed to do what send out the most recent file to twitter.  After a little looking I found that tweetsharp already supported this so yet again this was just a few lines of code to implement.

First I needed the logic to determine the last photo I have taken, fortunately I was carefully about my naming using a timestamp based name similar to “Photo_2008_10_01_090130.jpg”, so alphabetical sorting would work just fine.  I removed the error handling to keep things brief but here is the code to complete this logic:

string[] files = Directory.GetFiles(photoDirectory, "*.jpg");
Array.Sort<string>(files);
string fileToUpload = files[files.Length - 1];

Now you have your photo to upload just signup for one of the photo TwitPic using your twitter account and run the following code using your credentials.

IFluentTwitter twitter = FluentTwitter.CreateRequest();
twitter.AuthenticateAs("user_name", "password");
twitter.Photos().PostPhoto(fileToUpload,
                      SendPhotoServiceProvider.TwitPic);
twitter.Statuses().Update("My Picture").AsJson().Request();

Hopefully this, you too can make you own grow box (or other inanimate object) share its feelings on twitter.

Computer controlled grow box – Part 2

IMG_4156

Though I have made some significant changes to the grow box controller, the actual grow box has undergone some minor but important changes over the past few months.

Automated watering

Now I must say this one is pretty darn simple.  Though I will be planning on a slightly more complicated hydroponic setup later I decided to start with a very easy bottom watering technique.  Just take a regular old fountain pump (I went with the cheapest I could find) drop it in a 5 gallon bucket of water and attach a hose long enough to reach your planting tray and plug in the power to the pump to your grow box controller and that’s about it.

IMG_4153

To prevent evaporation and algae and little bugs making a home in my nice bucket of water, I added a lid with two holes for the water output and power input.  The power input required me to make a straight cut with a utility knife to ensure a snug fit while not requiring me to cur the AC line to feed the wire through.

IMG_4152

I also cut a hole of the same size as the water output on the bucket lid to the grow box to allow the line to enter while still keeping the box closed.

IMG_4147

Exhaust fan control

IMG_4160

Air circulation is important for plants to be healthy but when the box gets warmer than expected I installed two controlled CPU fans to help regulate temperate as well as one static fan that constantly pushes air from the top to bottom.

I added a 12 volt exhaust fan to the top of the box (pictured above) to help push hot air out of the grow box with another (pictured below) at the lower part of the grow box to push in cold air as needed.  Both of these fans are powered by a 12 volt power wall adapter plugged into the grow box controller.

IMG_4149

Heating

Though the computer and lights allow the box to create a comfortable internal temperature, sometimes it needs a little help.  For this I installed a regular old seedling heater to hopefully take a little sting out of the cold floor the seed tray is sitting one.  Like other components this was simply plugged into the grow box controller.

Putting it all together

My previous version was a little sloppily put together with duct/packing tape (lets just call it prototyping).  Though this added some hackiness appear it wasn’t too functional so I added a little strip of wood to support a couple hinges which I created a top which holds the LCD panel.

IMG_4158

Upon opening the top you can see the grow box controller and the state of the art 600 MHz PC in all their glory.

IMG_4146

As you can see I have still have some cleaning up to do with compress air and maybe a few more zip ties but all in all everything seems to have come together nicely.

Peppers sprouting in grow box (time lapse)

Well slightly more exciting than watching grass grow but for something that takes several weeks to complete is definitely worth a watch.  If you watch carefully you can even see the automatic watering in action.

Joining the sprouts is a mature pepper plant which has been flowering and daisy seedling my 7 year old planted hoping it will flower as well.

How to use Vegetronix soil moisture sensor (VG400) on Arduino

With the summer starting to come to a close it has been time for me to start thinking back to the computerized grow box.  I have been doing some considerable work on the electronics and software over the summer.  Better to break stuff while the plants are outside and not while killing them inside.

Though I have been happy with my homemade gypsum soil sensors I decided to try out a commercial option hoping for better accuracy and longer life.  This is important with my current plans to include automatic watering to the latest version of my grow box.  Don’t want to wake up to a flood in the garage due to a broken sensor.  After some looking I came across the Vegetronix VG400 which measures the dielectric constant of the soil using transmission line techniques.  Which I have no idea what that means but sounds impressive.

The hookup couldn’t be simpler, red wire to 3V, bare wire to ground, and black wire to an analog input.  As you can see below in my completely not to scale diagram below.

vegetronixArduino

From here it all comes down to some simple code to write on the Arduino to get some values.

void setup()
{
// Setup serial
Serial.begin(9600);
}void loop()
{
Serial.println(analogRead(0));

delay(200);  // wait 200 milliseconds
}

Upload the code to the Arduino and now I can get a moisture value from the analog input between 0 and 614 (0-3 volts) depending on the degree of water saturation.

vegetronixOutput

Though not as hacky as my PS2 controller moisture sensor solution definitely more elegant and reliable.  Stay tuned for more details of other improvements to the computer controlled grow box.

Grow box during the summertime – UPDATE

HighTempGrowbox

UPDATE: With weather climbing my grow box got up to 111.5 degrees today with the lights off.  If I was using one of those fancy computers with temperature sensors it would have turned itself off by now.  Turning off computer so I will have something working this winter…

[July 25, 2009] I was planning on growing my jalapeno peppers in my grow box this summer, but given the higher than average weather we have been having.

With the weather being in the 90’s 100’s and given the CFLs on average increase the temperature by around 10 degrees the grow box has not been great place to grow plants unless I was thinking of growing cacti.  Looking at my historical data the highest temperature this summer was 107.6 111.5 degrees.

As you can see above I have been making some progress on the computerized grow box, which I will plan on writing it up soon…

How to grow onions and not onion flowers

2279

Last year, I grew a lot of onion seeds but unfortunately not many large onions I could use in the kitchen.  I have learned a few things since then which hopefully can help you not have the same problem.

Use small onion sets: Last year I selected all of the largest onion sets in the 100 count bag which from some of my experimentation this year proves why almost all of my onions bolted to seed.  Smaller onion sets were much less likely to bolt to seed during normal temperature fluctuations.  Now what should you do with those large onion sets?  Why not think of them as flower bulbs since that is what they will end up eventually.  Given you know the onions will grow pretty small so you can plant a 1-2 inches apart and they do make a quite attractive flower and as an extra bonus you can collect the onion seeds for next year.

Grow from seeds: Well if you are like me with all of your plants bolting to seed on the positive side that gave you a considerable number of onion seeds.  Now you have a couple choices here, you can plant some seeds at the end of the summer which will create basically small onion sets which will go dormant over the winter and pop back up during spring.  The other option is to plant seeds indoors 9-10 weeks before last spring frost and plant seedlings the size of a pencil or smaller into your garden.

Try a different onion variety: The ultimate reason flowers bolt is temperature fluctuations which tricks the onion that it has completed its biennial (2 year) growing pattern which results into the onion jumping into its last stage of its life, flowering.  Now unless you are growing in a heated greenhouse or grow box, unfortunately you don’t have too many options in controlling the weather.  Fortunately you can select onion varieties that are more tolerant to temperature fluctuations.

Hopefully with these tips you can grow a few less onions flowers and a few extra onions.  Though if you still get a few onion flowers you do have a couple choices.  Pull it up and user the smaller onion in your kitchen or simply embrace the flower and the bees it will attract and get plenty of onion seeds for next year.

IKE