Showing posts with label neopixels. Show all posts
Showing posts with label neopixels. Show all posts

Wednesday, November 7, 2018

Ugly Christmas Sweater 2018



I just finished working on an ugly Christmas sweater for 2018.  I started with this gem, which was a thoughtful donation from a friend.  The biggest challenge I first saw with this type of sweater is that it opens up in the front, requiring some thoughtful planning to ensure there is enough power distributed from one side to the other.  In order to reduce the amount of hand sewing I needed to do (and to reduce resistance), I ended up using a combination of silicone wire and conductive thread.
To get started, I ironed some fabric stiffener to the front and neck of the sweater, because I've learned the hard way that conductive thread doesn't work reliably with stretchy yarn (without a little help).  My original thought was that I'd keep the Neo-Pixels and sensors confined to one side of the sweater, while sewing LEDs onto both sides.

The fabric stiffener did its job, but I ended up having to cut some of it out, because the sweater ended up looking rigid and boxy in the shoulders.
The next thing I did was work on writing the code and prototyping the circuit.  This took a long time, because I wanted my sweater to have the following features:

1.  Neo-Pixels triggered by a light sensor
2.  Multiple songs triggered randomly
3.  The ability to turn the music off and on with the press of a button
4.  A light display triggered by a temperature sensor
5.  A motor that did something useful  (if only marginally)

After lots of experimentation, and some judicious remixing, I have a fully functioning program! The code compiles and circuit works!  While I kept the idea for the motor alive in my code, I ended up scrapping the idea. 







Next, I needed to figure out the best power supply to use.  Initially, I wasn't sure whether a 3.7 V lithium polymer battery would work, since I was using power-hungry sensors and NeoPixels; a lipo cell ended up working fine.

Of note, the LilyPad Arduino 328 Main Board doesn't have a JST socket soldered to it, so I sewed on a LilySimple Power to add an on/off switch, as well as a place to put the battery.

Based upon preliminary tests, I noticed that  powering the circuit directly from the LilySimple Power was interfering with my temperature sensor.  The interference didn't happen whenever the LilyPad was connected to a USB port through the FTDI cable.  After a lot of experimentation with different batteries, voltages, and plugs, I determined that my problem might be that I had too many things connected to the positive (+) pin on the LilyPad.  When using a LilySimple Power, which attaches to the positive pin of the LilyPad, I thought that I needed to come up with another way to send power to the temperature sensor. 

While trying to figure out how to solve my problem I came across this LilyPad Temperature Sensor Example code, which explained that I needed to declare a spare analog pin as an output, set it to high, and then connect the positive (+) pin of the sensor to it.  BRILLIANT!

But...even after I made those changes to the code, the temperature sensor was still reading higher than it should have whenever my LilyPad was powered via the LilySimple Power.  The simple solution, which I wish I'd thought of earlier, was to modify the sensor threshold in the code itself.

To save time, I used the cording foot on my sewing machine to attach the silicone wire used for the power and ground rails going up the center of my sweater.

Very carefully, I split the coating of the wire in places where it needed to come in contact with the NeoPixels, and I hand-sewed them to gaps in the wire.





All of the wires and hot glue look pretty messy inside, but I'm hoping they'll be strong enough they way they are. 




When I turn the power on, green and white LEDs flash in an alternating pattern.  If I cover the light sensor, the NeoPixels fill with green, red, and then blue.  When the temperature sensor gets triggered by warm hands (or a warm cup of coffee), red LEDs turn on and flash.  If I want to hear one of four random Christmas tunes, I simply toggle a momentary push button and a piezo buzzer kicks into high gear, in sync with the lights!

To have a look at the code, visit my Wearable Electronics repository on Github.







Sunday, July 23, 2017

ATtiny85 TARDIS

I just finished building this ATtiny85 controlled TARDIS for under $20, using a laser cutter file from this Instructable.   I found printable Police Box decals via a quick Google search.






I modified the Adobe Illustrator file to add a square of 3mm Baltic birch plywood to the inside of the TARDIS top, to keep it from sliding around.  While this slightly improved the original design, it made gluing the NeoPixels to the inside of the box a bit trickier; they needed to be glued a bit lower down on the box than they would have without the added piece.


View of ATtiny85 from underneath TARDIS

I'm excited about this build, featuring 10 hand-soldered NeoPixel LEDs and a diffused 10mm RGB LED, because it led to my further experimentation with electronics.  I've built a couple others incorporating Photons, but this one doesn't require reliable wifi or a pricey microcontroller.

Electrical components that fit inside the box
I am powering the device using a switched battery holder containing 2- AAA batteries. I am still trying to figure out how to use capacitors in order to use a 5V power supply, such as a USB port.

Lessons learned:
I learned that the code for using a common anode RGB LED is slightly different from that using a common cathode RGB.  I also figured out how to combine NeoPixel sample code with a blinking RBG LED for really fun effects.

Breadboarding the entire circuit prior to soldering was essential, and helped to ensure that my code worked. In the process, I was reminded of the importance of burning the bootloader of an ATtiny85 to 8 Mhz before uploading code featuring NeoPixels.

I should have tested the soldering connections with the multimeter as I worked (not after).  During my first iteration, I made the mistake of soldering everything to a 1" X 1 " ProtoBoard without noticing that every three holes of the board were connected vertically.  As a result, I had to start all over!  The board depicted above (which I ended up using in its place) is half of an Adafruit Perma-Proto board, which was more intuitive to work with.

Soldering jumper wires to the LEDs and NeoPixels, and connecting them to wires soldered to the pins of the ATtiny85, is a good way to connect components.  Color coding my wires, and using labels, helped to prevent confusion when assembling everything inside of a tight space.

Placing 200 ohm resisters on each of the RGB legs is a good idea.

Using a glue gun to provide strain relief and insulation for the RBG LEDs and NeoPixels is vital.

Sunday, June 26, 2016

Flora Sparkle Skirt #etextile

After learning how to make digital clothing for my avatar in Jokaydia Grid (for a graduate class), I decided to return to the real world to try my hand at sewing a real skirt.



Taking inspiration from a variety of YouTube videos (most notably this one), I purchased 20 yards of black tulle (I only used six) and two yards of blue satin (I only needed one) to sew my first garment ever!

My first skirt...sans electronics.

While it turned out pretty well (albeit a little on the large side), it wasn't complete without some bling!  So, I followed Becky Stern's directions for creating a Sparkle Skirt, using a Flora, motion sensor, and 12 neopixels!

Strand test mode


I'm sure there is a better way to do this.

Throughout this process, I learned quite a bit.  In addition to figuring out how to make gathers in fabric using the cording foot on my sewing machine, I discovered the beauty of fabric paint as an electrical insulator, which I'd never thought about prior to this experiment.







Since my skirt has so many gathers, it was prone to short-circuiting before I applied a shiny, navy fabric paint to the exposed conductive thread.   This was the most tedious part of the process, since my circuit went all the way around a rather lengthy diameter. But, it worked like a charm!

On the underside of the skirt, I used iron-on fusible webbing to insulate the data line of the circuit, since it was hand-sewn.







Friday, May 6, 2016

Channeling the 80's: Sound Reactive Flora Skirt


After putting the finishing touches on this sound reactive leather skirt (made for my daughter, who may never actually wear it in public), I found myself thinking back to my high school years, hanging out in the discos of Germany! While I wouldn't dare go out in public wearing something like this today, I am amused to no end, imagining how quickly I would have jumped into this skirt back in the 80's!  Forgive this shameless indulgence.


If you want to make your own sound reactive wearable, or see the process I followed to make this, check out the Sound Reactive Equalizer Skirt on Instructables.

Leather skirt with Flora microcontrollerSound reactive skirt turned offSound reactive skirt Sound reactive skirt turned on



Sunday, December 27, 2015

Light Blue Bean and Neopixels

Adding more than three neopixels may require the addition of a voltage regulator, 
a transistor, and resistors.
Using the Blue Bean app, I can control LEDs from an iPad.

I've been experimenting with neopixels, using a Gemma, an ATtiny85, and most recently the Light Blue Bean.  While I am most excited about the potential of the ATtiny85, because of its smaller size and cost, I am also intrigued by the idea of controlling a gadget wirelessly.

Using the code from the Smartphone Controlled Mood Light project, modified to accommodate fewer LEDs, I'm able to control the color of three neopixels soldered to wire. So far, I'm only able to change the color of all the neopixels at the same time, rather than being able to customize each one individually.

If I changed the code to accommodate two LEDs, I could use this to control two glowing eyes, which would be a much easier way to do this than the Evil LED Goat project.  If I wanted to be able to remotely change the color of a hat or other wearable, this could also be useful, although doing so seems like a waste of a $30+ microcontroller.

My next step is to try to modify the code to make use of the accelerometer and or the buzzer. While I like the idea of being able to change the color of a project remotely, I'm interested in using the Bean for something a bit more useful.  I have a lot more to learn first.

Friday, December 18, 2015

Running Neopixels on an ATtiny85

ATtiny85 controlling sewable neopixels
Today, I am learning how to use an ATtiny85 to program sewable neopixels, with the goal of moving toward using surface-mounted RGB LEDs in paper circuitry.  The reason that this is so exciting is because the ATtiny85 is an inexpensive, low-profile chip, making it useful for notebook hacking and art projects!  If I can figure out how to make this entire process happen on a Chromebook, it would be a huge breakthrough for classroom instruction.


At the time I was working on this project, there was still one step that required the use of a PC: the process of burning a boot loader/ changing the fuse timing on the ATtiny85.  To use neopixels, the ATtiny85 needs to run on an 8 Mhz internal clock, rather than the default of 1 Mhz. As of 11 January 2016, this issue has been fixed, making it incredibly easy to do this type of thing with students using Chromebooks!

Once I converted the chip to 8 Mhz, I was able to use CodeBender and a Chromebook to program it with neopixel sample code (with only a couple of small tweaks).

My next step was to see if I could apply this new learning to building a paper circuit with copper tape and surface mounted RGB LEDs.  The photos demonstrate a prototype using the surface mounted RGB LEDs soldered to wire!

Since I was able to get the LEDs to do what I wanted with wire, I am 100% convinced that this can be replicated with copper tape!  Stay tuned!



ATtiny85 controlling SMD RGB LEDs






















Updated 19 Dec 15:
I've created my first paper circuit with neopixels!  To learn more, visit BlingtheBook.blogspot.com.

Saturday, May 16, 2015

Fun With Neopixels!


I've been playing around with paint and a Gemma microcontroller (to learn how to program individually addressable neopixel LEDs).

Gemma would be incredibly valuable for teaching students about eTextiles, because they are less expensive than LilyPad Arduino boards, as well as being smaller, and quite easy to program!

For this purse, I used a Gemma, a LilyPad push button, three sewable snaps, conductive thread, and 2 coin cell batteries (in a holder) to power up nine neopixels.

From start to finish the process took three days.   This was largely due to the fact that I had to strip the leather and hand punch all of the holes that I sewed conductive thread through.

Using the Adafruit Neopixel library, and the button cycler code, I was able to customize the colors to match my bag.


Here are some pictures of the purse that I just finished transforming!  (In the event that you are wondering about the process or supplies that I used to paint and seal the leather, you may want to check out Sassyfeet.com.)  If you'd like to know where I got my inspiration for creating an "electronic handbag" check out:  http://www.electronicfashion.co.uk/

Black leather purse
Random Rainbow Pattern
I used Lumiere leather paint to make my design!

Sewable Snaps Inside Purse Create a Switch
Sewable Snaps on Back of Pocket





Complete Circuit: Attach Pocket Using Snaps

Gemma Sewn to Inside of a Pocket


Saturday, January 24, 2015

Chameleon Scarf Completed


I've been comparing and contrasting my LilyPad Arduino to the Adafruit Flora.  Using the Chameleon Scarf tutorial (and code) from the Adafruit website, I have created my first eTextile made with Flora.  This scarf has a color sensor and neopixel LEDs that change color, based upon what is placed in front of the sensor.

Although I did not write any of the code for this project (which feels like cheating), I learned how to use a new feature of my sewing machine, how to add Arduino libraries, and the advantages of using Adafruit conductive thread, rather than cheaper thread.  

To get started, I bought an inexpensive cashmere scarf and sewed it in half to create the tube you see here. Using a special foot on my sewing machine that zig-zags over a cord, I was able to gather the tube into ruffles and quickly sew my power and ground lines.

The trickiest part of this project was making sure that my computer had the correct Arduino libraries added.

While sewing the circuit together, I discovered that Adafruit thread is stronger, shinier, and much easier to work with than the Spark Fun thread!  I will never go back!

Rather than sewing the ribbon into a circle, I used Velcro, making it easier to remove the ribbon and LEDs from inside the scarf.

I enjoy the process of coding with a LilyPad, but I really like the way that a Flora doesn't require as many pins to create something truly inspiring; I have concluded that I am a fan of neopixel LEDs and the Flora Color Sensor.  I am eager to learn how to write my own code using Flora and its many sensors.