-->
Page 1 of 1

Can't get 12V Led Strip to work with my nodemcu

PostPosted: Sun Dec 11, 2016 11:55 pm
by Sasha Bolotnov
Hi,

I really suck as circuits and wiring but I'm learning. I am trying to connect a LED strip (12V) to my nodemcu. There are quite a few tutorials out there but I still can't figure it out.

I am using LTROP SMD 5050 RGB LED Light Strip and BUZ91A MOSTEFs to wire things together. My setup looks like on the image below. The 12V power comes from an external power supply (it works fine if we wire the leds directly) and the NodeMCU module is powered by its own power source.

Image

I am flashing it with NodeMCU 1.0 (ESP-12 Module), the program is very simple (I used a sample from one of the examples and trimmed it down for bare simplicity). The program works fine, I can see the Serial output and the onboard led changes brightness. But the actual stip does nothing.

Code: Select allvoid setup() {
  pinMode(D0, OUTPUT);
  pinMode(D1, OUTPUT);
  pinMode(D2, OUTPUT);
  Serial.begin(115200);
  //trying to play with WriteFreq
  analogWriteFreq(200);
  Serial.println("Finished setup");
}

void loop() {
    analogWrite(D0, 800);
    analogWrite(D1, 1020);
    analogWrite(D2, 400);
    delay(1000);
    analogWrite(D0, 1200);
    analogWrite(D1, 200);
    analogWrite(D2, 400);
    delay(1000); 
    analogWrite(D0, 800);
    analogWrite(D1, 1020);
    analogWrite(D2, 400);
    delay(2000);
   
  Serial.println("Finished loop");
}


I think it may be something related to the wiring or how I source the power or maybe the MOSTEFs are a wrong fit for this setup. Please help, I am out of options now.