WS2811 SPI Driver Using One Transistor And Passives

ws2811-spi-driver

We love the WS28xx projects because even if we never plan to use them, the signal timing is like the most addictive puzzle game ever. For instance, check out this WS2811A driver which uses hardware SPI to generate the signals.

The WS28xx offerings place a microcontroller inside an RGB LED, allowing them to be individually addressed in very long chains or large matrices (still a chain but different layout). But the timing scheme used to address them doesn’t play well with traditionally available microcontroller peripherals. [Brett] had been intrigued by some of the attempts to bend hardware SPI to the will of the WS2811 — notably [Cunning_Fellow’s] work featured in this post. He took it a great step forward by simplifying the driver to just one transistor, three resistors, and a capacitor.

Click through the link above for his step-by-step description of how the circuit works (it’s not worth re-explaining here as he does a very concise job himself). The oscilloscope above shows the SPI signal on top and the resulting timing signal below. You will notice the edges aren’t very clean, which requires the first pixel to be very close to the driver or risk further degradation. But, since the WS28xx drivers feature a repeater which cleans up signals like this, it’s smooth sailing after the first pixel.

 

IKEA LED Table Mod Doesn’t LACK Awesome

Some people look at IKEA LACK tables as cheap furniture. Our readers look at them as a blank canvas. [Klaas] has turned a LACK Side table into an interactive LED table featuring 144 RGB LEDs. After attending a class on WS2801 pixel strings at his student IEEE chapter, [Klaas] was inspired to design something of his own. He settled on an IKEA LACK table and started sketching. He didn’t actually have a table on hand, so he had to deduce the size from the website images and dimensions. He calculated a usable size of around 45cm, which was pretty close to the mark. After running a few tests, [Klaas] determined that a 12×12 grid of squares 35mm on a side would provide that enough resolution to play simple games. The 35mm x 35mm grid would also be small enough for the LEDS to illuminate. He used a laser cutter to cut the an interlocking grid from 3mm MDF. A base plate with 144 12mm LED holes was also cut out, and the entire assembly was glued together.

For illumination, [Klaas] settled on WS2812B LEDs, as they were cheaper than their WS2801 couterparts. The WS2812B’s also snapped easily into his 12mm holes. At this point [Klaas] actually purchased his IKEA table and proceeded to cut a huge hole in it. The grid glued right in, and some aluminum L-profile cleaned up the top edge. Driving all those LEDs would need a bit of processing power, [Klaas] chose a Teensy 3, and the well-known OctoWS2811 library. He also added a USB host shield, which allowed him to use an Xbox 360 USB game pad as his controller. For software, he created a simple Tetris clone, and ported snake from the Arduino game shield. A menu and some scrolling text ties everything together. The only thing left to add is a glass top. [Klaas] hasn’t settled on clear or diffuse glass yet. We a suggest clear to avoid hiding any details of this great build.

Continue reading “IKEA LED Table Mod Doesn’t LACK Awesome”

Rewriting WS2812 Driver Libraries For Optimization

ws2812_compared

We like [Tim’s] drive for improvement. He wrote a WS2812 driver library that works with AVR and ARM Cortex-M0 microcontrollers, but he wasn’t satisfied with how much of the controller’s resources the library used to simply output the required timing signal for these LED modules. When he set out to build version 2.0, he dug much deeper than just optimizing his own code.

We remember [Tim] from his project reverse engineering a candle flicker LED. This time, he’s done more reverse engineering by comparing the actual timing performance of the WS2812(B) module with its published specs. He learned that although several timing aspects require precision, others can be fudged a little bit. To figure out which ones, [Tim] used an ATtiny85 as a signal-generator and monitored performance results with a Saleae logic analyzer. Of course, to even talk about these advances you need to know something about the timing scheme, so [Tim] provides a quick run-through of the protocol as part of his write-up.

Click the top link to read his findings and how he used them to write the new library, which is stored in his GitHub repository.

Low-Power SMD Fireflies

lowpowerledfireflies

[Tyson’s] family went with creating rather than buying Christmas presents last month, which gave him the opportunity to build some electronic fireflies for gifts. He drew inspiration from a similar firefly project we featured last year, but expanded on the original model by designing dedicated PCBs and housings for each of his firefly pieces.

Although he’d settled on using ATTiny85’s for this project, [Tyson] was fresh out of through-hole versions. He decided to skip the prototyping phase and go right for fabrication, cranking up the laser-jet printer for some toner-transfer, which successfully produced 4 functioning boards (and 3 failures). The fireflies were [Tyson’s] first attempt at SMD soldering, and we’d have to say it’s a job well done; he reflowed each board with a cheap-o heatgun from Harbor Freight.

After some hiccups with fuse programming, [Tyson] got the code uploaded and the fireflies illuminated.  Swing by his site for the nuts and bolts on construction, then snag the project files here. (Direct .zip download)

Stop Traffic In This 7-Mode LED Running Jacket

[Miria] was tired of tangling with bicyclists on her nighttime runs. It was obvious to her to illuminate herself, but she thought it would be really cool if the lights responded to her heart rate. The short summary that tipped us off is over at NYC Resistor, and [Miria] gives the gory details on her blog. The LEDs operate in seven different light modes that increase in speed proportionate to her heart rate.

She started the build around an Arduino but found that the compatible heart rate sensors were mostly optical and gave inaccurate readings. Since she was already using a Garmin GPS watch and heart rate monitor band, she decided to hack into the conversation between the two. Garmin uses the ANT protocol for this. While [Miria] found the documentation to be an effective sleeping pill, she also found that SparkFun has an ANT transceiver breakout board. Unfortunately, it’s been discontinued.

[Miria] continued undeterred, using the SparkFun board for prototyping. Her final version uses a Teensy 2.0 and this ANT transceiver in place of the ill-fated SparkFun board. She found an Energizer power pack that plugs directly into the Teensy and can power both Adafruit weatherproof LED strips for about an hour. Look both ways, and check out her demo after the break.

Continue reading “Stop Traffic In This 7-Mode LED Running Jacket”

SLDongle: The Microcontroller Gift That Keeps On Giving

It must be nice to be one of [kiu]’s colleagues. Some people pass out chocolates or stress balls at work as Christmas gifts, but [kiu] made a bunch of SL dongles to introduce his colleagues to the world of microcontrollers.

The dongles are based on the ATMega88PA and work on three levels to provide something for everyone. The no-experience-necessary option is to plug it in to a USB port and admire the light show sequences. If you know enough to be dangerous, you can remotely control the LEDs from a USB host using [kiu]’s sldtool for Linux or Mac. He originally included examples that visualize CPU utilization and ultimately added a Ruby-based departure countdown for the next outbound train at the nearby station.

If you’re 1337 enough you can flash your own C or assembly code via USB. Holding down the button during power-up lets you use the dongle as a USBasp so it can be flashed with avrdude. [kiu] says the bootloader can’t be unlocked through software and is theoretically unbrickable. Stick around after the break to see the full demo.

Continue reading “SLDongle: The Microcontroller Gift That Keeps On Giving”

LIDAR With LEDs For Under $100

If you need some sort of distance sensor for your robot, drone, or other project, you have two options: a cheap ultrasonic sensor with limited range, or an expensive laser-based system that’s top of the line. LIDAR-Lite fills that gap by stuffing an entire LIDAR module onto a small board.

In traditional LIDAR systems, a laser is used to measure the time of flight for a light beam between the sensor and an object. The very accurate clock and laser module required for this system means LIDAR modules cost at least a few hundred dollars. LIDAR-Lite gets around these problems by blinking a LED with a ‘signature’ and looking for that signature’s return. This tech is packaged inside a SoC that reduces both the cost and size of a traditional laser-based LIDAR system.

As for the LIDAR-Lite specs, it can sense objects out to 40 meters with 5% 95% accuracy, communicates to any microcontroller over an I2C bus, and is small enough to fit inside any project.

Considering the existing solutions for distance measurement for robots and quadcopters, this sensor will certainly make for some very awesome projects.

Edit: One of the guys behind this posted a link to their spec sheet and a patent in the comments