3.3v-5v level converter

bidirectonal-mosfet-level-shifter

Using the level shifter shown I see 5V for 3.3V input and around 80mV for ground.
Assuming that’s ok (is it?) I’m trying to run some 2812 addressable leds but having no luck .

import board
import neopixel 
pixels = neopixel.NeoPixel(board.D18, 10)
pixels[0] = (255, 0, 0)
pixels[2] = (255, 255, 0)

I connect my raspi physical pin 12 (gpio18) to the level shifter and from that to the middle D0 line of the leds and bubkes. The leds are getting 5V ok and middle line is generally showing 0V (didnt try on scope) . anyone with some clues?
For instance is setting the correct length of strip (10 in the code above) mandatory? My strip is rolled up and I have no idea how many leds there actually are…

Please give a full schematic and I have a look and give you a schematic review.
Cheers

Ludwig

You can set the number of LEDs smaller than the real number and only that number will light. I don’t see any reason why setting it to larger would fail, it’s a timing/shift register based protocol, but I’ve never tried it.

I’ve found a decoupling cap across the LED power at the start of the strip has helped stability for me before.

I’m not familiar with the library you are using (I’m using FastLed over C++ on Arduino,) but don’t you have to flush the array onto the led strip at some point?

‫בתאריך יום ו׳, 1 בנוב׳ 2019 ב-1:19 מאת ‪Duncan via T.A.M.I.‬‏ <‪noreply@discourse.telavivmakers.org‬‏>:‬

removing the 3.3v - 5v ckt allowed the lights on albeit limpingly - and the data line got pretty hot physically …
i’ll try the cap and a different 3.3v-5v ckt but have hit another limitation namely that the neopixel library seems to require the same pwm that runs the raspi audio , so i cant have audio and leds at once … ronen does the fastled lib require pwm , and will it run on a raspi ? I dont really need fast leds.

I have no idea.

‫בתאריך יום ו׳, 1 בנוב׳ 2019 ב-15:11 מאת ‪jeremy rutman via T.A.M.I.‬‏ <‪noreply@discourse.telavivmakers.org‬‏>:‬

For running the leds from raspi I used a shelf level shifter, lowering LED supply voltage with diode also worked, Elad also sent a sacrificial pixel method that would save heat on the diode.

To get audio and pwm at same time apparently the hdmi audio output can be used , this requires e.g. hdmi-vga cable with separate audio breakout .

BTW to monitor/control the wifi-lan connected pi from the net I used this , it was easy to get going and allows ssh from anywhere. You can also do that on your own with reverse tunneling but will need an always-accessible server