LED Constant current dimming

I bought a fish tank (yeah…) that comes with an LED light bar.
Shoud be this one.
CLE120 – 36W | 38VDC | 900mA | IP67

It seems to come with a constant current power supply.
(http://ciano.pt/en/produto-loja/conversor-sistema-led-cle100-120-euruk/)

After reading around a bit on dimming LED’s it seems that with these constant current supply’s dimming is not that nice. (correct?)

Though i came across this post on instructables.

My background on electronics is very limited.
What are my options here? Is the circuit from instructables supposed to work for my situation, or not?
I don’t want to blow up anything :slight_smile:

I’m looking into PWM controlling it with an arduino (or esp8266 like the wemos d1 mini if possible)

Thanks in advance for any help!!
Bart

If your power source is truly a current source, then the instructable method should work.

CAUTION: If it isn't a current source, but a regular power supply, you will destroy the wall plug, the transistor, and possibly anyone close to the wall plug.

For safety: Try the circuit in the instructable, but with one addition: put a 1A fuse between the MOSFET drain and the positive terminal of the supply.

Ok thanks, I'll take the hint on the fuse!
The info on the adapter pictured isn't enough to determine if it's a true constant current supply?

Can I test this in any way when I get it? Prior to building the circuit.

Bart_e:
Ok thanks, I'll take the hint on the fuse!
The info on the adapter pictured isn't enough to determine if it's a true constant current supply?

Can I test this in any way when I get it? Prior to building the circuit.

No problem. Well, I'm not an expert in wall power supplies, so I'm not going to give any definite answer.

To test: build the circuit, stand back, and seeing if the fuse blows. Good luck!

So... I finally got everything in.
But there's a problem. I built the circuit in the schematic with a 1amp fuse like you recommended.
When I connect the source with the drain disconnected, the lex'slightlight, which they should because the shunt is disconnected.

But as soon as I connect the mosfet drain (no pwm signal connected to the gate) the power source starts making a high frequency noise and after a few seconds the fuse blows.
The mosfet also becomes very hot. Is it normal it's shunting even without a pwm signal connected?

So this means the power supply can not handle being shorted?

Is it best to build a source my own, or buy something else that can be dimmed
The led bar specs say:
36w
38vdc, 900ma

Like most instructables this circuit is crap.

But as soon as I connect the mosfet drain (no pwm signal connected to the gate) the power source starts making a high frequency noise and after a few seconds the fuse blows.

With the gate not connected it floats and picks up interference. This results in it turning on and off rapidly and not very fully. You should have a 10K resistor from gate to source to prevent this.

That being said it sounds like you do not have a constant current supply so you might want to try a chopper circuit rather than a shunt. But measure the voltage of your supply both with the LEDs connected and with not. That will tell you what sort of power supply you have.

It has 36v with the led connected and around 40v with them not connected.

Can you explain the chopper circuit a bit more? (Example?)

Thx for helping!

It is that circuit, but with the ground of the LEDs connected to the drain of the FET instead of the ground. So that when the FET turns on there is current through the LEDs. Still have that 10K between the gate and ground.

Ok if I understand what you're saying you mean:

  • connect current source + to led +
  • connect led - to MOSFET drain
  • connect MOSFET source to current source -
  • gate to pwm signal and add the resistor

Sorry, I'm not too familiar with this and don't want to blow something up.
This way I can't short the source so no fuse is necessary?

Yes that is the circuit.

This way I can't short the source so no fuse is necessary?

You don't short anything with this circuit, if you think you do you are wiring it incorrectly.

Hi,
Unfortunately that destructibles works by shunting the supply current around the LEDs, hence turning them OFF under PWM.
This means the current source doesn't see an open circuit load and go mental.

Unfortunately it ASSUMES the current source is ISOLATED from the POWER MAINS.

As has already been pointed out, no 10K between gate and source to protect open circuit gate.

Also IRF840 is not a logic level MOSFET.

Tom.... :slight_smile:

Yeah i'm not using that IRF840 actually. I did look that up and am using a irlz24n, which is a logic level mosfet.

So now i built the new circuit. I tested it with the LED's not connected, i put my voltmeter in place and have now 2 dead MOSFETs.
Is this because i put my voltmeter where the LED's should be? Or another reason?
Initially i had about 35V there, when it died i have 46V. Which is the voltage when measuring the source with no load.

This is my circuit drawing...
Google Photos

Hi,
OPs Circuit

Can you post a picture of your project so we can see your connections to the MOSFET.
bcircuit.jpg

Thanks… Tom… :slight_smile:

Ok, i attached a picture of my test mess :slight_smile:

I did change the mosfet again and attached the led’s. It seems to work now BUT…
When i start a fade (from 0 to 255) everything low just flickers enormously (like a strobe).
When i pass ± 180 it starts to dim nicely. When it flickers, i hear a noise in the source also.

Hi,
Thanks for the pics.
Can you check your protoboard and make sure the power rails down each side are connected and not broken where I have indicated?
That 10K might not be connected to gnd.
joints.jpg
What other components have you got connected in the picture?
circuit.jpg
I would suggest your gnd connection to the MOSFET from the Arduino controller NOT daisy change through the RF unit, but connect directly to the Arduino.
Thanks… Tom… :slight_smile:

I have an ESP8266 (wemos d1 mini) as the microcontroller, connected to a pca9685 breakout board for the pwm signal.
There’s also a i2c lcd and a onewire sensor, but that’s of no importance

I have attached a new pic where i removed the sensor. Just to remove the mess a bit.

I am really stupid, the breadboard power lines are indeed broken up. Djeezes…
I connected to the ground line so the resistor is connected.

However i now have another dead mosfet. One to go :frowning:

EDIT: Sorry… don’t know what i did but my mosfet ain’t dead… Also the resistor wasn’t 10k but 220ohm.
Got mixed up somewhere. Stupid mistakes.
I changed to a 10k but result is the same.

Hi,
Yes the protoboard link problem is not indicated on the boards, some do have a link others don't.

When i pass +- 180 it starts to dim nicely. When it flickers, i hear a noise in the source also.

This could be due to the PWM frequency.
The reason that using PWM to control the LED brightness with the a constant current source is that the source also uses PWM to give constant current.

I don't know, but can you change the PWM frequency off you control PWM.

One PWM frequency may be a frequency harmonic of the other and at certain PWM % various harmonic components may cause problems.

Tom... :slight_smile:

I don't think the flickering is related to the pwm frequency.
When i change the frequency to 40 i can see flickering in the higher ranges also.
But in the lower range it more flashing and n between i can see the same low hz flicker.

I think it's the power supply not handling the pwm very good. Would a capacitor over the led + - be a good option?
Like mentioned in this post :

I however don't have one here, perhaps i can recover one from an old device somewhere...

I also tryed the esp8266's own pwm, same result.

I have a video here:

Once it turns on it does keep dimming but it's too bright in the video to notice.

Adding a 50V 1000µF capacitor does not help.
I connected it to:

    • and - of the LED's.
    • of source and drain
    • and - of source

I’m thinking on leaving the current path of using the current source i have now.

Can someone check the attached schematics?
I would now like to use a meanwell lcm-40 led driver with 10V pwm input.

http://www.mouser.com/ds/2/260/LCM-40-SPEC-806135.pdf

I have a transformer from 230V to 12Vdc.
I would then like to use kbl005 to rectifie and a lm7810 to have 10VDC in parallel with a lm7805 to have 5VDC.
This way i can power everything from the 230V mains supply.
Can i use my irlz24n to step up the pwm like shown in the diagram i drew?

Diagrams are a bit dodgy, forgive me.