loading

Step 4: In Which We Try Not to Burn Our Fingers. Again.

You can choose any one of a million different ways to put a Ghetto pixel together, and I hope that you will. (keeping it on a Breadboard, Perfboard, PCB batch, DIY PCB, conductive thread, are all great options, please show us your builds in the comments!) However, if you need some inspiration, then this is how I built mine.

I knew from the start that what I really wanted to do was to mount the LED right on top of the Chip, but there are two problems with this. First, the legs of the LED don't line up with the Legs on the chip when you sit the LED on top, and Secondly, You need to put the resistors somewhere. Adding the resitors in, sort of solves the first problem because they can be used to extend the legs of the LED to reach the pins you need to connect too on the chip.  However, I had to be a bit careful with this, as I didn't want the LED 2cm above the chip, I wanted a close as I could get to make the whole package as small as it could be.

This meant some tight soldering, directly onto the legs of the Chip and the LED *gulp* these things don't like lots of heat! and what is worse, some heavy duty clipping of wires and legs so that only the barest amount of metal was left exposed.  If I had smaller resistors to hand, I would have used them, but I didn't and had to use some 1/2 watt whoppers.

You can sort of see the build process in the photos on this step.  I started with the LED in a "helping hands" croc clip. I bent one of the resistor's legs to 90o and soldered it as high as I could onto the LED leg, with the body of the resistor sticking out from the LED, not down. Once cooled, I clipped the leg of the LED off leaving only as much as I dared to in order to give the resistor enough mechanical strength to then be bent down so it can touch the pin of the uC.

This process was important because if the leg of the LED was left on, there is a chance that it could touch one of the pins of the uC, therefore bypassing the resistor.  Bad times. Clipping the legs off the LED was scary, but meant there was no risk of shorts.  Good times.

I found that there wasn't any really handy way of doing the resistor soldering, I had to hold the resistor in my fingers. Ouch, that sucker gets hot real quick. It's a constant reminder that no matter how hot your fingers are getting, the LED or uC is getting hotter, and you should use your Iron carefully and sparingly.

Once you have the 3 resistors soldered to the LED, and the LED pins have been shortened, put the Chip in the jaws of your vice and find the correct uC pins to solder the resistors onto. Do this carefully and more than once,  you need to be VERY sure you are soldering the right LED leg to the right uC pin.  Not taking enough care makes this into a very big and hot mess of solder and swearing.

Again, you should bend the legs of the resistors up and out (away) from the uC leg, so that they only just touch right at the base of the resistor and the top of the uC pin. YOU DO NOT WANT TO GET _ANY_ SOLDER ON THE THIN PART OF THE uC LEG (otherwise you won't get it to fit in a bread board or DIP socket again).

Get your pruning sheers out, and cut off the excess leg of the resistors so they are as trimmed as it is possible to be.   

Save one clipping of resistor leg, as you can use it to connect the common pin of the LED to the Vcc (or ground if you are rocking a common cathode) of the uC.  

stick your fingers in a cold glass of water. You are all done!

Stick the assembled Ghetto pixel back into the bread board, making sure you got it the right way round, and fire up the arduino, and sequencer, and let that lil'pixel glow.

If it doesn't work, then make sure:
  • You don't have any shorts, i.e. bits of metal touching other bits of metal that they shouldn't be.
  • You don't have any bad joints, i.e. bits of metal not touching bits of metal that they should be.
  • It's actually sitting in the breadboard properly. Now it has some solder on it, it's pretty difficult for it to actually make contact with the tracks inside the board.
I suppose if you've tried everything, then there is a chance that you've killed either the chip or the LED with heat, but I'm not the best dude in the world with the soldering iron and while i've burnt my fingers on this project, more times than I'll admit, I've not lost a component through heat yet. You could try reprogramming the uC with the LED still attached to see if it responds (should program normally), and you could try connecting a 3V coin cell between the pins of the LED (above the resistors) to see if that still works. I'll bet both are fine.

I'll (again) assume that you've got it working, I'm an optimist like that.

We could call it a day there, but I've got a couple of other things to show you.  Let's build it out!....
<p>So does this firmware work with all blinkM software BlinkMSequencer etc as i cant get anything working with the cyz firmware, whats the master firmware for? is that in place of communicator sketch?</p>
<p>You know ive been messing with electronics for years and never use resistors on my leds,never burned one out yet,honest i never use them,unless ime building a kit and there there ile use them but for breadboarding i never bother,i never use 5 v i use lipo wich is 4.20 most but thats enought people say but ive never melted any led,or blown an mcu and i conect them wrong way all the tme and my mcu still work,i must be just lucky lol</p>
Has anyone been able to upload a stand alone script to one of these ghetto pixels?
FYI : I've forked the original cyz_rgb project with a few fixes and extra functionality at https://bitbucket.org/Fanjita/cyz_rgb_fork.
Is it possible to run without an Arduno?
I could be wrong but I dont think the arduinoISP can be used to program a hex file. If it can then I have missed that :-)
Hello jimthree, <br> <br>I have been playing with this for the past 2 weeks... I have an attiny85 and im also using common anode but when I use the firmware that you have and also the one from CZY, it doesn't work. When I use the BlinkM flasher to burn... no problems and the works sequencer. I have no idea what im doing wrong. any insight? <br> <br>just attiny85 using avr burn-o-mate with the fuse off for the 8 divide. <br> <br>any information is helpful.
So, I've been eyeing this experiment for the past year, and this week, finally found enough free time to start playing. I'm not exactly having success quite yet, but I have the strange feeling I'm very close, and must be missing something. . . <br> <br>So I bought 20 of the ATTiny45, and some LED's. The LED's haven't come in yet, but the processors have. I thought I could start playing, using some LED's I had laying around. <br> <br>Okay, so after a little back and forth on the programming of the chip, I was able to get the Arduino as ISP working. I soldered a 8 PIN DIP to an Arduino Proto Board, and wired it up. I was able to flash it, and I had success. I disabled the CKDIV8 in the fuses. <br> <br>I hooked up the ATTiny45 to a breadboard, and then proceeded to wire it up. I loaded up the Arduino Sketch for the BlinkMCommunicator, and the Sequencer with no lights coming on. I crossed the Ground with each of the resistor legs to make sure I had power, and I did. <br> <br>So I dug into the sketch, and I was getting &quot;Looking for a BlinkM: No I2C devices found&quot; <br> <br>I loaded up the multi-track sequencer, and did a scan, and it didn't find any either. <br> <br>So, does this sound like an addressing issue? Anyone ran into this? Have any other ideas for me to check out? <br> <br>Thanks so much in advance. <br>
This is an awesome instructable, but I don't understand why you don't just use a WS2801 chip or similar, they are a fraction of the cost (About $0.10usd each) and they address themselves...There would be no need to burn each chip with firmware and an address..
As requested, here's a little demo of 7 pixels I have working. I would have had all 10 going but I ran out of resistors :( I just bought another 40 chips, so within a week or so I should have 50 pixels in all up and running (assuming none crap on me). I'll definitely post my final product when I'm done too! <br> <br>http://www.youtube.com/watch?v=IIGq40xvRec
Hey,<br>im using piranha common cathode LEDs, i can`t get it working :( <br>please help me <br>greets from germany.
No Problem! If you are using Common Cathode LED's then just use the original CYZ_RGB firmware from the downloads section of the website: http://code.google.com/p/codalyze/downloads/list<br><br>You don't need to use the firmware that I modified, because that's for the other type of LED's <br><br>Jim
what about the schematics ? still same ?<br>connect LED to PB 3/4/1 ? with resistors of course... cant get it workin :(<br><br>greets from germany!
Yea the schematics should be exactly the same. Have you checked that the LED is working? One thing I did when I was testing was to use individual LEDS and then you can bundle all the cathode's together to make a common cathode LED,. or all the anode's together for common anode. You really need to experiment with a breadboard. My guess is that if the LEDs you have are working, then the problem is going to (has to!) be programming the Chip. Make sure you know what you are doing with that. Tray and program a simple blinky light firmware on the chip. This might help: http://imakeprojects.com/Projects/avr-tutorial/<br><br>Jim
Hey,<br>AVR Studio 4 isn`t recognizing my USB tiny ISP.... what can i do ??? oO <br>if i flash the .hex via avrdude it gives me a &quot;success&quot; and a led lights up... <br>rgb led is connected to GND -- common cathode and the R, G,B with a resistor to PB 1/3/4<br><br>in BLinkM Sequencer, at scan I2C bus nothing is shown<br><br>help please!<br><br>greets from germany ^^
Sorry,<br>all working now :D Thanks a lot :D<br>but tell me, do i always have to connect ghettopixels--arduino--pc ??<br><br><br>greets
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.
try giving the original CYZ_RGB firmware a spin, you don't need my firmware for CC leds. you can grab it from the downloads section of the website: http://code.google.com/p/codalyze/downloads/list<br><br>Jim
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:<br><br>1. Open Edit &gt; 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. <br><br>2. If you want to change it, highlight channel 0 (the one you just set), select Tools &gt; Change BlinkM I2C Address, and enter the new address. The # along the left of the sequencer should change to.<br><br>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.<br><br>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? :)<br>
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.<br><br>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.
Yes, you'll need to have something that translates the serial output from the PC into i2C for the pixels. An Arduino does this very well, but you may find it's possible to make a BareBones Arduino (http://bit.ly/nJd3Xx), or even some custom Attiny firmware(http://bit.ly/rmCf8x) that that does this job for you, rather than tying up and Arduino. <br><br>Post some pics of your builds!<br><br>Jim
Can you power them all from the Arduino or do we need to hook them up to another power source? I'm thinking of you want multiple pixels on at the same time. I think the Arduino Uno can only supply about 40mA.<br><br>If so, how would you hook it up?
Hi,<br><br>I'm trying to build one of these but I try to use it with my own arduino Sketch. I connect the RGB pins to pin 1,3,4 on my ATTINY45. But on Pin 3 and 4 the led simply blinks instead of fading on or of. On pin 1 the LED fades in and out like it should. If I have read the specs for the ATTINY45 correctly, only pin 0 and 1 support PWM. Is this the reason? But how does it work with this blinkm firmware then? They don't use PWM to fade the RGB leds in and out?<br><br>My source for my arduino sketch:<br>int redPin = 1; // Red LED, <br>int greenPin = 3; // Green LED, <br>int bluePin = 4; // Blue LED,<br><br>// Program variables<br>int redVal = 255; // Variables to store the values to send to the pins<br>int greenVal = 1; // Initial values are Red full, Green and Blue off<br>int blueVal = 1;<br>int i = 0; // Loop counter <br>int wait = 15; // 50ms (.05 second) delay; shorten for faster fades<br>int DEBUG = 0; // DEBUG counter; if set to 1, will write values back via serial<br><br>void setup()<br>{<br> pinMode(redPin, OUTPUT); // sets the pins as output<br> pinMode(greenPin, OUTPUT); <br> pinMode(bluePin, OUTPUT); <br> <br> <br>}<br><br>// Main program<br>void loop()<br>{<br> i += 1; // Increment counter<br> if (i &lt; 255) // First phase of fades<br> {<br> redVal -= 1; // Red down<br> greenVal += 1; // Green up<br> blueVal = 1; // Blue low<br> }<br> else if (i &lt; 509) // Second phase of fades<br> {<br> redVal = 1; // Red low<br> greenVal -= 1; // Green down<br> blueVal += 1; // Blue up<br> } <br> else if (i &lt; 763) // Third phase of fades<br> {<br> redVal += 1; // Red up<br> greenVal = 1; // Green lo2<br> blueVal -= 1; // Blue down<br> }<br> else // Re-set the counter, and start the fades again<br> {<br> i = 1;<br> } <br><br> // we do &quot;255-redVal&quot; instead of just &quot;redVal&quot; because the<br> // LEDs are hooked up to +5V instead of Gnd<br> analogWrite(redPin, 255 - redVal); // Write current values to LED pins<br> analogWrite(greenPin, 255 - greenVal); <br> analogWrite(bluePin, 255 - blueVal); <br><br> <br> delay(wait); // Pause for 'wait' milliseconds before resuming the loop<br>}
Hi there Mister A<br><br>So let me get this straight, you are using an arduino sketch compiled for the ATtiny45, probably using the core libs from the MIT group? That's very cool, I've been meaning to play with this for a while.<br><br>You are correct in both your points. Yes, the Attiny45 only has two PWM timers available, and yes the blinkM uses PWM to control all three colours.<br><br>The significant difference is that blinkM's and the CYZRGB code that we use here implement software PWM, rather than than using the hardware timers. (to be specific, I think they use the two hardware timers, and then the blue channel is done in software) . Read up on software PWM, that should give you some ideas.<br><br>Jim<br><br>
Hi,<br><br>I would just liek toknow if this could be applied in the same manner to a Luxeon III Star Led like this one: <br><br>http://www.seeedstudio.com/warehouse/index.php?main_page=product_info&amp;products_id=194.<br><br>i am kind of new to the whole electronics/led world and i've kind of hit a wall here.<br><br>im trying to get together an RGB LED preferably a luxeon or cree with super high light output and control the color sequences.<br><br>please advise,<br><br>Much appreciated.
Whooo there! Nope, i've not checked the link you sent, but i doubt it would work. The atTiny chip would not be able to provide enough current to power the Luxeon Led. You would need to get a &quot;led driver&quot; or make one yourself using transistors. It's beyond the scope of this instructable <br>Jim
Hi Scott. your breadboard looks fine to my eyes, but I can't verify that you have the -ve line from the tiny85 plugged into the cathode on the LED. You can tell the common pin from looking at the bits of metal inside the LED from underneath. don't rely on it being the corner with the flat edge.<br><br>The junk you are seeing in the serial monitor is almost certainly due to the eron baud rate. try changing the baud and seeing if you can get any sense out if it.<br><br>As you are using common cathode LED's your best bet would be to head over to the CYZRGB project and download their binaries, don't use mine. <br><br>Jim
Hi Jim,<br><br>Thanks. If by &quot;-ve line from the tiny85&quot; you mean PIN4 (GND) tied to the LED cathode, it's not. They're both tied to a common ground, but not each other.<br><br>And yes that's what you meant, I'm not sure exactly what you mean in terms of specifics... if I wire PIN4 to LED cathode, they'll connect but there won't be anywhere for GND to flow to.<br><br>Or maybe you meant something else by '-ve'?
no, you are right, by -ve I meant ground. as long as bit the LED cathode and tiny85's GND are tied to a common ground somewhere, you will be fine. I think you should work out what is going on in the serial monitor first, as we know there is def. some problem there. <br>Jim
OH you're KIDDING me, Arduino IDE.<br><br>The Arduino IDE defaults to 9600 baud. The ThinkM script initializes serial to 19200 baud. Apparently the Arduino IDE can't detect this, self-adjust, or warn and so the text is garbled.. once I set the serial monitor to 19.2 I can read the output fine. Hopefully this helps someone else.<br><br>The LED still isn't doing anything, but at least I can start debugging it. Maybe I missed a setup step at the end. Feeling better at least :-)<br><br><br>Thanks<br><br>
Hmm..<br><br>Serial console works perfect if I base a simple sketch around:<br> Serial.println(&quot;Hello World&quot;);<br><br>Let me ask this.. Are you using 0022 IDE?<br><br>I see in the BlinkMCommunicator sketch code, there have been past issues with it not working on a Arduino IDE release (there is a comment of 0012 incompatibility fixes in blinkM_funcs.h). It might be that again, or something else I just don't see.<br><br>
I took the suggestion to use common-cathode RGBs, and followed this tutorial, but I get no joy. Something's wrong obviously, but not sure what. Could a second set of eyes spot the problem?<br><br>The Arduino Uno has BlinkMCommunicator loaded. No errors uploading it. When I enable DEBUG in the sketch and open the serial console, each time I rese the Arduino it prints this junk: &not;&Ouml;„&Ouml;o&Egrave;g&divide;&atilde;&Atilde;O&thorn;<br><br>The ATtiny85 uses the type 85 firmware for CYZ_RGB. No errors when flashing it.<br><br> Arduino:<br>Analog IN A4 -&gt; ATtiny85 PB0/PIN 5<br>Analog IN A5 -&gt; ATtiny PB2/PIN 7<br>5V -&gt; ATtiny Vcc/PIN8<br>GND -&gt;ATtiny GND/PIN4<br><br> ATtiny85:<br>PB5/PIN1 -&gt; empty<br>PB3/PIN 2 -&gt; LED anode A<br>PB4/PIN3 -&gt; LED anode B<br>GND/PIN4 -&gt; Uno GND<br>PB0/PIN5 -&gt; Uno A4<br>PB1/PIN6 -&gt; LED anode C<br>PB2/PIN7 -&gt; Uno A5<br>VCC/PIN8 -&gt; Uno 5V<br><br>I saw in one comment that the schematic should be exactly the same if you use common anode or common cathode. So I did not change anything. <br><br>The LED is good.. if I move the 150ohm resistor to 5V, that color lights up. <br>At this point I can't tell if it's an issue with the controller on the Uno, my wiring, or an issue on the ATtiny.
Attached are some images (having trouble uploading them using Google Chrome.. second try..)<br>
Hey all,<br>i build 10 &quot;BLinkm clones&quot; aka Ghettopixels.<br>now i want to place them in my floor and i want to use cat5 cable to connect them... will this work ? i got about 15meters length...<br><br>Thanks for upcomming answers
Hi, first of all congratulations and thanks for such a great tutorial!!!<br><br>My question is regarding a PCB boards. i see on this link (http://sjalbers.nl/Atmel/BlinkM/BlinkM.htm) that he has his mounted on PCB's. Ques: has he made these him self? if so how?? i really want to make some of these..<br><br>thanks<br><br>
Nice. And you made h-a-d. :-)<br><br>I just ordered most of the parts I needed for this... going to start by cloning 10.<br><br><br>For folks that appreciate this, there was another clone attempt of BlinkM someone did recently. It too is a nice effort (and includes a batch of custom PCBs): http://sjalbers.nl/Atmel/BlinkM/BlinkM.htm<br><br>Blinky stuff == AWESOME
I should point out for readers - this article text does not specify if the ATTiny45 should be 10PU or 20PU model.<br><br>I expect the 10PU is all that is needed (and if you notice, the author's bit.ly links actually link the 10PU model).<br><br>However, Mouser charges much less for the 20PU model ($1.87) vs the 10PU model ($2.30). <br><br>There may be other differences between the 10PU and the 20PU, however I can not qualify that (read the spec sheet). <br><br>Would be interesting to hear from some readers who made this..<br><br>
Thanks Scottinnh!<br><br>Yes good point, I was using the 10PU version because they were on special offer at my supplier, The 20PU's would be just as good, and could even be a bit better. I too would love to hear from anyone who has got a comparison. <br><br>Jim
You are totaly correct! The glass wall project was a great inspiration for this project, and I used his build notes for reference. I certainly should have mentioned that in the instructable, thanks for linking it out.<br>Jim
great project. Couple of questions<br>!st how do I stop the flicker? some colors are solid and others flicker alot<br><br>I am using your firmware for the common anode and I finally got everything working alright. I am using the sequencer and everything works except when In upload to the blinkm. It doesnt seem to be holding the program. It just turns a solid color. Have you had this issue?<br><br>thanks<br>bryan
HI,<br><br>The flicker could be due to the 'Clock Div by 8' fuse being set, which would mean the chip is running 8 times slower than it could be. Read up on fuses and perhaps download something like AVR Burn-O-Mat to set the fuses using a GUI.<br><br>Yes, the firmware will only hold about the first 5 bars of a sequence generated with the BlinkM sequencer, but not the full sequence. If you want to use it in a stand-alone context, you'd probably be better of buying a proper blinkM. The guys who wrote the CYZ_RGB firmware sacrificed some (most) of the storage area for better colour interpolation <br><br>Jim
great work - very complete - and with that little extra most people need to be successful doing someone else's project.<br><br>Wonder if a large surface mount type resistors would make it a little more compact.
Yes. SMD resistors would be great, but I wasn't able to buy them in the small quantities I needed, and I'm not that hot with precision soldering ;)<br>
Would it be possible to skip the resistors completely and just rely on a small duty cycle and high enough PWM frequency to avoid flicker?
I've done this without resitors before, but only when powered by coincells (such as CR2032). It's all about the current. LEDs will allow as much current as they can to pass through them, they have no practical resistance of their own in effect, if you don't use resistors you are shorting out the uC's Pins. This isn't a problem with CoinCells because they have so much internal resistance, they can't 'release' enough current in one go to damage anything. It's a different story with USB which can source 100mA or even 500mA. Without resistors, you'd hurt something very quickly. <br><br>Keeping the duty cycle low, may help but you'd end up with LED's that weren't nearly as bright as if you'd used resistors. That said, I'd encourage you to experiment, it's likly that you will blow something up, but if you are quick, you can feel it getting too hot and cut the power first before you let the magic smoke out.
I really like your idea. I looked into a DIY ShiftBrite, but it seemed too difficult and didn't save much $$. Question: couldn't you turn the chips over to get the LEDs closer?
Yes I guess you could get the LED closer, but it would make it much more tricky to solder. I liked the idea of still being able to insert the chip into a breadbiard or socket despite having a big LED sat on top of it.<br>Jim
&quot;If stuff melts or you let the smoke out, then smile and recognise that you've found the lower limits of the resistor you can use. It's all part of the fun.&quot;<br><br>Or it was faulty, congratulations you are a destructive testing expert :)
Nice Project! Well done.<br><br>Jules
yes yes yes. <br>im going to be building these very soon.

About This Instructable

28,387views

97favorites

License:

More by jimthree:Ghetto Pixels - Building an open source BlinkM The Seismic Reflector Mini Greenhouse Irrigation System 
Add instructable to: