Color Sensor From An RGB LED And A Photocell

When you need to quantify the color of an object, you’ve got quite a few options. You can throw a Raspberry Pi camera and OpenCV at the problem and approach it through software, or you can buy an off-the-shelf RGB sensor and wire it up to an Arduino. Or you can go back to basics and build this reflective RGB sensor from an LED and a photocell.

The principle behind [TechMartian]’s approach is simplicity itself: shine different colored lights on an object and measure how much light it reflects. If you know the red, green, and blue components of the light that correspond to maximum reflectance, then you know the color of the object. Their sensor uses a four-lead RGB LED, but we suppose a Neopixel could be used as well. The photosensor is a simple cadmium sulfide cell, which measures the intensity of light bouncing back from an object as an Arduino drives the LED through all possible colors with PWM signals. The sensor needs to be white balanced before use but seems to give sensible results in the video below. One imagines that a microcontroller-free design would be possible too, with 555s sweeping the PWN signals and op-amps taking care of detection.

And what’s the natural endpoint for a good RGB sensor? A candy sorter, or course, of which we have many examples, from the sleek and polished to the slightly more hackish.

Continue reading “Color Sensor From An RGB LED And A Photocell”

Pi Time – A Fabric RGB Arduino Clock

Pi Time is a psychedelic clock made out of fabric and Neopixels, controlled by an Arduino UNO. The clock started out as a quilted Pi symbol. [Chris and Jessica] wanted to make something more around the Pi and added some RGB lights. At the same time, they wanted to make something useful, that’s when they decided to make a clock using Neopixels.

Neopixels, or WS2812Bs, are addressable RGB LEDs , which can be controlled individually by a microcontroller, in this case, an Arduino. The fabric was quilted with a spiral of numbers (3.1415926535…) and the actual reading of the time is not how you are used to. To read the clock you have to recall the visible color spectrum or the rainbow colors, from red to violet. The rainbow starts at the beginning of the symbol Pi in the center, so the hours will be either red, yellow, or orange, depending on how many digits are needed to tell the time. For example, when it is 5:09, the 5 is red, and the 9 is yellow. When it’s 5:10, the 5 is orange, the first minute (1) is teal, and the second (0) is violet. The pi symbol flashes every other second.

There are simpler and more complicated ways to perform the simple task of figuring out what time it is…

We are not sure if the digits are lighted up according to their first appearance in the Pi sequence or are just random as the video only shows the trippy LEDs, but the effect is pretty nice:

Continue reading “Pi Time – A Fabric RGB Arduino Clock”

Beautiful Linear RGB Clock

Yup, another clock project. But here, [Jan] builds something that would be more at home in a modern art museum than in the dark recesses of a hacker cave. It’s not hard to read the time at all, it’s accurate, and it’s beautiful. It’s a linear RGB LED wall clock.

7512951486134540347You won’t have to learn the resistor color codes or bizarre binary encodings to tell what time it is. There are no glitzy graphics here, or modified classic timepieces. This project is minimal, clean, and elegant. Twelve LEDs display the hours, six and nine LEDs take care of the minutes in add-em-up-coded decimal. (It’s 3:12 in the banner image.)

The technical details are straightforward: WS2812 LEDs, an Arduino, three buttons, and a RTC. You could figure that out by yourself. But go look through the log about building the nice diffusing plexi and a very clean wall-mounting solution. It’s the details that separate this build from what’s hanging on our office wall. Nice job, [Jan].

RGB LEDs: How To Master Gamma And Hue For Perfect Brightness

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!

Continue reading “RGB LEDs: How To Master Gamma And Hue For Perfect Brightness”

Tiny Tiny RGB LED Displays

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.

Where's the LED?
Where’s the LED?

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.

Real-time Driving Of RGB LED Cube Using Unity3D

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.

Landscape animation RGB Cube - smallWe’re not just talking about driving the LEDs themselves at a low level, but how you what 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.)

Continue reading “Real-time Driving Of RGB LED Cube Using Unity3D”

Beautiful Weather Station Uses Acrylic, RGB LED, And And ESP8266

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.

Continue reading “Beautiful Weather Station Uses Acrylic, RGB LED, And And ESP8266”