0

May 27, 2015 AT 4:00 am

As Seen on Show and Tell: Twinkling daffodils based on Adafruit Neopixel Tiara #WearableWednesday

Thank you to Virgil Machine for sharing his great twinkling daffodils project on show and tell last week! Check out his blog for info on the full build.

This was a fun project. The final tiara project its for my granddaughter’s pre-school graduation. I would have done a mortar board, but I think it might be unseemly for a 5-year old to wear a tricked-out costume in her procession, so I decided on a tiara that should could wear at family events to celebrate her accomplishment.

Rather than the headband plus wires in the tutorial, I decided to buy a tiara and add the neopixels to it. I looked all over Michael’s, AC Moore, ToysRUs, Itzaparty, etc, and found nothing suitable, but I found this online and bought 2 so I’d have one for backup.

Meanwhile, I was preparing for our local “in-Bloom” festival and decided to see what I could do with fake daffodils. That same day (but I had the idea first) Wearable Wednesday had a floral bouquet project, so I knew I was on the right track. It turns out fake daffodils are hard to find, but AC Moore had a fake potted plant.

I’m in this to learn, and I was not disappointed by this project.
What I learned (or at least some of it…some things re-learned)

  1. See my post on setting up the neopixels on a breadboard…that was the initial test. I got it going with 4 neopixels, both a Gemma and a 3V Trinket, and some alligator clips
  2. I wanted to add colors to the code supplied. The comments are pretty clear:
    // Here is where you can put in your favorite colors that will appear!
    // just add new {nnn, nnn, nnn}, lines. They will be picked out randomly
    // R G B
    uint8_t myColors[][3] = {{232, 100, 255}, // purple
    {200, 200, 20}, // yellow
    {30, 200, 200}, // blue
    };
    // don’t edit the line below
    #define FAVCOLORS sizeof(myColors) / 3
    However, I was not sure about the [][3] construct (i.e., not specifying one dimension of the array). Some Googling revealed that if the array is initialized, the dimension can be omitted. This one is initialized, so all I had to do was more colors (more rows of {R,G,B}). The comments in the example code say that, but not why. I have been programming for 40 years in a variety of languages, so arrays are very familiar–sometimes I just have to learn the details to apply them with understanding. So, I added 5 colors.
  3. The tiara example shows the neopixels powered from the 3.3V pin on the Gemma, and that works with both a Gemma and a 3V Trinket. The Adafruit Neopixel Uberguide says to always power neopixels separately from the power pin on the microcontroller, and that they need 5V. As far as I can tell the guide is accurate, but for projects using a few neopixels from a Gemma or 3V Trinket, powering from the 3.3V pin works. The guide also says not to use alligator clips, but I didn’t have any trouble with them for testing.
  4. The Uberguide says to add a 1000uf capacitor across the + and – pins of the power supply, and also a 300-500Ohm Resistor between the data pin and the first neopixel. I will reserve that knowledge for future projects. Becky’s tiara tutorial does not mention this, and the circuit works without them. Just for grins, I will add the cap and resistor to the daffodil circuit.
  5. Further, the guide says that if you’re using a 3V microcontroller and power the neopixels from a 5V supply, you need a logic level shifter. I decided to stick with the tutorial for the tiara (3V Gemma with neopixels connected to 3.3V and GND on the Gemma), but for the daffodils I will use a 5V Trinket to avoid the need for a level shifter, and power the neopixels from power rail. not the 5V pin on the Trinket. I was going to power the circuit from my 5V regulated power supply, but that adds an extra component, so I’ll just solder a barrel jack on the perma-proto and use a 5V wall wart (I’d need power anyway to power the 5V supply). I’m using the Adafruit Compact Switching Power Supply.
  6. After fussing with ideas about an enclosure, I decided that I didn’t need one. The circuit is very simple, and I don’t need a lot of internal connections. So, I’m putting it on a small mint tin size perma-proto, with a barrel jack for the connection to power. Since the power rails are down the center, I can place the trinket horizontally across the board, with the BAT and GND pins over the power rails, supplied by the barrel jack. Since pin #4 is next to GND, I can modify the data pin in the code and connect DATA, GND, and Vcc to header pins to connect to the 3-wire connector and on to the daffodils. That’s it. I will put 3/4″ standoffs on the 4 corners of the perma proto to provide clearance.I don’t need to solder anything other than the 3 wires to the Trinket…that will make it easier to reuse.
  7. Speaking of the 3-wire connector, I found some, labeled B2-2832, that I ordered a while back, I don’t remember from where. Googling the number doesn’t yield anything useful. Anyway, it simplified the wiring a lot. I’ll cut it in half, use the receptacle end to attached to the Trinket pin and power rails, and solder the other ends to data. power and ground coming from the circuit. I’ll put the resistor in the connection on the data wire.
  8. I had originally planned to put the neopixels inside the corona (trumpet part of daffodil). My wife, who understands crafty stuff better than I, suggested just positioning the neopixels outside of the flowers, to let flowers diffuse the light. This turned out to look better, and also simplify the project. I would have had to clip out the flowery stuff inside the corona (fake pistil, stigma, and anther), poke holes in the corona for wires, and solder the inter-flower data wires and heat shrink on the flower.I made more work for myself because I started out with the original design in mind, but the tutorial reflects the improved process.

Read more.


Featured Adafruit Products!

NewImage

Adafruit Trinket – Mini Microcontroller – 5V Logic: Trinket may be small, but do not be fooled by its size! It’s a tiny microcontroller board, built around the Atmel ATtiny85, a little chip with a lot of power. We wanted to design a microcontroller board that was small enough to fit into any project, and low cost enough to use without hesitation. Perfect for when you don’t want to give up your expensive dev-board and you aren’t willing to take apart the project you worked so hard to design. It’s our lowest-cost arduino-IDE programmable board! Read more.


NewImage

Flora RGB Smart NeoPixel version 2 – Sheet of 20: So, you want lots and lots of NeoPixels? And you want them for less? Not a problem! Here’s a sheet of Flora NeoPixels fresh from the (reflow) oven. Cut them off as you need ’em and save a pretty penny while you’re at it. Read more.


Flora breadboard is Every Wednesday is Wearable Wednesday here at Adafruit! We’re bringing you the blinkiest, most fashionable, innovative, and useful wearables from around the web and in our own original projects featuring our wearable Arduino-compatible platform, FLORA. Be sure to post up your wearables projects in the forums or send us a link and you might be featured here on Wearable Wednesday!


Check out all the Circuit Playground Episodes! Our new kid’s show and subscribe!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground”Adafruit’s Apps!


Maker Business — “ORANGE PI: MEETING WITH STEVEN ZHAO IN SHENZHEN”

Wearables — Design with IFTTT

Electronics — Keep track of those rails!

Biohacking — Why Our Eyes Cannot Look at a Solar Eclipse

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.