Neopixel slim LED strand won't light up

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Technigirl
 
Posts: 14
Joined: Wed Jul 12, 2017 5:15 pm

Neopixel slim LED strand won't light up

Post by Technigirl »

Hello!

I'm using the slim neopixel strip with a Gemma M0. https://www.adafruit.com/product/5225

I have soldered a male JST connector to the Gemma M0's Vout, D1, and Ground pins. I plugged the strip's female end into this. I confirmed that the strip's red wire is the one that is matched to Vout.

I can't get the strip to light up at all. I've tried several example codes that I've found on this site.
(I've tried several, none have worked, but below I've pasted the latest code that I tried). The code runs with no errors in the Serial output.

I can see that there is just under 5V coming out of the Gemma's Vout pin, so that seems to be ok.

What could I be doing wrong here? Maybe something wrong with the strip?

Code: Select all

# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

import time
import board
import neopixel


# On CircuitPlayground Express, and boards with built in status NeoPixel -> board.NEOPIXEL
# Otherwise choose an open pin connected to the Data In of the NeoPixel strip, i.e. board.D1
pixel_pin = board.D1

# The number of NeoPixels
num_pixels = 20

# The order of the pixel colors - RGB or GRB. Some NeoPixels have red and green reversed!
# For RGBW NeoPixels, simply change the ORDER to RGBW or GRBW.
ORDER = neopixel.GRB

pixels = neopixel.NeoPixel(
    pixel_pin, num_pixels, brightness=0.2, auto_write=False, pixel_order=ORDER
)


def wheel(pos):
    # Input a value 0 to 255 to get a color value.
    # The colours are a transition r - g - b - back to r.
    if pos < 0 or pos > 255:
        r = g = b = 0
    elif pos < 85:
        r = int(pos * 3)
        g = int(255 - pos * 3)
        b = 0
    elif pos < 170:
        pos -= 85
        r = int(255 - pos * 3)
        g = 0
        b = int(pos * 3)
    else:
        pos -= 170
        r = 0
        g = int(pos * 3)
        b = int(255 - pos * 3)
    return (r, g, b) if ORDER in (neopixel.RGB, neopixel.GRB) else (r, g, b, 0)


def rainbow_cycle(wait):
    for j in range(255):
        for i in range(num_pixels):
            pixel_index = (i * 256 // num_pixels) + j
            pixels[i] = wheel(pixel_index & 255)
        pixels.show()
        time.sleep(wait)


while True:
    # Comment this line out if you have RGBW/GRBW NeoPixels
    pixels.fill((255, 0, 0))
    # Uncomment this line if you have RGBW/GRBW NeoPixels
    # pixels.fill((255, 0, 0, 0))
    pixels.show()
    time.sleep(1)

    # Comment this line out if you have RGBW/GRBW NeoPixels
    pixels.fill((0, 255, 0))
    # Uncomment this line if you have RGBW/GRBW NeoPixels
    # pixels.fill((0, 255, 0, 0))
    pixels.show()
    time.sleep(1)

    # Comment this line out if you have RGBW/GRBW NeoPixels
    pixels.fill((0, 0, 255))
    # Uncomment this line if you have RGBW/GRBW NeoPixels
    # pixels.fill((0, 0, 255, 0))
    pixels.show()
    time.sleep(1)

    rainbow_cycle(0.001)  # rainbow cycle with 1ms delay per step
Last edited by dastels on Sun Aug 07, 2022 10:45 pm, edited 1 time in total.
Reason: Add code tag

User avatar
dastels
 
Posts: 15760
Joined: Tue Oct 20, 2015 3:22 pm

Re: Neopixel slim LED strand won't light up

Post by dastels »

Are the data and ground pins connected correctly?

You are powering the strip with 5v, but the M0 uses 3.3v logic. You should use a level shifter to covert the NeoPixel data signal to 5v logic. Or power the strip with 3.3v from the Gemma. See https://learn.adafruit.com/adafruit-neo ... -practices.

Dave

User avatar
Technigirl
 
Posts: 14
Joined: Wed Jul 12, 2017 5:15 pm

Re: Neopixel slim LED strand won't light up

Post by Technigirl »

Thanks Dave! I tried the 3.3V output of the Gemma, and that didn't seem to do the trick. I'll have to give the level shifter a go next.

I am pretty sure I have the power and ground connected correctly. My Power wire matches to the strip's red wire.

The strip's data line is connected to the Gemma's D1 pin.

User avatar
Technigirl
 
Posts: 14
Joined: Wed Jul 12, 2017 5:15 pm

Re: Neopixel slim LED strand won't light up

Post by Technigirl »

Actually I think it is the strand now...using the 3.3V output, and a different type of neopixel strand, it works. I'm not sure why this particular strand doesn't. I have 2 of them and neither works. :(
The strand that works is this model: https://www.adafruit.com/product/3630
The one that doesn't is the model referenced in my original post.

Is there something particular to the slim strand that I need to do, or do I have defective strands?

User avatar
dastels
 
Posts: 15760
Joined: Tue Oct 20, 2015 3:22 pm

Re: Neopixel slim LED strand won't light up

Post by dastels »

NO, they're just NeoPixels. The only odd bit is the mention of the wiring not being labelled.
The red wire is V+ power, the middle wire is data in, and the last wire is ground.
Dave

User avatar
Technigirl
 
Posts: 14
Joined: Wed Jul 12, 2017 5:15 pm

Re: Neopixel slim LED strand won't light up

Post by Technigirl »

Thanks Dave.

I think I may have found the problem. I just noticed that on both of these slim strands, 2 of the wires into the JST seem to be crossed (see pic). That doesn't seem right, I don't think. I will try cutting and directly soldering them, although it sucks that I can't use the JST.
slim_neopixel.jpg
slim_neopixel.jpg (252.51 KiB) Viewed 45 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”