You would think that there’s nothing to know about RGB LEDs: just buy a (strip of) WS2812s with integrated 24-bit RGB drivers and start shuffling in your data. If you just want to make some shinies, and you don’t care about any sort of accurate color reproduction or consistent brightness, you’re all set.
But if you want to display video, encode data in colors, or just make some pretty art, you might want to think a little bit harder about those RGB values that you’re pushing down the wires. Any LED responds (almost) linearly to pulse-width modulation (PWM), putting out twice as much light when it’s on for twice as long, but the human eye is dramatically nonlinear. You might already know this from the one-LED case, but are you doing it right when you combine red, green, and blue?
It turns out that even getting a color-fade “right” is very tricky. Surprisingly, there’s been new science done on color perception in the last twenty years, even though both eyes and colors have been around approximately forever. In this shorty, I’ll work through just enough to get things 95% right: making yellows, magentas, and cyans about as bright as reds, greens, and blues. In the end, I’ll provide pointers to getting the last 5% right if you really want to geek out. If you’re ready to take your RGB blinkies to the next level, read on!
Hackaday.io contributor extraordinaire [al1] has been playing around with small LEDs a lot lately, which inevitably leads to playing around with large groups of small LEDs. Matrixes of tiny RGB LEDs, to be precise.
First, he took 128 0404 SMD RGB LEDs (yes, 40 thousandths of an inch on each side) and crammed them onto a board that’s just under 37 mm x 24 mm. He calls the project 384:LED (after all, each of those 128 packages has three diodes inside). A microcontroller and the driver chips are located on a separate driver board, which piggy-backs via pin headers to the LED board. Of course, he had to use 0.05 inch headers, because this thing is really small.
Of course, no project is without its hitches. [al1] bought LEDs with the wrong footprint by mistake, so he had a bunch of (subtly different) 0404 LEDs left over. Time for an 8×8 matrix! 192:LED isn’t just the first project cut in half, though. It’s a complete re-design with a four-layer board and the microcontroller on the back-side. And as befits a scrounge project with lots of extreme soldering, he even pulled the microcontroller off of a cheap digital FM radio. Kudos!
We’re in awe of [al1]’s tiny, tiny hacking skills. Now it’s time to get some equally cool graphics up on those little displays.
RGB LED cubes are great, but building the cube is only half the battle – they also need to be driven. The larger the cube, the bigger the canvas you have to exercise your performance art, and the more intense the data visualization headache. This project solves the problem by using Unity to drive an RGB LED cube in real-time.
We’re not just talking about driving the LEDs themselves at a low level, but how youwhat you want to display in each of those 512 pixels.
In the video, you can see [TylerTimoJ]’s demo of an 8x8x8 cube being driven in real-time using the Unity engine. A variety of methods are demonstrated from turning individual LEDs on and off, coloring swaths of the cube as though with a paintbrush, and even having the cube display source image data in real-time (as shown on the left.)
Everyone knows there’s form and there’s function. It isn’t fair, but people do judge on appearance, sometimes even overriding all other concerns. So while your Makerspace buddies might be impressed by your weather station built on a breadboard, your significant other probably isn’t. [Dennisv15] took an ordinary looking weather station design with a 0.96″ display and turned into an attractive desk piece with a much larger display and an artistic–and functional–enclosure.
The acrylic cloud lights up thanks to an RGB LED Neopixel strip and can indicate weather trends at a glance: red for warmer, blue for colder, flashing for inclement weather. The project was truly multidisciplinary, using a laser cutter to produce the body and the stand, a 3D-printed display bezel, and a PCB to make it easy to build.
The Pi Zero is a great piece of hardware, even if you’re not designing another USB hub for it. [Marcel] wanted to control a few RGB LED strips from his phone, and while there are a lot of fancy ways you can do this, all it really takes is a Pi Zero and a few parts that are probably already banging around your parts drawers.
This isn’t a project to control individually addressable RGB LEDs such as NeoPixels, WS2812s, or APA102 LEDs. This is just a project to control RGB LEDs with five four connectors: red, green, blue, power, and or ground. These are the simplest RGB LEDs you can get, and sometimes they’re good enough and cheap enough to be the perfect solution to multi-colored blinkies in a project.
Because these RGB LEDs are simple, that means controlling them is very easy. [Marcel] is just connecting a transistor to three of the PWM pins on the Pi and using a TIP122 transistor to drive the red, green, and blue LEDs. You’ve got to love those TIPs package parts!
Control of the LEDs is accomplished through lighttpd. This does mean a USB WiFi dongle is required to control the LEDs over the Internet, but it is so far the simplest way we’ve seen to add multicolor blinkies to the web.
What’s the smallest RGB LED cube? A 1x1x1 cube is easy, but it’s a stupid joke and we’ve heard it before. No, to build the smallest LED cube, you’ll have to stuff 64 RGB LEDs into a cubic inch, like [Hari] did with his miniscule LED cube.
One might think that individually addressable RGB LEDs are the way to go with an LED cube this small. Anything else would hide the LEDs behind a mess of wires. This isn’t the case with [Hari]’s LED cube – he’s using standard surface mount RGB LEDs for this build. But how is he connecting the things?
The entire build was inspired by the a much earlier project, the Charliecube. This LED cube, like [Hari]’s uses Charlieplexing to condense all the connections for a column of LEDs to only four wires. Repeat that sixteen times, and [Hari] built himself a tiny, one-inch cube of glowey goodness.
The cube itself was built with a PCB backplane designed in Eagle and fabbed at OSHPark. The LEDs are driven by an Arduino Nano. If you’d like to build your own, or you’re a masochist for dead bug soldering, you can grab all the design files over on [Hari]’s hackaday.io project page.
Disco Floor’s are passé. [dennis1a4] turned them upside down and built an awesome RGB LED ceiling display using some simple hardware and a lot of elbow grease. His main room ceiling was exactly 32 ft x 20 ft and using 2 sq. ft tiles, he figured he could make a nice grid using 160 WS2812B RGB LEDs. A Teensy mounted in the ceiling does all the heavy lifting, with two serial Bluetooth modules connected to it. These get connected to two Bluetooth enabled NES game controllers. Each of the NES controller is stuffed with an Arduino Pro Mini, a Bluetooth module, Li-Ion battery and a USB charge controller.
Bluetooth is in non-secure mode, allowing him to connect to the Teensy, and control the LEDs, from other devices besides the NES controllers. The Teensy is mounted at the centre of the ceiling to ensure a good Bluetooth link. Programming required a lot of thought and time but he did manage to include animations as well as popular games such as Snake and Tetris.
The hard part was wiring up all of the 160 LED pixels. Instead of mounting the 5050 SMD LED’s on PCBs, [dennis1a4] wired them all up “dead bug” style. Each pixel has one LED, a 100nF decoupling capacitor, and 91 ohm resistors in series with the Data In and Data Out pins – these apparently help prevent ‘ringing’ on the data bus. Check the video for his radical soldering method. Each SMD LED was clamped in a machine shop vice, and the other three parts with their leads preformed were soldered directly to the LED pins.
The other tedious task was planning and laying out the wiring harness. Sets of 10 LEDs were first wired up on the shop bench. He then tacked them up to the ceiling and soldered them to the 14 gauge main harness. The final part was to put up the suspended ceiling and close the 2 sq. ft. grids with opaque plastic.
[dennis1a4] did some trials to figure out the right distance between each LED and the panel to make sure they were illuminated fully without a lot of light bleeding in to adjacent panels. This allowed him to get away without using baffles between the tiles.
Check out the video to see a cool time-lapse of the whole build.