Arduino lighthouse and magic
When I was at my girlfriend's house and I showed her teenage daughter that I could now, using my iPhone, switch on an espresso machine in my home a few kilometers away, I had expected her to be impressed but instead of showing her amazement she just walked by, rolling her eyes and asking “has everyone gone mad here?”
Still I thought it was quite nifty. I can now switch on the machine when I'm heading home and I will be able to pull my first espresso right after coming in. I even added another cable to the box and now I can also switch a set of lights on and off when I'm not home. The box is programmable for dozens of on/off times but I can add some spontaneous extra movement there to convince any burglars that there's really a live person there.
Plus, my youngest daughter who lives in Australia is able to alert me if she's made a new move in the Wordfeud game we have on. When I'm slow in responding, she switches the kitchen lights on and off, so if I'm home I will know that either there's a ghost or it's her online.
A while ago I've done extensive temperature measurements on the espresso machine and learned a lot from it. How nice it would be, I thought, if I could not only check online what the state of machine and lights is, but also how hot the machine is. The easy way would be to just get another box like the one I had but with the temperature probe option, all turnkey and ready to hook up and go online with.
That's when a friend mentioned Arduino. A system of electronic components and a programming language for everyone to use, change and provide, free and open source like Linux and TeX. It's somewhat like the elegant easily connectible parts in science class ages ago, where transparant cubes held a resistor, a transistor or a capacitor and these magically combined to create circuits that gave off sound, light and even radio waves. Using one simple circuit I made back then with the AF114 transistor I could speak through many radios in the homes of our neighbors all at once while making all tv's in the area go snowy. Arduino has taken this a thousand steps further and there seems to be no end to the nerdy, funny and very practical things it can do.
I got myself a basic starters kit:
And I enjoyed the looks of the tiny parts. Resistors haven't changed a bit over the years but man, these microswitches are awesome today!
It's lots of fun to learn the code for a trick, change it a bit, look up commands and use these as building blocks to make the hardware do even more. Measuring room temperature proved simple enough and making the Arduino board and its adjoining extra parts on the breadboard & jumpers talk to the computer wasn't hard either. It involved some commands that looked like the stuff necessary to get my very first modem hooked up in the eighties.
I also made the entrylevel project that's in all the manuals and courses about Arduino, a LED light fading in and out. I made a little clip for this blog and after uploading I was pleased to see that very many others have done the same thing, also sharing some footage of the tiny lights blinking. Little lighthouses signaling something to one another and to all passing by ;-)
Next, a little LCD screen for the board. Such extras are called shields and I imagine it to be like a soldier getting peripherals for his job in the field. It took some soldering and although my soldering station did fine after 25 years of inactivity, my own technique has gone rusty. Hans, the friend who suggested Arduino in the first place, has corrected this and he is sending me two screens ready to go.
This morning, an ethernet shield arrived. Now the board will not only have its own screen, it will also be able to talk to the world, just like its brother the laptop. I find it's amazing how well these parts are produced. They cost very little, they don't carry any hidden code that makes its use limited to one manufacturer's interests and they are produced with such an eye for detail and packaged with the same innovative feel for design that Apple folks have. If you didn't have a need to get this stuff, you would wish you had, didn't you? I mean, look at that!
Hans has ordered one just like it from iprototype.nl in Leiden. He has sourced lots of data from his home and there's a lot to be gathered still. For instance, his modem remembers all telephone calls, their origins and destinations. The electronic switch he uses to control the lights outside his house also turned out to have a memory that can be read and today's printers and scanners do not only know which cartridges are empty, they also remember when a piece of paper got stuck and where it got stuck!
He is still working on a reporting unit but I think it's fun what he has so far. It's like a computer watching the house, calmly and devoid of emotion, mildly manic about any event that could be measured and remembered. The text of the report evolves very slowly but all the numbers in it are alive, it seems, as the central unit talks of all the little happenings in and around the house:
“The printer Brother DCP-7045N has printed 1001 pages and 1 paper jams occurred while printing. Also 1529 pages were scanned and 18 jams occurred while scanning. The toner has been replaced 1 times. Currently, none of the outdoor lights are on. The front garden lights were switched on 0 times, the back garden lights were switched on 6 times. The back garden light was on for 461 minutes.”
I imagine there will be a voice, calmly reading all these data in the hallway where you hang your coat when you arrive. Soft music will be in the background, covered by the voice. You will have a few moments to meditate and to be aware of where you are.
Reacties