DIY S.O.S. Beacon for Everyday Use

I recently sat down with a friend to discuss plans for an Infobox at his art space near downtown Albuquerque. You know, a free sort of box in which to put zines, audio cassettes, revolutionary materials, or whatever, all for 24-hour public access. During this process I began to wonder about a kind of universal symbol or beacon that might be co-opted by other likeminded individuals concerned about the state of affairs in our nation and abroad. Jokingly, I suggested an SOS beacon — we could just leave it on perpetually, signifying a constant state of distress. Well, here we go.

It’s mostly made out of free or garden-variety radioshack parts, which should make the thrifty happy. For the sake of variety it uses multicolored lights and varies its speed with the ambient temperature. The housing is from a blown lightbulb, the power supply’s from a junk cellphone charger, and the whole thing’s held together with hot glue! Complete details after the jump.

Central to this project is an Atmel ATtiny25 microcontroller (like a wonka-visioned Arduino, which is built around Atmel’s ATMega328). This little guy has 2k of flash and only 128 bytes of ram, but this is plenty for this simple project. I have it running at 8 MHz, which is fast enough for it to pulse the lights on and off to fake 256 levels of brightness (you know, PWM). You do need a programmer dongle to work with tiny microcontrollers like these, but that’s not too big a deal — you can get a DIY kit from adafruit for like 20 bucks.

The thermal part is accomplished by connecting the collector of an NPN transistor (I used a 2N4401) to a low-value resistor, connecting the collector side of the junction to the ADC line of the microcontroller, the emitter to ground, and installing a 10k thermistor from the collector to the base. This way, as the resistance on the thermistor changes, the amount of current dumped to ground changes as well, which you can sample in your program. You could also be more primitive and use a voltage divider with the thermistor instead of a transistor, but this is just how I decided to do it. Actual values for hot, cold and room temperature were determined by using the same circuitry but with an Arduino, which can super conveniently dump info to your computer via USB.

The microcontroller doesn’t have enough juice to run the LEDs directly so instead its output pins are connected to the bases of three 2N4401 transistors through 330 ohm resistors. The transistors’ collectors are connected directly to the +5V rail and the emitters run to the LEDs, the channels of which are paralleled together. Each channel on each LED has a resistor, naturally, to control the amount of current running to it; just make sure you don’t exceed the either the maximum rating for your LEDs (25-30 mA for mine), or the maximum rating of your transistors (600 mA, for a 2N4401) and that the totals for all your channels is well within the range of your cellphone charger (1 amp, for my LG unit).

Everything else is programming errata, and the curious can download all the sourcecode:


Happy labor day!

About these ads
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s