Big picture: I want to control a LUXdrive 3023 BuckPuck LED driver (3023-D-E-1000) from a Particle Photon (essentially an ARM Cortex M3 microcontroller). I have tried a few things but fail to get it to work (see below).
This seems like a very trivial problem to me but even here my very basic EE knowledge seems to be insufficient.
The LED driver has a control pin where a voltage of 0-5V can be applied to adjust the constant current the driver provides. At 0V it outputs 1A and at 5V it outputs nothing. The 5V can be taken from the driver's own reference pin or supplied externally, in which case a common ground between that external source and the driver's LED ground pin has to be established. According to the docs, the control pin draws less than 5mA.
On the microcontroller side I have a 3.3V PWM output at 500 Hz. The idea is to dim the LEDs by brining the PWM signal to the driver's control pin and essentially very quickly alternate between current and no current output; I could also dim the LEDs by using the microcontroller's DAC to vary the voltage at the driver's control pin, which would cause it to vary the current to the LEDs. But I have read somewhere that LEDs are happier with being run at their designed current rating and instead switched on/off for dimming purposes.
Anyway, the question is how to get from the MCU's 3.3V PWM signal to the 5V needed for the driver's control pin.
What I have tried so far:
Switch the driver's reference/control pin connection with a FET
Using a 2N7000 FET where the MCU's PWM output pin is connected to the gate pin, the driver's 5V reference pin to the drain pin, and the driver's control pin to the source pin.
Nothing was being switched though. I am not sure whether I was not able to open the 2N7000's gate with the 3.3V or whether there is a conceptual problem here.
Bring the 3.3V PWM signal to 5V with an op-amp
I tried to increase the 3.3V signal to 5V with a LM358 op-amp I had lying around. I set the gain to 1.5 with a pair of 330k Ohm and 220k Ohm resistors (giving the ratio 330k/220k = 1.5).
While this dimmed the LEDs, I was not able to fully switch them off, i.e. providing a full 5V at the driver's control pin. I am not sure what the problem is here though. I do not fully understand how an op-amp works and I would not be surprised if a PWM signal cannot be put through an op-amp without affecting the signal in a negative way, or that there is going to be some timing issues/considerations at the very least.
Any tips or recommendations? Please be as specific as possible in your answer and do not assume that I know my way around EE.
Many thanks!
-Jonas
This seems like a very trivial problem to me but even here my very basic EE knowledge seems to be insufficient.
The LED driver has a control pin where a voltage of 0-5V can be applied to adjust the constant current the driver provides. At 0V it outputs 1A and at 5V it outputs nothing. The 5V can be taken from the driver's own reference pin or supplied externally, in which case a common ground between that external source and the driver's LED ground pin has to be established. According to the docs, the control pin draws less than 5mA.
On the microcontroller side I have a 3.3V PWM output at 500 Hz. The idea is to dim the LEDs by brining the PWM signal to the driver's control pin and essentially very quickly alternate between current and no current output; I could also dim the LEDs by using the microcontroller's DAC to vary the voltage at the driver's control pin, which would cause it to vary the current to the LEDs. But I have read somewhere that LEDs are happier with being run at their designed current rating and instead switched on/off for dimming purposes.
Anyway, the question is how to get from the MCU's 3.3V PWM signal to the 5V needed for the driver's control pin.
What I have tried so far:
Switch the driver's reference/control pin connection with a FET
Using a 2N7000 FET where the MCU's PWM output pin is connected to the gate pin, the driver's 5V reference pin to the drain pin, and the driver's control pin to the source pin.
Nothing was being switched though. I am not sure whether I was not able to open the 2N7000's gate with the 3.3V or whether there is a conceptual problem here.
Bring the 3.3V PWM signal to 5V with an op-amp
I tried to increase the 3.3V signal to 5V with a LM358 op-amp I had lying around. I set the gain to 1.5 with a pair of 330k Ohm and 220k Ohm resistors (giving the ratio 330k/220k = 1.5).
While this dimmed the LEDs, I was not able to fully switch them off, i.e. providing a full 5V at the driver's control pin. I am not sure what the problem is here though. I do not fully understand how an op-amp works and I would not be surprised if a PWM signal cannot be put through an op-amp without affecting the signal in a negative way, or that there is going to be some timing issues/considerations at the very least.
Any tips or recommendations? Please be as specific as possible in your answer and do not assume that I know my way around EE.
Many thanks!
-Jonas