LED Cylinder
Uncategorized
Add comments
Jul 262008
Last night as we were preparing for the party, Eric broke out his camera and took this cool video of my LED Cylinder project. Thanks Eric!
More details on the project, including schematics and sourcecode, are available at http://dclausen.net/projects/ledcyl/.
If you want to learn how to make projects like this, check out our classes! We have several electronics and LED classes coming up, including Introduction to LEDs next weekend and Building LED Displays the weekend after that. Also you should come to our Party / Art of the Game Gallery Show tonight (Saturday, July 26, 2008) to see this project and a bunch of other cool things on display.
71 Responses to “LED Cylinder”
Comments (70) Pingbacks (1)
Will you also publish the schematics for the microcontroller board?
I am wondering how you made a charge pump out of just a diode and capacitor.
Very neat… thank you for sharing the video.
Great looking project, something I’ve been looking into myself, albeit in 2D. Congrats.
Its a real shame we seem to be missing half of the schematics, it seems. The charge pump would be useful to know about, and how does it all route back to the microcontroller?
Also, why so many MOSFETs in this design? I’m not too clear on why you need to use 3 x TC4427 drivers, and 5 x IRLU3715 chips? Why two different types? And why wouldn’t the LED driver chip (I have some of the 5940 type but never used them) deal with the power requirements itself without the need for the MOSFETs? My only guess is because you are strobing to save GPIOs on so many LEDs, but if you’re strobing them, how does the TLC5940 manage to achieve its PWM brightness control? Surely there’s not enough time.
Still doesn’t explain why we have two different stages of MOSFETs.
More clarity please! I’m nowhere near the NY area, being in the UK, I can’t attend your classes.
Thanks for a great project posting though!
Stu
Thanks for the questions. I will post a schematic for the microcontroller board soon.
The TC4427As are mosfet _drivers_. They sit between the microcontroller and the IRLU3715s, which are real power mosfets. Both are needed because on their own, neither part has all of the necessary properties. The TC4427As can be interfaced directly to the AVR’s 5V I/O pins, but they can’t handle enough current to drive all the LEDs. The IRLU3715s can switch quite a lot of current, but they require a stiff 10V/0V control signal in this configuration, which the AVR can’t provide. Fortunately, it turns out that the two parts complement each other nicely, and can be combined in such a way that you get the easy interface of the TC4427A along with the high current handling capability of the IRLU3715.
In multiplexed LED matrices like this one, the circuit needs both high side switches and low side switches. In my design, the IRLU3715s are the high side switches, and the TLC5940s are the low side switches. The high side mosfets are driven one at a time, sequentially, to provide power to exactly one plane of the cylinder at a time. The low side switches control which LEDs are illuminated in the plane while it is active. This switching happens faster than the human eye can perceive, and so it looks like all the LEDs are illuminated at once, but if you had super-human vision you would see that the planes were illuminated one after the other.
Brightness control is done by varying the fraction of time that each LED is illuminated during the plane’s “on” window. At full brightness, the LED is on for the entire time that the plane is active. At half brightness, it is on for only half of the time, and so on. (Actually the relationship between perceived brightness and duty cycle is not linear — see the “gamma correction” section of the code — but that’s of secondary importance).
Update: I posted a schematic for the microcontroller board to the project website.
Hi, I wish to build your led cylinder and I am a bit confused about how many components I do need. Can you help me and tell me if I am correct?
4X TLC5940NT (led-drivers)
5X IRLU3715 (mosfets)
3X TC4427A (mosfets drivers)
1X ATMEGA168
2X 100uF electrolytic
1X 16Mhz
1X 10Kohm
2X 15pF ceramic
1X 0.1 uF ceramic
2X 1N4148
lot of rgb leds
Thanks again for your time, we are going to build two of those here in Italy! Federico
You would have to create a BOM in Eagle to get the exact parts count. Off hand, I think your list is missing several caps. On the top board you need four 0.1uF ceramics at each TLC5940. You also need one each of 1000uF and 100uF electrolytics (in addition to the two 100uF caps on the lower board which you’ve already listed).
Also you need ballast resistors for the TLC5940s, 1/10th inch headers (male and female) to connect the two boards, a jack for the power connector, and stiff music wire to build the cage.
Good luck! Let me know how it turns out.
Hi, first of all, cool project and thanks for sharing it !
I have a couple of questions which hope you can help me with!
How did you came up with the color decoding ? I mean, if you want to do white, you have to turn on all three RGB components. But, what about the rest of the colors? Was it something like “try and error” ?
Also, could you please explain how the charge pump works ?
Thanks !!
Hi again!
I have now the partlist but I miss a couple of items. Near each TLC5940 there is a resistor, from the pictures looks like violet,black,red, so a 7Kohm. Am I correct?
Then, on the atmega board there are 3 ceramic resistors listed on the schematic (2x 15pF and 1x 0.1 uF) but from the pictures I can’t see the 0.1 . Perhaps you didn’t used it, in the end?
Can you explain me what is this “music wire”? I’ve never seen it and I don’t know what to look for ๐ Looks like a guitar wire, but solid… what sort of instrument use it?
Last but not least I want to ask if you could provide the board also for the atmega part, because I think I will not be able to draw it by myself. You would be extremely generous.
As soon as possible I will buy the parts i need, I am already waiting for the leds from your same vendor ๐
Hi, Great looking project ๐
I’m gonna try to build one my self.
I downloaded the schematics and source code and orderd all the same parts.
Only i can’t find one thing,
The value of the iref resistor.
Can you tell me the value ?
Thanks D Mensink
I believe the Iref resistors are 2k. The TLC5940 datasheet has a graph showing resistor value versus current. 20ma is a safe value but you should easily be able to go higher if you want it to be brighter.
On the AVR board there really is a 0.1uF capacitor on the Vcc pin of the AVR. It is probably obscured in the photos by wires.
Music wire is sold in hobby/craft stores. As far as I know it’s not meant to be used in a musical instrument. I got mine from a store in New York called Pearl Paint, in the section where they have balsa wood, dowels, and brass tubes of various shapes and sizes.
I don’t have a board layout for the AVR board. As you can see it was hand-wired.
Ok, I have just received yesterday the leds, I am excited about the project ๐ Thanks for the resistor hint, this helps Mensink too. Have to look around for something similar to the music wire here in Milano… Now I have to figure out the bottom board, I am not too good in reading schematics ๐
Thanks!
Thanks for you’re help.
I downloaded the datasheet and found the graph.
I still have to find a way to get my hands on the
TLC5940NT, there a little bit hard to get here in
the netherlands. earlyest delivery date is feb 2009 :-S
or order 1700 pieces ๐
but somehow i’ll find them ๐
Same here in Italy, for the TLC5940NT :/
Excuse me for the stupid question, but for generating the right eagle print view, it’s ok for the top to mantain the
top, pads, vias, dimension, t-bKeepOut, t-b-vRestrict layers
and for the bottom to mantain the
bottom, pads, vias, dimension layers
then ratsnest ?
I had time for playing with the rgs leds while waiting for the TLC5940NT and I wish to start this proj as soon as possible ๐ I think that could be useful, for the first test, to use the arduino to control that the board works fine..
any hint? fede
No. I won’t be able to give you all the information you need here to start etching circuit boards with Eagle from scratch. But there are a number of good resources online that walk you through it step-by-step. Check out instructables.com or just search the web for terms like “toner transfer” “pcb” “etch” “eagle” etc. Good luck.
Why not just use P channel mosfet? Am i missing something?
P-channel mosfets would work, but they tend to be less efficient than N-channel, and there are not as many varieties available. The downside of using N-channel FETs is, of course, the charge pump.
This article gives some more info:
http://www.industrialcontroldesignline.com/howt…
Hi,
I'm really interested in this project and have one question regarding the 'anode planes'.
Can you tell me the top to bottom (or bottom to top for that matter)
relationship with the mosfet outputs i'e jp1 = plane 1 etc
Thanks
Good question. I don't actually remember how I did it, but it basically doesn't matter. You can wire it up any way you like, and then set the mapping in the software to match your hardware. The plane_trans[] array is what controls that mapping.
Hi Davec:
Very nice work. Congrtulations.
In the file ledcyl.c (renamed to ledcyl.pde) you say: “this is technically an Arduino sketch but it is basically just straight ANSI C”.
Is it possible to compile it with the IDE Arduino ?, I obtain mistakes as this one:
“In function 'void __vector_11()':
error: 'PD5' was not declared in this scope”
Can you help me?. Thank you in advance.
Jesus Sayago
Hello Davec:
Very nice work. Congratulations.
I have downloaded your files and yousaid “this is technically an Arduino sketch but it is basically just straight ANSI C”, I am trying to compile it with Arduino's IDE and mistakes appear as this one:
In function 'void __vector_11()':
error: 'PD5' was not declared in this scope.
Is this normal?. Can you help me?
Thank you in advance.
Jesus Sayago
@krisstto: I was working just yesterday night on this, and I have got the same error. I think that it's something about the atmega328chip. I have still to check better the PORTD command but if you compile the code on a atmega168 everithing is ok, if you do on a atmega328 it returns that error.
Federico seems to be right. I can compile it fine with the chip set to mega168 but not with mega328. I don't know why that is. the mega328 has a PD5 pin just like the 168 does. Maybe there is a problem with the avr-libc header file for it? Anyway, you can change the pin name constants like PD5 to just a simple literal 5 and then it should compile. The constants make the code a little more clear, but they aren't necessary.
Hi Dave, I have finally got the art of making double sided boards and I have started to create a copy of your project, wich I would like to extend. If someone is interested in, I am uploading pictures here:
http://blackman.amicofigo.org/gallery/v/Arduino…
Now I am trying to interface the board with an arduino for the first test. Reading the scheme and looking at your picture of the bottom board I have figured out that the pins should be like:
[upper 3 pins, from looking from the top]
analog4 PC4
analog3 PC3
analog2 PC2
[the 5 pins on the left]
digital 11 PB3
digital 13 PB5
digital 10 PB2
digital 9 PB1
digital 5 PD5
[the other 3 pin]
analog0 PC0
gnd
analog1 PC1
Are they correct?
BUT i have difficulties in understanding the 3 pin near to the power supply, they shuld be
gnd
+10
+5
And the BIG question is… Where does the +10 come from? ๐
Hope you can help us. Thanks again, Federico
I think I have got the charge pump to work. Still difficult to understand why it works, but it works. Tell me if I am right:
http://blackman.amicofigo.org/gallery/v/Arduino…
Anyway, if you could confirm to me the pinout of the “controller board” it would be great. Thanks again, Fede
I still have to work out the order of the 5 pin for the anodes but my cylinder looks like working (I had to do some debug due to “false positive” solde. I am soldering the leds, it's a damn long work ๐ I will post news as soon as possible. Real fun projetc!
Federico
Glad to hear you are making such good progress. I tried to visit your website but I can't resolve the hostname.
As far as the pinouts go, it should all be documented on the schematic. At this point that's my only reference. You will also have to consult a schematic for the Arduino to figure out the mapping of the AVR pins to the Arduino header names.
Hello, I have done with Eagle the lower board (microcontroller) in two versions. One to work to 5v and other one to work between 7-25v (with 7805). Both have conector ISP to programme from the parallel port (file bootloader from IDE Arduino) and a conector FTDI to programme the ATMega from IDE Arduino and USB.
Links:
http://dl.getdropbox.com/u/2716652/board_bottom…
http://dl.getdropbox.com/u/2716652/board_bottom…
B.R.
Jesus Sayago
I had some problemi with my domain name (wich is actually a friends domain name) but now my pics are on http://blackman.amicofigo.com/gallery/v/Arduino…
The pinout I posted above was right (thanks for the lower board!) It would be cool to make one with the atmega free pins avaible. I could work on it, because I wish to add an xbee to this lamp ๐
As I work on the project on free time I haven't finished it yet. I have found also this magic “music wire”, called “acciaio armonico” here in Italy. I have soldered all the led columns but applied just the first 7 because I have found a new error now that is difficult to debug :/
On my lamp I have just the first two column on, on the first led driver, but if I touch with a finger somewhere on the second led driver or on the tirth, everything works for a wile. I imagine it's something about a wrong solder but I am going crazy for understanding where.
Anyway, I will tell you my progress!
I have spent hours on this but at the end my cylinder (the first seven column) is working. It was a wrong solder between the first led driver bus and the second. It was a weird problem, as with my tester and the chips off everything was of, but with the led driver chip inserted nothig was working.. In brief, putting in the led driver chip was moving a bit the solder of the bus…
So I can go on an plance the next 12 columns and think then to the lower board. I have tried to modify krisstto one because I wish to be able to use the atmega free pins easily but my skills on eagle are still low, so I failed ๐
Hi Federico:
I would like to help you with the design of the lower board in Eagle.
If you can explain to me what your you want, I will try to arrange it.
My English is not very good.
Best Regards
Jesus
First to give thanks to Dave for sharing this project. Already I have ended my LED Cylinder, here it is possible to see as it has stayed:
http://www.flickr.com/photos/krisstto/sets/7215…
The LEDs are not welded whith solder, but they are welded by Electronic spot – welding device:
http://www.hobbiesguinea.com/product_info.php?p…
Best Regards
Jesus
ยกquรฉ maravilloso!
Krisstto your setup is awesome. My lamp doesn't look that good, mostly because I was not able to have perfect straight music wire… (It was packet “rounded”) Perfect the idea you used to have the possibility to remove the cage. I would have thought it too ๐
For the lower board, I will tell you as soon as I define better my needs ๐ By the way, I have upgraded for the pics on http://blackman.amicofigo.com/gallery/v/Arduino…
Wow, both of your cylinders look better than mine. Excellent work!
Mine is still under construction. I have to fix definitly a bus problem I have because of a wrong solder, i think (It works, but when all the light are on, like on full red or full white they start to fliker a bit). In fact tonight I am here debugging this weird problem.
Then I need to etch the lower board, I wish to add a button to change animations on demand and one to set defined colors (like all white, to use it as a normal lamp in my room ๐ ) and an xbee extension linked to my home server, to do things that I have still to imagine!
Dave, it's the project you made the best idea!
@krisstto
I wish to have the atmega free pins disposable at the extern part of the lower board. In particular I wish to have the possibility to plug in horizontal, external to the lower board, this board:
http://www.ladyada.net/images/xbee/pinout.jpg
in particular it would be extremely cool to have the +5 GND and RX TX pins in the right order ๐
Then, it would be nice to have some other free pin from the atmega disposable at the external, for wiring for example some button.
I have tried to do this in eagle but I obtain always impossible boards to hetch at home because there are TOO MANY vias, too little space between the routes and so on …
What do you think about my ideas of addon? With this it would be possible for example test colors from a webpage to the lamp, or to choose the animation to loop, to setup favorites colors or animations or activate the lamp on email arrival etc.
Fede
I was forgetting.. for the xbee, tx and rx can be two pins from the atmega, as with the newsoftwareserial arduino library you can obtain a serial from 2 pin at your choice
Dave thank you very much, but the merit is yours. It is a great project.
Federico, your cylinder is seen very well also. Warn me when you finish your modification.
B.R.
Jesus
Well, if you have spare time and you want help me with the lower board it would be nice ๐ ๐
Fede
@krisstto
I wish to have the atmega free pins disposable at the extern part of the lower board. In particular I wish to have the possibility to plug in horizontal, external to the lower board, this board:
http://www.ladyada.net/images/xbee/pinout.jpg
in particular it would be extremely cool to have the +5 GND and RX TX pins in the right order ๐
Then, it would be nice to have some other free pin from the atmega disposable at the external, for wiring for example some button.
I have tried to do this in eagle but I obtain always impossible boards to hetch at home because there are TOO MANY vias, too little space between the routes and so on …
What do you think about my ideas of addon? With this it would be possible for example test colors from a webpage to the lamp, or to choose the animation to loop, to setup favorites colors or animations or activate the lamp on email arrival etc.
Fede
I was forgetting.. for the xbee, tx and rx can be two pins from the atmega, as with the newsoftwareserial arduino library you can obtain a serial from 2 pin at your choice
Dave thank you very much, but the merit is yours. It is a great project.
Federico, your cylinder is seen very well also. Warn me when you finish your modification.
B.R.
Jesus
Well, if you have spare time and you want help me with the lower board it would be nice ๐ ๐
Fede
Hello, I saw this project a while back and thought it was really cool, now I want to try to make one and something like it. I am trying to understand how it all works, and with the schematics and all supplied it makes it easy to see how it all goes together. But… I need some help before I can even start. I need to know what all I have to buy and if I can even get the items needed (or if their are newer models).
I saw that someone had posted a list and I think I can see what all is needed from all the pics and the schematics.. BUT I cannot find some of the items (at least in stock) and cannot order them without getting 6000+ (google was no help with those part numbers… pages of links to data sheets). I was wondering if anyone knows a good place to order the parts without buying in bulk or if there are newer/comparable models that would be in stock. Any help would be great.
Thanks in advance – Evan
As said in the original post you can but the LEDs from ebay. I bought the other components from digikey, except the music wire, that I bought from a “brico” or “leroy merlin” here in italy. If you need a complete list you can read the scheme. There is not, as long as I know, a “newer model”. Fede
Any way to get some part numbers from the ones any one is using for the capacitor, diodes, and the crystal timer thing… I mean I looked them up on digikey…. but there are like 100s of each with slightly different properties. I'm not sure which to get or if it matter.
Also, I read above about using the Atmega328 and how people were having problems. Was anyone able to get it working and did they have to change anything?
It should be easy to have it working on the 328, but I have not tryed yet. I am using a 168 that I had here doing nothing. I have to search to see if I still have my digikey buy list, or at least I could tell you the names of the hardware you need. If its not too much different it should be ok.
BTW, tomorrow I have spare time to try again to do my lower board… I hope to complete it !! Fede
What I have so far is:
The PCB
4X TLC5940NT (led-drivers)
5X IRLU3715 (mosfets)
3X TC4427A (mosfets drivers)
1X ATMEGA328
and the LEDs
.015 OD music wire. (in shipping…. hope i for the right diameter)
Were you able to find your buy list?
I just got an Arduino with mega328 and was trying to see if I could burn the sketch of the c file that you gave in the zip file. I get an error mentioned above. I changed the PD5 to just 5 and I get another error dealing with a similar thing (this time its the PB2)… not sure why it is doing this. I know nothing about this stuff so I did some research.
I found on this page: http://www.arduino.cc/en/Reference/PortManipula… it explains what all the the PD and PB are, PORTD digital pins 0-7, PORTB digital pins 8-13.
Anyways… my question is… PD5 means pin 5 (yes?) but PB2 doesn't mean pin 2, but the 2nd pin in the PB range (pin 9?)… Basically.. what do I have to set these to as to not have a constant but the literal value?
PD5 should be Arduino digital pin 5 PWM (pin 11 on the atmega) and PB2 should be Arduino digital pin 10 PWM (pin 16 on the atmega). Digital 9 is PB1, because the first one is PB0. You have to read the datashet of the atmega to understand these values!
Fede
PD5 is the name of a pin on the AVR microcontroller. Forget about the Arduino numbering system for a moment. This system is totally different. AVR microcontrollers have output pins grouped into things they call “ports”. You get PORTA, PORTB, PORTC, PORTD, and so on. Each port has 8 pins in it, named PX0, PX1, PX2 through PX7 (replace X with the letter of the port). In C code, the ports map to 8-bit variables. So you can say PORTC = 0xFF. That drives all eight C pins of the microcontroller high. PORTC= 0 drives all of the C pins low. When you want to set the value for just one pin, say PC3, you do something like this: PORTC |= 0x08. That sets the fourth bit in PORTC to one, driving it high, leaving all the other pins unchanged. To someone looking at the code, the 0x08 in that statement looks like a magic number. So to make the programmers intentions more clear, the library maintainers created constants like PB3 and macros like _BV. _BV(PB3) is equivalent to (1 << 3), which is equal to 0x08. So PORTC = _BV(PB3) has the same effect as saying PORTC = 0x08. The difference is that it is more clear to a human reader.
For some reason, when using the mega32, some of these constants seem to be missing. It's probably just a bug that will be fixed in a future relase. To work around it, I think you can always replace PAX, PBX, PCX, and PDX with just X. I.e. PA3 with 3, PB7 with 7, PC0 with 0, and so on.
Very cool use of the 5940 and Arduino. I'm working on a project that is similar and hopefully you can give me some direction. I want to use the 5940 to control an array of 10×10 RGB leds. How much of your design could I use for this?
I haven't had time to do anything in a while, I just started soldering all the LEDs to the music wire… a pain. I just now noticed that I had gotten common-anode and not common-cathode. How screwed am I? Is is possible to changing some things in the programming, or would have I to re-do something on the board, or order common-cathode LEDs…..
Big mistake. You'll have to change all the LEDS. It's a hardware problem, not programming
Ufortunatly Steve is right. You have to change your leds! Fede
can someone please tell me the pin connections if im using a Arduino Duemilanove as the botton board..
Anyone still checking the comments?
I am building one of these but I’m just wondering what gauge wire to use.ย I found this stuff which looks like it will work, don’t want to go too thin as it will be wobbly, don’t want to go too thick as it won’t fit the holes, and not 100% how thick the holes are.ย Any advice?
http://www.ebay.co.uk/itm/Piano-Spring-Wire-Carbon-Steel-Various-Diameters-Lengths-/290673622134?pt=UK_Crafts_Other_Crafts_EH&var=&hash=item896214c2de
Hi Davec! Your project is still kicking! After years, everyone that comes to my house is shocked ๐ On youtube, people are asking too. Just to keep in touch ๐
Federico Sideralis
Federico can you tell me what kind of steel wire you used?ย I found a place to order but they have a bunch of gauges and not sure which.ย Too thick and it won’t fit in the board, too thin and it might be too fragile…
Hi! I found the music wire in a market shop named “brico” here in Italy. Right now I don’t have it here but I remember it was just a bit bigger than my holes (1mm) so I suspect it was more or less 1.2 or 1.4mm. With my dremel I adapted it a bit to fit my 1mm hole. The worst part was that mine was not straight but in a “roll” so it has been terrible to work with.
very nice project… I’m new in this and I really need some help with this… I’m from PTY and need some lights…. can you help me out?
can anyone help me out of here?
can you tell me how you built this and what materials to get?
Hi, can you publisch a BOM for this project? It’s a ton of work to get all these components together from these images.
Hi, I’m trying to program it in atmel studio, it shows me a lot of errors, wouldn’t it be better to use a hex file and fuse for it?
Hi, it is not possible to publish the hex file and the fuses for it. I would also like to ask why the ground is divided in the diagram, one leads tcl 1a 4 and the other tcl 2a3, it should be so, thank you
ing good
I have a problem, the circuit of the led cylinder is lost, can you send it to me?
thank you