Twitter/Web/iOS control Neopixel ring necklace

To show off the really fun things you can do with an Electric Imp breakout as small as Aria, we are posting the latest build of our Electric Imp powered Neopixel ring. ImpOS code for this project is available on the MakeDeck GitHub page.

YouTube Video:

The latest version features:

* MakeDeck Electric Imp Aria
* Sparkfun PowerCell LiPo charger
* Adafruit 16 pixel Neopixel ring
* 500mAh LiPo battery.

Control the color, brightness, pattern ect by:

* Pitchfork Color Picker
* Agent hosted jQuery Color Picker
* Twitter

Here is how the Twitter control works: The agent code includes the Electric Imp Twitter search code that allows you to constantly search ALL of twitter for a tweet with a specific term. Whenever it finds such a tweet it will return it and all of the tweet meta-information back to the agent. Then the code allows you to parse the tweet for additional information. This allows you to control the ring via Twitter. For example, if you tweet Neopixel, please change to #Red, with the example code, the Neopixel ring will find the tweet and change colors. You can choose any terms to search, and any to parse, allowing you change the colors around any text you like!

Full tutorial coming soon!

Very Cool!!!

That’s a neat idea!

Have installed the code but am really looking forward to the tutorial!

Until I write up a full tutorial, I decided to take a few more pictures and post a few notes. One of you is certain to find a better way to do this than I did, and hopefully we can make it an even better project. Here is a link to some pics on Pinterest.


I used the Sparkfun Powercell LiPo charger, and a 500mAh battery. If you round off the corners on the Powercell, it will fit down in between the pixels on the ring. This is great for making it small, but not great if you want to use the micro-usb port. If you want to use that, you’ll need to keep the board up a little so the usb port is accessible. I used black hot glue for this. You can remove the JST connector and USB connector from the powercell board if you like, or leave them in place.

I bought a tiny surface mount switch and glued it to the ring as shown in the pics. The switch breaks the negative lead on the battery before it goes into the Powercell board.

I took a 0.1" male header pin and bent the ends to opposite 90 degree angles with needle nose pliers. One end soldered down into the data in on the ring, and one end up into Pin 7 on the Aria board. Two pieces of wires run from 3.3V and GND on the Aria to Power and GND on the ring.

Two very short pieces of wire connect to VCC and GND on the bottom of the Powercell board to VIN and GND on the Aria.

Solder a loop of wire to the Data Out pads, this is between the 0 and 15 pixels, or the “top” of the ring.

The biggest design issue here is that you are covering the BlinkUp components once is built. Make sure the board is blinked up first, and then you can move networks with programming.

I can see a web interface in the code, what do I need to do to access it?

Just browse to the agent URL, or click the link in the IDE.

cool, looks like something got confused and it was still running my old agent, a wait and a reboot has brought it too life, hurrah!

Wierd thing is, the imp is only changing the color for the first minute, after that, it keeps replying to show its got my color calls but is not changing, a quick reinsertion of the imp and it comes back to life.

Hmmm. The Imp runs its BlinkUp routine for the first 60 seconds. Wonder if that is playing into it. The agent will always respond unless it crashes, even if it can’t talk to the device. I’m using the module, and even though the power circuit is nearly the same on Aria, the module uses a little less current. I am using the 3.3V regulated line from the imp to power the ring, but you could move that to VIN, and let the ring draw directly from the battery. That will mean that its voltage will change as the battery drains, but the ring and the Imp wont be competing for current from the regulator. That’s a bit of speculation… @Tom and @Hugo could provide a better answer.

Currently I’m running it off a beefy 5v PSU (as I had originally bought a 60-pixel strip)

It does have the “last pixel on the ring” problem, but it just that it doesn’t work after the first few seconds I am wondering about.

The last pixel on the ring issue seems to be related to the clearFrame() function to me… I need to talk to @beardedinventor about that.

a 60 pixel strip is going to use a LOT of current… I think its 20mA per pixel? that’s 1.2Amps at full brightness. The reg wont output that much, so you do need to power with 5V. Given that the card can use up to 400mA when if first powers up WiFi… you should have at least a 1.6A power supply, if my math is correct.

The pixels draw 20mA per colour per pixel (so 60mA if you’re blasting full white to all pixels). So 3.6A for 60 pixels at max brightness.

What is the “last pixel on the ring” problem?

the clearFrame function in the Neopixel class just doesn’t seem to work on the new code. I wrote one like this:
function clear() { for (local i=0; i<NUMPIXELS; i++) { pixelStrip.writePixel(i, [0,0,0]); } pixelStrip.writeFrame(); }

and that seems to work, but I don’t know how it differs from what is in the class. Whenever your write a function where you walk a pixel around a ring, the last one seems to stay on.

@beardedinventor The “last pixel on the ring” problem is the one you were discussing here at the following link, it looks like I have to add a level shifter :frowning:

I have moved the ring over to a USB powered board and am running the ring at 3.3v off the board output pins.

The ring is running cooler now and the problem with it stopping reacting has gone away, am still left the “last pixel on the ring” either almost off or flickering but until I buy a level shifter I won’t know if that is the cause.

BTW Great bit of code, just need a USB battery (or your lipo card) so I can wear under my shirt Elon Musk Tony Stark style :slight_smile:

Here are my thoughts on an even cooler “arc reactor”. It would be nice to make the device a little bigger… more along the lines of the Iron Man version. Adafruit has a larger 24 pixel neopixel ring, but the project might do better with fewer pixels on a larger ring, especially if its battery powered. I’m considering manufacturing a round board with WS2812 chips on it that would allow C3V0 to plug directly into the center. It would have a JST connector on the back and you could attach a nice large LiPo. I was looking at the “arc reactor” models on shapeways, and there are some really cool ones. I’d like to get on modeled just for this board, and we could have a seriously awesome Imp enabled project.

@back_ache, @jwehr - someone found a bug in our NeoPixel code this weekend and submitted a fix. @Tom pulled it into GitHub this morning.

If you feel like trying once more, it should be working now. This is the code you want:

I have also been experimenting with neopixels and want to design these into a board but I’m uncertain of a few things. I have been working with the WS2812 version in the form of the sparkfun single pixel breakout board, the adafruit 8 pixel stick and the adafruit 16 pixel ring.

  1. All of these seem to work fine when powered by the april board 3.3V and a small resistor on the signal wire. Is there a point at which 3.3V will not be viable? I know that at some point the april power regulator will not be able to supply enough current for everything.

  2. The datasheet for the ws2812 shows a typical circuit where 5V is connected directly to VDD and 5V through a 150Ohm resistor to VCC, also with a capacitor to ground. The sparkfun breakout has a capacitor. The 8 pixel stick appears to have one capacitor for each pixel. The 16 pixel ring seems to have one capacitor per pair of pixels. If I’m going to put up to 16 pixels on a board what do I really want for capacitors and resistors?

  3. I’ve seen comments about the ws2812b and I’m wondering what the practical considerations are other than having fewer pins. From the datasheet it looks like it has about half the brightness. Will its behavior with respect to being powered off of 3.3V be different?

  4. Would it be possible to take the data out from a string of pixels and run it back into an imp digital-in pin with a callback and detect the number of pixels by probing with color sequences of increasing length or will there always be some signaling coming out the end of a string?

If you are going to create a board for it, could I suggest using micro-b usb connector rather than mini-b as in Europe at least all our phone chargers (and other gadgets) are using that connector

@beardedinventor your new code lights all the pixels (and is a pretty cool animation)

Can we get the change rolled into Makedeck’s code?