There are a few designs out there for constant current devices, but most of them use a certain chip. I was looking for a way to build my own constant current supply from parts that I have available. The aim is to control a RGB LED with 10W (10-12V,350mA).
As I have next to none experience in electronics (last lecture ~7 years back), I wanted to run two different designs by you guys.
The first is one I have taken straight from here
And the second one I found was this one here. It is interesting as I have a Darlington driver around. I slightly modified the circuit in a way that R1 is not connected to the main power supply (compare Fig.6 in the linked document) but gets controlled by an Arduino PWM port.
Would this be possible or do I need more parts for the PWM support?
How do you think those two circuits compare?
Ps: The part numbers are just put in by CircuitLab, so please do not pay too much attention to them. I most definitely will use different parts and will consult their data sheets beforehand.
After some time I have now actually built the circuit one (with the MOSFET). I also added a Low-pass filter to connected an audio signal. Together with an Arduino as a driver for the RGB LEDs the light pulsates to the beat of the music.
- I built the constant current driver circuit from above three times for R,G and B
- The input is connected to three PWM pins of an Arduino
- Based on a Tutorial by Jeremy Blum, I built a simple low-pass filter with 2 op-amps, a few resistors and caps and a trim pot.
- One can now connect audio which is split into a singal for the speaker and an input for the op-amp. The op-amps amplify the signal which then goes to an Arduino analog pin input
- With some code running on the Arduino I can now trigger the light based on the analog input
- I added a voltage regulator (LM7809) to step down from 12V to 9V for the Arduino. This is not really needed, but I had one and wanted to try it :)
I had some fun building this and now want to put it into a lamp and do some more coding...