I am running a somewhat powerful LED, on the order of 3.5V 500mA, off of an ~11V battery using a constant current switched mode power supply from Ebay that uses the LM2596. What I need to do now is turn on and off the LED using an Arduino at a variable frequency of around 10 to 100 hz and 30% duty cycle, and have the current rise and fall times be under 5% of the period, which is 0.5ms at 100Hz. In other words, a square wave, not a sine wave. I have an Arduino Pro Mini in the project already that is outputting the correct pattern, but how do I amplify this?
I've thought of a couple of solutions, but none seem to be feasible.
Switched mode power supply controllers with a PWM input seem to try to smooth out this input and give an even output current, the opposite of what I want.
I could use a simple current limiting resistor with a transistor between it and the LED, but this is too much power dissapation (~5W) for a reasonably sized resistor, not to mention the variation in current with battery charge and LED temperature (and therefore voltage drop).
I could have a switched mode power supply bring it down to maybe 4-5V and use a resistor and transistor after that, which would solve the heat and battery voltage problems but make the accuracy even more dependent on forward voltage.
If I keep the constant current power supply and a transistor is put between the battery and power supply input, the inductor would keep the current from changing quickly enough.
The most feasible solution I've thought of is to put a transistor between the power supply output and the LED, but can switched mode power supplies handle this kind of switching on their output? Would the power supply spike the voltage when the LED is disconnected to try to maintain the constant current? How well does the maximum voltage setting on those power supplies work?
I'm going to spin a custom board in the future, but right now I'm looking for a solution simple enough to implement on a protoboard.