Instead of an Arduino, I decided to build this using a BeagleBone Black. Why? Because I had just recently bought a BBB and wanted to use it in a project!
- BeagleBone Black – $45.00
- Adafruit 144 LED 1m NeoPixel strip – $59.95
- 4× 18650 batteries rated at 2400mAh
- 2× 2 18650 battery holders 2 × $1.66 = $3.32
- 10A DC Buck Converter – $12.85
At $121.12, This is significantly cheaper than the Pixelstick’s post-kickstarter $325 price tag. Plus I don’t have to wait till May to play with it!
According to the specs of the NeoPixel strip, at full draw one would need 60mA * 144 = 8.64A of current to drive the pixel strip. This makes powering the strip and board slightly challenging. Doing some research it looked like 4 3.7V 18650 batteries rated at 2400mAh would do nicely. Setting them up as two parallel pairs of two batteries in series gives me 7.4V with 4800mAh which passed through the 10A DC buck converter supplies a consistent 5V to power the strip and the BBB. Interesting though was that when I measured the current to power the strip, I read ~2.4A with the strip showing a blue and green lit at full intensity, with ~2A for the red at full intensity, but with the strip at full intensity white I never got it to budge beyond 5A. This seems to be fine for powering the strip without it experiencing brown-out.
The NeoPixels are extremely timing sensitive requiring a steady 800KHz data-stream (although there’s been some recent work on identifying much lower timing specs for the WS2812 chip that drives it). This rules out using an RPi as it’s not running a realtime OS (although there are various projects to run a realtime Linux on the RPi). The Arduino has no problem running the necessary real-time code, as I said, I wanted to try my hand out at using the BeagleBone Black for a project. Given the BBB is also running standard Linux like the RPi, this wouldn’t have been possible, except for the fact that the BBB’s ARM Cortex-A8 has two additional CPUs known as Programmable Realtime Units (PRUs). The image decoding is done on the linux side, populating a buffer which is then made available to the PRU. The PRU runs a tight assembly code which cycles through the buffer, bitbanging the data out to the NeoPixel.
Here are the images I’ve taken so far using it:
I still need to add an LCD display and a control interface for more flexibility. I’ll release the code once I’ve done some more testing and refined it.
Update: and thank you to Adafruit – I’d submitted one of my Beaglestick images to their BeagleBoneBlack Case contest, and it turns out I won a case.