Requesting help NPN as current limiter

Ken M., Tue Jul 10 2012, 12:31AM

Hey folks, I've been working on and of with a sort of DIY Laser "Test Bench" over at Link2, documented a little bit of the 1st version ran out of steam, but I"m redesigning it atm to be a litle bit better and to cost a bit less.

To give some back ground I"m using a Atmega328-P with the arduino bootloader and libraries, to server as the heart of the operaation, using the ADC's to monitor the batterys (sincce I plan on making it portable) and notifying if the batteries or a battery is low, an Isense resistor (was 1ohm) tied to ground and measuring across it to give how much current is going through it (I may switch it after a test last night showed the resistor was getting pretty toasty and I was plannning on switching it to SMD from through hole), and 2 ADC channels to read from a TEC (one is direct for powers above 1W, and the other channel comes from an op-amp to be avle to read 1mw-1W). Some I/O's for adjusting and selecting alo ng with indicators, a UART to talk to a Graphic LCD (to actually see whats being read and what my settings are), and a PWM channel outputting 8K to a RC DAC for an analog voltage to control how much current is going through the transistor to drive either a dummy (also used if I buy a driver and need to set current) or to an actual Laser diode, however the transistor I'm using on the old version of the board probably isn't going to work to well since its rated for 300mW and right at 2A (try'n to design this for 5mA -2A driver), also while testing at max voltage for use with blue and violet lasers the transistor doesnt kick on till 1000 counts or 50% of the adjustment range.

The problem I'm having is understanding dc current gain for a transistor in linear region and translating the datasheets for the different voltages I'm using, being 3-4.2V for red lasers, and 6-8.4V for blue/violet lasers. I know I should know how to do this stuff and be able to find info through google, but google turns up mostly stuff on using an NPN as switch, and not much in terms of exact info I'm looking for on using them for current limiting.
Re: Requesting help NPN as current limiter
Patrick, Tue Jul 10 2012, 12:44AM

the use of them (NPN's) for current limiting is not really precise, though when ive seen it done well, it was due to the designer knowing the transistors behavior well,even when hot, and values not neccasarilly posted in the spec sheet.

well typically instead of using it as a switch, its used to limit current via a small value resistor. IE will generate 0.7 Vdrop when your overcurrent value is reached. Im not sure if such a primative current limiter is useful for laser devices, they'er sort of sensitive to voltage and current conditions.

so the 0.7 volt drop opposes the base current/voltage reducing gain, and thus the transisitor nonlinearlly slows conduction by increasing its effective impedance... you can use limiter on the 723 ic or the other fixed or variable voltage regulators... not sure if theyll meet your specs though.
Re: Requesting help NPN as current limiter
Mattski, Tue Jul 10 2012, 03:15AM

It's best to use negative feedback if you want to get a fairly accurate current. What I'd do is put together a negative feedback circuit using your NPN transistor as a pass transistor and driving the base of the transistor with an opamp circuit. The opamp circuit has a reference voltage provided by your DAC on the non-inverting input, and it has the voltage across the sense resistor on the inverting input. If the sense resistor is on the low-side, i.e. from 0V to the laser diode cathode then you can take that voltage directly, if the sense resistor is on the high-side, between the NPN's emitter and the laser diode anode then you'll need and additional difference amplifier circuit to get the voltage across the resistor. I've done something like this with some power LEDs and it was stable from the start though you could add some additional compensation if it oscillates. You'll want some kind of limiting resistor on the opamp output.

Negative feedback will ensure that even as the Vce changes for different laser diode voltage drops and temp fluctuates your circuit will compensate for the changes. The sense resistor should be physically large enough to prevent substantial heating which changes its value if you want it to be really accurate.
Re: Requesting help NPN as current limiter
Sigurthr, Tue Jul 10 2012, 06:09AM

What exactly are you trying to do here? It sounded like you want a laser diode test bench... yet you're vastly overcomplicating things.

Laser diodes exhibit a negative thermal coefficient resistance, and as such are properly run on constant-current based drivers. The standard practice is to wire a LM317 in the current regulation mode and feed the LD with the current regulated output. As long as the diodes Vf is met, any voltage can move around to wherever the regulator wants it and the diode will be quite happy. Just remember the LM317 drops about 3V in current regulation mode.

Each diode make has a maximum safe operating current (and voltage, but that is less relevant), and each individual diode has a different If to Po curve (that is "forward current to optical output power") due to very slight manufacturing inconsistancies.

So, for a test bench you normally take your Constant Current LM317 driver and build it with a beefy potentiometer in series with the current setting resistor and gradually ramp up the current until the desired level. Having the pot in series with the resistor set for the maximum safe operating current of the diode allows you to never exceed the safe current level. You could also add the 1ohm current sense resistor but it needs to be able to dissipate a lot of heat and it will lower the efficiency of your system, it is more practical to buy a cheap multimeter capable of a few amps of current measurement and just measure current through the diode's return path.

Or, were you looking for a diode deathbed tester? That is best done with an adjustable CC/CV power supply as the diode's Vf WILL INCREASE as you run it at higher currents and it often vastly increases near death, so you need to have a large range of values available. Example: the 12x 405nm diodes can have a Vf near 12V once you reach the deathbed levels for efficient diodes. But really, there is little point in a deathbed tester, just wastes diodes which aren't very cheap.
Re: Requesting help NPN as current limiter
Shrad, Tue Jul 10 2012, 07:40AM

I'm not a really prolific writer on this forum, but I absolutely have to disagree on this post

the LM317 is far too unstable for any laser diode, and a CC/CV power supply usually has a transformer voltage tap automatic switching which will destroy diodes instantly

the best thing to do is indeed to use an opamp with a negative feedback and drive a low VGS mosfet, but you can find the ready-made alternative by using a flexmod driver

Link2

the cost is really good for all it does, and it is a great piece of engineering

for current setpoint, you feed it a 0 to 5V analog value, and for current reading, all you have to do is wire an instrumentation amplifier to the shunt resistor and read the value with you micro
Re: Requesting help NPN as current limiter
Sigurthr, Tue Jul 10 2012, 12:07PM

We (the laser enthusiast community) have been using constant current mode LM317's for laser diodes for years now and never had a single diode fail when the current is set properly. Voltage regulators will oscillate if you don't place filter caps on the inputs and outputs, that is the only time I have ever seen one be "unstable". I'll just agree to disagree.

A GOOD quality lab CC/CV power supply will have plenty of filtering and stable output. I know of many professional laser system builders who use these to test their diode assemblies before incorporation into the final product. They have sworn by them for years. Again, I'll agree to disagree, but it makes me wonder... what crap power supplies have you been using? There should never be any noticeable ripple (<10mV/A) from a good lab quality power supply.

Yes, the flexmod driver is fantastic, and is a viable option for a bench driver.
Re: Requesting help NPN as current limiter
Shrad, Tue Jul 10 2012, 02:34PM

I'm not talking about ripple, but parasitic spikes generated when those supplies switch from one winding to another

LM317 still has the drawback to be prone to thermal runaway and you will never go over something like 300mA to 500mA with stable output... also, the pretty high voltage drop is quite annoying

I have seen much more trouble from 317 current sources than from op-amp negative feedback, and I'm into electronics for a really long time now and lasers for 5 years... I can only tell from my own experience and maybe I had no luck, but I really popped my bunch of 658nm diodes with LM317s

I power my diodes from negative feedback circuits only, and at least I've only grilled a diode from bad transistor choice once or twice...

the main advantage is that you can hook it a powerful industrial NPN darlington and achieve 0~50 amps easily, or even make a passbank of transistors by using sharing resistors at each emitter (like .5 ohm) and then shunt the common point for feedback
Re: Requesting help NPN as current limiter
Sigurthr, Tue Jul 10 2012, 03:04PM

Hmm, I've never had/seen a multi-tap autoswitching bench supply before, only single transformer (two winding) linear units or switchmode supplies. I wasn't sure what you meant before but now I follow, yes that would kill a diode instantly.

I have a few units of a 1.45W (optical out) 445nm diode running on two LM317s in parallel at 620mA each which have around 30 or 40 hours each of use on them. All are running fine but I actively cool both the diodes and the TO-220 heatsinks. I usually use 100uF 'lytics on the output side and 22uF on the input side of each lm317, and use two 5W 1ohm metal oxide resistors in series for the current set resistance. There is a small amount of thermal drift between cold and when the regulators reach thermal steady-state equilibrium with the cooling aparatus, but it isn't bad at all.

I've never heard of LM317 CC problems below 900mA before, and those were mostly thermal issues I think. What were the symptoms you were getting? Was it dropping out of regulation, oscillating, or having wild voltage swings, etc?
Re: Requesting help NPN as current limiter
Ken M., Tue Jul 10 2012, 04:27PM

To answer your initial question Sig, this"overcomplicated" Idea came from the fact the I 1) had no LPM to measure (roughly) the output power of my lasers, 2)for builing lasers in the future its nice to have a dummy load.

You don't want to just buy or build some CC driver and attach it to the LD especialy if it is adjustable.

You don't know where the pot is set at, so the thought formed of why not build a LPM with a dummy load on the same board and it will be good.

Then while messing around (reverse engineering a Driver for a green laser I had) I noticed it was using a NPN as a current limiter with neg feedback from an op-amp, so I thought hey,why not use a uC with ADC channels to measure the TEC , and the resistor of the dummy load and output the values on an LCD screen. So to not always have to design or buy drivers to test a LD (see if it is dead or at least to see its breaking point or its max output power) I could use the uC to PWM into a DAC to drive an NPN in linear region to limit current. I could then test the driver with the dummy load, and if it was good I could run a LD off it, and even better in the case for testing both its max power and its breaking point, if the LD is a complete unknown, I could set the uC to start at 0mA and slowly step up to determine the minimum current to start lasing, and if attached to a PC it could datalog and give a graph for the full range of teh laser diode.

In a nut shell yes its over complicating a lot of things I could do easily.

I was just asking about the NPN because I'm having a hard time selecting one to suit my purpose, and still get a very nice range of current limiting.
Re: Requesting help NPN as current limiter
Sulaiman, Tue Jul 10 2012, 10:26PM

I've killed a couple of laser diodes,
mainly by seeing how far I could push them.

The thing with negative feedback is that careful consideration should be given to
what happens during powering up and powering down.
During these phases of changing/low supply voltage(s) unexpected oscillations/spikes etc. can occur.
Re: Requesting help NPN as current limiter
Shrad, Wed Jul 11 2012, 09:18AM

for sure you have to clamp output and input with a transistor/RC circuit designed well enough

the good thing with a driver like the flexmod is you can preset a defined value as max current, and you can then use a voltage source as current setpoint if you want to make a test bench

basically all you need to have is a potentiometer and a operational amplifier if you want a scaled reading on a multimeter or galvanometer