Incorrect lighting of ws2811b led strips. Wemos D1 Arduino controlled



  • I have built this project: https://www.youtube.com/watch?v=duiAbLsXZSE It is a Lithophane lamp, 3D printed. A friend has this built and it works perfectly. The one I built was using the exact same links to buy all the parts. The function is to light up the lamp remotely using a phone app which can change the colors from all on white or any color picked from a color selector. Also a slider to change the stepper motor speed. The led strip in my friends lamp have all the leds light up exactly the same. My led strips light up with a repeating by 3 sequence. If my friends controller is connected to my led strip it also lights up wrong. I have not hooked my controller to his light strip yet. But logic dictates the problem is not my controller because his controller gives the same result with my lights. Are these defective or the wrong type? They were supposed to be ws2811b 5V strips. The second problem with the strips (I purchased two) was that only the first 45 of 60 led's lit up. The last 15 were not lit, voltage at the end of the strip was 5V.

    Here is the sketch code:

    #include <Adafruit_NeoPixel.h>
    #include <SPI.h>
    #include <BlynkSimpleEsp8266.h>
    #include <ESP8266WiFi.h>
    #include <Stepper.h>
    
    #define PIN D2
    #define NUMPIXELS 60
    #define BLYNK_PRINT Serial
    
    int motorSpeed; 
    int motorDirection; 
    
    const int stepsPerRevolution = 4096; 
    
    BlynkTimer timer; 
    Stepper myStepper(stepsPerRevolution, 14, 12, 13, 15); 
    Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
    
    void stepperControl() {
      if (motorSpeed > 0) {
        if (motorDirection == 0) {  // Rotate Clockwise
          myStepper.step(stepsPerRevolution / 50);
        } else {  // Rotate CounterClockwise
          myStepper.step(-stepsPerRevolution / 50);
        }
      }
    }
    
    void setup()
    {
      Serial.begin(9600);
      timer.setInterval(1, stepperControl);
      Blynk.begin("H9uwVJelnjeAEpjfIhNKe3VdwCb3ERZO", "SilentRunning", "Spectre972zpr4");
      pixels.begin();
      pixels.setBrightness(55);
    }
    
    void loop()
    {
      Blynk.run();
      timer.run();
    }
    
    
    
    BLYNK_WRITE(V0)
    {
      motorSpeed = param.asInt();
      myStepper.setSpeed(motorSpeed);
    }
    
    
    BLYNK_WRITE(V2)
    {
    
      int R = param[0].asInt();
      int G = param[1].asInt();
      int B = param[2].asInt();
      Serial.println(R);
      Serial.println(G);
      Serial.println(B);
      for (int i = 0; i < NUMPIXELS; i++) {
    
        pixels.setPixelColor(i, pixels.Color(R, G, B));
    
        pixels.show();
      }
    }
    

    LED Strip.jpg Lamp.jpg Blynk App.png


  • Mod

    @Beeblebrox666 good work on isolating the problem.

    There are led strips that light upp three and three. I have one myself (purchased by mistake)

    It is also known that sellers on Ebay and Ali send different stuff for the same product. This happens from time to time.

    So the simple explanation is that the seller sent you a different type of strip.



  • @mfalkvidd said in Incorrect lighting of ws2811b led strips. Wemos D1 Arduino controlled:

    @Beeblebrox666 good work on isolating the problem.

    There are led strips that light upp three and three. I have one myself (purchased by mistake)

    It is also known that sellers on Ebay and Ali send different stuff for the same product. This happens from time to time.

    So the simple explanation is that the seller sent you a different type of strip.

    @mfalkvidd Thanks! This is the first project I had ever attempted with these components. It would be nice if the led strips themselves were printed with a code indicating type, Mine look identical to those my friend used with one exception, mine had wired plugs on both ends (One male, one female) If you have any info on how to use the 3 x 3 or whatever they are called, let me know... Again Thanks!


  • Mod

    @Beeblebrox666 you can use them just like any other strip, with the limitation that not all leds can be controlled individually.



Suggested Topics

2
Online

11.4k
Users

11.1k
Topics

112.7k
Posts