I've read the NeoPixel Uberguide (https://learn.adafruit.com/adafruit-neo ... -neopixels) a few times, but I am having a hard time understanding the power requirements for NeoPixels.
For example, I have an ESP32-S2 QT Py powered by a USB-C power supply that is marked "Output: 5V=3A/9V=2.22A". The QT Py draws the 5V power so it has 3A available, right? I plan to use 32 NeoPixels (4 x 8 pixel stick) as a light source, so I imagine I have to plan for them to run bright, which would be 32 NeoPixels x 60 mA / 1000 = 1.92 A minimum. Have I got that right?
But what I don't understand and can't seem to find documentation on is how much the QT Py itself draws. In other words, how much of the 3A available is left for the NeoPixels? Is that even a sensible way to think about this?
I also don't really understand the power implications of the Stemma QT connector. Would this be a better way to connect the NeoPixels than the A1/5V combo?
How would I determine the maximum number of NeoPixels that I could run straight off this microcontroller without any add-on power? And how do I understand the impact of adding another device (like a power relay to control a neighboring AC light) to the mix?
If there are good tutorial documents or videos you would recommend, I'd love to learn more. Thanks!
Understanding NeoPixel power needs
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 13823
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Understanding NeoPixel power needs
The QT Py ESP32-S2 has a 3.3v regulator on board that maxes out at 600mA. That gives an idea of the max current that the QtPy will use for itself.
https://www.adafruit.com/product/5325
https://www.adafruit.com/product/4232
https://www.adafruit.com/product/2690
The 3A USB-C supply you are using sound ample for your 32 neopixel (2A) + ESP32-S2 (.6A).
https://www.adafruit.com/product/5325
Normally, the draw will be far less even with WiFi so the best way to measure is to use a USB meter. We have a couple different models that you can plug right in between the power supply and the board. These are super helpful when try to determine the correct power supply based on your actual usage.3.3V regulator with 600mA peak output
https://www.adafruit.com/product/4232
https://www.adafruit.com/product/2690
The 3A USB-C supply you are using sound ample for your 32 neopixel (2A) + ESP32-S2 (.6A).
- efc
- Posts: 16
- Joined: Sat Nov 20, 2021 11:00 am
Re: Understanding NeoPixel power needs
Well, I decided to try something else as well and bought one of the skinny NeoPixel strips (https://www.adafruit.com/product/4913). These are 60 pixels, but less powerful… so I thought 60 of these roughly similar to 30 regular pixels.
Unfortunately, when wired with ground to ground, power to the 5V pin and data in to A1 I can’t get the strip to light at all. I am using a 5V 3A usb power supply for the Qt Py and the on board 5V pin for the strip.
Should this work? What might I be missing? How can I test the strip to be sure it is not a dud?
Unfortunately, when wired with ground to ground, power to the 5V pin and data in to A1 I can’t get the strip to light at all. I am using a 5V 3A usb power supply for the Qt Py and the on board 5V pin for the strip.
Should this work? What might I be missing? How can I test the strip to be sure it is not a dud?
- michaelmeissner
- Posts: 1819
- Joined: Wed Aug 29, 2012 12:40 am
Re: Understanding NeoPixel power needs
I'm tracking down issues with Adafruit DOT neopixels (https://www.adafruit.com/product/5225, https://www.adafruit.com/product/3630, and perhaps others) right now, and there are 2 issues that it could be:
1. Voltage levels
With my Gemma M0, if I wire up 1 or 2 neopixel 16 LED rings, the Gemma drives them just fine using the Battery, Ground, and A2 connections. I can run it either from USB (5 volts) or lipo battery (3.7 to 4.2 volts). But if I switch to the strips I mentioned above, the lights come on with full white or don't work at all. If I use my Teensy LC which has a neopixel level shifter built-in, it works fine.
The issue is there is a difference in voltage level between the voltage powering the LED (5 volts and/or 3.7 to 4.2 volts) and the data signal (always 3.3 volts). Some chips will detect the differences in signaling if a 3.3v data signal goes on/off. Some won't. The original WS2812 and WS2812B neopixels were really bad with this, but most of the newer SK6812 LEDs are more forgiving. The Adafruit DOTs seem less forgiving.
Over the years, there have been several different solutions:
The other thing is that which end is the input and which end is the output varies. I was stumped when I moved neopixel DOT strands that it didn't work at all, until I released that https://www.adafruit.com/product/5225 wants the input on the male plug while https://www.adafruit.com/product/3630 wants the input on the female plug.
It would be helpful if Adafruit released gender swapping and/or format swapping cables (i.e. JST SM 2.5mm pitch vs. JST PH 2.0mm pitch vs. JST SH 1.0mm pitch). I find often times my hand spliced soldered connections come apart when I use it in a cosplay setup for 10 hours or so.
1. Voltage levels
With my Gemma M0, if I wire up 1 or 2 neopixel 16 LED rings, the Gemma drives them just fine using the Battery, Ground, and A2 connections. I can run it either from USB (5 volts) or lipo battery (3.7 to 4.2 volts). But if I switch to the strips I mentioned above, the lights come on with full white or don't work at all. If I use my Teensy LC which has a neopixel level shifter built-in, it works fine.
The issue is there is a difference in voltage level between the voltage powering the LED (5 volts and/or 3.7 to 4.2 volts) and the data signal (always 3.3 volts). Some chips will detect the differences in signaling if a 3.3v data signal goes on/off. Some won't. The original WS2812 and WS2812B neopixels were really bad with this, but most of the newer SK6812 LEDs are more forgiving. The Adafruit DOTs seem less forgiving.
Over the years, there have been several different solutions:
- Power the neopixels with 3.3 volts instead of 5 volts. You have less power available (typically 250-600mA), and technically 3.3 volts is under spec for the LEDs. But a lot of time it will work.
- Sometimes just powering the LEDs with a lipo battery instead of USB works. The 3.7 - 4.2 volts that lipos put out are just enough smaller voltage that the chip will see the signaling from the data pin.
- Use a high speed power level converter on the data pin to raise it to the voltage used for the lights. The normal level shifters used for I2C/SPI devices are too slow for neopixels, but there are faster converters. It is unfortunate that the only level shifter available in through hole format (https://www.adafruit.com/product/1787) is rather big. You can get much smaller SMT versions from other suppliers, but for people who aren't up on SMT soldering there are fewer choices. I wish Adafruit would sell several breakout boards that have a single level shifter with each of the plugs used (JST SM 3-pin male/female, JST PH 3-pin male/female, and through hole pins) to easily plop into circuits.
- A few devices have a high speed filter available for neopixels and dotstars, such as Teensy LC (pin A3), Teensy prop shield (pins 11 and 13), and Adafruit prop shield (pin D8 IIRC).
The other thing is that which end is the input and which end is the output varies. I was stumped when I moved neopixel DOT strands that it didn't work at all, until I released that https://www.adafruit.com/product/5225 wants the input on the male plug while https://www.adafruit.com/product/3630 wants the input on the female plug.
It would be helpful if Adafruit released gender swapping and/or format swapping cables (i.e. JST SM 2.5mm pitch vs. JST PH 2.0mm pitch vs. JST SH 1.0mm pitch). I find often times my hand spliced soldered connections come apart when I use it in a cosplay setup for 10 hours or so.
- efc
- Posts: 16
- Joined: Sat Nov 20, 2021 11:00 am
Re: Understanding NeoPixel power needs
Thank you! I think it was a gender issue. I've plugged it all together again and it is working just fine!michaelmeissner wrote:Gender of the plug
Please be positive and constructive with your questions and comments.