Glowing Pocket Square

by JackDefay in Circuits > Wearables

2458 Views, 27 Favorites, 0 Comments

Glowing Pocket Square

IMG_20180510_230037.jpg
Shutta_20180511_223337.jpg
pocket square

Welcome to my first Instructables! This was a fun little project I wanted to share, but watch out for more stuff coming soon! I originally made this for my prom, but this design could be used for lots of similar projects from LED ties to custom glow lights.

Things You'll Need:

Materials:

  • Attiny85 or similar
  • Scrap protoboard
  • CR2032 watch battery holder and battery
  • Scrap wire
  • Small switch
  • RGB LED

Tools:

  • Soldering Iron
  • Helping hands
  • Laptop with Arduino IDE or similar

Optional stuff I happened to use:

  • 3D printer
  • Pliers
  • Capacitor
  • IC mount to allow for reprogramming
  • Copper wire
  • Tweezers
  • Soldering fume extractor
  • Work light
  • Tiny AVR programmer (https://learn.sparkfun.com/tutorials/tiny-avr-programmer-hookup-guide)

Assemble the Board!

sketch-1526087943081.png
IMG_20180429_172057.jpg
IMG_20180429_172102.jpg
IMG_20180429_172113.jpg
IMG_20180429_172117.jpg

You are welcome to assemble this however you would like, but I'll outline my process for anyone interested.

  1. First I assembled the light. I used a knockoff Neopixel RGBW LED (https://www.amazon.com/ALITOVE-Similar-Individually-Addressable-embedded/dp/B01K4HCVDC/) which I had lying around from a previous project. I have also used standard 4 pin common cathode RGB LED's with the attiny85 chip so that should work too, but won't be quite as bright.
  2. Then I soldered a 4.7 microfarad capacitor to the positive and negative terminals (as recommended for this specific LED), then I soldered positive and negative leads, and the data line to the LED with a 470 ohm resistor.
  3. Then I set up my battery holder. I used a larger protoboard than I needed so I had room to expand if necessary, then soldered the positive top plate of the cr2032 battery holder to the protoboard. I used some bare copper wire to string up the negative side underneath the battery holder.
  4. Next I placed the 8 pin IC chip holder on the protoboard with the battery in place so I knew there would be enough space, folded the pins over, and soldered it in.
  5. On the bottom I connected the power and ground leads of the battery holder to the IC holder. Make sure to leave a little length that can later be cut to add a switch in on the power line.
  6. Double check that the battery still fits, and if you have a multimeter, check the power and ground sockets of the IC holder. It might seem tedious, but checking these things as you go will pay off if you have to troubleshoot later.
  7. Connect the light leads to power and ground (near the connection to the IC holder), and run one data line from a standard pin on the IC. (double check with a pinout sheet to make sure the pin is available, but otherwise just use whichever one is most convenient to solder)
  8. Then snip the copper wire of the power line, before it reaches the IC holder, solder a small length of wire to either side.
  9. Then snip the wire to size, solder the leads to two leads of a small switch, clip the third lead, and hot glue the switch to an open space left on the side. Be careful to insulate the switch if placing on or near other exposed wire, since the case is metal. I simply used a small piece of electrical tape.

Programming Your Chip!

My code for this project can be pulled from Github: https://github.com/3jackattack3/simpleSpectrumLigh... . To program this I implemented a Platformio plugin for the atom text editor using a "tinyAVRprogrammer" from sparkfun. In my experience this has been my favorite way to write and upload code to IC chips like the attiny85.

The platformio plugin is more of a personal preference, although I highly recommend checking it out. I've tried 3 distinct methods of programming arduinos in text editors I like, and I've run into issues with both the Stino and Deviot plugins for Sublime text, but have had huge success with this platformio plugin for atom. However, since this is more of a personal preference, I'll try to add traditional arduino IDE code as soon as I have time. If you want to convert it yourself, just copy the text of the .cpp file into a new arduino project and remove the first line: "#include Arduino".

Programming the IC however becomes a bit more complicated. The method I used comes directly from sparkfun, and is the best method I've found so far. Check out their guide for an easy to follow guide on programming AVR chips (https://learn.sparkfun.com/tutorials/tiny-avr-prog...). The other dominant method I've seen is to use an arduino Uno as a bootloader for the IC chip, which is a lot cheaper if you have an extra board laying around, but is more error prone.

Optional: 3D Printed Case!

IMG_20180427_201549.jpg

To finish this build, I wanted to make it a bit more professional, while protecting the electronics and securing the switch. Above you can see my iterative process of the case design, and you can find the models on thingiverse! (https://www.thingiverse.com/thing:2904029) I designed these for my build specifically, but you could probably modify the model to fit your needs, or just use it as inspiration for your own designs!

How to Set Up in a Pocket Square

IMG_20180510_225838.jpg
IMG_20180510_225854.jpg
IMG_20180510_225919.jpg
IMG_20180510_225948.jpg
IMG_20180510_230037.jpg

Get creative! I started with a standard "one tip up" fold (http://www.tie-a-tie.net/how-to-fold-a-pocket-squa...) which works well for diffusing the light of the pocket square. Here, the material of the pocket square matters a lot. You can get a silk pocket square for cheap on amazon (https://www.amazon.com/Fine-White-Silk-Pocket-Squa...) which works fantastically to diffuse the light.

Fold the square into quarters, then insert the device in a fold so that it is solid on both top sides (oriented as a diamond). Complete the fold and use a safety pin at the base to maintain the shape. Once inserted into a pocket the safety pin will be completely hidden, and if fluffed up right, the light will appear diffuse like in the video rather than the point light shown here.