I have been doing much research to learn about transistors and to find the right resistor/transistor coupling to power a laser driver that I am building. I want to complete the circuit through the 5V/40mA output on an Arduino, as the base, to turn the laser on and off. The circuit will have between 0.2A and 1.25A current flowing through it to power the laser and that will either flow or be cut off by the transistor (the laser driver does not measure voltage, only current.) I want to use the NPN transistor as a switch so it will saturate completely.

Any help with the resistor and transistor I am looking for? I am having so much trouble reading through these data sheets. :/

Here is an image of the laser driver diagram for those who requested! Circuit Diagram for laser driver

  • \$\begingroup\$ It may help if you post a schematic that shows how you are imagining the circuit will look. \$\endgroup\$ – Dan Laks Oct 13 '14 at 22:20
  • 1
    \$\begingroup\$ To minimize the power lost in the transistor, I'd strongly recommend you consider using a MOSFET instead of a BJT. \$\endgroup\$ – The Photon Oct 13 '14 at 22:20
  • \$\begingroup\$ Indeed i'm with @ThePhoton on this, use a MOSFET to act as the switch. Definitely provide us with a schematic/diagram of how you want to drive this laser, because we may be able to point out flaws/things to save you time and more strange questions later ;) \$\endgroup\$ – KyranF Oct 13 '14 at 22:28
  • 1
    \$\begingroup\$ (continued) 3) Lots of power wasted in the resistors. You might want to consider a different design just for that reason. 4) The only reason to need a reverse diode is for reverse polarity protection or inductive flyback EMF. You probably don't have either one, so you can delete it. \$\endgroup\$ – AaronD Oct 13 '14 at 22:51
  • 1
    \$\begingroup\$ Converted my previous comments to an answer. \$\endgroup\$ – AaronD Oct 14 '14 at 1:48

You are likely to be better off using a MOSFET than a BJT.

We typically assume a BJT will have on the order of 0.2 V between collector and emitter in saturation. With 1 A collector current, that means 200 mW of power dissipation in the transistor.

MOSFET's drain-source channels on the other hand act a lot more like low-value resistors when fully switched.

Going to On Semi, I found several dozen available FETs with channel resistance (rDS(on)) below 50 milliohms for gate voltage of 4.5 V and current handling capability above 1.5 A. With this level of on resistance, the power dissipation is reduced to ~50 mW.

Lower power dissipation means a smaller package, probably lower cost, more power available for other functions, and less worry about thermal problems with your laser.

| improve this answer | |

I'd much rather do this:


simulate this circuit – Schematic created using CircuitLab

The opamp does whatever it has to to keep its (+) and (-) inputs equal. This makes the voltage across R1 equal to the voltage from R2, which is adjustable between 0-5V when on and 0V when off. Constant voltage across a constant resistance equals constant current through that resistance.

The only place for that current to come from is through the laser, via the transistor, hence a constant current sink that can be turned on/off via software. If you wanted, you could add an RC lowpass filter between a PWM output pin and the (+) input (keep the pot though) and also control the brightness via software. Just make sure that your PWM is actually 0-100% and not the 5-10% used for servos.

Do some math and choose R1 so that it by itself will limit the current to something a bit higher than you're comfortable with, but won't blow up the laser in case the transistor fails short-circuit, or if you adjust it too high, etc. Then set R2 to provide the same voltage that should be across R1 when drawing the desired current. Then add the appropriate heatsink(s), and you're done.

| improve this answer | |
  • \$\begingroup\$ nice job! The point about selecting R1 to be something that is likely to 'fail safe'er than using a normally very low ohm sense resistor is a good one. The op-amp can be given gain through a pot + feedback resistor. In fact a custom PCB will have room for a digital pot with 255 steps over I2C, or indeed a simple SPI/I2C Digital to Analog Converter peripheral can use used to set the "power" of the laser rather than fancy PWM magic. Of course the PWM is fine for LEDs and Lasers, and perhaps the OP can use the PWM for modulation at 32KHz or somethhing. \$\endgroup\$ – KyranF Oct 14 '14 at 5:39
  • \$\begingroup\$ Hmm that's OK, but the current depends on the (digital) output voltage of the arduino.. maybe not the most stable source. (I've done a switched reference type thing.) Add some R (1k-10k) in the inverting input, and typically you'll need some fast feedback around the opamp ~10-100pF from out to inverting input. \$\endgroup\$ – George Herold Oct 14 '14 at 12:18
  • 1
    \$\begingroup\$ @KyranF If you lowpass a PWM signal, you get a DAC. All you need is an R, a C, and a PWM frequency that is much higher than the RC filter's cutoff. Seems simple enough to me. It'll have a significant output impedance, but for this purpose, that's okay. \$\endgroup\$ – AaronD Oct 14 '14 at 13:43
  • \$\begingroup\$ A proper DAC chip is better though if you want consistency, surely? Theoretically yes, the RC circuit will work but who knows, given temperature and tolerance etc. \$\endgroup\$ – KyranF Oct 14 '14 at 14:05
  • \$\begingroup\$ It's no more consistent than the supply voltage, no matter what you use. Some parts use a separate reference for that, but it only shifts the problem to something else that might be easier to work with, doesn't solve it by itself. For a lowpassed PWM DAC, the output as a percentage of the supply voltage is determined only by the duty cycle. RC tolerances and temperatures only change the cutoff frequency, which doesn't matter if it's already much lower than the PWM and much higher than the desired response time of the circuit. \$\endgroup\$ – AaronD Oct 14 '14 at 14:35

You are likely way better off (function wise and cost wise) using something like and LED driver eg. LM3414 with PWM input, or if you want to keep it basic you can use a DLD101, which is a MOSFET and matching BJT. With that you can drop the LM338, 1N4007, and heavyweight resistors.

What frequency are you planning on switching the diode on/off at? Both of the above will work well at < 50kHz.

Pretty sure that you will toast your potentiometer at low resistances, regardless if it is 5W.

| improve this answer | |
  • \$\begingroup\$ Good point about toasting the pot. They should be derated by the amount of track actually used. If 25% of the track is shorted or left hanging in the breeze, then you only have 75% of the rated power. This is a function of the mechanical position, regardless of the taper (linear, audio, etc.). \$\endgroup\$ – AaronD Oct 14 '14 at 0:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.