Saturday, 11 June 2016

arduino - How should I light up all the LEDs?


I am working on a 4x4x4 LED cube. I have connected all the negative terminals of LEDs in a horizontal layer to each other, and am using one Arduino pin per layer. I have connected all the LED positive terminals of a vertical column together and am controlling each column via a pin.


So, 16 pins used for columns and 4 pins used for horizontal layers. The pins are directly powering and sinking the LEDs.


From my calculations, I can turn on atmost 16 LEDs at one time before reaching current limits. So, if I want to light up all the layers simultaneously, without burning the board, how should I go about it ?



Answer



Generally speaking these led cubes use persistence of vision and multiplexing to minimise the number of wires and digital IO pins for a given size of cube, but in your case you can also use it to reduce the overall current drawn by the cube. Instead of just turning a LED on or off, you would flash the led many times per second to provide an apparently continuous brightness but at a much lower current draw.



For instance, if you can continuously power 16 LEDs but need to power 64 LEDs then you can do so if you have a duty cycle of 25%. Each LED will be powered on for a quarter of the time and powered off for three quarters of the time, so it will be 1/4 of the brightness of the continuously powered LED but also consume only 1/4 of the power.


If you can cycle between the 4 planes every every 5ms (50Hz) then depending on how bright the cube LEDs are people looking directly at the cube probably won't notice the flickering, but anyone looking elsewhere will probably notice the flickering out of the corner of their eye. At 2ms (125Hz) few people would notice the flickering, even out of the corner of their eye.


For more information, take a look at the wikipedia page on Flicker fusion threshold.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...