I'm trying to use a basic LED driver circuit from PCB heaven (http://www.pcbheaven.com/userpages/LED_driving_and_controlling_methods/?topic=worklog&p=2) and I want to control it from a raspberry Pi GPIO (just to switch it on and off, I'm not going to be doing PWM with it). I _think_ the attached circuit should work, but I've not used an opto like this before so a sanity check would be helpful.
Note that the darlington transistor operates in the linear regime, it isn't just being used a switch (so it sops up any excess supply voltage and dumps it as heat - I'll adjust the number of LEDs depending on what the voltage drop across them at 60ish mA turns out to be).
I'm using a PC817, and driving the LED side at about 4mA (3.3V at the GPIO pin, 1.2ish for the LED, leaving about 2V across a 470R resistor). This should be fine for the Pi. My understanding is that this will allow the transistor side of the opto to also pass around 4mA (the current transfer ratio at 4mA is a bit over 100% according to the datasheet I've seen, and I'm assuming that is what that parameter actually means). Given the 4k7 resistor between the 15v supply and the top of the zener, will that be enough to short out the zener and keep the base on the darlington low enough to stop it conducting at all? Does that even make sense?
Also, I'm assuming that running about 4mA through both sides of the opto shouldn't damage it long term?
(I'm aware that the LEDs will be off when the GPIO is on).
Note that the darlington transistor operates in the linear regime, it isn't just being used a switch (so it sops up any excess supply voltage and dumps it as heat - I'll adjust the number of LEDs depending on what the voltage drop across them at 60ish mA turns out to be).
I'm using a PC817, and driving the LED side at about 4mA (3.3V at the GPIO pin, 1.2ish for the LED, leaving about 2V across a 470R resistor). This should be fine for the Pi. My understanding is that this will allow the transistor side of the opto to also pass around 4mA (the current transfer ratio at 4mA is a bit over 100% according to the datasheet I've seen, and I'm assuming that is what that parameter actually means). Given the 4k7 resistor between the 15v supply and the top of the zener, will that be enough to short out the zener and keep the base on the darlington low enough to stop it conducting at all? Does that even make sense?
Also, I'm assuming that running about 4mA through both sides of the opto shouldn't damage it long term?
(I'm aware that the LEDs will be off when the GPIO is on).
Last edited by a moderator: