Everyware: Icebreaker development – LEDs & MQTT

In this post I will briefly outline my part in the creation of our wearable technology: The Icebreaker T-Shirt.

My responsibilities included creating the physical prototypes: Using the NodeMCU and MQTT connections to build a wearable system.

Prototyping: Single RGB LED

I started off by prototyping MQTT connections with a single RGB LED. I built a basic circuit and programmed it so that it would connect to the MQTT broker, and light up when data is received.

This was a very basic prototype to test MQTT connections and reactions, to see what is possible across MQTT communications and how messages are both sent and received.

During this time, I ran into many internet connectivity issues with the NodeMCU board – Whilst it does work, it often needs resetting as the connection is prone to drop out after running for a while. This is a known limitation of the board and a workaround should  be found for the finished product.

IMG_20171125_192722

NodeMCU wired up to the RGB LED for testing messages sent across the MQTT i-dat broker.

RGBW LED Strips

After this, we experimented with using RGBW LED strips. I wired up a circuit (using transistors to prevent burning out my controller board) and experimented with some code to create patterns and colour combinations.

img_20171121_105614.jpg

Testing the RGB LED strip

In addition to issues with powering these strips from the NodeMCU board without external power sources, it was apparent these strips were not composed of individually addressable LEDs, so turned out to not be appropriate for our usage. It would also be difficult to fit these LED strips around a T-shirt design without cutting them in multiple places and soldering many wires to bridge the gaps, resulting in a messy and impractical finish.

img_20171121_122214.jpg

Wiring up the RGBW LED strip with multiple transistors – one for each colour & white.

 

24 RGB LED Ring

Next we moved onto using an Adafruit Neopixel 24 LED ring. First, I soldered some header pins into the ring for easy wiring. Later these could be removed and either directly soldered onto, or even potentially be connected to using conductive thread.

IMG_20171201_112748

24 LED ring with sample code.

I worked out how to individually address each LED to both change the colour and brightness, and then used the code from the first single RGB LED (shown above) to connect it to the MQTT broker.

After this, I setup basic reactions to each input to simulate what will happen once the database is properly connected; such as changing the colours when a match is detected.

Basic lighting effects/reactions i initially created include:

  • Ambient (No match/resting)
  • Match (Different colours for different matches) – Currently 3 max
  • Left – Left side lights up
  • Right – Right side lights up
img_20171210_210009.jpg

Wiring up my NodeMCU board to the LED ring. The circuit requires the use of capacitors to prevent damage to the LED ring and resistors on the data inputs. (Tape shown over LEDs is for diffusing)

The next steps are to create more visually appealing lighting effects & reactions (which I will work on over the next week) and to hook it up to the database via MQTT, which is being handled by my other team members.


 

Links

Adafruit Neopixel/Library: https://learn.adafruit.com/adafruit-neopixel-uberguide?view=all

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s