3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Ghetto Pixels - Building an open source BlinkM

Step 3Bread and Butter

Bread and Butter
«
  • IMG_1054.JPG
  • IMG_1116.JPG
  • IMG_1048.JPG
  • IMG_1049.JPG
  • IMG_1050.JPG
  • IMG_1052.JPG
  • IMG_1053.JPG
  • ATtiny45_l.jpg
  • last photo ←
»
If you were paying attention in the last step, you may have got a clue from the photo there, about what we are now going to build. Grab yourself a bread board, and wedge your freshly programmed Tiny45 in the middle of it, straddling the divide.

Next, get your LED and give it's underside a good close looking at, with a magnifying glass if you need to. Inside the clear plastic, one of the four pins is wired up differently to the other three. (see the photo) This is your common pin (i'm assuming, like me, you are using common anode LEDs). Make a note of this pin, don't loose it.  Push the LED into the bread board, at an angle of about 45 degrees, this allows each pin of the LED to sit in a different track on the bread board. Now remove the LED again, because you've forgotten which pin is the common,  find it, and push it back in again.

Grab the Tiny45 datasheet, or specifically this image, and with a bit of wire, connect the Common Anode pin to the same track of the breadboard that the t45's Vcc pin is sitting in.

Next, use the your resistors to connect the other three pins of the LED to ports PB1, PB3 and PB4 of the chip.

Now Grab your Arduino, and connect the 5V and Gnd to the chip's Vcc and Gnd tracks. This provides power for your Pixels. Next, connect PB0 on the chip to the Arduino's Analogue port 4, and PB2 to the Arduino's Analogue port 5.  This is the I2C connections, the data bus down which instructions are sent to the pixels

Use the photos I've included as reference.

Now that everything is wired up, you should connect the arduino to a USB supply, and let the power flow!  If it all goes well, you should see... er... nothing. perhaps a little flash from the LED as you power it up, but otherwise nothing at all. Don't panic, we should be all right.

Load up the BlinkM sequencer you downloaded in the last step, and in the file menu, select "connect to arduino".  It will ask you what COM port, and you should enter whatever the arduino is on (help!).  When the status text in the very bottom right of the sequencer window tells you it's connected, hit any colour on the swatch panel.  Bask in the light of your own creation, as the LED glows forth.  Or not.  If it doesn't ( and it should) there is something wrong. Check these things:
  • You have the I2C lines plugged in the right way round.
  • Check the Fuses on the ATtiny45.
  • Reflash the BlinkM communicator Sketch onto the arduino and then connect the sequencer to the arduino again.
  • You are using the right code for the right kind of LED? (Common Cathode, or Anode?) 
  • Check all your cables.
Every time I built a new pixel and tested (admittedly, I've only built four so far) It didn't work.  But every time it didn't work it was because I'd either forgotten to unset the "Clock Div by 8" Fuse in the uC or I'd screwed up the wiring. (Once it was because I thought I'd been clever and made some mods to the BlinkM communicator sketch on the arduino.  Keep it fresh kids, use it right out of the tin until you know what you are doing.)

I'm going to assume that you've just spent five minutes cursing, quietly, and then suddenly low and behold the light shines on!

Awesomeness in the supreme! You have built a Ghetto Pixel!

Next up, lets look at making this a bit more permanent, grab your iron, we're going a solderin'...
« Previous StepDownload PDFView All StepsNext Step »
5 comments
Jul 26, 2011. 4:23 AMmrtsunami92 says:
Hey,
im using piranha common cathode LEDs, i can`t get it working :(
please help me
greets from germany.
Jul 28, 2011. 11:57 AMmrtsunami92 says:
what about the schematics ? still same ?
connect LED to PB 3/4/1 ? with resistors of course... cant get it workin :(

greets from germany!
Jul 30, 2011. 10:04 AMmrtsunami92 says:
Hey,
AVR Studio 4 isn`t recognizing my USB tiny ISP.... what can i do ??? oO
if i flash the .hex via avrdude it gives me a "success" and a led lights up...
rgb led is connected to GND -- common cathode and the R, G,B with a resistor to PB 1/3/4

in BLinkM Sequencer, at scan I2C bus nothing is shown

help please!

greets from germany ^^
Jul 31, 2011. 6:57 AMmrtsunami92 says:
Sorry,
all working now :D Thanks a lot :D
but tell me, do i always have to connect ghettopixels--arduino--pc ??


greets
Mar 26, 2012. 8:16 PMagr00m says:
I'm having a similar issue with a common cathode LED except mine isn't even blinking when I connect it. I know i have the chip programmed correctly and fuses set, but I'm thinking it has to do with the common cathode wire, do you just have it hooked to ground? Maybe if you just told me what you did to finally get it working.
Mar 27, 2012. 7:08 PMagr00m says:
Yeah, I was using that one. I just finally got it working and wanted to post my findings. The current hex file must have the default address set to 0. So when starting the sequencer, you have to do this:

1. Open Edit > Edit Channel IDs and change at least one channel #s to 0 (easiest to just do the top one). This will make one of the sequences on the main screen address 0 and now should be tied to your chip/LED.

2. If you want to change it, highlight channel 0 (the one you just set), select Tools > Change BlinkM I2C Address, and enter the new address. The # along the left of the sequencer should change to.

3. If you go back to Edit Channel IDs, the LED should now glow the color of the channel ID in the list. If not...it's just a matter of continually trying to reset it. Some of them I had to close/open the sequencer, reconnect the Arduino, etc. but you'll eventually get it. The key though is to see if it glows the correct color when opening the Edit Channel ID menu.

Next I need to figure out how to run them from a single chip with pre-programmed sequences that I can control using like a push button switch to toggle through them! Any idea where I might find a tutorial on that? :)
Mar 27, 2012. 3:15 PMagr00m says:
Oh, I also wanted to ask, do you know how to hook them up so that you can run a string of them at the same time? I know the Arduino can only supply about 40mA, which is technically probably not even enough for 1 RGB if you're doing bright white.

If doing common Annode, I would think you just connect that to an external power source, then tie in the ground to the ground on the arduino. But for common Cathode, I'm not sure how you'd do that.
Nov 15, 2011. 12:30 AMcorrupt85 says:
Hi,

I would just liek toknow if this could be applied in the same manner to a Luxeon III Star Led like this one:

http://www.seeedstudio.com/warehouse/index.php?main_page=product_info&products_id=194.

i am kind of new to the whole electronics/led world and i've kind of hit a wall here.

im trying to get together an RGB LED preferably a luxeon or cree with super high light output and control the color sequences.

please advise,

Much appreciated.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
14
Followers
3
Author:jimthree(jimblackhurst.com)
@jimthree