-1

I have hooked up a programmable ws2812 LED . The Datasheet says "Default power on does not light up"

Using the hook up guide and a breadboard I have a single LED where ...

  • DIN is attached to GPIO 10 on the PiZero (tried with and without 220 resister)
  • VDD is attached 5V (Board Pin 2) - For single LED this should be fine
  • GND is attached (Board Pin 6)
  • DOUT is not attached

I am testing just with one LED for now. This is the Python Script saved as app.py that is running using sudo python3 app.py

import board
import neopixel
 
pixels = neopixel.NeoPixel(board.D10, 1)
#pixels.fill((0, 255, 0))
pixels[0] = (255, 0, 0)
pixels.show()

SPI has also been enabled on the Pi via https://www.raspberrypi-spy.co.uk/2014/08/enabling-the-spi-interface-on-the-raspberry-pi/

I have confirmed with a multimeter there is 5V on the LED pins.

However it runs with out code error however the LED does not light up in any way.

5
  • Whatever your software does the WS2812 needs a 5V drive so you need a level shifter. (There are i believe newer models that work with 3.3V.) – Milliways Mar 25 at 11:47
  • I thought a level shifter is needed if I take from the 3.3v however I am connecting to the 5v – John Mar 25 at 12:13
  • Try powering from the 3v3 line. If data is referenced from Vdd then the data 1 on the data pin may not be 'high' enough to register. Also - did you add a capacitor it (and possibly an extra resistor) is shown on the final diagram of the spec sheet? A search will show others using a capacitor. – user130616 Mar 25 at 12:41
  • I am using this configuration learn.adafruit.com/neopixels-on-raspberry-pi/… which suggests with one pixel but that may not be enough – John Mar 25 at 13:18
  • I understand now it is not about powering the LED it is about the voltage on the GPIO data pin that need shifting. – John Mar 25 at 14:59
0

I found the issue is around the 5v. You can use the 5V from the board to power the LED however the PI still runs at 3.3V logic levels which can lead to odd things happening.

I think this explained it well. https://learn.adafruit.com/neopixel-levelshifter

Some microcontrollers, such as the Arduino Uno and Adafruit Metro 32u4, run at 5V logic levels, and so their data pins can speak directly with the NeoPixel. Other microcontrollers, such as the Adafruit Feather boards, Arduino M0 Pro, Teensy 3, and others, run at 3.3V logic levels. This means there can be a communications mismatch when one of their data pins tries to talk to the NeoPixel’s DIN input.

When the 3.3V board tries to talk to the 5V NeoPixel, a variety of strange behaviors can be exibited, including incorrect colors, flickering, dimness, and seemingly “dead” pixels.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.