May 26, 2008 4:17 PM   Subscribe

I'm interested in learning how to wire LEDs and program/control them.

I want to learn how to wire a lot of LEDs together and then program or otherwise control them, so that I can trigger certain ones to go on or have them play in sync with music, or something of that sort. Preferably I'd like to be able to control the lights by hand through some sort of device/interface. I don't really know much, if anything, about electronics and programming. The most I can do is solder a couple LEDs to a battery and have them turn on. What resources should I turn to to get started?
posted by god particle to Technology (10 answers total) 30 users marked this as a favorite
Arduinos are great for this, but so are lots of other approaches. It's a great entry project into microcontroller programming. Instructables is a great place to start looking for LED projects and checking out the different platforms/methods people like to use. If you're interested in persistence of vision at all, there are some great projects here.
posted by Your Time Machine Sucks at 4:42 PM on May 26, 2008

You need to learn the design and construction of simple circuits as well as the programming of a microcontroller. It's a hefty load coming from no electronics and no programming.

The standard book for the first thing is the Art of Electronics by Horowitz and Hill. Then you need to learn programming. You may need a basic understanding of how a processor works because you may end up programming in assembly (I don't know how the Horowitz and Hill chapters on processors are - in any case any practical specifics mentioned will be out of date.) Otherwise you'll probably be programming in C. Here's a free IDE for Microchip PIC chips that will let you try the assembly programming and run programs on a simulated chip. These microcontrollers come with all levels of features and complexity so that's a decision. If you're syncing with sound, for example, you'll need A/D and signal processing functions. Depending on the chip you might just hook it up and program it or you might need a programming module. You can even buy "In Circuit Emulators" that directly connect your computer's emulated chip to your actual circuit in place of a real chip while you program and debug.

You can either build a physical control panel or control via the computer - again you can buy different options to communicate with the computer but at a minimum you'll probably be able to use a serial connection.

If it's a lot a lot of LEDs you'll probably need subsidiary driver circuits or even subsidiary microcontrollers depending on what you're going for.

For parts: some key online vendors are Digikey, Mouser, and Jameco.
posted by TheOnlyCoolTim at 4:51 PM on May 26, 2008 [1 favorite]

Don't spend any money on H&H. I can't stand the thing. Work up from the Schaum's for a bit, but then focus on implementing others' plans for a while. Evil Mad Scientist Laboratory are two enthusiasts who have made a venture of offering their open-sourcey LED get-up's, among other things. Maybe you could have a look at that, and imagine using their kit.

Actually, yes. If you are determined to do this, buy the kit, and feel no remorse for starting halfway done. There is still much more left.
posted by gensubuser at 4:56 PM on May 26, 2008 [1 favorite]

I like Horowitz & Hill, but it's more low-level and hardcore than you need for making interactive blinkythings with a microcontroller. You could read a chapter or two of it from the library and see if you enjoy its style.

Arduinos are great and pretty popular right now so lots of how-tos are written around them. The BASIC stamp is something else you could look at, though I'd recommend the arduino over it.
posted by hattifattener at 5:40 PM on May 26, 2008

I heartily recommend the BASIC stamp for a beginner. I had a senior with no real electronics or programming experience go through the entire Stamps in Class kit and then design a hardware UI for a software mp3 player.
posted by plinth at 5:43 PM on May 26, 2008

I respectfully disagree that it's a good idea for a enthusiastic new hobbyist with a project in mind to start out by first attempting to learn electronics + programming + assembly.

I would start out by finding the clearest, most beginner-friendly tutorial you can find for a simple LED project and pick up the stuff on that tutorial-writer's manifest, and build it on a breadboard so you can easily un-make your mistakes. With the voltage on a microcontroller, you won't blow yourself up if you do something silly. For the cost of schoolbooks on electronics, you can get more than one microcontroller. Join a forum and write a bunch of questions that start "Total newbie here, would anyone mind explaining exactly what is meant by...". In the microcontroller communities I've seen, people will help you.

When you have enough open questions about why it works (actually making it work is not hard), then get the books, or learn from online resources if you'd rather spend the money on a nice soldering iron.
posted by Your Time Machine Sucks at 5:57 PM on May 26, 2008

Instructables, baby.
posted by DenOfSizer at 6:19 PM on May 26, 2008

The Arduino referenced above really is a great way to do this. Check out these chips too, very useful if you want to do any sort of 'matrix' display with them. (You can order free samples of these chips which is a bonus. They sent mine right away and so far no nasty marketing or anything) There's already Arduino code for them too.
posted by christy at 6:34 PM on May 26, 2008

I want to do the same thing, and I've always drooled at the Phidgets LED64. Hooks in to your computer with USB, programmable in a bunch of different languages (Python! yay!). and looks pretty awesome. Way easier then making your own PCB.
posted by Mach5 at 7:19 PM on May 26, 2008

Yeah, I nth Arduino. It's based on AVR-GCC for the Atmel AVR series of microcontrollers, which are used frequently in The Real World, so any skills you learn with Arduino will still be valid if you decide to move beyond it, and it's a great platform to get started with. The first few tutorials on their site deal explicitly with LED control.

Depending on how many lights you want to control and how, you may eventually graduate to using, say, I2C to control a dedicated LED controller chip, but to start out, an Arduino is probably a good place (and the AVR chip on your Arduino can do I2C with very little extra work, so if you decide to go that route, you're all set).

Also, nthing Evil Mad Scientist Labs. I haven't used their LED board, but I'm told it's at the point where it's firmware-compatible with Arduino? Also, they have wicked businesscards (who else gives you a business card that works as an ATMega168 development board?) and are generally awesome.
posted by Alterscape at 7:33 AM on May 27, 2008 [1 favorite]

« Older Looking for fiction about horrifying and unusual...   |   Which path to a career in libraries: diploma or... Newer »
This thread is closed to new comments.