About
Hack a Day serves up fresh hacks each day, every day from around the web and a special How-To hack each week.
Click here to check if anything new just came in.
January 29 2012
Simulated dashboard for a simulated race

Simulators might have lost their cool for a lot of gamers, but [Fergo] is trying for a comeback. He built an electronic dashboard for a car racing simulator.
[Fergo] spends most of his track time on iRacing, an MMO racing simulator. Possibly due to a little bit of influence from Formula 1 steering wheels, he wanted to add to his dashboard that included Microsoft racing wheel. The dashboard includes RPM lights, a gear indicator, five general buttons, a rotary encoder, and a pit limiter, rev limiter and low fuel indicators.
The build is powered a VB.NET app that connects the iRacing API to an Arduino. To get all those buttons and LEDs talking to the Arduino, [Fergo] used an IO expander that communicates over an I2C bus. It’s a surprisingly simple design that should scale well if [Fergo] ever decides to expand his cockpit. We’re not sure if it could handle controlling a 737, but it would be more than sufficient for a Cessna 172 or Mercury capsule.
Check out [Fergo] tearing around the track with his buttonbox dashboard after the break.
Filed under: arduino hacks, misc hacks
January 28 2012
LiPo charging circuit tutorial

As far as battery technology goes, Lithium Polymer cells are the bee’s knees. They’re powerful enough to handle very demanding applications and come in a multitude of sizes for any conceivable application. There’s a problem with LiPos, though – they have the tendency to explode when charged incorrectly. Luckily, [Paul] sent in a great tutorial on building a LiPo charger that works over USB.
In the original design of [Paul]‘s board, he chose a Maxim MAX1551 Lithium battery charger. Confounded by the expense and/or unavailability of this IC (although Sparkfun has a few), he moved onto the similar Microchip MCP7813. This IC supports charging from a power source from 3.5 to 6 Volts as would be found in a USB hub.
The board [Paul] came up with is incredibly small – just barely larger than the USB plug itself. The layout is fairly simple as well. We’re thinking this could be a highly useful application of some home board fabrication. If you have a simpler way to charge LiPos that don’t require a specialized chip, send it into the tip line.
Filed under: news
The Fukushima Robot Diaries
After the terrible tragedy in Fukushima, the cleanup and damage assessment has begun. A robot operator, known only as [S.H.] has decided to write a blog about their efforts. As pictured above, they are using [iRobot] models, including the [510 Packbot], and the [710 Warrior].
Since cleanup efforts started, [S.H.] was posting on his or her blog daily. After word of this blog started getting out via various social media outlets, the blog was mysteriously taken down. The blog was at times critical of elements of the cleanup effort, but it’s unknown why the disappearance happened. Efforts to reach [S.H.] were unsuccessfull according to [IEEE].
Fortunately, before the takedown, [IEEE]‘s [Erico Guizzo] decided to make a copy of the posts. These have been translated into English and portions are now available at the link listed above. Be sure to check out robot training video after the break.
Filed under: repair hacks, robots hacks
Petition for DMCA exemptions regarding Rooting/unlocking gadgets

So you’ve been rooting devices eh? If you get caught you’re headed for the big house, the lockup, the pen, the joint, they’ll send you up the river, you better be careful! Seriously though, if you buy a device and circumvent the security features should that in itself be breaking the law? We’re not talking about stealing intellectual property, like playing copied games on a chipped system (yeah, that’s stealing). We mean unlocking a device so that you can use it for what you wish. Be it your own prototyping, or running open-source applications. Unfortunately if the current Digital Millennium Copyright Act exemptions expire it will be a crime.
Thankfully, [Bunnie] is doing something about this. You may remember him as the guy that found most of the ridiculous security holes in the original Xbox, or the brain behind the Chumby. Now’s he’s got an online petition where your voice can be heard. Speak up and let the US politicians know why unlocking a device isn’t a crime.
[via Twitter]
Filed under: rants
Weekly roundup 1/28/12


Another week has passed and it is time to review the best of what hit our blog in the past week.
In first place is a repeat from last week showing how you can turn an Android device with a CMOS camera into a radiation detector.
In first place if we ignore repeats is a post about how the Raspberry Pi board can decode 1080p video! We’re just itching to get our grubbly little hands on some of these guys when they are finally released.
Up next is a project from one of our own. This week [Brian Benchoff] put up a post about how he built a manifold clock after seeing a similar project on Kickstarter.
Following that is a post showing how you can overlay video onto an encrypted HDMI signal. The MPAA would probably like to crack [bunnie] over the knuckles with a ruler for this one but he actually isn’t decrypting anything. Instead, he is encrypting the overlay and just replacing the normal video with it.
We like this next one a lot because it not only is a nice hack but it allows you to subtly control what can and cannot happen around you. Specifically, you can jam remote control helicopters with this device. It probably wouldn’t be too hard to pair this up with a TV B Gone to keep people from turning the TV back on once you have wrought your mischief.
Finally, another really neat one for you. In this post, we show [Sprite_tm's] radio transmitter that is composed out of two button cell batteries, two lengths of wire and an ATtiny processor. It is amazing that this even works but with the right tools, a good hacker can do just about anything.
Filed under: Weekly roundup
January 27 2012
Followup: Troll physics solved

A month ago, we saw a marvelous demonstration of troll physics from YouTube user [Fredzislaw100]. In his video, we saw a circuit of three switches and three LEDs wired in series and but not acting like the should. A lot of the comments for this post elicited reasonable explanations like modifying the battery or pure camera wizardry via After Effects. Thankfully, [Alan] stepped in and showed us how it was done. The solution uses two AC power sources with diodes in two of the switches and LEDs and inductors in the third pair. [Alan]‘s build was rather large compared to the original video, so we were wondering how this circuit could be made invisible.
[Fredzislaw100] just posted a video on how he did it. Like [Alan]‘s build, it uses two AC power sources, diodes, and inductors. In contrast to every single guess about where the circuit is hidden, the majority of the build is inside the battery connector. [Fredzislaw] did some amazing work hiding a 74LV132 quad NAND Schmitt trigger inside the battery connector. The diodes were easily hidden on LEDs 1 and 3 with some red nail polish, but we’re amazed by the inductor built into the LED seen in the title pic.
So there you go. With a ton of electronics know-how and an extremely steady hand (and a microscope), you too can build your own troll circuit. Check out the video after the break.
Filed under: led hacks
DSLR performance measured with audio editing software

[Jaroslav's] camera didn’t have a feature to measure the speed of its response in different modes so he figured out his own method. Using the microphone on his webcam he recorded the sound made by the mirror and shutter movements, then used Audacity to analyze the camera’s performance.
When you get right down to it, this is a fantastic idea. Audacity, the open source audio editing suite, has the ability to show each captured audio track next to each other. That makes it easy for you to precisely align the clips, and has in-build time measuring features with fantastic resolution.
He tested a whole bunch of different settings on a Canon EOS600D DSLR camera. In the image above you can see him comparing performance between different ISO settings. He also looks into different brands and sizes of SD storage cards, as well as the time difference when storing raw image data versus JPEG encoded data.
Filed under: digital cameras hacks
[Jackson Pollock] is now a robot

Even though abstract expressionism died out several decades ago, robots are still chugging along dripping nihilistic pigment onto a cold, uncaring canvas. [Liat] and [Assaf] created a robot named The Originals Factory to create paintings in the style of abstract expressionism, a style of painting that is arguably best represented by [Jackson Pollock] and his ‘drip paintings.’
The build is surprisingly simple – there are four containers filled with C,M,Y, and K pigments. Pumps transport these paints to a print head mounted on an aluminum rail above a canvas. The software portion of the build is rather interesting. Instead of pixels, the image is rendered in ‘vixels’ – vertical lines of a specific length and color. Although we don’t see any examples of more precise work, [Liat] tells us The Originals Factory can be used to plot graphs on the canvas.
Check out a video of The Originals Factory squirting paint down a canvas after the break.
Filed under: robots hacks
How to add flair to a webpage that shows your project data

This temperature display may not knock your socks off, but it’s a simple demonstration of how you can used vector graphics as a web readout for data (translated). [Luca] wrote this four page tutorial to help others, he makes it look really easy, and the sky’s the limit on eye candy once you get he basics in place.
The first step is to create the dynamic SVG (vector graphic) file using Inkscape that will be used by the webpage. This starts with a static background, in this case the grey parts of the thermometer which will not change. Over the top the blue parts were added, with just a bit of XML editing to give those parts a hook which will be used in the next step. The demo above will have a moving blue bar and changing numeric output to match data coming in from a temperature sensor.
An SVG file is just a text file that is rendered as a graphic when loaded. [Luca] shows you how to used the identifiers set up when making the graphic to dynamically change the size and value of the blue parts with server-side PHP before sending the graphic to the browser. With that in place you just need to give the PHP file access to the data. He shows how to use the Pachube API but you could just as easily get this via serial or otherwise.
Filed under: software hacks
Synthesize with a hard drive

If you’d like a pseudo-mechanical way of producing a droning synthesizer sound, [gijs] is your man. He made a small synthesizer out of nothing but an old hard drive and a few components.
Whenever a disk platter is spun manually, the spindle motor inside the drive produces a few out of phase sine waves on its connections. [gijs]‘ synthesizer compares and amplifies these sine waves and sends them out to a speaker. The result is a strange droning chiptune-esque arpeggio.
The circuit for the build is soldered directly to the hard drive enclosure Manhattan style. Because the output of the spindle motor produces out of phase sine waves, [gijs] thought it would be a good idea if he could capitalize on some phase interference to alter the timbre of his synth. The entire build is mounted to a wall with hinges to one side so the speaker can be moved around. It isn’t much of a change, but we can here some wave forms cancelling each other out.
Check out the video of the build after the break. There’s also a few audio samples available on the project page.
Filed under: musical hacks
@publictextbox is a Twitter enabled phone booth

In the interests of open communication in shared spaces, [dan] made a public text box that serves as a terminal to the @publictextbox twitter account. We could see something like this being useful in a hackerspace or other hang out to announce to the world the happenings of the resident makers and builders.
The software setup is very simple and can run on just about any old computer you might have lying disused in a corner. The app is built with Processing, and the code is extremely simple and easily modifiable. Even though the case is a lovely cardboard number, the Twitter Box can be dressed up as any imaginable form. We’d love to see a nice TARDIS blue, but we’ll leave that up to [dan].
You can check out the demo of the Twitter phone box after the break. Alternatively, you could re-tweet this post and take part in a load test for the @publictextbox.
Filed under: misc hacks
Sixty4Racer an 8×8 Game

[Pete] has a cool new tutorial creating a re-imagining of the Atari classic “River Raid” for the PIX-6T4 micro controller based game system. The PIX is a netduino on a larger board featuring 2 analog controllers, a speaker, an sd card and an 8×8 monochrome LED display. With a resolution that low, it may make the good ole VCS look like a 360, but there is still a lot to learn about making a game at this low of a level.
The tutorial [Pete] has put together covers concept, gameplay, progression goals, screen handling and a boat load of code to show how it all goes together. Though this is for a C# based system many of the basics apply to just about any system you can imagine. So if you’re looking to learn how to handle graphics in C, sprite animation, collision, or randomly putting levels together out of tile blocks then you should take a look.
Join us after the break for a quick video.
Filed under: arduino hacks, led hacks
January 26 2012
Analog Joypad for your Retro PC

Part of the fun with old computers is playing some old school games, and while you could play them with a keyboard it is much more fun with a joystick. You can get old joysticks all day long on auction sites, but you have to watch out. Some are digital, which wont work for many games on many systems. Some were cheap to begin with and probably worn out, and many are flight sticks … ever play pac-man with a giant flight stick?
What I really wanted was a game pad like device for my 1986 Apple //c , using one of the modern thumbstick analog controllers. Using a thumbstick out of an old XBOX(1) controller, some generic parts from Radio Shack, and a little bit of effort , I ended up with exactly what I wanted.
Join us after the break and I will show you how to get there!
First some basics, most computers that have analog controllers implement it in a pretty simple method. In a nutshell there is a 555 timer wired up for single shot mode, the computer triggers the 555 and counts how many cycles pass before the 555′s output changes. One of the potentiometers inside the joystick is hooked up to this circuit and controls the rate that a capacitor charges. Once filled the 555 changes output. Swing the joystick one way, resistance increases and the capacitor takes longer to charge. Swing it the other way resistance lowers, cap charges faster. Simple right?

Now just multiply 555′s for how many axis you need and you have a simple analog joystick. Apple //s, and IBMs work like this, and use a 556 dual timer (one, two axis joystick) or a 558 quad timer (two, two axis joysticks). Below is an example circuit from the Apple //c Technical Reference Manual.

Other computers like the 8 bit Commodore’s and Atari’s used this setup for their paddle controllers which were often in joystick or flightstick format. About the only one I know of that does not handle analog joysticks in this manner is the Tandy TRS series, but I am sure there are others. Check with your computers nerd club before proceeding.
Next thing to consider is the values of the potentiometers inside of your joystick. the most standard value for old computers is 100K ohm. Apple used 150K ohm. Why? I don’t know but with Apple stuff, if its hard to source, they will use it. Thumbsticks themselves come in all varieties of resistance, from places like Digikey. If you don’t mind spending a couple bucks + postage, that might be the best way for you.
Since I am using scavenged thumbstick from an XBOX controller I don’t have a choice of what value it is. The thumbsticks that come stock with that controller is 10K ohm. In order to compensate for the difference in resistance,we just need to add more capacitance.
Before I go bothering myself with math, I need to find out exactly where my joystick “tops out” while its in its enclosure. I went out an purchased a 4x2x1 inch enclosure from Radio Shack, and while I was there I also picked up a couple panel mount normally open pushbutton switches.
With these radio shack project boxes, they give 2 choices of a lid, a nice molded plastic lid that sits on top of the box, and an aluminum panel that sits a bit recessed in the box. I just had to have that aluminium panel for looks, but it ended up causing a bunch of problems.
First I had to cut the lip of the box off where the panel would not be recessed anymore. That was accomplished using some 90 degree flush cut wire trimmers and a file. Because I lost about a quarter of an inch in height, the thumbstick would not fit anymore using the screw mounts inside the box. I had to snap off the screw mounts, then flatten the area where they broke off with a chisel. Then I surface mounted everything to a piece of pad-per-hole perfboard flipped upside down, since the only way the thumbstick would fit is if the board was flat against the bottom.


With all of that sorted out, I went to drill holes into the aluminum panel. I drew the outline of the panel on some paper, and I was measuring everything out. I didn’t like how the holes were sitting, so in the end I just simply eyeballed them on paper. Then I taped the paper to the aluminum plate and made divots for the hole centers with a hammer and nail.

The aluminum plate was then screwed to a scrap chunk of 2×4 wood, and drilled. I used a 1 inch hole saw for the joystick (which is a bit too large) and quarter inch holes for the switches. I used a jewelers file to quickly deburr the holes, but the large joystick hole was still a little rough. To give a more finished appearance I decided that it needed a grommet.

I went to the local hardware store, and when I asked for a grommet with about a 1 inch inside diameter, they looked at me like I just stabbed a baby. I ended up at Lowes where I found a grommet in one of the “hard to find” bins in the screw section with a 1&1/8th outside diameter, and a 23/32nds inch (18.25 ish mm) inside diameter, which is good enough. The grommet was much too tall to fit both inside and outside of the box, so I just simply chopped its top off and glued it down with some goop (super strong and thick glue).
Now that the box is in order I can see where my thumbstick tops out at. I bent the leads of the thumbstick out to a 90 degree angle so I could surface mount them to the perfboard. Then I soldered it down and added some test leads, ran the wires out of a hole I drilled in the back of the box for the joysticks cable, and popped on the lid.


Using a multimeter I found out that it the furthest I could push the thumbstick came out to about 8.5K ohm on both axis. My meter is overkill for most of what I do, so I could have used the 5 digits of accuracy, but its not needed. I will add some trimpots later for fine tuning.
Now that I know 8.5K is my max resistance, its time to figure out how much capacitance I need to add so that the circuit internal to the computer will behave the same with this 10K pot as it did with a 150K. The formula to calculate the capacitance is pretty simple:
((original_potentiometer_value * internal_timing_capacitor) / new_potentiometer_value) – internal_timing_capacitor
Most of the time the internal timing capacitor is 0.022 uf, though you might want to check before assuming for your machine. The original potentiometer value of the Apple // is 150K ohm so…
((150,000 * 0.022) / 8500) – 0.022 = 0.366235294
Therefore we need to add about 0.36uf in parallel to the joystick so that a 10K pot works the same as a 150K pot in the timing circuit. My capacitor selection pretty much stinks so I ended up using 3, 0.1uf capacitors in parallel and 2, 0.1uf in series per axis, giving me about 0.35uf. It does not have to be exact because I also added a 10K trimpot in series with the capacitors which will allow me to control how fast the extra caps charge, giving a fine tuning mechanism. Below you will see the schematic I ended up with for my Apple //c.

Now it is just a matter of wiring everything up, connecting buttons and a cable, and then using a test program to calibrate the thumbstick. The Apple //c has a nice diagnostic program which also test’s joysticks, but you could just as easily write one up in basic. For example, in Applesoft:
10 X=PDL(0): FOR I=1 TO 10: NEXT: Y=PDL(1) 20 PRINT X " " Y " " PEEK(49249) , PEEK (49250) 30 GOTO 10
To calibrate I just need to adjust the trimpots until its about center, the program above shows value from 0-255, and we can give ourselves about 5% in error, from there its just a matter of making sure the thumbstick maxes the readouts when in its most extreme up/down/left/right positions. Some error is ok, and a little jitteryness in center is fine as well.
Anyone who has programmed for analog controllers quickly figure out a little dead space for middle and a little room for error on the extremes is needed whether it be a 26+ year old computer, or a brand new Sony PSP, nothing is 100% perfect.

Once the thumbstick is calibrated to the computer its time to button it up and play some retro games. How well does it work? Pretty darn good, I may go back and drill a couple small holes so I can fiddle with the trimpots without having to take it apart, but other than that it plays good and looks nice (IMO) .

Thanks for reading!
(Reference: The Computer Controller Cookbook)
Filed under: how-to, news, peripherals hacks
Program a microcontroller over the Internet

If you’ve ever wanted to program a microcontroller “in the cloud,” you might want to head over to Inventor Town, an online IDE that allows you to write and compile firmware for the MSP430 series of microcontrollers.
After logging in with your Google account, you’re presented with a ‘My Projects’ page. From there, you can make as many projects as you like for the MSP430x2231 or ~x2211 microcontrollers. The online editor has the vital keyword highlighting feature, but sadly not many of the more advanced text editor features, like a red underlined syntax errors. After you’ve written your code, press the compile button, download your .HEX file and upload to your board.
We’re surprised we haven’t seen something like this before. To us, this seems like the ideal basis for a github-style microcontroller code-sharing website. Any enterprising ATtiny fans want to take a crack at this one?
Thanks [Rob] for sending this one in.
Filed under: Software Development
[Sprite_tm]‘s three-component FM transmitter

When the Regency TR-1 transistor radio came out onto the market in the 1950s, it was hailed as a modern marvel of microelectronics. With only four transistors and a handful of other components, the TR-1 was a wonder of modern engineering. [Sprite_tm] may have those old-timers beat, though. He built an FM transmitter with the lowest parts count of any transmitter ever.
Like most of [Sprite_tm]‘s builds, it’s an unimaginably clever piece of work. [Sprite] overclocked the internal RC oscillator of an ATtiny45 to 24 MHz. After realizing the PLL running at four times the frequency of the oscillator was right in the middle of the FM band, he set about designing a tiny FM transmitter.
[Sprite_tm] remembered his work on MONOTONE and made a short song for hit ATtiny. The firmware for the build takes the notes from his song and varies the 96 MHz PLL frequency a tiny bit, thereby serving as a tiny FM transmitter.
Does it work? Well, if you want to compare it to a Mister Microphone, the range is incredibly limited. That being said it works. It’s an FM transmitter built out of a microcontroller and a battery, and that’s very impressive. Check out [Sprite_tm]‘s demo after the break.
Filed under: ATtiny hacks, radio hacks
Jam a remote helicopter

The Syma S107 IR is a popular little remote controlled helicopter. When a friend of [Michael]‘s started flying one around the office he decided to try and jam the signal, creating a no fly zone. Luckily some people on the internet have already decoded the IR signals used by the flying menace. From there, a quick browsing of Mouser to source some LEDs, and to whip up some code for a TI MSP430 was all that was left.
The software on the micro controller is set to broadcast a “thrust off” signal, but [Michael] admits he is not 100% sure if the helicopter is actually receiving that, or if the signal from the no fly zone is mixing with the remote’s signal, causing garbage to be received. Either way when the helicopter gets in range of the no fly zone pad it drops from the air.
Things didn’t go perfectly though, overestimating the current capabilities of the MSP was causing the micro controller to reset and crash the debugger. But a simple rearrangement of how the signals are sent quickly solved this problem.
Join us after the break for a quick video.
Filed under: toy hacks
January 25 2012
Real-time depth smoothing for the Kinect

[Karl] set out to improve the depth image that the Kinect camera is able to feed into a computer. He’s come up with a pre-processing package which smooths the depth data in real-time.
There are a few problems here, one is that the Kinect has a fairly low resolution, it is also depth limited to a range of about 8 meters from the device (an issue we hadn’t considered when looking at Kinect-based mapping solutions). But the drawbacks of those shortcomings can be mitigated by improving the data that it does collect. [Karl's] approach is twofold: pixel filtering, and averaging of movement.
The pixel filtering works with the depth data to help clarify the outlines of objects. Weighted moving average is used to help reduce the amount of flickering areas rendered from frame to frame. [Karl] included a nice GUI with the code which lets you tweak the filter settings until they’re just right. See a demo of that interface in the clip after the break and let us know what you might use this for by leaving a comment.
Filed under: software hacks
Rotary phone-light-amp could be filed under bizarre

[Samimy's] latest project is a little strange, but one man’s weird is another man’s wonderful so we’re not about to start criticizing his work. Nope, we’re here to praise the fact that his rotary phone turned reading light and audio amp is very well constructed.
He started by removing the phone housing. Those old enough to have used one of these devices will remember their bulk, and there’s a lot of unused space in both the handset and body housing. [Samimy] started by removing the speaker and microphone from the handset, and drilling a ring of holes to receive white LEDs. The circuit was wired so that lifting the handset turns on the lights.
But he didn’t stop there. A set of speakers and the audio amplifier circuitry from an old tape deck are also hiding inside the base of the phone. If you look closely in the image above you can see that he’s connected his cellphone and is listening to some tunes through the antique hardware. Take a gander at the video after the break to see construction and use of the project.
Filed under: digital audio hacks, led hacks
Very accurate clock can’t be read accurately

[Martijn] is showing off his new clock which he calls a Light Spectrum Clock. We like to look of it, using RGB LEDs in five squares that remind us of some of those LED coffee table builds. From left to right this shows the week, day, hour, minute, and second. Simple, right?
We had to smile a little bit when looking through his write up. He chose an Arduino nano as a controller, using a TLC5940 chip to drive the LEDs. But it is the inclusion of a DS1307 real-time clock that we find amusing. It will keep quite accurate time (not quite as well as the DS3232 but still respectable) but the fuzzy display technique makes telling the time accurately an impossibility. But like other color-based clocks, that’s part of the fun. The real reason for using an RTC chip is that they usually include battery-backed operation so that you can shut off the LEDs when you’re not around and the clock will continue to tick.
You can watch the seconds pass by as fading colors in the clip after the break.
Filed under: clock hacks
Modular controllers you can’t wait to show off to your friends

Let’s get this straight, [Alex] is going to show us how to make controllers like this one? Where do we sign up? Even without seeing it in action we want one, but the urge to build is even greater after he shows it off (check the clip after the break). He’s a design student who made an open source project aimed at making it easier to build hardware controllers that pair with just about any software application.
The need for external controllers is on the rise, starting with music-based applications like DJ tools, and Midi controllers for musicians (we’re thinking Monome clones). But anything that can take input from a USB HID can be controlled with something like this. That’s because [Alex] is using the Teensy controller board as an interface. Just select the input types you want – sliders, potentiometers, buttons, switches – then wire them up to the microcontroller pins. If you start to run out of inputs he also discusses some add-on chips to use as port expanders.
Of course there’s a lot to be said for the physical appearance as well. Even though he used point-to-point connections for all of the controls, that wiring is hidden behind the aesthetically pleasing laser-cut dashboard. Follow his advice for layout and find a friend with access to a sweet laser cutter and you’re in business.
Filed under: Microcontrollers, peripherals hacks
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...

