Wearable Wireless NeoPixel Grid

A system was created using an mbed LPC1768 to control a grid of NeoPixels mounted on a T-shirt and Bluetooth to communicate with an iOS device. This was a final project for the ECE 4180 Embedded Systems class in Spring 2014. Several use cases were developed to demonstrate the system's capabilities for different scenarios.

Hardware

/media/uploads/rhodes42/hardware_diagram2.png

Hardware block diagram. IR sensor is optional.

The system was assembled as shown above. To avoid the need for a breadboard the connections were made by wires with female pin connectors on each end. Two configurations for the NeoPixels were used: 5 strips of 12 pixels and 2 8x8 panels. The connection to the mbed is the same for both of these.

The system was powered with a regular 9V battery. When a 9V battery is connected to Vin, we found that the 3.3V Vout pin actually provided about 5V.

/media/uploads/rhodes42/20140429_135922.jpg

2 8x8 panels

/media/uploads/rhodes42/20140429_140041.jpg

Custom 12x5 grid

The Neopixel is based on the WS2812 driver chip (datasheet: http://www.adafruit.com/datasheets/WS2812.pdf). This chip is controlled by a single-wire signal where 0's and 1's are represented by pulses with differing duty cycles. 24-bit values representing GRB color are encoded in this manner and the color for each pixel in a strip is sent out in order. The pixels will automatically get the right value by taking the first 24 bits received and passing the rest to the next pixel. A reset signal is used to mark the end of a sequence. For both the grid made with strips and the combination of 2 8x8 matrices, all NeoPixels can be controlled with a single digital output pin.

http://static.squarespace.com/static/5039e08be4b00cf0e8cf88cd/t/510a0096e4b000ead7e06ff7/1359610007453/BLE%20mini1.jpg?format=300w

The Bluetooth chip is a RedBearLab BLE Mini chip: http://redbearlab.com/blemini/

Software

The software development began with a NeoPixel library created by 4180 student Allen Wild. We found that the ARM assembly implementation of the NeoPixel protocol performed better than the SPI implementation created by David Rhodes. Code for this project used the setPixel and setPixels functions provided by the NeoStrip library.

Import libraryNeoStrip

Library for controlling a strip of Adafruit NeoPixels with WS2812 drivers. Because of the strict timing requirements of the self-clocking data signal, the critical parts of code are written in ARM assembly. Currently, only the NXP LPC1768 platform is supported. More information about NeoPixels can be found at http://learn.adafruit.com/adafruit-neopixel-uberguide/overview

On the mbed, Bluetooth communication is enabled by creating a Serial object. The mbed behavior is determined by what character is sent. Below is the iOS menu that selects the mbed demo.

/media/uploads/rhodes42/image.png

Demos

The demo code is here:

Import programECE4180_Werable_LCD_DEMO

working demo, with iPhone support

All of the demos can be seen in this video:

Missing Phone

This demo senses when the mbed is too far from the iOS device for Bluetooth communication and signals to the user. This is done by waiting for a timeout in the communication between the devices.

Standalone code for this demo can be found here:

Import programNeoPixel_BLE_Missing

blinks on BLE timeout

Distance Sensing

This demo uses the IR sensor to detect objects near the user. Both the IR sensor and the NeoPixels are on the back of the shirt. If someone or something gets too close to the user, the Neopixels will blink.

Standalone code for this demo can be found here:

Import programNeoPixel_Proximity

read IR sensor and blink when somethings too close

Bike Signals

In this demo the Neopixels are mounted on a backpack and the user can make left turn, right turn, and stop signals for when they are on a bicycle. In the video demo this is controlled by an iOS device, but ideally a separate controller consisting of an mbed LPC1114, another BLE chip (which we did not have), and pushbuttons would be created that could be mounted on the handlebar. /media/uploads/rhodes42/bikesmall.png

Standalone code for this demo can be found here:

Import programNeoPixel_BLE_Arrows

gets BLE commands, displays turn and stop signals

Animations and Art

Code was created to display ASCII characters 0-255 on the NeoPixels. Using this code, demos were made that display different emoji icons and create an item box from Super Mario Bros. Another demo was also made that makes a colorful rainbow display on the whole grid. /media/uploads/rhodes42/sadface.png

Further Development

For this project we requested 9 NeoPixel panels so that we could create a 3x3 grid of panels for a total of 576 pixels (24x24). We did not receive these so we made our project with the two panels that were already available in the lab. Future versions of this system would have more pixels and more complicated capabilities that use these pixels, including displaying image files and animations.


1 comment on Wearable Wireless NeoPixel Grid:

04 May 2017

we also buy some led panel from (https://www.alibaba.com/product-detail/Addressable-ws2812b-5V-RGB-led-panel_60551687987.html?spm=a2747.manage.list.103.qPa4za),and i have one sp105e bluetooth controlelr,but i do not know how to use that. it is difficult for me. Thanks.

Please log in to post comments.