Sunday, May 25, 2014

Raspberry Pi controlled power sockets - It's pretty easy

Ever since I started working on small projects with my raspberries I wanted to control something bigger than an LED. I played around with relays for some time but I always cut the cable (eg from a lamp) and connect the power line through the relay but for that I had to cut (and uglify) a stock cable.

A friend got me the idea of simply connecting a power socket to the relay so I can plug in what ever I want withoug having to modify it.

So I've built it and mounted everything on a piece of wood.

I used:

  • 3 Power sockets for 2€ each
  • a Power cable to power the sockets for 2€
  • an 8 port relay board for 6€
  • Since my female jumper cables I ordered a week ago didn't arrive yet I used some other wires
The base components screwed on a piece of wood

The power sockets are connected


All connected and ready to go.
This just just a proof of concept, if it works out I'll build it in a nicer (and safer) case

The last step was the software. I used the php-gpio library and built a simple webpage so I can control the sockets from my phone (or PC)


I connected my self made plant-shelf and a small fan to the sockets to the power sockets and gave it a try.


Here you can see it in action



Tuesday, May 6, 2014

DIY hydroponic pot for about 36€

So this is my first non-IT post on my blog and I hope it will help somebody save a few bucks.

One of my hobbies besides programming and teaching is gardening. I recently bought a hydroponic pot that automatically waters the plant for about 60€ and it worked amazingly well with lettuce:


But since it uses a very simple principal I thought 60€ are a bit much for that so I decided to make my own.

Thanks to my awesome Gimp 2.8 skills I was able to produce this paint-like schematic of what I'm going to build and how it should work:

There are actually two possible solutions for transporting the water to the surface. I chose a water pump but it would work equally well with a small aquarium-air pump that would be connected to the hose aboth the water level.

You'll need those things:
  • A planter (pot without holes)
  • A smaller flower pot that should not touch the ground of the planter - I used a flower bowl (didn't even know those things existed)
  • 1m garden/aquarium hose
  • 1 T-piece for the hose
  • An aquarium water pump
  • Hydroballs

I picked up everything for 36€ (about 49$)

These are european prices btw so in the US the parts should be much cheaper. It probably will cost you only 30 bucks or so

Enough of the theory.. let's build it!

All the parts

I had to drill some small holes in the bottom fot the water
and a bigger one for the hose

The bowl fits and the hose seems also pretty tight

Attach a short piece of hose to the pump

and put it under the bowl in the pot

Form a ring from some hose and make small holes in it

Stick it on the bowl-hose

Put the soil in and in my case a small pumpkin and we're finished

The plants really seem to love this kind of pot as you can see in the first pic of the lettuce. The last picture shows the young pumpkin plant. A few days later under fluorescent lights it looked like this:



I'll try to make a few more of them. Maybe I'll be able to make a cheaper or more effective version of this pot.