Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

0-2A+, Pulsable PWM linear laser diode driver

Joined
Dec 22, 2015
Messages
8
Points
0
Hi guys, below is a design I made for a 12V laser driver for a CNC

http://imgur.com/a/rDFcP - schematic
http://imgur.com/a/FY5nk - reality


ref_pwm is a PWM signal (or if you want... a DC one, you can skip the filter if so) of a few KHz, it's duty cycle sets the reference voltage anywhere in the range of (0-3.3V). [3.3 = max PWM output of your uC]

This sets the the reference for the current loop.

lase (or I guess lase bar ) pulls down the reference voltage to zero, killing the current in the loop.

RC filters are used to lower the edge on the PWM signals to make it easy for the loop to follow the reference.

the 1K res on the output of the opamp feeding into the gate of the MOSFET makes the load not compleltly capacitive, which the opamp (might) not like, depends on yuur choise of opamps.

Pick something which has common mode input range that goes all the way down to zero (LM324 works) as we are sensing around this range

I picked a 1OHM resistor for the sense resistor because it also acts as a degeneration resistor, lowering sensitivity of the loops, helping avoid oscillations

I tested it out, works great.

I'm using relay to short the laser when not in use to avoid issues with frying the laser

Vcc = 10~12V (based on your max current)
 
Last edited:





Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
Looks like a nice driver, though i think the voltage across the sense resistor is on the high side - i suppose efficiency doesnt matter that much here, and it does put it in the LM324's comfort zone (that thing will not do rail to rail common mode i think).

Why cut out the laser by shorting it with a relay though, instead of just dropping the input signal to shut it off? It seems that pulling the 'lase' input high would shut it off as well.

I'm sure it works, though the driver could actually dislike the contact bounce which causes rapid adjustments when you close that.
 
Joined
Dec 22, 2015
Messages
8
Points
0
Hi Ben!

The relay is used to short the laser when the CNC is not being used. Basically a safety feature . When the CNC is used, the LASE pin is used to modulate the laser.

Shorting the terminals helps protect the device against ESD, as I understand it. I read it in a thors lab manual about good laser drivers
 
Joined
Sep 12, 2007
Messages
9,399
Points
113
You're regulating the voltage on the sense resistor to whatever the PWM voltage is. I would have chosen to divide the PWM signal down to 0.1V instead of 5V and use a different op-amp, but that just means the power is dissipated in the FET instead of the shunt I suppose.

The voltage follower isn't necessary.

I would be concerned about contact bounce on the relay. This might cause oscillations on power-down if your timing isn't good.
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
Well, if the relay is only a safety precaution for 'storage' that should be okay. Bounce would be an issue if the laser is powered on, but if you start and stop things with the laser off set by /lase or zero pwm that should be okay.

As for the PWM voltage: I'd divide that too. If the sense resistor is 1 ohm and you apply the full 5 volts (running the laser at 5 amps... probably not?), that sense resistor will burn 25 watts. And you cannot use a wire-wound resistor for that either since those have a high inductance making the driver unstable.

The latter is a real issue, i've heard of at least one person that used a wire wound resistor for it, and that driver started oscillating at certain power levels.

The rail-to-rail problem with the opamps only happens when you power them from ground. I can't tell from the circuit, but if you use a negative supply voltage on pin 11 it's no problem.
 
Joined
Dec 22, 2015
Messages
8
Points
0
I'm using a 10W power resistor as the sense, so I guess that gives me about 3Amps give or take MAX current.

Anyway, I made some mods the circuit as it burned my LD (sad face)

I removed the NMOS transistor and replaced it with a NPN Darlington (TIP122)

I looked at the relay bounce and it turns out it was pretty bad, also turn on and turn off transients for VCC

I took the relay out of the picture

Anyway, here are the waveform driving a dead A140 LD

http://imgur.com/a/FbKTW

Another change I did was change R4 to about 10K to take the edge off the LASE signal a bit more.

I'll update once I get my new LD. I still see a bit of an voltage overshoot across the LD, which makes no sense as the current is under dampened. I'm not sure if it's parasitic or a measuring artifact as I have to float my scope to measures the voltage directly across the LD


I'll update once I stress test on my new LD :(
 
Last edited:

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
Looks pretty good. You should not put a signal on the input without the power supply running. This will partially power the opamps, causing the glitch you see in "rare turn on, I = 1.6A. Power is applied while current reference is non-zero".

Where do you see overshoot? I can't really make it out in the screengrabs.

If you only want to power it to 3 amps maximum, i'd strongly suggest limiting this current such that 100% duty on the pwm input results in 3 amps. You can easily do this by inserting a potmeter between the top of R3, it's wiper to pin 3 of the chip and the other connection to ground. 10k/100k or so should be good values.

With a dummy load run 100% pwm and set the pot so 3A flows, no more. This will prevent accidentily blowing up the laser diode when there is something wrong and the pwm input keeps high for some reason. If it is microcontroller controlled these things actually happen when the software crashes, never rely on it not to!
 
Joined
Dec 22, 2015
Messages
8
Points
0
UPDATES

http://imgur.com/a/A470t

The rare turn on/turn off would only happen if my firmware had a bug in it, it's not typical operation, but it's nice to see there is no overshoot.

I have used a resistor divider to set my max current to 1.6A, as this is as hard as I want to drive my LD

Anyway, I changed R2 to about 220K. This kills the rise time of the current (as you can see). However, I had no other choice, I have a VERY long cable connecting the laser driver to the laser and I think it's inductance is causing overshoots. It's not ideal, but for my particular use using a 220K and killing rise times will do just fine.


I think I'm done with this driver now =)

Thanks for the input everyone
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
If you are happy with the slow rise time stick with it - it's no problem for the laser, though the average power will be slightly less than computed due to the undershoot.

Making it -really- fast (like several MHz) gives you more problems: You could run 50 ohm terminated coax cable to get rid of the ringing and such, but the slew rate and gain-bandwidth products of the opamps is limited as well.

The delay you see now is purely due to R2/C1, and its a good thing to sort of soft-start the diode like that if you don't need more speed!
 
Joined
Sep 12, 2007
Messages
9,399
Points
113
Looks like your max speed would be about 2khz, which... might be okay for PWM, but that's horrid for any laser show applications.

Why are you driving it from lase instead of ref_pwm?

I've built several drivers somewhat similar to this design. I could never get a FET design to stabilize (even killed a $200 diode with oscillations once), and always ended up switching to BJT. Not sure what I was doing wrong, as I tried lots of different damping/compensation techniques, but BJT seems inherently way more stable for this.
 
Joined
Dec 22, 2015
Messages
8
Points
0
I had to lower the rise times because of my lead length, stray inductances were causing overshoots which might be harmful to the laser diode. But that's because I have long wires, if the driver is close to the laser itself speed will go way up. See the initial pictures with R2 = 1k.

This is not a function of the driver, but the lead length.

http://i.imgur.com/orN0gWB.jpg


Yes, with a BJT solution you are creating a variable current sink, while with a MOSFET you are designing a variable resistor.

because with the MOSFET solution your total resistance is rather small, small fluctuations in Vsupply, or even noise, cause large current fluctuations. A current sink, ideally, does not care about it's load on the other hand, or the supply voltage.

Also with a BJT solution the opamp is driving something that looks like a resistive load, instead of a mosfet which presents a capacitive load which it might not like.

REF_PWM is a PWM signal, it's filtered to give a voltage which is proportional to the PWM duty. Because of the filtering, it will naturally have a very slow response time. To get around this, I'm using the LASE port as you can see.
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
You can use a BJT in this circuit, but one problem comes from it's limited current gain: The opamp will have to push a lot of current into the base, or you'd need a darlington (which works too).

If you have problems with spikes on the supply voltage you could actually put a capacitor across your diode (provided its all soldered and no contacts can dislogde). This capacitor can be very small, just enough to account for the limitation in slew rate of the opamp.

Then again just putting proper decouply across the supply will do exactly the same, slow down any fluctuation to the point where the opamp + mosfet can respond quickly enough.

Given that these circuits are quite immune to supply voltage variations: you can just vary the supply voltage by 1 or 2 volts and probably not even have a measureable change in laser current.
 





Top