Step 6: Add the control wires

This is probably one of the easiest steps! All you are doing is soldering wires to the 4 groups.

I used some pieces of wire about 6 in long. They don't have to be different colors but it can be helpful if anything goes wrong & you need to debug the circuit. You don't need some header pins, but if you want some feel free to use them.
<p>In file included from sketch_apr27a.ino:1:0:<br><br>sketch_apr27a.ino:48:21: error: variable 'displays' must be const in order to be put into read-only section by means of '__attribute__((progmem))'<br><br>Fout bij compileren.</p>
pretty good to use pins as input for a &quot;no HIGH/LOW&quot; value.
Are the resistors there to protect the LEDs? If the arduino is using around 3 volts then can we skip them? I made a cylon eye scanner that works fine with no resistors. I'm using blueish white xmas light LEDs, so they might take higher voltage anyway.
I know this question is ancient by now but just in case some one else is looking at this tutorial I'll answer it.<br><br>The Arduino uses 5V not 3 so you do need the resisters. <br><br>Your christmas tree leds either have resistors in them somehow, are a higher voltage or... Shrug, you got luck somehow...
Are the resistors that important to led's? ive been using mine for simple light-up projects with an arduino uno and havent hade any problems. Either way if it did start smoking i think i would stay it was part of the design.
the problem with a burnt diode is that is will get closed &quot;XOR&quot; opened circuit, this in charlieplexing would be veeeeerey painful, because you will get some sequences to light o not light completely, and unles you are using high brightness LED (wich are transparent so you can sometimes identify a burnt one just by looking at it and seeinga a black spot where anode and cathode meet) it wil be difficult to find out wich one is the defective LED. And charlieplexing is intended for HIGH quantities of &quot;matrix points&quot; and they end up being a HIGH quantity of LEDs to check in case any of'em fails. So use resistors for good practice.
Giving too much voltage and/or amperage to any electronic can kill it. You do not always need a resistor though, it depends entirely on what the voltage and amperage rating on the LEDs are, whether they are connected in series or parallel and what voltage your supply is.
i am not able to download the code... it is downloading as .tmp format and not as .pde
Mine did the same thing. Just re-name .tmp to .pde
Found this to be a very useful instructable, although I found the diagram a little hard to follow. I had a crack at a version myself and came up with the following. I've colour coded the pin outs which has helped me with visualising <br>Charlieplexing. <br>My plan is to have play with the code to see if I can improve the bounce of the larson, and perhaps port it to an ATTiny rather than monopolising an Arduino!<br>Great instructable by the way. Having a look at your new ones now!
Your schematic is backward from the instructable. You have pin 1 going to LED1, LED2, LED3 and the instructable has pin 4 going to LED1, LED2, LED3. Pin 2, pin 3 and pin 4 of the Arduino are also flipped (i.e. 1 to 4, 2 to 3, 3 to 2, and 4 to 1). <br> <br>Additionally, you both use pin 1, 2, 3, 4 in your schematic and then use 0, 1, 2, 3 in the code. <br> <br>Lastly, neither of these schematic allow the program to work in all three modes. <br> <br>Am I missing something or was this just a very poor example of charlieplexing. It is complicated enough without getting contradicting info.
The schematic you've commented on and the instructable have different authors, hence the differences. I went away to try to get my head around charlieplexing and that's what I came up with independently and as it helped me understand the concept, so I thought I'd share it. It was my first attempt and I've improved it since. With the new one below. The pins are labelled ABCD in this version...<br> <br> The instructable is a really good example of charlieplexing and helped me a lot. It's not the only resource I used to understand the concept.
The schematic above is very well done. Congrats!
How could I do this with 22 LED's?
you would expand the circuit using charliplexing.<br>(a good explanation is here <br><br>http://uzimonkey.blogspot.com/2009/01/charlieplexing-on-arduino.html<br><br>to figure out how many pins you need, well the relationship for pins to leds is<br><br>y = x^2 - x<br>with y being leds, and pins being x.
Got me back to my highschool days, several decades ago. For those having trouble calculating that:<br>{1+root(1+4y)}/2 or<br>{1-root(1+4y)}2<br>(and then take the positive number)<br><br>so for 22 LED's this would be 5.7 lines (=6) -&gt; 22 is an ineffecient number of LED's with regard to the number of datalines<br><br>3 lines wld service 6 LED's<br>4 lines wld service 12 LED's<br>5 lines wld service 20 LED's<br>6 lines wld service 30 LED's
open it with notepad and copy it to your arduino program, should work
also on a different point, is it possible to change the pins used? I see that there is a place to define them, but even if i change them there, it does not change it.
I made it and got it all working without any modification of your code. I went through labeling each LED, using the turnon() function. When I ran turnon(12); it turned on the LED that I had previously labelled as 4. I figured my soldering or something must be wrong... BUT, when I ran the sequence, it ran correctly, all I had to do was place LED 12 in front of LED 1 and then it works. I am very very confused. John
I wired everything together, all the leds can turn on, and the cylon scanner works, but when certain leds turn on, other random ones will glow dimly. Is this because I left out the resistors or does it mean there's a short somewhere? This is my first charlieplexing project and although it's not perfect, I'm still glad it partially works. thanks!
It's easy to include some type of PWM dimming as Charlieplexing is already a type of duty mode. If counter is higher that fade value, just skip that LED this time.<br> <br> I have 8bit level PWM here:<br> <a href="http://www.youtube.com/watch?v=8apRaZQbv5w " rel="nofollow">http://www.youtube.com/watch?v=8apRaZQbv5w </a>
&nbsp;Yes, I managed to make it work.! Thank's al lot, for this great instructable, :)
&nbsp;Code doesn't work with my arduino, it gives a error.&nbsp;<br /> Nice instructable!<br /> <br />
I&nbsp;know it would be a pain to change at this point but your schematic is a bit confusing.&nbsp; I&nbsp;think you call it &quot;Circuit Diagram.png&quot;.&nbsp; It appears the red wire coming from pin 3 through the resistor is going to BOTH the anode and cathode of the three pins it's attached to.&nbsp; After a little thought it's clear you meant it to go only to the cathode but this might be more confusing to somebody else.<br /> <br /> Great instructable.<br />
&nbsp;Thanks for pointing that out. I just changed that. Fortunately I still had the Eagle CAD file.
Sweet!&nbsp; Clever design. Great instructions.&nbsp; Great photos.<br /> <br /> Nice work.<br />
An easier way is to put half the resistance into each of the wires, and then you can swap the polarity of 2 neighbouring LEDs to get less of the looping around connections happening.<br />
&nbsp;Brilliant! &nbsp;Thank you.<br /> <br /> Seems to be a relatively 'simple' how-to. &nbsp;I've been wanting to do this for a while but have been a bit bamboozled when it comes to actually wiring it.<br />
Dude, I'm thinking that we need to replace those LEDs with some 12 volt relays and wire up some real lights onto the back of the car! :-)<br />
&nbsp;That would definitely&nbsp;be something! You would need a diode for each relay. The reason charlieplexing works, is LED's are diodes so current only flows one way through them.&nbsp;
looks fun and complex O_o<br />
&nbsp;It is really fun! It Definitely isn't the easiest thing I've built, But I think it was worth the effort.

About This Instructable


119 favorites


More by computergeek: DIY Apple Remote (Slideshow for the instructable) DIY Apple Remote Shield for the Arduino Simple 2-way motor control for the arduino
Add instructable to: