First we need to identify the wires on the pebble pixel strand. One wire is 5V power, one is ground, and the third is the data wire, which is directional -- connect at the IN end and data flows through to the OUT end.
Figuring out which wire is which is the hardest part of this project. These wires are generally not marked, and there's no standard for which connector is which. There are a couple tricks that will help us.
- If your strand has connectors soldered to it, you can usually (not always) trust the color coding. Red is almost always +5v, black is usually G, and a green or other colorful wire is usually data.
- The +5v wire often has a tiny copper wire coiled around the inner wire inside the shielding. If you spot this, or anything that looks like stripes, you know you've found the power wire, usually connected to red.
- With the resin bump facing you and the connector pointing upwards, place the +5v wire on the left. We can make an educated guess that this is the IN end, the middle wire is data, and the rightmost wire is G. Let's start with this assumption. If the wires don't light up, try the same configuration at the other end.
If you have some alligator clips and a Circuit Playground Express or other microcontroller with copper pads, you can load up some NeoPixel test code and clip the wires to the controller to be sure you've got it right. If not, then just soldier on and be prepared to redo it if you need to.
If your strand already has connectors soldered to it, use those. Otherwise, solder a male 3-pin JST connector to the IN end of your strand.
Mine has a male connector on the IN end.
Grab your extra JST connectors and plug the corresponding (female) connector into your LED strip. Adafruit's JST connectors are all black, so the easiest way to keep the wires straight is to solder while plugged in to the strand (but not plugged into power!).
Solder the 3 wires of the female connector to your Feather ESP32 as shown:
- +5v/Red Wire to BAT
- Middle wire to GPIO 13
- Black / G wire to G
Check to be sure the wires are going to the right place -- switching the power and ground wires will cause your board to short out.
Powering the Strip
If your project has just a few pixels (no more than 30-50), you can now power them up through the JST connector port. You can also power from the USB port -- but if you're doing that, connect the power wire to USB instead of BAT.
If you have more than 50 pixels you can damage your microcontroller if you try to pull the power through the board like this. Here's a better way to power longer strands.
Grab your second male/female pair of JST connectors. Strip about 1/4" of shielding off all 6 wire ends. Solder the middle wires together.
Plug the female connector into the male connector you just soldered onto your Feather. Plug the female into the LED strip. Follow the the wires carefully and twist together the two power and two ground wires on the connectors.
Unscrew the tiny screws on your screw terminal and slide the twisted pairs of wire into the correct holes: power to + and ground to -.
Check and double check that you've got this right. The ground wire should go from the Feather G pin to the screw terminal -, then out to the G wire on the pixels. The pixel wire with the copper coil should go from +5v to + to BAT.
Plug your power supply in via the screw terminal and your lights should come on. Success! If they didn't, here are some things to try.
Troubleshooting
- Have you loaded the WLED software yet? Do that first.
- If you can't get the lights to light up at all, you may be connecting to the OUT end instead of the IN end. Try flipping the strip around.
- Double check that you've set up the correct GPIO pin in LED Settings in WLED - the lights won't come on if you've soldered to pin 12 and set up the software on pin 13.
- Wiggle the wires in the screw terminal. These things can be fussy or the pads can be misaligned. Unscrew and re-screw until you can tug on the wires with nothing coming loose.
Color Order
Once your lights have come on, open a browser and go to your project in WLED. If you gave it a name in the WLED settings, you can get there by typing that into your location bar followed by ".local" -- mine can be reached by going to http://garland.local.
Normally when WLED first boots up, the default is a warm yellow light color. But our lights didn't boot up in yellow.. they booted up in green. What gives?
Open the WLED interface (open garland.local in a browser window). Choose "solid" as your effect and red as your color from the color picker.
My lights are now bright blue. If I choose green, they turn blue, but if I choose red or green they appear to be swapped. Not to fear: these pixels simply have a different Color Order than standard. There's a setting in WLED to fix this.
Head to the LED Preferences tab under Config and scroll to the Hardware Setup section. Find the box for Color Order and change it from GRB (green, red, blue) to BGR (blue, green, red). This will swap red and green so your strip matches the interface.
FYI: This can be a problem when mixing different types of strips or strands. Normally you can solder together any kind of NeoPixels as long as you match the pins and get the data order right, or solder multiple strands or rings on different pins on your QT Py. But if the color order is different on one of the strands, there's no way to tell WLED to treat the different strands differently. Changing this dropdown will affect your whole project, so take that into account when you're doing your planning. You may need an additional controller if you want to add a different type of lights.
Text editor powered by tinymce.