Arduino controlling pwm of MeanWell driver

Hello everybody!
i know the basic of electronic and arduino (I think at least!) for some little projects
now i'd like to control the light of my aquarium via Arduino (nano specifically)
i'm using a meanwell driver to control the leds, it's datasheet says it accept dimming function in 3 way:
0-10v direct
0-10v pwm
or a 100k ohm pot (This is what i'm using right now)
reading in this forum like this 0-10V PWM (2 Solution) - General Electronics - Arduino Forum
or this PWM dimming of a Meanwell HLG led driver - Project Guidance - Arduino Forum
it says that with just a optocoupler i can have a full 0-10V pwm

and this is where i dont understand. Why?
An optocoupler for me it's like only a "relay" it can turn on or passes information when the little led inside turn on, right?
Why shoult it trasform a 5v pwm into a 10v pwm?

i only thought and optocoupler could help isolating the tiny and fragile arduino even more if i wire it (optocoupler) before the relay that turn on and off the meanwell driver..
So i should wire and optocoupler before the relay and another one to manipulate the pwm???
I really dont know where i am lost in here

thank you all!

Just to give a bit more information: i'm powering the arduino from a 12v power supply with a step down module to around 7.5V (Because i also have some 12v fans for the led heatsink) and also powering the relay module with another step down to 5v

Why shoult it trasform a 5v pwm into a 10v pwm?

It doesn’t.

It controls a transistor that acts as a switch. You still need a source of 10 or 12V to generate the higher voltage signal.

So i should wire and optocoupler before the relay and another one to manipulate the pwm?

No.

or a 100k ohm pot (This is what i'm using right now)

Do you have the information/diagram for that? Are you providing a 10V source for that? If you're just using a pot, the Meanwell device must have 10V available for you to use...

An opto-isolator should work, but since you probably don't need isolation you can us a [u]transistor[/u] or [u]MOSFET[/u] driver. Put a ~1K pull-up resistor (connected to ~10V) in place of the motor/solenoid load. Since the load is non-inductive you can leave-out the diode, and since there is very-little current you can use a "small" transistor or MOSFET (you just need to boost the voltage). Note that these simple driver circuits are inverters and they will invert your PWM (255 PWM is off and 0 PWM is full-on.) An opto-isolator can also invert depending on how the input-side (internal LED) is wired.

This question pops up every few months or so.
You don't need a 10volt supply or 10volt PWM for these Meanwell LED drivers.
Do a site search (lollipop on top of this page).
Leo..

Grumpy_Mike:
It doesn’t.

It controls a transistor that acts as a switch. You still need a source of 10 or 12V to generate the higher voltage signal.
No.

The meanwell driver should have the 10v inside
in any case thank you Grumpy Mike, before findind those 2 thread i was reading about one of your schematics:

that should work

DVDdoug:
Do you have the information/diagram for that? Are you providing a 10V source for that? If you're just using a pot, the Meanwell device must have 10V available for you to use...

An opto-isolator should work, but since you probably don't need isolation you can us a [u]transistor[/u] or [u]MOSFET[/u] driver. Put a ~1K pull-up resistor (connected to ~10V) in place of the motor/solenoid load. Since the load is non-inductive you can leave-out the diode, and since there is very-little current you can use a "small" transistor or MOSFET (you just need to boost the voltage). Note that these simple driver circuits are inverters and they will invert your PWM (255 PWM is off and 0 PWM is full-on.) An opto-isolator can also invert depending on how the input-side (internal LED) is wired.

Yes sure

I still dont understand how an opto should work it modify the output voltage? it has a voltage amplifier inside?? i dont really know where i start not understanding......

Wawa:
This question pops up every few months or so.
You don't need a 10volt supply or 10volt PWM for these Meanwell LED drivers.
Do a site search (lollipop on top of this page).
Leo..

Hello Wawa
in my first message i referred exactly to what you suggested to another member of the forum:

Wawa:
You might be overthinking this.
It seems the dimmer has an inbuild pullup to an internal supply.
Because when you leave the Dim pin "open", LED current is max.
Try an opto.
Opto transistor across the Dim+/- pins.
And opto LED via a 1k current limiting resistor to Arduino.
Leo..

Wawa:
You don't.
The LED driver already provides that voltage.

You don't have to convert Arduino PWM to voltage, and feed a voltage into the LED driver.
Just leave it as PWM.

Just try.
Connect the opto transistor collector to Dim+, and the opto transistor emitter to Dim-.
Opto LED cathode to Arduino ground, and opto anode via a 1k current limiting resistor to an Arduino PWM pin.
Draw a diagram, and post if for approval if you're not sure.

The IDE has some LED fade examples.
Leo..

Hello everyone
so in this time i ordered both bc183 for the grumpy_mike's schematics and also some opto
the bc183 arrived today and i tried to make the circuit in a breadboard but i didnt study it enough because i can't understand where should i put the ground of 12v? i really dont find it in the schematics......
and also, what if i dont use the capacitor because i dont have a 1uf but only bigger ones?
thank you

Sorry Wawa i just found this topic Suggesting shield/breakout board for dimming operation via 10Vdc/PWM/resistance - Project Guidance - Arduino Forum
in which i read this:

Wawa:
If I read the manual correctly, you can use one of three dimming methods.

PWM being the easiest.

Connect DIM- (white) to Arduino ground.

Small NPN transistor (e.g. BC547).
emitter to ground.
collector to DIM+ (blue)
1k resistor between base and one of Arduino's PWM outputs.

Write 0-255 to the PWM pin for 100-0% dimming.
Leo..

So can i just do this? my bc183 should be fine right?

With a BC183, you must share Arduino ground with DIM(-).

If you have an opto coupler, I would use that instead of the BC183.
The opto creates an extra layer of safety, because grounds of the two devices are NOT shared.
Leo..