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). The MCU runs at 3.3V. I have tried a few things but fail to get it to work.
This seems like a very trivial problem to me but even here my very basic EE knowledge seems to 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. But I have read somewhere that LEDs are happier with being run at their designed current rating and insteads 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.
Any tips or recommendations?