DIY LEDs using Meanwell LDD-700L drivers won't dim

shneerf

Community Member
View Badges
Joined
Jan 2, 2020
Messages
96
Reaction score
94
What state or country do you live in
New York
Rating - 0%
0   0   0
So I've done a test run of this circuit before doing the final build and it worked before when I ran only one series of LEDs. Now that I have all of my lights, 11 circuits in total, my lights won't dim, they stay full bright no matter what signal I send to the drivers. I've been trying different things and I don't know what's wrong. I know I'm supposed to have the Arduino share the same negative as the drivers so I don't know what else could be wrong. Does each LED series have to have it's own separate wire going to the negative output of the meanwell driver? Is there something else I'm overlooking? I'm at a loss of what to do and I feel like I may be damaging my components by troubleshooting too much so if anyone has any experience with these I could really use some help.

LED lights.png
 
Are you also connecting gnd to the LEDs? If so, that may be the problem.
 
Power supply should only be connected to the input of the drivers not the input and output. Connecting it to the output bypasses the path of the controller.
 
I've troubleshot this again and even when I don't connect the negative terminal of the VOUT to the PSU it still doesn't dim. Now I'm thinking I need to individually wire a separate ground wire for each LED series to the VOUT of the Meanwells which makes no sense to me. I've worked on electronics for around 10 years now and I still don't understand ground. Ground is ground, but you have to connect grounds to other grounds to work, and sometimes you have to separate them.... It just doesn't make sense.
 
I've troubleshot this again and even when I don't connect the negative terminal of the VOUT to the PSU it still doesn't dim. Now I'm thinking I need to individually wire a separate ground wire for each LED series to the VOUT of the Meanwells which makes no sense to me. I've worked on electronics for around 10 years now and I still don't understand ground. Ground is ground, but you have to connect grounds to other grounds to work, and sometimes you have to separate them.... It just doesn't make sense.

NOTHING goes to the V out of the driver BUT the driver to LED..Ever..
Not debateable..

About th only thing is a broken ground between Aduino and 36V ps or your pins ar inactive..

Put a VOM between Aduino PWM signal and aduino ground (AFAICT) at 100% on and measure voltage.

LDD's not diming is almost always a floating PWM wire be it no ground or not connected.

Not sure of the impact of your incorrect ground to V out of the driver. Possibly blew the dim circuit in the LDD but first things first,

esquema_en.jpg
 
Last edited:
Is should connect like this.
Screenshot_20200119-080605_Drive.jpg

I know, but there wasn't anything in the datasheet showing how to run multiple ones. I assumed ground is ground, which is something everyone says and I've been taught for years, but it's not. Well sometimes it is. The picture doesn't show that the PWM source needs to be grounded specifically with the -VIN or else it won't work. Also, you can connect the -VINs and +VINs to each other in parallel so I assumed you can do that for the -VOUT since it's a reference 0 voltage but I guess you can't for this case. I'm currently waiting for parts to rewire this, I have to add in 11 new individual ground wires for the -VOUT for each which is a huge pain and also will look tacked on. It really sucks but I don't think there's anything else I can do.

Thanks to everyone for the help I'll update for any changes and hopefully post the final product soon.
 
I know, but there wasn't anything in the datasheet showing how to run multiple ones. I assumed ground is ground, which is something everyone says and I've been taught for years, but it's not. Well sometimes it is. The picture doesn't show that the PWM source needs to be grounded specifically with the -VIN or else it won't work. Also, you can connect the -VINs and +VINs to each other in parallel so I assumed you can do that for the -VOUT since it's a reference 0 voltage but I guess you can't for this case. I'm currently waiting for parts to rewire this, I have to add in 11 new individual ground wires for the -VOUT for each which is a huge pain and also will look tacked on. It really sucks but I don't think there's anything else I can do.

Thanks to everyone for the help I'll update for any changes and hopefully post the final product soon.

you can parallel LED strings at the cost of mA/# of parallel strings.
Config is usually not recommended.

lddnew.JPG
 
It's not the code, the pins output the proper PWM signal and I've verified this when I isolated my LEDs and also with a multimeter. I'll post it anyway in case it's not optimal or could cause problems that I might've missed. I'm using a Wemos D1 mini.

Code:
/* Example: Wemos - NodeMCU ESP8266 - Getting starting
 * Created by Ilias Lamprou
 * Modified: Sep/9/2019
 */

#include <ESP8266WiFi.h>

//--- SETTINGS ------------------------------------------------
const char* ssid = "xxxxxxxxxxxx";        // WIFI network SSID
const char* password = "xxxxxxxxxxxxxxxx";        // WIFI network PASSWORD
WiFiServer server(8000);                   // Default Virtuino Server port
IPAddress ip(192, 168, 0, 29);            // where 150 is the desired IP Address. The first three numbers must be the same as the router IP
IPAddress gateway(192, 168, 0, 1);         // set gateway to match your network. Replace with your router IP
//---

//---VirtuinoCM  Library settings --------------
#include "VirtuinoCM.h"
VirtuinoCM virtuino;               
#define V_memory_count 32          // the size of V memory. You can change it to a number <=255)
float V[V_memory_count];           // This array is synchronized with Virtuino V memory. You can change the type to int, long etc.
//---


boolean debug = true;              // set this variable to false on the finale code to decrease the request time.

int V1_lastValue = 0;
int V2_lastValue = 0;
int V3_lastValue = 0;
int V4_lastValue = 0;
int V5_lastValue = 0;
int V6_lastValue = 0;
int V7_lastValue = 0;
int V8_lastValue = 0;

//============================================================== setup
//==============================================================
void setup() {
  if (debug) {
    Serial.begin(9600);
    while (!Serial) continue;
  }
 
  virtuino.begin(onReceived,onRequested,256);  //Start Virtuino. Set the buffer to 256. With this buffer Virtuino can control about 28 pins (1 command = 9bytes) The T(text) commands with 20 characters need 20+6 bytes
  //virtuino.key="1234";                       //This is the Virtuino password. Only requests the start with this key are accepted from the library

  connectToWiFiNetwork();
  server.begin();

  pinMode(D1, OUTPUT);            // On Virtuino panel add a button to control this pin
  pinMode(D2, OUTPUT);            // On Virtuino panel add a button to control this pin
  pinMode(D3, OUTPUT);            // On Virtuino panel add a button to control this pin
  pinMode(D4, OUTPUT);            // On Virtuino panel add a button to control this pin
  pinMode(D5, OUTPUT);            // On Virtuino panel add a button to control this pin
  pinMode(D6, OUTPUT);            // On Virtuino panel add a button to control this pin
  pinMode(D7, OUTPUT);            // On Virtuino panel add a button to control this pin
  pinMode(D8, OUTPUT);            // On Virtuino panel add a button to control this pin
 

  }

//============================================================== loop
//==============================================================
void loop() {
  virtuinoRun();        // Necessary function to communicate with Virtuino. Client handler

  // enter your code below. Avoid to use delays on this loop. Instead of the default delay function use the vDelay that is located on the bottom of this code
  // You don't need to add code to read or write to the pins. Just enter the  pinMode of each Pin you want to use on void setup
 
 //--- Example1:  How to read the value of V1 pin from Virtuino. On Virtuino add a slider. Select the pin V1
    if (V[1]!=V1_lastValue) {              // The V1 has changed
      Serial.println("V1="+String(V[1]));  // print the value of V1
      V1_lastValue=V[1];                   // store the V1 to the variable V1_lastValue so as to know if it has changed
      analogWriteFreq(400);
      analogWrite(D1,V1_lastValue);
    }

  //--- Example1:  How to read the value of V1 pin from Virtuino. On Virtuino add a slider. Select the pin V1
    if (V[2]!=V2_lastValue) {              // The V2 has changed
      Serial.println("V2="+String(V[2]));  // print the value of V2
      V2_lastValue=V[2];                   // store the V2 to the variable V2_lastValue so as to know if it has changed
      analogWriteFreq(400);
      analogWrite(D2,V2_lastValue);
    }

  //--- Example1:  How to read the value of V1 pin from Virtuino. On Virtuino add a slider. Select the pin V1
    if (V[3]!=V3_lastValue) {              // The V2 has changed
      Serial.println("V3="+String(V[3]));  // print the value of V2
      V3_lastValue=V[3];                   // store the V2 to the variable V2_lastValue so as to know if it has changed
      analogWriteFreq(400);
      analogWrite(D3,V3_lastValue);
    }

  //--- Example1:  How to read the value of V1 pin from Virtuino. On Virtuino add a slider. Select the pin V1
    if (V[4]!=V4_lastValue) {              // The V2 has changed
      Serial.println("V4="+String(V[4]));  // print the value of V2
      V4_lastValue=V[4];                   // store the V2 to the variable V2_lastValue so as to know if it has changed
      analogWriteFreq(400);
      analogWrite(D4,V4_lastValue);
    }

  //--- Example1:  How to read the value of V1 pin from Virtuino. On Virtuino add a slider. Select the pin V1
    if (V[5]!=V5_lastValue) {              // The V2 has changed
      Serial.println("V5="+String(V[5]));  // print the value of V2
      V5_lastValue=V[5];                   // store the V2 to the variable V2_lastValue so as to know if it has changed
      analogWriteFreq(400);
      analogWrite(D5,V5_lastValue);
    }

  //--- Example1:  How to read the value of V1 pin from Virtuino. On Virtuino add a slider. Select the pin V1
    if (V[6]!=V6_lastValue) {              // The V2 has changed
      Serial.println("V6="+String(V[6]));  // print the value of V2
      V6_lastValue=V[6];                   // store the V2 to the variable V2_lastValue so as to know if it has changed
      analogWriteFreq(400);
      analogWrite(D6,V6_lastValue);
    }

  //--- Example1:  How to read the value of V1 pin from Virtuino. On Virtuino add a slider. Select the pin V1
    if (V[7]!=V7_lastValue) {              // The V2 has changed
      Serial.println("V7="+String(V[7]));  // print the value of V2
      V7_lastValue=V[7];                   // store the V2 to the variable V2_lastValue so as to know if it has changed
      analogWriteFreq(400);
      analogWrite(D7,V7_lastValue);
    }

  //--- Example1:  How to read the value of V1 pin from Virtuino. On Virtuino add a slider. Select the pin V1
    if (V[8]!=V8_lastValue) {              // The V2 has changed
      Serial.println("V8="+String(V[8]));  // print the value of V2
      V8_lastValue=V[8];                   // store the V2 to the variable V2_lastValue so as to know if it has changed
      analogWriteFreq(25000);
      analogWrite(D8,V8_lastValue);
    }
}







//============================================================== connectToWiFiNetwork
void connectToWiFiNetwork(){
  Serial.println("Connecting to "+String(ssid));
   // If you don't want to config IP manually disable the next two lines
 
  WiFi.mode(WIFI_STA);                       // Config module as station only.
  WiFi.begin(ssid, password);
   while (WiFi.status() != WL_CONNECTED) {
     delay(500);
     Serial.print(".");
    }
   Serial.println("");
   Serial.println("WiFi connected");
   Serial.println(WiFi.localIP());
}


//============================================================== onCommandReceived
//==============================================================
/* This function is called every time Virtuino app sends a request to server to change a Pin value
 * The 'variableType' can be a character like V, T, O  V=Virtual pin  T=Text Pin    O=PWM Pin
 * The 'variableIndex' is the pin number index of Virtuino app
 * The 'valueAsText' is the value that has sent from the app   */
 void onReceived(char variableType, uint8_t variableIndex, String valueAsText){     
    if (variableType=='V'){
        float value = valueAsText.toFloat();        // convert the value to float. The valueAsText have to be numerical
        if (variableIndex<V_memory_count) V[variableIndex]=value;              // copy the received value to arduino V memory array
    }
}

//==============================================================
/* This function is called every time Virtuino app requests to read a pin value*/
String onRequested(char variableType, uint8_t variableIndex){     
    if (variableType=='V') {
    if (variableIndex<V_memory_count) return  String(V[variableIndex]);   // return the value of the arduino V memory array
  }
  return "";
}


 //==============================================================
  void virtuinoRun(){
   WiFiClient client = server.available();
   if (!client) return;
   if (debug) Serial.println("Connected");
   unsigned long timeout = millis() + 3000;
   while (!client.available() && millis() < timeout) delay(1);
   if (millis() > timeout) {
    Serial.println("timeout");
    client.flush();
    client.stop();
    return;
  }
    virtuino.readBuffer="";    // clear Virtuino input buffer. The inputBuffer stores the incoming characters
      while (client.available()>0) {       
        char c = client.read();         // read the incoming data
        virtuino.readBuffer+=c;         // add the incoming character to Virtuino input buffer
        if (debug) Serial.write(c);
      }
     client.flush();
     if (debug) Serial.println("\nReceived data: "+virtuino.readBuffer);
     String* response= virtuino.getResponse();    // get the text that has to be sent to Virtuino as reply. The library will check the inptuBuffer and it will create the response text
     if (debug) Serial.println("Response : "+*response);
     client.print(*response);
     client.flush();
     delay(10);
     client.stop();
    if (debug) Serial.println("Disconnected");
}


 //============================================================== vDelay
  void vDelay(int delayInMillis){long t=millis()+delayInMillis;while (millis()<t) virtuinoRun();}
 
As far as I can tell your code looks good, at least on the output side of things. I don't know enough about the ESP side of things to confirm though.

As long as you have things wired up the way oreo5457 posted in his diagram, there shouldn't be a problem on that end. Always make sure that the Arduino, power supply and the input side of the drivers share a ground. Sometimes the pin on the Arduino can be a little loose and cause issues. The output side of the drivers is isolated and you don't have to/shouldn't connect it's ground in any way to the input side. Ground in a DC circuit like this isn't like a true ground connection on mains lines. It should be 0V but it can float negative and cause all sorts of problems if it's shorted to the input side.

You should also verify the voltage output and wattage of the PSU to make sure it can handle the full load.

Can you isolate one driver and LED cluster physically by either removing them or disconnecting the wires from the other drivers/clusters? If so, try to do that and then run a much simpler code to verify the dimming functionality of your setup. Something like this will set the output of pins 1-4 at decreasing levels to test the signalling to the driver.

Code:
/*

*/

void setup() {
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
    
}

void loop() {
  analogWrite(1, 255);
  analogWrite(2, 125);
  analogWrite(3, 60);
  analogWrite(4, 0); 
}
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top