Introduction: Dancing Star

Overview

This project includes different components and technologies that I wanted to try out. In a nut shell, there are 2 main components:

  1. A 3D printed bracelet with a color sensor
  2. A T shirt with neopixels that light up according to the color picked up by the bracelet

I'm using Adafruit technology for the components and XBees for the wireless communication between the components.

Step 1: ​List of Equipment

  1. 2 T shirts - One plain which will be underneath and one with some graphic design that will be interesting to light up.
  2. Flora Budget Pack that contains:
    1. FLORA main board
    2. Four Flora RGB NeoPixels V2
    3. 3xAAA Battery holder with JST connector and on/off switch
    4. Stainless Medium Conductive Thread - 3 ply - 18 meter/60 ft
    5. Needle set with 20 pieces
    6. Small Alligator Clip Test Lead (set of 12)
    7. USB cable - A/MicroB - 3ft
    8. 4x Alkaline AAA batteries
  3. Flora - I have the V1, since May 2015 the V2 is available
  4. Flora Color Sensor
  5. Flora RGB Smart NeoPixel
  6. 2 x XBee Module - Series 1 or from SparkFun XBee 1mW Wire Antenna - Series 1
  7. 2 x XBee Adapter kit
  8. FTDI Serial TTL
  9. Lithium Ion Polymer Battery
  10. USB Lilon charger
  11. Soldering Iron
  12. Solder wire
  13. Soldering iron stand
  14. Multimeter - I bought one but never really ended up using it.
  15. Cutters, pliers, etc...
  16. Additional fabric, sewing material, sewing hoop, etc...

Step 2: Development Environment

  1. Download the Arduino IDE and the required libraries:
    1. NeoPixel

    2. Color Sensor TCS34725

Currently I'm using Arduino v1.6.4

Step 3: T Shirt

  1. I actually printed the graphics on the T shirt using Inkodye. More about that you can find here. Credit goes to the very talented calligrapher, Benoit Furet, for the graphics design.
  2. Sew the NeoPixels and Flora to the T shirt that is going to be underneath following the steps in the Chameleon Scarf tutorial.
    1. This is a great reference for understanding the flora board.
    2. The sewing hoop is used to ensure the threads don't cross each other and that the shirt remains taunt.
    3. Don't sew on the color sensor as that will be part of the bracelet. Use alligator clips instead in the meantime.

    4. Note that between each NeoPixel the power and ground rails are continuous while between each pixel's data pad to the next there are small segments of conductive thread.

    5. I used Gutermann fabric adhesive instead of clear nail polish to seal the knots.

    6. I sewed small circles of fabric on the back side to cover up the knots.

  3. Coding - this is the code I used prior to adding the bracelet and wireless connection.
    You copy it into the Arduino IDE and while the flora is connected to your computer you upload the code to the flora.
    It fires off the color sensor every 3 seconds and changes the lights according to the color it picks up. You could easily add a button to trigger the color check.
  4. After I tested, I then sewed on the top shirt to align the lights with the graphics.
  5. I also sewed on a small pocket for the battery pack and extra fabric at the bottom to conceal all of the electronics. I put some of my inspirations here.

Step 4: Wireless

I wanted the bracelet to be separate from the shirt and therefore decided on wireless communication between them.
I used the simplest xBee series 1. Their wireless range is up to 100 meters (!) so the bracelet can even be on someone else.

You need 2, one for the shirt and 1 for the bracelet.

They are preconfigured to work with each other but you can use XCTU to change the PanID that is the identifier. It needs to be the same for both and you can pair the DH and DL to the SH and SL on each respectively.

Adapter

You need an adapter to connect the XBee to the flora. You can buy one Or if you're adventurous you can make one yourself by using the Adapter Kit.

You'll need a solderer and solder wire.

Use this tutorial to solder the kit. The first one took me 40 mins, the second less then 10. If you're new to soldering as I was, there are plenty tutorials on YouTube.

Tip: don't solder the straight header at the bottom. You can wire the holes directly to the flora instead.

The code here is incorrect. you no longer need the NewSoftSerial library, it is now part of the Arduino SoftwareSerial. Besides, I found it only works when you use Serial1 directly.

If you want to really understand XBees, check out this cookbook.

Wiring

See the photos to see what I hooked up to what. I'm planning to add a layout diagram. Sometime.

Step 5: Bracelet

  1. There are many options to create the bracelet. I decided on 3d printing. You can find the Solidworks file and the STL file below. If you are in Israel, I really recommend Dfus 3D for printing. Great rates and excellent quality. Shapeways also looks like a great place to print from although I haven't tried.
    You can check out some of my design inspirations here.

    It fits very well. You need to be a bit creative with the internal paneling. I used different methods to attach and conceal the electronics. Especially the wiring which is the least attractive part of the project.
  2. I updated the code to communicate over wireless. See both the bracelet and updated shirt code below.
    Note I used Serial1 and NOT softwareSerial. Although all of the examples I found were with SoftwareSerial I could not get the flora to read from the XBee adapter.
    Also, Serial monitor will only open after the sketch starts running so I never managed to see the messages printed out during setup().

Step 6: Summary

I really enjoyed working on this project. The design, coding and soldering were all new to me.

The coding took a lot of trial and error. Coming from a coding background I would have preferred a more eclipse like IDE instead of the very basic Arduino one. I read there is an arduino plug-in for eclipse but I haven't tried it out.

For some reason conductive thread does not work with the XBee adapter. I kept replacing it with different options. Finally settled on basic electric wire strung through beads to avoid shorts.

If you have any questions or suggestions, please feel free to post a comment.

For a review of all of the micro-controllers out there, I recommend this instuctable: Which MICROCONTROLLER for your ELECTRONIC FASHION?.

This Flora/Bluefruit Prototyping Armband instructable was also useful for me.

For more ideas for projects, I suggest to check out this site.