Neopixel Nightlight

I recently purchased a Shapeoko desktop CNC kit and am using it to create enclosures for various projects. I started working on a nightlight for one of my nieces. She will be able to change the color, brightness, pattern, ect… and the rest of us will be able to send it “light messages”. This picture shows using a neopixel strip. The font is “Mango Temple”, since she is into Mango anime. The enclosure is milled from red oak. I have the front mostly sorted out, and am working on the back piece that will hold the imp and battery. I’m looking for suggestions to make this a really cool project. Anyone?

The enclosure looks pretty sweet and cannot see a way to improve it, if you haven’t done so already I’d make the battery rechargeable from a microusb phone charger

software wise,

  • A “sunrise” alarm clock that does a long-fade to full at specified time
  • A IFTTT type link so she can attach it to social media of whatever
  • A sunset function that fades from full to nightlight in the time it takes to get into bed
  • A NFC reader so she can present physical things to it to trigger different actions, for example like Disney has done with infinity (nfc tagged figurines) but in her case tagging thing to do with her love of Anime

I was going to do one of these myself for my daughter but I wasted all my energy on trying and failing to get neopixels working well :frowning:

Hmm… I wonder what was going on… I have never had a problem using them, and ive hooked them up every way imaginable. I wonder if you got a bad batch? Thanks for the ideas.

@back_ache - are you boosting your data line to 5V?

The reason people have difficulties with Electric Imp + NeoPixels is that neopixels are 5v devices and they sometimes work with a 3.3v signal.

There are two solutions:

  1. Boost the DIN line to 5V (preferably with an AND gate so it’s nice and fast)
  2. If you’re not driving a lot of pixels, add a diode on the 5V line. This will drop VDD slightly, making the 3.3V data signal above the high voltage threshold.

Hmm, sounds like makedeck’s got an opportunity to make neopixel “boost-boards” (maybe there something like in the ardunio world for the plug-and-players).

I bought a long enclosed neopixel strip with the idea of the nightlight being a wall-washer that never worked (but I’d chopped the plug so engaging with the supplier was pointless)

I then bought a neopixel ring which gave very unreliable results

Where did you get your Neopixels? I’d like to determine why some work well and some don’t.

@jwher - there are two kinds of “NeoPixels” - one is the ws2812, the other is the ws2812b. The two ICs have very similar but slightly different timing requirements.

But - the imp can’t time things with quite enough granularity using the SPI bus hack. As a result, we’re right on the edge of the allowable timing thresholds (even taking into account timing errors).

The imp outputs 3.3v instead of 5v (not going to explain why it can sometimes work because of VDD and high/low thresholds… you can find that in another post).

So both the timings and the voltage is right on the threshold - added together this makes for an unreliable system across multiple pieces of hardware (different strips, and different imps). Depending on your power supply, and a few other things it might work, but it might not.

Regardless - if you are running your NeoPixels at 3.3v, you are running them out of spec, nad you expect consistent results.

@back_ache - all that said, if you have a NeoPixel strip where the LEDs have 6 terminals instead of 4, you might be able to use my ISS-Overhead neopixel code.

It seems to work more reliably for the old style of NeoPixels without having to boost the Din voltage. You can find the code here (no guarantee it will work):

I guess I am wondering if Adafruit has been very particular in which chip they have purchased and how they have thier boards laid out… perhaps has contributed to my success? Have you seen both the ws2812 and 12b on Adafruit products?

@back_ache Next time you order, I’m going to toss in some known good Neopixels. :slight_smile: I suppose I should make my own strips and rings at some point…

@jwher - the older NeoPixels used the ws2812, the newer ones use the 2812b. Both have been sold through AdaFruit - the 2812b is what they currently stock (typically - there might still be some NeoPixel products using the the 2812).

@jwher I bought both of them from “cool component” here in the UK, I thought they were simply importing from adafruit but am wondering if they went to china for the strip.

@breardedinventor you guessed right, its a six-wire strip.

I’ve had success with these and these from coolcomponents, driven directly from aprils, but only using this code.

@jwehr, I am considering getting one of my kids to change their name to Reilly.

Hahaha! I’m hoping to be able to do lots of names. Still need to work out the back part of the enclosure.