Benjamin Fleckenstein

IT, Electronics, Language, DIY and whatever else catches my attention.

Building a robot camera ... or not.

Since we moved into our own house I'm always a bit nervy when it comes to leaving the house 'alone', when we go on holidays.

I'm the typical: Did I switch off the ofen [1]? kinda guy. So I thought about a way of how I could check my house remotely. I came up with a camera mounted on a robot chassis that I could control via the internet. I could fire up my notebook, connect to the robot, drive around the house and make sure everything was fine.

I started searching for parts and did some programming, when I realised that the concept had a fundamental flaw. The robot with all it's different components of course needs a battery, and the only thing that will provide enough energy while being light enough for the robot to carry would be an Lithium Ion battery. That's a problem.

Lithium batteries can explode quite violently - especially if they get physically damaged or overcharged. The first one could easily happen if the robot bumps into something that falls over and crushes the robot. The latter might occur if the charging system of the robot has a flaw.

So in the end the robot that should make sure nothing bad happens to my house might actually be the biggest threat to it. Another project for the 'yeah, that doesn't really work'-pile. But as I already have invested some research into it, I thought I could publish it. It might be useful for other things.

The Hardware

The robot basis would be an AREXX RP5 basis - it comes with the necessary to motors and the required drive chains - at about 40 Euro.

The motors itself could be controlled either by two Tinkerforge Motor Bricks - each at 49 Euro, or a L293D chip. The later would be much cheaper - only 2 or 3 euros - but requires manuall soldering of the circut and doesn't allow acceleration control like the Tinkerforge hardware.

Camera and 'Brain' of the robot would be a Raspberry B Model with a Rasperry camera and WIFI Modul from Edimax. All together for about 80 Euro.

As a power supply I planned on using a Lithium Ion battery with a wireless charger from Adafruit. The receiver of the wireless charger would be mounted below the base of the robot. This way you would just have to drive onto the charging station and not fidle around the problem on how to plug the robot into a socket remotely. This part of the hardware is questionable if it works. The wireless charger only provides 600mA and I'm not sure if this would work as planned. All around for about 85 Euros.

The Software

I developed a simple python application that uses OpenCV to grab images from the camera an forward it to the remote client using a simple TCP Socket.

The client would connect to the socket, and get picture after picture and display it. This so called 'motion Jpeg' is simple, yet it uses quite some bandwith as every frame is transfered as full blown JPG instead of just sending keyframes every now and then and just incremental differences in between. However I figured I could lower the resolution or the frame rate of the pictures if necessary.

To control the movement of the robot the client would connect to another TCP socket and just send simple commands like: forward, reverse, left, right and stop. The robot would translate this into switching of the appropriate motor at the right time. The control would be fairly simple - you could only drive in a straight line, stop to turn and drive another straight line - but it would work to get around the house.

You can find the last version of the software at github. The video stream works so far and you can see the image on the client. However I just tested it on localhost - so I have no idea how well it will perform via wifi.

Also be aware, the connection between the server and the client isn't encypted or authenticated in any way at the time. That was something I would have added later.

Summary

Well, that's about it. If you take the hardware, the software and ignore that fundamental flaw I described earlier you have a remote controlled drivable camera for a price of 200 to 300 Euro. I'm might build it sometime, yet I won't use it 'unattended'.

[1]Actually the ofen is no problem, it has an autooff feature if there isn't anything on it or it runs longer than 4 hourse. Same goes for the electric iron, but there are so many other things that can burn down or drown the house!!!! [2]
[2]You know what they say about multiple exclamation marks, don't you?

Project: Bathroom, Part 5

After the tiling was done, work continued much quicker. I've installed the floor, the sinks, the toilet, the mirrors and cut the borad that goes on top of the front-wall.

The most difficult thing was to get the silicon around the sinks and the bathtub in acceptable shape. With the first try all I got was an ugly smear that didn't even work from a technical point of view let alone the asthetic part. But with some practice, a new cartidge gut, new 'thingy to make the silicon nice and triangle shaped', lot's of silicon and most importanly soapy water it worked in the end.

Now I'm left with adding the wood around the bathtub, installing the light and the switches and installing the faucet in the shower. Here are some pictures.

/static/images/bz_5_1.jpg
/static/images/bz_5_2.jpg
/static/images/bz_5_3.jpg
/static/images/bz_5_4.jpg

Project: Bathroom, Part 4

It took quite some time, but finally the tiling is done. Besides having to work on some weekends there were also some technical problems that slowed me down.

The biggest problem was the shower tub. We bought one from Bette Floor, that we could put in (and remove again) after the tiles where installed. Unfortunately that only works if the tub is only surrounded by two wall. In our case - having three walls, the tub wouldn't fit and I had to remove some of the tiles on the bottom again.

Cutting holes for the taps was another problem. I used my dremel with a diamond cutter. It worked well but it created so much dust that I had to do this outside. As the holes weren't always big enough after the first try it took a lot of cutting, checking, cutting some more, checking again. In the end it sometimes took me up to 30 minutes to get one tile done.

The again, the'attach the tile to the wall' part was pretty easy. I used Dots from a company called Tes instead of the usual tile spacers. This way the tiles all had the same space to the wall and each other.

Ater the tiles sticked to the wall grouting them was pretty easy. In the end I'm pretty happy with the result. Here are some pictures.

/static/images/badezimmer4_1.jpg

The Shower

/static/images/badezimmer4_2.jpg

The Wall where the sinks and the toilet will be