Sunday, May 2, 2010

Software for Refarm the city/balcony

I am currently in the process of writing the software for my farm. As usual I took the inspiration from Refarm the city. A pity - they seem to have a brilliant tool available, but my attempts to get in touch failed, and hence I just got my inspiration from their look and feel, and started to write my own little thing using Processing and the excellent controlP5 library.

You can see the humidity sensor to the left, the light sensor in the middle and a general status for the plant to the right.
Posted by Picasa

Sunday, April 25, 2010

Refarm the city continued

Making the best of this sunny sunday afternoon, I continued to work on my microcontroller driven garden project. My first gravity based water supply quickly revealed that the pressure is to low. I also wanted the Arduino to control the water flow, hence I had to order a magnet valve to stop and start the water hose. Additional pressure has to be generated using a water pump. I found a cheap one with Comet Pumpen.

In the pricture above you can see the new water distribution system. Unfortunately it does not work. I guess the parts which I got from a pet store are for air supply and they do not withstand the pressure generated by the pump.

A quick look (above) at the water pump (right), magnet valve (middle) and the "server box" to control the water flow.

Power is managed by a rechargeable lead battery and a prototype board for a relay switch which takes the 5V an Arduino can generate to trigger the relay switch so that the magnet valve and pump can start to operate. This is my first operational soldered PCB (even including a diode which kills the electric current generated by the collapsing magnet field inside the relay. I used a standard 1N4001). Sofar I just trigger the relay using a battery. This is agile hardware development at its best!

Sunday, April 18, 2010

Refarm the city

This weekend I had been sitting on my balcony and had been wondering how I could protect my herbs I need for cooking from drying up, during the periods when I am not at home, travelling for work.

A quick look at the internet brought a project to my attention, which I found very appealing: Refarm the city. Turning my balcony into a Arduino based lab for farming? Deal! So I started creating the water basin.

A box of water bottles turned upside down, will provide an environmentally friendly water tank.

Drill some holes into the caps.

Connect the bottles using sokme tubes and connectors from the nearby fish shop.

Wired everything up.

Some additional controls.

Final outlet. Still need to find a 5V magnet valve to control the outlets.

Prototype for a humidity sensor.
To be done: Construct a water and rain proof shield for the microcontroller to send information to the base station. 

Making a MakerBot

Last weekend a group of tinkerists gathered to build a MakerBot. The MakerBot was bought by Good School, and assembled by Palo Altona.

In case you want - a MakerBot is a 3D printer, capable of "printing" 3D objects out of molten plastic. It is a very fascinating technology. There is plenty of information available in the internet. One of the more fascinating projects is the RepRap, a self replicating printer, e.g. the vision is, that the RepRap will be able to print itself one day.

Or as Chris DiBona, a Google employee, said: "This is China on your desktop."

Friday, April 9, 2010

UML Model Validation

Today I'd like to share a small video with you which raises an important issue: UML Model Validation. Being an extremely complex language without proper understanding of the rules and constraints of the UML Model it is easily possible to create invalid UML models. That is why there are standard documents and also a certification program for UML to help people look under the hood of the diagrams.

And here is the video by a tool vendor (*) to solve the problem of model validation (I took it from a LinkedIn discussion)

I love the part in the middle of the video when the model is actually validated. In UML terms the error message is absolutely correct. In terms of human readable error messages there seems to be a problem, as illustrated by the video (you need to have sound).

(*)  Please note that I do not have any kind of affifilation with the vendor, nor know the tool particularily well. Having said that I do not want to say it is a bad tool, I also do not want to endorse it. The problem is very common among UML tools and usually they tend to be decreasingly useful when the constraints to be validated get more complicated.

Arduino robot project pt. 2

Yippie, the robot chassis arrived a while back from Honk Kong in this wonderful wrapping. While it had been on its way, I had been busy soldering my first InfraRed distance sensor. I even had to experience the disappointment of the whole thing not working after I transferred it from my breadboard, but in the end I just figured out that there was a cable missing.

Yesterday I also had the pleasure to attend my first Palo Altona Drinkup - a group of tinkering specialists based in Hamburg. If you are interested, have a look at the website, there are regular meetings/drunkups.

Sunday, March 14, 2010

Arduino robot project pt. 1

Inspired by a post which I found Fabian Steeg's blog, I purchased the Arduino Microcontroller and started to assemble various little projects. If you are in Germany I highly recommend to get the controller from Fritzing.

When I started wiring the hardware I purchased a book by make:
It is really a funny book and a nice introduction into electronics, with all kinds of weird experiments. Essentially I am into the idea that they invite their readers to break stuff.

After some initial brain storming I came up with the idea, that for my first real project I'd like to create a robot which is capable of making movies. Hence it should be able to move around without bumping into stuff and have a pan and tilt tower where the video camera is mounted.

After some research I found a twin gear box made by Tamiya:
This will replace the standard motor for the tracked vehicle kit (also by Tamiya).
The gear box is already assembled and I am still waiting for the chassis to arrive from Hong Kong. Meanwhile I am constructing the IR Sensors and the pan and tilt tower. The two required servos are already working. Now it still requires some metal work to put all the pieces together.

Sunday, February 21, 2010

Xtext Valueconverters

I just stumpled across a link which explains very nicely how to use value converters in Xtext and thought I just cross post it:
Petter's Random Thoughts on Software: Xtext Valueconverter

The blog post had been written by Petter Graf, probably you would like to check out his other postings.

Tuesday, February 16, 2010

Xtext, guice and IExecutableExtensionFactory

Consider that you have written an eclipse plugin using Xtext and added some custom made commands, handlers, menu items ... to your code.

Quite possibly you will want to use google guice sooner or later in your custom code, either to use the advantages of this dependency injection framework yourself, or to access some of the objects which are provided by your xtext plugin, and which you want to inject in your code.

In this case the IExecutableExtensionFactory mechanism provided by eclipse and in a more concrete manner either the subclass of org.eclipse.xtext.ui.core.guice.AbstractGuiceAwareExecutableExtensionFactory which is automatically generated for your ui plugin of the Xtext language. You can also subclass the AbstractGuiceAwareExecutableExtensionFactory yourself, if you do not want to or cannot modify your module definition for guice generated by Xtext. Looking at the generated example should be enough documentation to get you started.

Once you are done, all you need to do is to add the factory in front of your class descriptions in any of the extensions you are using and the class becomes part of the injection container and can "receive" injections:

    <handler class="my.package.MyFactory:my.package.handler.SomeHandler" commandId="commandid">

That's all and you are ready to go.

Wednesday, February 3, 2010

TMF Xtext 0.8M5 is out...

I could not find any release notes yet, but you may point your update manager to

in order to get the new release.