__ __         __            ___           
  / // /__ _____/ /__  ___ _  / _ \___ ___ __
 / _  / _ `/ __/  '_/ / _ `/ / // / _ `/ // /
/_//_/\_,_/\__/_/\_\  \_,_/ /____/\_,_/\_, / 
retro edition                         /___/ 
Now optimized for embedded devices!
About Successes Retrocomputing guide Email Hackaday

USB host mode for Droid

posted Feb 10th 2010 12:00pm by
filed under: android hacks, cellphones hacks

There’s a simple hack to use your Motorola Droid phone as a USB host. It is a hardware-only hack that doesn’t require you to crack open your phone, root it, or even to change firmware (although device drivers in the stock Android image may be quite limited). The dongle above is used as a key to enable the mode while the phone is booting. This was repurposed from a car charging cable by removing the wires and resistor and shorting the resistor pads. Once the phone is in host mode the dongle is swapped for a simple USB-mini to USB-A socket adapter, built from two cables you probably have lying around. Now you can plug in any device you want.

[Thanks Freezer90]

electromagnetic coil gun

posted Feb 17th 2005 3:00am by
filed under: misc hacks

coil gun
remember greg the high voltage hacker that brought us the homemade night vision scope?  one reader commented:

Greg is a great guy with a ton of ingenuity. He is an inspiration for all high-voltage enthusiasts, and is the only person i know to have constructed a working Tesla coil out of nothing but junk. He is a Class-A hacker!

with a comment like that, and a few other tips i’ve recieved, i figured i should take a closer look at the other articles on his site.  his electromagnetic coil gun howtos are of particular interest.  on his site, they come in two sizes, small and large.

The total peak energy storage for this system is 1874 Joules, the same amount of caloric (not mass) energy found in 4.7 tablespoons of SKIPPY peanut butter. For reference, my other coil gun’s peak energy was 55 Joules or 0.14 tablespoons of peanut butter

Make any photo 3D using The Gimp

posted Feb 27th 2012 9:01am by
filed under: digital cameras hacks

Put your face close to the screen and cross your eyes until the two images above become one. You may need to adjust the tilt of your chin to make it happen, but when they come together you’ll see [John Lennon] pop out in 3D. This was made using a 3D rendering script for The Gimp.

The process is not entirely automatic, but it won’t take too long to mask off the outlines for different depth layers. The script makes three different layers from the image. One of them is a color-coded depth map that uses a custom color palatte to choose distance for each item. If you paint the background dark blue it will be processed at the furthest distance from the viewer’s cross-eyed perspective, yellow is the nearest.

[Don] mentions a parallel output and a cross-eyed output in his write up. We understand the cross-eyed version, but are just guessing that the parallel version would be used in a stereoscopic viewer that puts a partition between the two images so that each eye sees a different frame. You know, like a View-Master.

How-To: Binary clock using a Freeduino SB 2.1

posted Jun 6th 2008 7:00pm by
filed under: classic hacks, how-to, misc hacks


Solarbotics recently released its own version of the Arduino microcontroller development board. They based their board on the Freeduino design. We thought this would be a good opportunity to review the new board as well as present a How-To about building a simple binary clock. Along the way we’ll cover some basics on attaching LEDs and switches to a microcontroller.

If you haven’t heard about Arduino, you must be trying really hard to avoid it. Arduino is a package of hardware and software that allows easy programming and fast prototyping, lowering barrier to entry for microcontroller development both in terms of cost and learning curve.

There are two types of Arduino compatible boards. The “software” compatible boards do not have the exact same physical layout, but they can run the programs generated by the Arduino IDE. They also have a compatible bootloader on the AVR chip. Examples of this type of board are the Boarduino and the Arduino Mini.

The 100% compatible boards have the header pins in exactly the same position and order as the Arduino reference design. The reason that this is important is that there are Arduino “shields” which plug on top of an Arduino. Popular ones are the ProtoShield and the XBee shield. The Freeduino SB is the latter type, a 100% hardware and software compatible board.

So if it’s 100% compatible, why is it a Freeduino and not an Arduino? It’s a matter of licensing. While the Arduino software and designs are free (as in beer), the actual Arduino name is trademarked and requires permission to use. For some people that wasn’t free enough, so they created Freeduino under the Creative Commons license, which has zero intellectual property encumbrances – no copyright, trademarks, or restrictive licenses. That allowed Solarbotics to build a Freeduino and be sure that they weren’t infringing on anything.


The Freeduino comes as a “mini-kit”, which means that all the surface mount components are done, leaving just over a dozen through-hole parts to solder on. The instructions are humorous and well written, just right for someone who knows how to solder. The Freeduino was at least as easy to assemble as a Boarduino, and took less time. It’s possible to assemble the board in under an hour, even for someone out of practice with soldering skills. While the instructions and ads say that you can use either a regular USB jack or a mini-jack, the kit does not come with both. Instead there are two versions of the kit, so you have to decide before you buy which USB connector you want. Our kit came with a USB mini connector.


Here’s the assembled Freeduino (in red on the right) next to a (slightly damaged) Arduino NG. The PCBs are the same size and shape. Note the difference that the USB connector makes.

It turns out that the choice of USB connector can effect the compatibility of the Freeduino board. Because they shifted things around, the regular sized USB socket casing bumps into some Arduino shields, so they might not fit. As the manual says, “Our design pushes the USB-B connector up to make room for the switch, and it will interfere with some Shield boards.” The USB mini connector doesn’t have this issue, so if the right cable is handy, it’s a no-brainer which one to get. Many common cellphones and digital cameras to use this kind of connector.


Here are three USB cables: regular, mini, and micro. The middle one fits the USB mini connector on the Freeduino.

A nice feature of the Freeduino is that the ATmega chip comes pre-loaded with the “blinky” program (this is the “hello world” of the Arduino universe). Once assembled, powering up the board immediately runs the blinky program, showing right away that the board is operational.

While all Free/Arduino boards are compatible, it is possible to add features, as Solarbotics proves with this board. Generally, the Freeduino they put together is an improvement over the current generation Arduino Diecimila. Most users won’t really notice the better use of capacitors for circuit protection. They will notice the better placement of the indicator LEDs, which are closer to the edge of the board. The power switch is slightly misleading. It seems to sit between the voltage regulator and the ATmega chip. Even with the switch in the “off” position, a little power is still being used.

Those who use the Freeduino for real-time applications will appreciate the much more accurate 16 MHz crystal, which has about 1000x less error than some other designs. The PCB also has some room for customization, which will be useful for those trying to build compact projects. There is room to add a potentiometer (trim pot) that can set the analog reference voltage for the AD converter. Note that the kit does not come with this part. When working with non-TTL sensors the trimpot could save a few external parts. Solarbotics also left room to add a second, heftier voltage regulator, if needed. However, it’s not clear what the limits of the one on the board are.
The feature that they seem proudest of is the blue LED on pin 13.

Since the Freeduino has a more accurate crystal, we decided to see how it would perform as a clock. A binary clock is the easiest to implement because the display is just a row of identical LEDs. Each LED is wired to a pin through a resistor and hooked to common ground. The digital output of the controller can then turn the LED on and off. This calculator helps choose just the right resistor value, but there’s enough leeway for a resistor that’s pretty close. Note that the polarity of the LED is important.

A clock isn’t much use if you can’t set it, so this clock includes two switches. One switch selects which number to set, and the other switch is used to set the value. The switches are wired using a pull-down resistor. [Ladyada] has a long but thorough tutorial on using switches. The switches need to be debounced, but we took care of that in software. That’s about all there is to the hardware setup. Note that we used some of the analog pins as digital I/O. The chip supports this and the latest version of Arduino software does too. Be sure to use at least version 11 of the Arduino package or the buttons will not work.


The Arduino software environment runs as one big loop. Each time through the loop, our program does the following:

The count of milliseconds is kept for us by the Arduino library using a timer interrupt. It’s not quite as simple as it seems at first, because the Arduino milliseconds counter can roll over. So there’s extra code to detect and handle that condition. Then all we have to do is break it down into hours, minutes and seconds.

Handling the buttons turns out to be the trickiest part. First of all, we only want to act when the button is just released; not when it is up, held down, or just pressed. Second, the buttons have to be debounced. Debouncing is a whole separate subject which deserves an article of it’s own. We used a software debouncing trick that waits for an input to stabilize. For those who want to learn more, the definitive paper on the subject is here(PDF).

Displaying the time is actually the easiest part, since all we have to do is set the various pins according to the bits in the time variables. The entire program is available here(PDE). The Arduino IDE compiles and downloads it to the board with just a couple of clicks.

After downloading program, or resetting the board, the clock starts up right away and begins counting seconds. The display is three sets of LEDs showing binary numbers. The leftmost 5 show the hours in 24-hour (military) format. The middle six display the minutes, and the last set is for seconds. The clock can be set with the two buttons. Button 1 selects which part of the time to set: hours, minutes, or seconds. Pressing button 1 rotates through each part. The set of LEDs that are being set will flash briefly. Button 2 is used to actually change the value. For hours and minutes, button 2 will increment the value each time it is pressed. That does mean that it may have to be pushed up to 59 times to set the minutes. When setting the seconds, button 2 just resets them to 0. We thought this was easier to synchronize than trying to catch a moving number.

In order to prevent accidentally changing the time, the software implements a “safety.” If no button is pressed for about 3 seconds, then button 2 is disabled until button 1 is pressed again. Pressing button 1 when the safety is on will flash the set of LEDs currently selected and turn button 2 on again.

Just to see if the more accurate crystal makes a difference, we ran the exact same program on the Freeduino SB and then a Boarduino. The boards were set and compared using a radio controlled “atomic” clock as the reference time. Here’s a picture of the Boarduino running the binary clock:


The Boarduino did surprisingly poor job at keeping time. Without correction it gained over a minute per hour. The Boarduino uses a resonator that can have up to 0.5% drift. We had to apply a “fudge” factor of 0.85% to keep it from drifting noticably. Even then it tends to gain a few seconds over the course of a few hours. The Freeduino did much better; drifting only a couple of seconds during a five hour run. So the more accurate crystal does make a difference.

There’s lots of room for enhancements to this project. We used a prototyping breadboard with lots of jumper wires, but there are plenty of better ways to wire it up. It could even be implemented as a shield.

We hope that this how-to was useful as both a review of the Freeduino SB board and as an example of simple micro-controller input and output. Happy hacking.

Mayor is a hacker and wants to use DIY parking meters

posted Apr 8th 2011 6:05am by
filed under: transportation hacks

The Mayor of Silverton, Oregon is a hacker and wants to use roll-your-own hardware in the town’s parking meters. It’s not that he thinks he can do a better job than companies selling modern meters (although there have been notable problems with those), but he wants to retain the sentiment of the 1940′s era parking meters that are being replaced. Those meters are known as penny parking meters, because you can get 12 minutes of time for just one penny.

Many municipalities have gone digital with parking payment systems due to costs associated with servicing mechanical meters and collecting coins from each one of them. This hack aims to keep the look of the vintage meters, but replace the mechanical readout with a digital screen. The meter would still offer a reasonable parking deal; five minutes for free. Cost for replacing the internals is estimated at $150 per meter… which seems just a bit high if they are looking at a 250 unit run. The main problem that we see with the idea is that the original parking meter bodies don’t have a slot which can accept quarters.

[Thanks Rick]


(c) 2014 hackaday.com. All Rights Reserved.