Money Spent:
Distance Traveled:
23,317 miles
the comic
the blog
about us

 ATW #59, Back home

 Meh, it's good to be back. If you just got here, this is the last comic journaling my trip around the world. Click here to go back to the start. 
last comic Comments (8) | Posted on 2011-06-06

 How to build a needlessly complicated weather clock for under 10 euros

So what the hell is a weather clock? It's something that looks like a clock, but shows the current temperature and weather (and in my case also the phase of the moon). There are different ways of doing this. In my case it gets the information online and the display is actually built out of a clock.

From the beginning, this was a solution in need of a problem. I got the idea a while ago that a usb keyboard could be used as a cheap computer interface. Then arduinos got cheap and mooted the whole idea. But I was never one to let go of a stupid idea easily. To cut a long story shortish, I was looking for a project and decided to build a weather clock with a budget of 5 Euros. For that much money I couldn't buy anything big, so I'd have to make do with what I had lying around. The brains are an OLPC, the interface is a controller from a broken keyboard, and the display was going to be a clock I happened to have, but I ended up buying a slightly bigger one for 2 Euros from ikea.

The keyboard controller

It's easy to put information into a keyboard, but how do you get it out? Keyboards have three leds which can be toggled on and off by software: caps lock, number lock and scroll lock. I figured I could tap into them and use one as clock, one as data and one as latch to push data to shift registers. It didn't quite work out that way.

First thing I had to do was figure out how to toggle the LEDs in software. Since I was using the OLPC, I wanted to program in Python. There is a library for Python called python-keyboardleds, but I could never get it to run, so I wrote my own.

Now that I could toggle the LEDs at will, I needed a usable signal from them. After measuring with my multimeter, I found that one LED line stays at 5 volts and the other toggles between 5v and about 3.8v. That's no good by itself, but using an op amp I had lying around as a comparator gave me logic levels. So far so good. I bought four 8 bit shift registers (total cost 96 cents) to theoretically give myself 32 bits of output data. I wired up one LED output as clock and one as data and I got garbage out. Each toggle of the clock led registered 2-5 clock cycles. It turns out the LEDs have a lot of bounce when they're turned off or on. I tried adding a Schmitt trigger, RC filtering, blah blah blah. Finally I solved the bounce by using one shift register as a signal buffer and the output of that as the clock to the remaining shift registers. This tied up another LED and halved my data rate, but it works, at a blazingly fast 40bps (that's bits per second). Since I had lost my latch line, I solved this by feeding the last bit through an inverter to the clear line of the shift registers and using the second to last bit as an enable. In this way, nothing happens to the motor until the enable is high (i.e. all the data has been received). Then, as soon as the clock changes, the high enable bit moves to the last bit, which becomes low on inversion and clears all the shift registers. More complicated, but it works. Moving on.

The Clock

I bought a RUSCH Wall clock from ikea (cost: EUR 1.99), which exactly fulfilled my criteria of being:
A. Cheap
B. Easy to take apart
C. Cheap
Originally I was planning to directly drive the coil to make the hands move. So I cracked the thing open, soldered the smallest wires I could find to the coil, spent about 2 hours trying to put the damn thing back together again and a couple of days trying to get the damn thing to tick. Finally I realized that even if I did get the thing to tick, even at slightly less than one second per tick, it was likely to take several minutes for each update. What I needed was a beefier motor, which I figured I could hook up directly to the gears. I pulled the motor from an old answering machine and after some surgery involving a box knife, part of a cork (Merlot in case you're curious) and a lot of super glue, it worked.

Motor controller

I'll spare you the long saga and just say that if you're planning to build your own H-bridge, don't. After a lot of pain and wasted energy, I just bought a motor controller, L293D (cost: EUR 4.30).


Because I wasn't using a servo or stepper, I needed some way of knowing where the hands were. Using the motor controller, the distance traveled in a given time was pretty consistent, but I still needed occasional feedback. As it happens, I have quite a few optical switches I've salvaged from old printers, so I figured I wire them up to the keyboard to trigger a key press each time the second hand passed through them. I'd never used an optical switch before, guessed how to wire them up, guessed at the circuit, voltage and resister values, and so of course it was the only part of the project that worked the first time. You can see the circuit I used below.

Extra touches

Making the face was pretty straight forward, but fun nevertheless. I owe a debt to Sean Carney and his website ( for the basic design. After designing the face, I printed in balck and white and colored in with crayons (every project is better with crayons). Then it was just a matter of gluing it to the clock and cutting out some holes for the switches. Since I had some extra data lines, I figured I should do something with them. I had a bunch of extra LEDs lying around, so I decided to use 12 of them to show the time. As you'll see in the end, this made for some wonderful wire spaghetti. I also used three LEDs hidden behind the three suns in my weather icons as extra status indicators. One shows if there was an error, one shows when I've received a new comment to my website. The third isn't currently used. Suggestions are welcome. Finally, although it has nothing to do with the weather clock itself, I added some alarms, which are spoken by the computer using eSpeak. When the first alarm is activated, the computer also reads me out the day's full weather forecast.


In the end, I wrote everything from scratch. The OLPC runs a little server, which serves up a small app for configuring the clock. I formatted the pages so I could load them on my Nook.

Wrap up

In the end with all the odds and bobs, this probably cost me around 10 euros above what I had on hand. Here's what it looks like in action:

EDIT 20, Feb, 2014
This project has been featured on Hackaday:
Comments (190) | Posted by Andrew on 2014-02-18 05:29:54

 Things to do with your nook

I've wanted an Optimus Maximus keyboard since I first heard about it. Whereas some people seem to think it's an expensive gimmick, as someone who routinely switches between three different keyboard layouts (and can't touch type on all of them) it would be a godsend. However, I don't have that kind of money to drop on a keyboard.

A couple weeks ago I got a nook simple touch. I can't speak highly enough about this little tablet. If nothing else it's makes me want to read. Obviously pretty much the first thing I did was to root it which makes it the only e-ink tablet on the market. After getting everything working it made me wonder if I could use it as a wireless soft keyboard for my regular computer.

I've never written an android app and before I dove headlong into that I figured I should do a quick and dirty proof of concept. I decided to mock up a keyboard in html, run a minimal server on my main computer and somehow connect the server to another program to mimic key presses. I didn't want to mess with fonts, so I decided to use an image for each key. I typed out all the keys from the different keyboard layouts to a text file and used a quick and dirty python script to parse the file and send commands to image magick to produce the images then modified the same script to generate an html file. You can see the html page here.

The server side code was borrowed from another project I did a couple years ago. The code is super messy, but if you're curious, the whole thing can be downloaded here. . Basically the keypresses send a code back to the server in acsii, they are decoded in a look up table and then sent to xte which simulates the key presses.

How does it work? Not very well. Opera mini doesn't want to connect to my home brew server and the browser browser doesn't handle javascript very well so I can't switch between layouts. xte will generate German and US keypresses just fine, but I haven't been able to get it to output Cyrillic, which was actually the impetus for this project in the first place. So it's still just a proof of concept for the moment, but it was a fun afternoon getting it working. Take a look below:

Comments (310) | Posted by Andrew on 2012-03-15 03:13:15

 What the US government has to say about alcohol

What We Have to Say About Legalizing Alcohol

By: Gil Kerlikowske

When the President took office, he directed all of his policymakers to develop policies based on science and research, not ideology or politics. So our concern about alcohol is based on what the science tells us about the drug's effects.

According to scientists at the National Institutes of Health- the world's largest source of drug abuse research - alcohol use is associated with addiction, sleep disorders, increased risk for cancer, and motor vehicle accidents. We know from an array of treatment admission information and Federal data that alcohol use is a significant source for voluntary drug treatment admissions and visits to emergency rooms. Studies also reveal that binge drinking alcohol remains common on college campuses, raising serious concerns about what this means for public health especially among young people who use the drug because research shows their brains continue to develop well into their 20's. Simply put, it is not a benign drug.

Like many, we are interested in the potential alcohol may have in lowering the risk of coronary heart disease for individuals. That is why we ardently support ongoing research into determining what components of alcohol can be used as medicine. To date, however, neither the FDA nor the Institute of Medicine have found alcohol consumption to meet the modern standard for safe or effective medicine for any condition.

As a former police chief, I recognize we are not going to arrest our way out of the problem. We also recognize that legalizing alcohol would not provide the answer to any of the health, social, youth education, criminal justice, and community quality of life challenges associated with drug use.

That is why the President's National Drug Control Strategy is balanced and comprehensive, emphasizing prevention and treatment while at the same time supporting innovative law enforcement efforts that protect public safety and disrupt the supply of drugs entering our communities. Preventing drug use is the most cost-effective way to reduce drug use and its consequences in America. And, as we've seen in our work through community coalitions across the country, this approach works in making communities healthier and safer. We're also focused on expanding access to drug treatment for addicts. Treatment works. In fact, millions of Americans are in successful recovery for drug and alcoholism today. And through our work with innovative drug courts across the Nation, we are improving our criminal justice system to divert non-violent offenders into treatment.

Our commitment to a balanced approach to drug control is real. This last fiscal year alone, the Federal Government spent over $10 billion on drug education and treatment programs compared to just over $9 billion on drug related law enforcement in the U.S.

Thank you for making your voice heard. I encourage you to take a moment to read about the President's approach to drug control to learn more. source

Comments (60) | Posted by Andrew on 2011-10-31 09:11:17

 48 hour film II

We'd made a movie and even won, but we weren't terribly happy with the final result, so we had to do it again and more importantly, we had to do it again on a weekend which we both had free. This time we felt like we had a grasp on what we were doing. We had all the equipment we needed to make a good movie, we had no shortage of ideas and we had some more people interested (almost all of them ended up canceling). About the only thing we had planned was that I wanted to do something with split screen, since A. I had written a plugin in Blender which does it and B. I remain deeply enamored with the opening of grifters.

The subject was love, the only actor we knew we had was Marek and so within 5 minutes both Shanti and I had the exact same idea for a movie. This time we actually needed a script including an over the top monologue about love which took us several hours and some Scotch to finish.

There were three roles to play and we were prepared to step in and play them ourselves but fortunately at the last minute we were able to get Kaya and Lena and Jonas, who didn't appear but who became our one man production team and helped us a lot.

We had a long shot list but no real idea where to shoot them all, so we did a lot of excessive running around and every once in a while I'd yell stop and make Marek walk back and forth in front of the camera in different costumes. Fortunately Shanti kept a list so that we knew when we had enough material. We ended up shooting waaaaaay long, but at least we finished with enough shots to cut the movie together.

I think the idea we had was good and the movie works, but unfortunately we delivered it too late to be considered in the competition. So where did we go wrong? Let me count the ways: First, we shot in too many bloody locations. When you only have 48 hours to shoot, you either need to know exactly where you're shooting and what, or you need to scale back. One of the contest rules was that the piece has to unquestionably take place in the district of Berlin they specify, but we went a little overboard shooting all over the bloody place. As a result we didn't even have all the material on the computer until close to midnight. Second, we didn't think out our setups very well. Our actors were basically improving their lines based on directions we gave them, so to make it match we shot with two cameras. The cameras didn't match very well and we forgot to sync at the beginning which became a headache in post. Third, we didn't give enough instruction. I basically just let out actors read through our script, improv their own words and shot the result, only stopping them if they did something really wrong. I think they did a great job, but we ended up capturing their practice and several takes, all with slightly different dialog. This made editing a nightmare. Sometimes more is not better, especially when you have a tight deadline. Fourth, I messed up the settings. I tried to export at full HD in H.264. With all the effects and corrections I added, even for a short movie it took close to 2 hours to render.

So, the movie was shown out of contention, but I'm at least happy with the result. We still hope to clean it up, add music and hopefully it will become something quite good. At the very least though, I learned a lot from this film. I learned a lesson in organization and I also learned a lot about direction (mostly in the direction of "what I should have done differently"). Because we're still learning the process of making the film in the first place, we couldn't take as much time as we should have for our actors. We were fortunate that we ended up with some very naturally talented actors who were very patient with us.

Anyway, the final film as it was delivered (40 minutes late) can be downloaded here (1920x1080 305MB)

Comments (107) | Posted by Andrew on 2011-06-01 03:38:27

 My mic pole

As I write this we've competed in the 48 hour film contest 3 times. Basically, I'm using it as my film school, so each time I try to focus on something different. The first time we were just trying to make a film, any film. For the next film I wanted to focus on sound a little more. On our first movie we just wired Shanti with a lapel mic. Since the genre was documentary that worked just fine, but now needed a mic pole. What is a mic pole you ask? Well it's litterally a pole with a shock mount on the end of it used to hold a microphone. You use it to hold the microphone over your actors, as close to their mouths as possible to get the best sound. They're expensive to buy, but do a quick google search and you'll find dozens of diy projects. This is how I made mine.

I think the pictures speak for themselves so I'll keep my descriptions brief.
The raw materials: a screw, some pvc pipe, four o-rings and an expandable painter's pole.
Total cost: about 9 Euros.
I marked everything with a permanent marker and drilled the corners so I could get the saw in place. I just guessed on the ring width. On the final version I ended up with 2cm even, any less and it might not be stable enough but I wanted to make them as small as possible to avoid echo. I kept the detachable paintroller and just muscled off the handle. This means that the shock mount is detachable which means it can be used hand held which is great when we're getting background audio. The shock mount is fastened to the handle with the bolt and by good luck they're a pretty good fit.

Conclusion: I've used this quite a bit and so far it's served me well. It dampens handling noise very well, but the o-rings are a little tight so that if it's shaken too much, a slight twang can be heard on the mic. However, in practice this has never made it's way onto the recording.

Comments (48) | Posted by Andrew on 2011-06-01 03:07:16
Older posts
Home | Comic | Blog | Footbag | Projects | About | rss