LED Stimulator

Hi folks, I am currently designing an LED stimulator for vision research and intend to control them via an Arduino. Before I order a bunch of components, I was wondering if those familiar with the Arduino could look over my design and make sure its feasible. I’ve included a pdf of the circuit diagram as well. The resistances are not noted in an effort to clean up the diagram, but you can still get the main idea.

The plan is to use common cathode RGB LED’s and drive them with an Arduino, via separate banks for each color for ease of color mixing. Since these LED’s must be tied together at ground (common cathode), I realized that the switch must be on the high side( I plan to use a p-Channel mosfet rated at 24V, 20A). This created another issue, since p-channel mosfets close when the gate is LOW, thus making the PWM unusable. So here’s what I am attempting to do to get around that issue: invert the outputs via a 74HCU inverter IC, amplify the voltage to Vcc with op-amps in order to fully close the transistor switch, and feed a bunch of current to the LEDs when the transistor sees LOW ( which is actually a HIGH Arduino output).

A couple other notes, I intend to control the intensity of the light with potentiometers ( that are referenced from 5.6 V to Vcc). These are connected to in such a way that I can read the value and display it to indicate intensity, as they will serve to control the current through the LEDs ( at first I wanted to use PWM, but its to slow for the fast (1-5 ms) pulses I desire). Also, the Zeners are intended to limit the maximum voltage across the LED banks.

If possible, please comment on the design and note ways I can improve it, or if it will not work, suggest ways I can make it do so! Thanks everyone!

LED Circuit.pdf (440 KB)

Don't cross-post please. Your other post deleted.

Circuitry is wrong, and not gonna to work. Have a look: http://www.electronics-tutorials.ws/transistor/tran_7.html Or better use dedicated chips, there are a lot of special led driver IC, easy to use and with software library available.

Can someone give me some tips as to what must be done to improve the circuit; I took a look at the above link and it looks like the mosfet is connected in the proper direction, and I'm kind of stumped as to where else to go with this.

What kind of leds? Data sheet or link to product. Using OPA as level shiftier is overkill, simple BJT is o'k; You can't install pot in series with leds; Why do you think PWM is slow? there is a way to make it faster : 62.5 kHz or more; Inverting in software is much easier , so you don't need chip to do this at all.

Thanks! Here's a link to the data sheet for the leds: http://www.bivar.com/Images/Cart/R50RGB-4-0045.pdf And good point about inverting from software, I suppose that wouldn't be tough at all. Also, how does one go about making PWM faster?

How many leds in parallel on your drawings? BTW, you can’t connect them in parallel like that, use separate resistor for each led, than combine at mosfet drain.

May be you don’t need mosfet at all, 80 mA per led you can drive about 6 with darlington arrays.

Thanks Magician, your assistance has been awesome!

The number of LEDs I planed to use was 35…though running them in all in parallel does seem like a hefty current draw. Maybe I will break them into banks and just use more outputs to avoid some of the heat related headaches associated with high current loads. However to avoid breaking them into too many banks, I will use the mosfets. (as I’d need 18 PWM outs to use darlingtons, which my board doesn’t have)

That link you’ve provided me looks like a lifesaver…no need to invert the input as the transistors are paired. The only modification I may make to it is use beefier transistors to up the current load from 500 mA so that I can run more than 6 leds off each branch.

I though I should have a resistor on each led…the professor I’m building this for said he though one would suffice as its just to limit current; should have just stuck with my instinct lol.

Another note, I searched the forums for information about that PWM stuff. I think I’m on the write track, seems pretty straight forward to modify.

Tomorrow I’m going to draw an updated schematic and post it, if possible take a quick look at it to make sure the kinks are worked out, that would be greatly appreciated.

Thanks again!

I have this link in my bookmarks: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235060559

Alright, I’ve retooled the circuit using the switching circuit suggested by Magician and attached a PDF of it below. A couple notes for Q’s 1,3,5 I’m going to use N-channel Mosfets of the 2N7000 variety. And for Q’s 2,4,6 I’m going to use P-channel Mosfets that have a drain-source voltage limitation of 24V and a drain current limit of 20A.

The goal I have in mind is to get a maximum of 960 mA to leave the transistor of each MOSFET drain ( on Q’s 2,4,6) and feed this down to the banks of 12 LED’s below. Heres a data sheet of the P-channels I plan to use, http://www.fairchildsemi.com/ds/ND/NDB6020P.pdf , if anyone thinks I may be pushing the envelope in regards to current let me know; but I believe this should be well within the transistors capabilities.

Also, I have not reduced the number of LEDs from 35 to 12, am going to use three banks of 12 but have chosen to only include one of these banks for clarity. I have also decided to ditch the potentiometers and control the light output through a control GUI I intend to use with this setup.

A quick aside, I plan on running this lighting rig off a 10 V, 10A power supply; which should provide me just enough current ( as all the LEDs running at once will draw 8.64 Amps), thus I may have to run the Vcc rail at close to 10 V to achieve this (hence the reason no resistances are chosen yet); might there be any concerns to be voiced about this?

Thanks for help!

LED Circuit 2.pdf (380 KB)

A quick aside, I plan on running this lighting rig off a 10 V, 10A power supply; which should provide me just enough current ( as all the LEDs running at once will draw 8.64 Amps), thus I may have to run the Vcc rail at close to 10 V to achieve this (hence the reason no resistances are chosen yet); might there be any concerns to be voiced about this?

I don't agree, you will dissipate a lot of power from 10 V PSU in resistors (70 % or more), better to decrease voltage to just +5V. One more things, lowering voltage to +5 you wouldn't need a level shifter N-channel mosfet, and use simpler circuitry like posted here: http://ruggedcircuits.com/html/circuit__16.html Also, I don't think you need a group of 3 banks, one transistor easily can handle 80 x 35 = 2.8 A.

You're right,driving from one transistor would save some work on both the circuitry and programming end as well, I believe thats what I shall do; however just to be safe I'm going to attach some heat sinks to the back of those transistors.

I think I'm going to order both sets of transistors (N and P channel) and experiment with both designs and see how each performs, as I've decided the extra $3 dollars or so in transistors is worth the added flexibility in design!

Much thanks Magician!

You cAn easily use shiftpwm. Or am I wrong?