MeanWell LED Drivers: 3 in 1 Dimming Function.

Rompfl

Active Member
Hey @guod , I built the circuit but at the DIM + and DIM- I just get +10.06V output, independently of what the PWM is outputting so i think there has to be an error. The PWM output works (Arduino and Poti, 0-5V), the Voltage Regulator works (12V --> 10V) so the error has to be at the transistor switch. I built the circuit like you told me to but connected the ground of the IC to the Arduino GND / DIM- or otherwise it wouldnt output anything. Do you have any idea what could be wrong? Thanks in advance
 

stardustsailor

Well-Known Member
Too much ouzo ?
( I totally dislike it ,BTW ...)

|Why ?
What's wrong with that method of applying PWm signals to Dim inputs ....?
:confused:

I can see that at Guod's schematic, the transistor is shorting to GND the +10V signal ..
So when base is High ,0 V is at dim Inputs ....
when base is low ,+10 V at DIm inputs ...
Ok ,fine ,for sure .....

But what's actually wrong with opening / closing the circuit with the transistor in series ?
The +10V line is there ,and all the transistor does , is opening and closing tre circuit ...:roll:
?
..Well,it works fine,though....(:

Cheers.
(Not with Ouzo ...o_O ...Please ...)
:peace:
 

Rompfl

Active Member
@stardustsailor I just read out a poti and divide the readings 0-1023 with 4 to get the proper output for PWM signal 0-255. As per arduino tutorial I just use the analogWrite(pwmPin, sensorValue) function at digital pin 10 for the PWM signal
 

stardustsailor

Well-Known Member
@stardustsailor I just read out a poti and divide the readings 0-1023 with 4 to get the proper output for PWM signal 0-255. As per arduino tutorial I just use the analogWrite(pwmPin, sensorValue) function at digital pin 10 for the PWM signal
http://playground.arduino.cc/Code/Timer1


Two pots ( 10 K up to 100K ) needed .......for setting frequency and Duty Cycle ....
Manually
A of pot to GND ,B of pot to Vref ,Wiper to Analog input pin ...

Just an example of code ....

// pwm generator box //
//Libraries
#include <TimerOne.h>
//Pins


int pwmPin = 9;
int freqPin = A0;
int dutyPin = A5;
//Variables
long period;
long pulse;
//Operation
void genPWM (int FREQPIN,int DUTYPIN)
{
unsigned int periodVal=analogRead(FREQPIN);
delay(2);
//---------------------------------------------------------------------------------------------------------------------------
if ( periodVal >991 && periodVal <=1024 )
{
period = 20000 ;
}
else
if ( periodVal > 901 && periodVal <=990 )
{
period = 10000 ;
}
else
if ( periodVal > 801 && periodVal <= 900)
{
period = 4000 ;
}
else
if ( periodVal > 701 && periodVal <= 800 )
{
period = 2000 ;
}
else
if ( periodVal > 601 && periodVal <= 700)
{
period = 1000 ;
}
else
if ( periodVal > 501 && periodVal <=600 )
{
period = 400 ;
}
else
if ( periodVal > 401 && periodVal <= 500)
{
period = 200 ;
}
else
if ( periodVal > 301 && periodVal <= 400 )
{
period = 100 ;
}
else
if ( periodVal > 201 && periodVal <= 300)
{
period = 40 ;
}
else
if ( periodVal > 101 && periodVal <=200 )
{
period = 20 ;
}
else
if ( periodVal > 0 && periodVal <= 100)
{
period = 10 ;
}
else
if ( periodVal == 0 )
{
period = 2 ;
}
//--------------------------------------------------------------------------------------------------------------------------
unsigned int pulseVal=analogRead(DUTYPIN);
delay(2);
// ANALOG TO 10 BIT DIGITAL SCALING (0-1023 points for 0-5 volts input.)
pulse=map(pulseVal,0,1023,0,100);
Timer1.pwm(pwmPin,pulseVal,period);
}
//Setup
void setup()
{
analogRead (A0);
Timer1.initialize(period);
pinMode(freqPin, INPUT);
pinMode(dutyPin,INPUT);
pinMode(pwmPin, OUTPUT);
}
void loop()
{
genPWM (freqPin,dutyPin);

}
 
Last edited:

osyed

New Member
Hello everyone,

I have a question related to the circuit posted by Guod. I have read that it is not safe to short both the DIM+ and DIM- terminals. If this is the case then lets take Guod's circuit and say the transistor is on, in that case the terminals DIM+ and DIM- are effectively shorted since the transistor is on. Would this cause any problem in the normal operation of the power supply over longer run?

Thank you in advance.

Best regards,
Owais.
 

guod

Well-Known Member
one must distinguish between analog and PWM control.

PWM is just on or off ... short or open ... 0 or 10 volts for rhe 3-1 control.for the Meanwell-Drivers

with analogue control we should avoid the area below 10%
this is the reason to put a resistor in series with the Potentiometer
shorten is here also possible.
 

CanadianONE

Well-Known Member
one must distinguish between analog and PWM control.

PWM is just on or off ... short or open ... 0 or 10 volts for rhe 3-1 control.for the Meanwell-Drivers

with analogue control we should avoid the area below 10%
this is the reason to put a resistor in series with the Potentiometer
shorten is here also possible.
I agree with the resistor 100% as the driver states 10%-100% dimming you wouldn't want to go below the 10% as they have not stated it can do so. You definitely do want want to fry your $60-$100 driver.
 

Getgrowingson

Well-Known Member
Trying to figure out why when I connect my 3 drivers meanwell hlg dim circuits in parallel but no current flow from + to - they dim. Any suspects?
 

Getgrowingson

Well-Known Member
The drivers are all in parallel and then the pot is in series between the positive and negative of the dim wires. 36k pot I found at work and a 4.5k resistor
 

Getgrowingson

Well-Known Member
I know what I'm doing wiring wise I just don't understand why they are dimming with infinite resistance between positive and negatives.
 

Getgrowingson

Well-Known Member
a greater resistance would just drop more voltage across it the way i see it. but even without it connected its dimming it
 

osyed

New Member
@guod thanks for your response.

So if I understood you correctly, you mean to say that when the transistor is turned on we are applying 0V to the input rather than shorting it, so in other words physically connecting DIM+ and DIM- has a different affect on the internal dimming circuitry than switching the transistor on? Please correct me if I am wrong. Secondly, I have gone through the datasheet of the HLG variant of the supply with dimming functionality, I couldn't find the maximum voltage of the PWM that can be applied. For sure it says 10V PWM but is it safe if a 12V PWM is used instead of 10V?

Thank you in advance.
 

WwW1962

Well-Known Member
Good Day Gentlemen, i just received a bourns 3590--104L 100K pot, the tabs
are lined up different looks something silmilar to this macro im about to make
pot pointing to right __ l l l_________
l 1 3 l
l www l======
l 2 _/>cw l
l___________ _____
need a little help here, thank you so much
WwW
 

Attachments

Top