ws2812b on pcb not white

Posted on
  • Hello,

    i'm playing with self soldered ws2812 strip (neopixel like from ebay)
    i've use the solution with the open drain (330ohm between DIN and 5v) - color have changed
    but i've got strange behavior.
    I'm working with pattern repeated on the strip...
    if i switchOn only on led on my pattern , there is two led ligthed up one purple, one green...
    i've tried some things like decay rbg value in the rgb array, but it's not that...
    any idea...
    Where i'm bad?
    thanks for your idea...

    é.

    var tGauss = new Uint8ClampedArray(9);
    var rgb = new Uint8ClampedArray(20*3);
    
    tGauss = [0,0,0,0,255,0,0,0,0];
    
    console.log(rgb);
    // animation chenillard
    function anime() {
    	// pour espruino
    	for (var i = 0; i < Math.ceil(rgb.length/3); i++) {
    		rgb[(i*3)+0] = tGauss[i%tGauss.length];
    		rgb[(i*3)+1] = tGauss[i%tGauss.length];
    		rgb[(i*3)+2] = tGauss[i%tGauss.length];
            console.log(rgb[(i*3)],rgb[(i*3)+1],rgb[­(i*3)+2]);
    	}
    	require("neopixel").write(B15, rgb );
    	decalage++;
    }
    
    function onInit() {
    	USB.setConsole();
        pinMode(B15, 'af_opendrain');
    	setInterval( anime, 500);
    }
    
  • if i try

    require("neopixel").write(B15, [0,0,255] );
    

    it's blue;
    255,0,0 = red - orange
    0,255,0 = purple

    !!!
    is it a problem with the resistor on the drain?

  • I've tried with only 2 leds (new wire, new soldering, new leds)
    same result.

  • If you run that command multiple times, do you still get problems?

    What voltage are you running the LEDs/board off? And are you sure you have connected GND between the board and the LED strip?

  • it's a setinterval..... it loop
    I'm working with espruino mini unpinned.

    I think i have alway the same prob with the way to powering circuit (leds + espruino)if i need more than 400mA and using usb for programming at the same time... i need lot of power for the leds...
    I'm confuse because usb power the board!
    how to connect heavy power during developping time with usb plugged? and have same power without usb connected...
    On my previous work i do not need power and using for powering oled screen... we've (you in fact) find the solution.
    I'm confuse... always and always... sorry... when i've read your tech doc about powering, i'm confuse... for a non english reader, i find your explanation to ambigious (i'm sorry to have to say that...), the way you build your sentence is not univoc (one way) for my understanding level.
    so i'm confuse and i don't know if i had to do that way or this way... do i have to bridge some thing on the back of the board????
    I've roasted, one board... i was desesperate to do that and i want to avoid to do that again, just because i'm enable to understand how to wiring power on the espruino...

    Can i power the espruino's board and my leds by the same way
    Vin -> 5V and vBat -> Leds?

    I think it's a power prob.... and perhaps a logic level prob... but...

    regards

    é.

  • 330 ohm pullup?! Why such a low resistance? IIRC I used 4.7k; I wouldnt go lower than 1k, and would probably use 4.7 or 2.2....

  • @DrAzzy that's what I'd suggested in the write-up I believe. With a decent length of wire going to the LEDs I felt it needed a decently low resistance to get a nice clean waveform.

    @Mrbbp so you're using Espruino Pico?

    As you say you'll struggle to get more than 400mA out of USB on the Pico, as there is a fuse in there to stop accidental shorts causing problems.

    I'd use an external 5v supply. Does this diagram help?


    1 Attachment

    • ws2812-wiring.png
  • Thanks very much for diagram.it's really usefull, i've printed it.
    I've finally return to my old arduino uno. And it's working fine.
    I've lost some minutes to remember how to declare an array 😱
    And to find a simple lib..i've used lib from polulu led strip...

    Thanks for your time.
    é.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

ws2812b on pcb not white

Posted by Avatar for Mrbbp @Mrbbp

Actions