The Most Minimal WS2812B Driver

Whether you call them individually controllable RGB LEDs, WS2812, or NeoPixels, there’s no denying they are extremely popular and a staple of every glowey and blinkey project. Fresh off the reel, they’re nearly useless – you need a controller, and that has led to many people coming up with many different solutions to the same problem. Here’s another solution, notable because it’s the most minimal WS2812 driver we’ve ever seen.

The critical component in this build is NXP’s LPC810, an ARM Cortex M0+ in an 8-pin DIP package. Yes, it’s the only ARM in a DIP-8, but still able to run at 30MHz, and hold a 4kB program.

JeeLabs is using the SPI bus on the LPC810 to clock out data at the rate required by the LEDs. The only hardware required is a small LED to drop the voltage from 5V to 3.3V and a decoupling capacitor. Yes, you could easily get away with this as a one-component build.

The build consists of a ring of sixty WS2812b RGB LEDs, and the chip dutifully clocking out bits at the correct rate. It’s the perfect start to an LED clock project, an Iron Man arc reactor (are we still doing those?), or just random blinkey LEDs stuffed into a wearable.

Thanks [Martyn] for sending this one in.

MicroDMA and LEDs

[Jordan] has been playing around with WS2812b RGB LED strips with TI’s Tiva and Stellaris Launchpads. He’s been using the SPI lines to drive data to the LED strip, but this method means the processor is spending a lot of time grabbing data from a memory location and shuffling it out the SPI output register. It’s a great opportunity to learn about the μDMA available on these chips, and to write a library that uses DMA to control larger numbers of LEDs than a SPI peripheral could handle with a naive bit of code.

DMA is a powerful tool – instead of wasting processor cycles on moving bits back and forth between memory and a peripheral, the DMA controller does the same thing all by its lonesome, freeing up the CPU to do real work. TI’s Tiva C series and Stellaris LaunchPads have a μDMA controller with 32 channels, each of which has four unique hardware peripherals it can interact with or used for DMA transfer.

[Jordan] wrote a simple library that can be used to control a chain of WS2812b LEDs using the SPI peripheral. It’s much faster than transferring bits to the SPI peripheral with the CPU, and updating the frames for the LED strip are easier; new frames of a LED animation can be called from the main loop, or the DMA can just start again, without wasting precious CPU cycles updating some LEDs.

IcosaLEDron: A 20-Sided Light Up Ball

Tired of balls that are just balls, and not glowing geometric constructions of electronics and wonderment? Get yourself an IcosaLEDron, the latest in Platonic solids loaded up with RGB LEDs.

The folks at Afrit Labs wanted a fun, glowy device that would show off the capabilities of IMUs and MEMS accelerometers. They came up with a ball with a circuit board inside and twenty WS2812B RGB LEDs studded around its circumference

The frame of the ball is simply a set of twenty tessellated triangles that can be folded up during assembly. The outer shell of the ball is again printed in one piece, but fabricated out of transparent NinjaFlex, an extraordinarily odd, squishy, and likely indestructible material.

Inside the IcosaLEDron is a PCB loaded up with an ATMega328p, an accelerometer, a LiPo battery charger, and quite a bit of wiring. Once the ball is assembled and locked down, the squishy outer exterior is installed and turned into a throwable plaything.

If 20 sides and 20 LEDs aren’t enough, how about a an astonishing 386-LED ball that’s animated and knows its orientation? That’s a project from Null Space Labs, and looking at it in person is hypnotic.

via Makezine

Measuring the Length of WS2812 Strips

[Tim] discovered a simple way to measure the length of WS2812 addressable LED strips from a microcontroller. This is great for any project that can have an arbitrary length of addressable LED strip attached to it.

The simplest (and perhaps most reliable) way to measure strip length is by feeding the serial output pin of the end of the strip back to the microcontroller. The microcontroller keeps clocking bits into the strip until it receives data from the end of the strip. [Tim] didn’t want to run an additional signal to the end of his strip, so he found another solution.

[Tim] used the ADC of his microcontroller (an ATtiny) to measure supply voltage droop as LEDs are turned on. Each LED draws around 60mA at full brightness, so [Tim] sequentially turned on each LED and watched the ADC for slight voltage changes. If the voltage changed, there must be an LED at that address. [Tim] does note that this method is extremely dependent on the power supply used and only works on short strips. Check out his blog post for more details.

Test Your Signal with the WiFi Cup

[CNLohr] wanted to test the WiFi range in his house. One look at his roommate’s cup and an unorthodox idea was born. The WiFi Cup used an ESP8266 to connect to his home network. For output, [CNLohr] also added a WS2812 LED strip to the cup. The ESP8266 was programmed to send UDP packets to [CNLohr’s] laptop. When the laptop responded back, the ESP8266 turned on the LEDs, lighting up the cup. The cup’s response to signal strength was very quick – about a second.

[CNLohr] took the WiFi Cup around the house. He was surprised to detect the connection in corners he didn’t expect; in fact, the signal wasn’t weakening at all! He proceeded to walk outside with it, hoping to see the signal strength decrease. As a testament to his roommate’s robust router, the cup merely flickered. Hoping for a better test, [CNLohr] switched out the router for a cheaper TP-Link with shorter antennas. While the initial ping test showed a slower response time, the cup detected WiFi around the house just fine. It only wavered for a couple of moments when it was placed inside a metal bucket. We have to wonder how thin [CNLohr’s] walls are. WiFi never works that well in our house!

Continue reading “Test Your Signal with the WiFi Cup”

Star Gate LED Clock Has Plenty of Pizazz

[David Hopkins] has finally finished off his Star Gate LED clock over on and it looks fantastic.

We originally featured his progress with the project in Hacklet 18 – Tick Tock, it’s Time for Clocks, and we’re happy to say it’s finally complete. The clock features 60 WS2812 LEDs to simulate the Star Gate’s chevrons — and to tell the time. Under the hood is an RTC, an Arduino Nano, an LDR and even an hourly ‘chime’. Did we mention it also automatically dims at night?

What we’re almost more impressed with is the build quality, which [David] doesn’t actually mention how he did it — regardless, it looks great! Stick around after the break to see a video of it in action, so you can really appreciate the clock’s capabilities.

Continue reading “Star Gate LED Clock Has Plenty of Pizazz”

DEFCON Shenanigans: Hack the Hackaday Hat

We don’t want to call it a challenge because we fear the regulars at DEFCON can turn our piece of hardware into a smoking pile of slag, but we are planning to bring a bit of fun along with us. I’ll be wearing this classy headgear and I invite you to hack your way into the WiFi enabled Hackaday Hat.

I’ll be wearing the hat-of-many-scrolling-colors around all weekend for DEFCON 22, August 7-10th in Las Vegas. You may also find [Brian Benchoff] sporting the accessory at times. Either way, come up and say hello. We want to see any hardware you have to show us, and we’ll shower you with a bit of swag.

Don’t let it end there. Whip out your favorite pen-testing distro and hack into the hat’s access point. From there the router will serve up more information on how to hack into one of the shell accounts. Own an account and you can leave your alias for the scoreboard as well as push your own custom message to the hat’s 32×7 RGB LED marquee.

You can learn a bit more about the hat’s hardware on this project page. But as usual I’ve built this with a tight deadline and am still trying to populate all the details of the project.