I have started to investigate how I can drive a large bank of LEDs directly from my Beaglebone or Raspberry PI. I have developed a video before:
[youtube id=”wXvs0CrRPIw” width=”600″ height=”350″]
where I drove a 2 colour 8×8 LED common anode dot matrix display using three 74HC595s and a transistor array UDN2981A to source the current. This used the Arduino as the platform to drive the array and it worked very well, with a very fast refresh rate.
So, now I want to do this for the Beaglebone/PI and as while the processor rate should allow me to have a much more advanced output, the pin current limitations are going to be a problem. In addition, I would like to have some level of fading to give me a true multi-colour display, rather than the 2 colour display I had before.
So, my solution seems to be the TLC5940 from Texas Instruments (Link to the Datasheet), which is a 16 channel LED driver with dot correction and grayscale PWM control. Wow! So, 16 channels is great; dot correction means that I don’t need colour graded LEDs; and 12-bit grayscale control means 4096 different grayscale PWM levels. It also has a constant current driver on each output, which should mean no resistor banks…
That makes this a very powerful chip for driving LEDs or motors. I will order a few and plan to build a circuit that drives an LED array in the not too distant future. (If some time has elapsed use the search function on the site to see if the video/guide exists)
I am going to drive an 2.4″ (60.2mm) 8×8 RGB array RGB 8×8 Display Luckylight KWM50884ARGBB which has a common anode configuration and 32 pins. The forward current per dot is 25mA (the max forward current per dot is 100mA at 1/10 duty cycle and 0.1ms pulse width). The forward voltage at a forward current of 20mA is R: 2.0V, G: 3.2V, B: 3.2V.
I like all sorts of displays and I started a project to build my own ceiling lamp using WS2812 RGB LEDs which are controlled via SPI, a Beaglebone Black is supposed to be the brain.
But now I’m stuck since I’m unable to get any results.
I googled a lot and haven’t found anyone who tried to use the WS2812 with the Beaglebone so far.
Then I saw your videos which are really good and thought maybe he is willing to give me some advice on the hardware side and priming the GPIOs on the BBB.
So here I’m and hoping this wakes your interest.
Greetings from Germany
Here is a link to the LED datasheet:
http://www.adafruit.com/datasheets/WS2812.pdf
btw. ebay is a good place to buy them if you want to play around with them yourself
Hi Derek,
Thanks for your videos and info, greatly appreciated and very informative and clear.
I am very interested to know more about your process with the TLC5940 and the BBB/Raspberry Pi, as that is one of my main goals and projects around both platforms. I have been successful using an Arduino as a serial buffer for the TLC’s, which is attached via usb to a raspberry pi, which receives UDP strings of 0-255 values to dim individual channels remotely. Of course I would love to skip the middle piece of blue hardware and wire directly with the pins on the Beagle Bone Black, so that ideally I can have the lighting hardware boot quickly. Any direction would be amazing. Cheers.
Hi Dr. Derek,
I’m using the BeagleBone black and enjoy your videos and blogs. I notice you’ve done many interfacing videos such as the “Beaglebone_ Introduction to GPIOs – Using Device Tree Overlay”. At one stage you show the device tree overlay file, but you don’t indicate what actually happens in the running BBB when a file entry is read or written, such as a write to turn on/off the LED in this video. Off course the answer is that a device driver is linked to the file entry being written. It would be extremely instructive if you could do a blog/video on the device driver writing process. I am reminded of it on this page where you say you will interface array type LEDs to the BBB. This could entail writing a device driver for the GPMC on the AM3359 uP of the BBB. Even a trivial device driver driving one pin would be useful. Thank you.
I am looking to drive a 64×32 RGB Matrix using a BBB Rev A5A.
I have no clue where to start.
There are many tutorials but I am having issues just trying to load the image file.
The computer I am using is 32 bit and when I try to uncomporess the file it says it is for a 64bit device.
Is there a way to change the software to use with a 32 bit machine?
i m confuse… can you please mentioned or give me a link of complete raspberry pi videos series.
Derek,
I’m having trouble building an LKM on the Raspberry Pi 4b. I’ve followed your instructions in chapter 16 “Building the LKM on the RPi”
1. I’m not sure what responses to give in make oldconfig.
2. make modules_prepare fails with
CC kernel/bounds.s
In file included from include/linux/compiler.h:54,
from include/uapi/linux/stddef.h:1,
from include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/page-flags.h:8,
from kernel/bounds.c:9:
include/linux/compiler-gcc.h:121:1: fatal error: linux/compiler-gcc8.h: No such file or directory
#include gcc_header(__GNUC__)
^~~~
compilation terminated.
3. I get the same error trying to build an LKM.
make[1]: Entering directory ‘/usr/src/raspberrypi-linux-ff45bc0’
CC [M] /home/js/Development/lkm_gpio/lkm_gpio.o
In file included from include/linux/compiler.h:54,
from include/linux/init.h:4,
from /home/js/Development/lkm_gpio/lkm_gpio.c:10:
include/linux/compiler-gcc.h:121:1: fatal error: linux/compiler-gcc8.h: No such file or directory
#include gcc_header(__GNUC__)
^~~~
compilation terminated.
Any suggestions would be most welcome.
Many thanks,
John Schwartzman
john@fortesystem.com