There are many different types of pixels available. This is a general reference that shows connection points for most types of strips. Your project may have different requirements, but this is a good starting point.
For NeoPixel strips or other strips that have 3 solder pads or wires, connect to the screw terminal at the base of the board. There are markings on the PCB showing which terminal is which. It's set up with three 3-pin strip connections in mind, and each strip has its own power and ground connection. The GPIO pins are labeled: 19, 22, and 21, and they're in the middle of each block of 3 wires.
If you'd like to add a fourth instance/strip, connect the data and ground to the pins next to the screw terminal as shown, and the power wire to one of the +5v screw terminal ports.
The two Stemma connector ports can be used to connect sensors or other peripherals.
How many LEDs Can I Connect?
The Sparkle Motion board has four outputs for LED strips: 3 in the screw terminal and one more using the GPIO pins next to the screw terminal. It has a "Classic" ESP32 chip onboard.
Estimating Power Requirements
Each individual NeoPixel draws up to 60 milliamps at maximum brightness white (red + green + blue). In actual use though, it’s rare for all pixels to be turned on that way. When mixing colors and displaying animations, the current draw will be much less. It’s impossible to estimate a single number for all circumstances, but we’ve been using 1/3 this (20 mA per pixel) as a gross rule of thumb with no ill effects. But if you know for a fact that you need every pixel on at maximum brightness, use the full 60 mA figure.
To estimate power supply needs, multiply the number of pixels by 20, then divide the result by 1,000 for the “rule of thumb” power supply rating in Amps. Or use 60 (instead of 20) if you want to guarantee an absolute margin of safety for all situations. For example:
60 NeoPixels × 20 mA ÷ 1,000 = 1.2 Amps minimum
60 NeoPixels × 60 mA ÷ 1,000 = 3.6 Amps minimum
The choice of “overhead” in your power supply is up to you. Maximum safety and reliability are achieved with a more generously-sized power supply, and this is what we recommend. Most power supplies can briefly push a little extra current for short periods. Many contain a thermal fuse and will simply shut down if overworked. So they may technically work, but this is the electronics equivalent of abusing a rental car.
Here is a guide giving more info on what that means in terms of power draw: Powering NeoPixels Guide. The power draw varies greatly depending on the type of pixels and the brightness, as well as the color choice.
Keep in mind, 60 mA is a worst case estimate! We’ve written a whole separate tutorial on getting things under control: Sipping Power with NeoPixels.
Driving Pixels with WLED
For perfect performance, it is recommeded to use 512 LEDs/pin with 4 outputs for a total of 2048 LEDs.
For very good performance, it is recommended to use 800 LEDs/pin with 4 outputs for a total of 3200 LEDs.
For good performance, you can use 1000 LEDs/pin with 4 outputs for a total of 4000 LEDs.
For okay performance, you can use 1000 LEDs/pin with 5 outputs for a total of 5000 LEDs.
For okay performance, you can use 800 LEDs/pin with 6 outputs for a total of 4800 LEDs.
ESP32 can calculate about 65k-85k LEDs per second (that means 1000 LEDs @~70fps, 2000 LEDs @~35fps, 4000 LEDs @~18fps)
4 outputs seem to be the sweet spot.
What Kind of LEDs Can I Use?
The Sparkle Motion board and WLED accept a wide variety of pixel types. Anything in the Adafruit store labeled as "NeoPixel" or "Dotstar" will work. You can use rings, strips, jewels, pebble pixels, stars, RGBW strips, or just about any RGB addressable pixels you can find in our shop.
This setup will NOT work with "dumb" RGB strips or analog strips. It's meant for strips with individually addressable pixels (strips where each pixel can become a different color) rather than the strips that can only show one color at a time.
How Do I Power It?
The Sparkle Motion board has onboard power management so you can use 5v, 12v, or 24v strips. The board will deliver up to 20v (which is usually sufficient for 24v pixels). Be sure your power supply matches the voltage the LEDs expect. Here are a few good options. Check the shop for more variations including power supplies with inline on/of switches.
For wearable or portable projects you can use a USB battery with 5v pixels, plugged into the onboard USB-C port, or this 8xAA battery pack for 12v pixels. But if you're making a wearable project, you might also want to check out the Sparkle Motion Mini board. It's not quite as powerful and won't drive 12v pixels, but can power up to 4A at 5v and that's plenty for most costume pieces.
A Word About Connectors
It's possible to direct-wire your LED strips or pixels into the screw terminal, but I find it easier and more convenient to use 3-pin JST connectors that can be permanently affixed to the Sparkle Motion board with strain relief so they don't pull out. Then I can simply plug in whatever LED strip or strand I want to use.
LED strips often come with these connectors already attached, but there seems to be no standard for whether the factories attach the male or the female connector on the "in" end. For my own peace of mind, I try to be consistent and always use the male side of the connectors on the microcontrollers, and the female on the "in" end of my LED strip. Data is flowing "out" from the microcontroller and "in" to the strip, so the male/female metaphor makes good sense in this arrangement.
There is also no standard as to which way the color coding is wired on these connectors. Some have a red wire on the left side, some on the right side. Some have no color coding at all. Hooking your strips up "backwards" (accidentally connecting a red wire to a black wire) can damage your board and your LEDs, so it's important to be really careful when you're setting up your connectors. Be as consistent as possible with color coding and throw away any connectors you've got in the drawer that are wired "backwards" from the rest.
Screw Terminal Connections
Use a tiny precision flat head screwdriver to carefully and gently open the ports on the screw terminal. These are pretty easy to break so be gentle. Look carefully at the openings as you turn the screws. When you see a square opening appear, stop turning.
Strip about 1/8" of wire from the 3 connector wires and insert carefully into the screw terminals. Use red for +, the middle wire for data, and the remaining wire for -. Gently tighten the screw until it's snug: about 5 turns -- it shouldn't turn freely, if it does, you've got the wire in the wrong part of the hole so pull it out and try again.
The wires should not come out easily when you tug. But, as we know, these controllers get tugged on all the time! After testing to be sure of my connections, I added a zip tie around the back of the controller to create strain relief on the connectors.
Connect the female side of the JST connector to your LED strip or strand, making sure the wire order matches the male connector in your screw terminal: +5v (red) should match up to +, data IN to GPIO, and G to G. Plug in your strand and power up the board. The board comes pre-loaded with a rainbow animation so your lights should come on if you've got everything hooked up right.
Page last edited January 29, 2025
Text editor powered by tinymce.