יום שלישי, 19 ביוני 2012

Moisture sensor from galvanized Nails

It's time to water the plants!

I decided to build a simple moisture sensor that will help me remember to water my plants.

I was feeling inspired after reading about Luke Iseman's cool Garduino project on MAKE magazine. It basically gives his in-house garden a life-support system which keeps moisture and light at the right levels.
Well, I wasn't inspired enough to build a complete system like he did, but I found it amusing that we could use large construction nails for something as delicate as catering for a plant using electronics...

So I made a moisture indicator using Arduino, and it even works!
Once an hour it samples the moisture in my plants' soil. Then it lets me know whether it's moist enough (Green LED on) and when it's time to water them (surprise -- Red LED on).

A little piece of advice I got from smart people on the Gardiuno project talkback: passing direct current through nails in this environment would make them oxidize and corrode fast.
Using galvanized nails and replacing DC for AC would slow down this process. In this cacse I chose galvanized nails and additionally made sure current only passes through them momentarily every hour.
In the pictures below you can see the nails started corroding already. I hope it's because I made all the experiments with them before finalizing the device...
 
All in all - nothing fancy here, but this little device is both useful and simple. And these are excellent properties for a project.


Green light = moist enough!
Red light = time to water!
Simple, useful and fun!










































Where to go from here?  There's plenty of room for improvements:

For starters, I could change these nails... the ones seen in the photos were abused and started corroding.

Then, there's the fun of making this device actually water the plants for me if I neglect doing that on time.

Next stage would be to replace the almighty, but expensive, Arduino with a PIC to do the same job for a fraction of the price and space, freeing up the Arduino for future projects.

Thanks for reading!
L10R

יום שבת, 2 ביוני 2012

Robot eyes follow your mouse pointer

(Click image to watch the video)


Never out of my sight: This creature will watch your mouse's every move.

Not so much because it's programmed to, but because it's suspicious (and a bit jealous).

How does it work?

Here's the data flow:
On the PC, a Java program captures the mouse movements. The code is simple, but I didn't know how to do it before. Uncle google helped.

The same program transmits the mouse coordinates (currently only x) to an Arduino via the serial port.

The Arduino has a library for working with servos, so it's straightforward to pass the serial input to the servos.

The servos are mounted to the bottom of the monitor and the 'eyes' are glued onto their arms.

 The image on the side was taken by looking upwards... the angle is a bit funny but I wanted to show how the servos fit in the setup.







Wait, that reminds me of the in Pac-Man!

A total coincidence. And I don't mind them using it.


Thanks for reading!
L10R
 

Aquarium Timelapse


Aquariums can be stunning. 

Some time ago (Sept. 2010), we had this aquarium at work.
I thought it was pretty static (...and boring) until I made this time-lapse video:


(Click image to watch the video)


The video is composed of  photos taken at intervals of one minute from one another.
It shows that despite having very few fish in it, this aquarium is filled with life.

Making this time-lapse movie was a breeze; it did not require messing around with electronics, utilizing special camera controls or buying software.  All it took was my fairly basic Canon camera (nothing fancy!), free software and... curiosity.

Taking the shots was by far the most fun part - the camera volunteered to do it automatically for me:
Turns out, many Canon cameras have a brilliant feature for 'temporary hacking' them - the "Canon Hack Development Kit" or CHDK.
CHDK essentially unleashes the camera's full powers without permanently modifying it -- for free!
You could make it take RAW images, detect motion, even play mini games. It rocks.
I used one of the intervalometer scripts, it worked on the first try.

The photos had enough resolution to allow for 'zooming in' on interesting areas. So the next step was to crop multiple photos at the same coordinates, and I didn't want to do that manually.... JPEGCrops came to the rescue.

To combine the shots together to a movie I used good-old Windows Movie Maker.


Thanks for reading!
L10R