I was recently contacted by someone that had read my post about MeanWell LED driver units with dimming capabilities. They needed advice on how to connect a driver unit to a wireless dimming controller they'd purchased. After a couple of attempts at connecting the two it became clear there wasn't a simple way to it because of the way they're designed. After buying one for myself for 20 bucks I thought I'd do a teardown and analysis of how the wireless dimming controller works and explain why they can't easily be connected.
|RF LED Dimmer|
The wireless dimming control unit is designed to operate from a 12 - 24 volt input and vary the brightness of a regulated load up to 8 Amps via PWM switching, whereas the MeanWell LDH-45 driver is a DC-DC converter that has an input terminal to switch an unregulated load on and off in a PWM manner. The PWM input has a maximum input voltage of 8 volts, I think it can do more but the documentation is unclear. So in theory we can put a resistor divider across the 12 V output of the dimming controller to reduce the voltage to a safe level and connect it to the PWM control terminal. See if you can spot the mistake I've made in my logic. I'll explain it later on but needless to say the connections in the diagram below wont work. I'll give you some clues, disconnecting the positive output of the dimmer causes the light to go out, but disconnecting the PWM DIM terminal causes the light to stay on.
|Initial Incorrect Connection|
A 3 button remote control key fob unit is used to increase and decrease the brightness of the lights as well as turning them off.
|Remote control key fob|
For the low price I paid I expected the remote to be a low quality PCB with cheap components in a flimsy case. Surprisingly the remote control is well built, with a water resistant rubber seal.
|Rubber waterproof seal|
There isn't anything too interesting in the remote. It contains a user replaceable battery, some surface mount tactile buttons, and a status LED. The marking on the crystal indicates that unit operates at 433.92 MHz.
|Remote control PCB|
The main dimming unit is also reasonably well constructed for such a cheap item. Although screw terminals would've been nicer, it comes with spring loaded connectors like you'd see on the back of a set of speakers. These are directly soldered to a medium quality single sided board of low complexity.
|Bottom of LED Dimmer PCB|
After the board is removed the operation of the device becomes clearer. You can see that it contains a radio module (with a coil of wire for an antenna) that communicates with the key fob, some memory, an unknown microcontroller, a switching FET, a pull up resistor for the I2C line, and 3 extra components that make up the power supply. The board is named "RF-DIMMER-MBK-V7"
|Top of LED Dimmer PCB|
|ATMEL 24C02N - 2048 bit serial EEPROM|
|RF Module PCB|
Although it's incredibly hard to see, the switching MOSFET is a 50N03-10 CP device. It has a 30 volt maximum VDS and a maximum drain current of about 50 Amps (Not at the same time of course).
To explain why the device didn't operate as I first expected, it helps to colour code the different nodes on the circuit board below. Once again the input is on the right.
Black - The negative input terminal and ground point for the rest of the circuit.
Red - The positive input terminal. It's directly connected to the output positive terminal and supplies power to the rest of the control circuit.
Purple - This is the input voltage after is has passed through a reverse protection diode
Yellow - This is a 5 V line supplied by 7805 voltage regulator
Dark Blue - This is the data line that is returning from the RF module
Light Blue - The Mosfet gate drive
Green & White - SDA and SCL lines of the I2C bus
Orange - Negative output terminal
|Voltage Node on PCB|
To help make it even clearer why my first connection attempts didn't work I redrew the schematic in a more conventional fashion.
|RF LED Dimmer Schematic|
As you can now see, the circuit is relatively simple. It takes the input voltage through a reverse polarity protection diode and feeds it into a linear regulator to provide a 5 Volt line. This is used to power the memory IC, RF module, and an unknown microcontroller. The microcontroller reads data from the RF module and stores this configuration data in the EEPROM memory. The microcontroller then adjusts the PWM waveform driving the gate of the MOSFET turning the load on and off rapidly and changing the brightness of the light. It does this by effectively disconnecting the negative terminal of the load.
Why my first idea didn't work is becoming clear. I assumed that the switching element would be on the high side of the load, with the load connected to ground and the switch between the load and the 12 volt line as in figure b below. Connecting a voltage divider as a load would have produced a PWM signal between 0 and 6 volts, but this wasn't the case.
The switching mosfet is on the low side of the load as in figure a below, and for a good reason too. This allows the gate drive voltage of the mosfet to be independent of the supply voltage. A high side switch would require a p-channel mosfet and a gate voltage of 5 volts less than the input to drive it, but because the input voltage can vary from 12 to 24 volts the gate drive voltage would also have to vary. This can be done, but it adds extra parts. It's much easier to use a low side switch and drive it with a 5 volt signal that doesn't change as the input voltage does. As this device is designed to control LEDs that aren't connected to anything else, it doesn't really matter. The problem only arises when you are connecting multiple devices. Placing a resistor divider across an output like this will give a PWM signal that changes between 6 and 12 volts. This means that the light will come on and stay on. Disconnecting the positive output of the dimming unit will cause the PWM DIM and the -DIM terminals to be connected with a resistor, placing 0 volts on the PWM DIM turning the light off. If you disconnect the PWM DIM line the light will turn on as mentioned in its data sheet (leave unused wires unconnected).
The MeanWell LED driver really requires an output configuration similar to figure c, where the output terminal is forced to high or low voltage, the other configurations can force the output to a high or low voltage but not both.
|Load switching configurations. Assume 12 volt input on the left of each figure, load on the right.|
To look at the waveforms of the dimming device. I placed a dummy load resistor on the output and measured the voltage across it. The image below shows the device at two of its 32 dimming settings.
|Voltage across load at dimmest setting|
|Voltage across load at approximately quarter-brightness|
After thinking about it, there is a way to connect the unit to the MeanWell controller. The voltage used to drive the FET is exactly what we need to drive the PWM DIM pin. So if you were to open the box and solder on a wire to the light blue trace in the above diagram everything should work. Bringing the output of a microcontroller out to the real world without protection isn't ideal, and the current the microcontroller can supply is unknown. You could give it a go, it should work.
|Voltage on the MOSFET gate|
As an aside my initial tests were with a long strand of LEDs and I got some strange results. What was happening here was when the low side switch was turned off the cabling in my setup was coupling in noise from the mains voltage. Testing with a resistor fixed that though. Doh!
|Initial incorrect experiment|