A slight problem may have taken out one of Max Maxfield's Adafruit NeoPixel rings. Happily, there is a solution.
But what about my rotary potentiometers? There are five of these in the upper portion of the control panel. As you can see in the image below, I've decided that each will have 16 associated LEDs.
Fortunately, Adafruit supplies NeoPixel rings with 16 elements. These are perfect for my project, as illustrated below. Adafruit also offers 12-NeoPixel and 24-NeoPixel rings.
In addition to power and ground connections, each NeoPixel ring has a data-in connection and a data-out connection, thereby allowing you to connect a bunch of them together in series. All of this brings us to the crux of my problem. This morning, I brought one of my rings into work to show to my chum Ivan. When I proudly turned everything on, however, the result wasn't what I had expected. Instead of a glorious rainbow pattern rolling around the ring, all we saw was one lonely NeoPixel giving a very half-hearted attempt to light up.
Ivan immediately bounced over to his office and returned with a multimeter and oscilloscope. It took only a few seconds to discover that we were getting power to the ring, and the programming signal was reaching the ring's data-in pin, but there was no programming signal at the data-out pin. Hang on. I've been thinking about this as a long shift register, but it just struck me that this might not be a good analogy. Maybe we shouldn't see anything at the data-out pin unless we modify the program to behave as though there were more NeoPixels in the chain. (Hmmm... I'll have to go back and experiment further.)
It may well be that I accidently blew out the input stage to the first NeoPixel in the chain by electrostatic discharge (ESD). However, Ivan also pointed out that we were seeing a lot of overshoot and undershoot on the programming signal, as seen in the oscilloscope screenshot below.
In order to address this, we added a potentiometer into the circuit just before the signal line was presented to the NeoPixel ring. We started off with the potentiometer set to 0Ω. Then we gradually increased the resistance until the overshoot and undershoot were completely removed from the signal, as shown below. Increasing the value further started to impact the slope of the signal's edges.
The ideal value for this particular configuration was 230Ω, which we subsequently approximated by strapping two 470Ω 1/4-watt resistors in parallel. The required resistor value will no doubt depend on the characteristics of the rest of the wiring harness, so I will be repeating this procedure for future iterations of the design.
As I say, it may be that this overshoot and undershoot is not a problem, and that it was my own stupid fault that my NeoPixel ring was toasted due to my failing to take ESD precautions. On the other hand, I feel much happier knowing that we are now working with a clean programming signal. But now I must away to order a replacement NeoPixel ring. In the meantime, please feel free to post any questions or comments below.
— Max Maxfield, Editor of All Things Fun & Interesting