In your circuit and PCB I'm missing knowledge and experience in many different areas. Have you reached your goal if you can make it work yourself, in this particular case, almost, somehow, by chance or accident...?
DrDiettrich:
In your circuit and PCB I'm missing knowledge and experience in many different areas. Have you reached your goal if you can make it work yourself, in this particular case, almost, somehow, by chance or accident...?
Dear Diettrich,
Its all about defining the goal,
You see points of missing knowledge and experience because its true,
This is not my profession and not what i do for living.
I'm not willing to learn the entire world of electronics (which is a big one) in order to solve specific needs .
My goal here was to find sufficient solution for me, since commercial laser drivers cost more than 1000$.
Thank you for your help and good will.
I'll still be grateful if you could help me final optimize it in case it won't take a lot of effort.
Thanks
Nir.
I designed some laser drivers in the past ... i see something strange in your circuit, but it can be matter of personal preferences ... about the PCB, if you permit, there are some things that usually are "at least deprecated" ... other than the use of too much thin tracks, as TomGeorge already mentioned, try to eliminate all 90 degrees tracks (is preferred to never use this configuration turning a track) ... and also these strange tracks joining points (one where U9, R15 and C7 connect, one where Q4 connect C5, these like these ones) ... and also keep tracks at good distances from soldering vias (as example, track from Q3 pass near TP holes, etc) ... did you use any autoroutr ? ... the layout looks very strange for me ...
Also the fact you used a NPN darlington (same thing if you switchesd to N-channel mosfet) for interrupt a positive power is really weird, usually they work good only for interrupt GND path (maybe it work only cause you used only low currents til now ... but is not a good thing )
By the way, what commercial laser drivers are you intending that cost more than 1000$ ... never built one that cost more than few Euros, and all worked good, at least til the 2W 445nm diodes that was the more powerful ones i used ... never worked with IR laser diode clusters drivers anyway, maybe you intend these ones, they are more complex cause requires limitation of around 1.5V at 10 or 20 Amperes ...
Etemenanki:
I designed some laser drivers in the past ... i see something strange in your circuit, but it can be matter of personal preferences ... about the PCB, if you permit, there are some things that usually are "at least deprecated" ... other than the use of too much thin tracks, as TomGeorge already mentioned, try to eliminate all 90 degrees tracks (is preferred to never use this configuration turning a track) ... and also these strange tracks joining points (one where U9, R15 and C7 connect, one where Q4 connect C5, these like these ones) ... and also keep tracks at good distances from soldering vias (as example, track from Q3 pass near TP holes, etc) ... did you use any autoroutr ? ... the layout looks very strange for me ...Also the fact you used a NPN darlington (same thing if you switchesd to N-channel mosfet) for interrupt a positive power is really weird, usually they work good only for interrupt GND path (maybe it work only cause you used only low currents til now ... but is not a good thing )
By the way, what commercial laser drivers are you intending that cost more than 1000$ ... never built one that cost more than few Euros, and all worked good, at least til the 2W 445nm diodes that was the more powerful ones i used ... never worked with IR laser diode clusters drivers anyway, maybe you intend these ones, they are more complex cause requires limitation of around 1.5V at 10 or 20 Amperes ...
Thank you for the tips, its really helpful although its seems that my knowledge gap is too big to achieve a fully optimized scheme and pcb design.
The laser drivers i'm referring to are PC controlled variable frequency, duty cycle and current.
Up to 250mA is great.
All in the visible range of 400-700nm.
In case you are familiar with one on reasonable cost i will be more than happy for a link ![]()
So , I tried to take into account all the super helpful tips you all delivered. (hopefully I'm a good student :D)
Again thank you very much for it.
The attached schematic should be better?
In the simulation plotted the laser current in blue and the DAC input in green.
You have learned a lot ![]()
I'd add a voltage divider to the DAC output, to better match the 100mA/V (10 Ohm) feedback range. Modify R2 to match the desired maximum current, a 3.3V feedback may result in too low laser voltage remaining.
M1 is used in linear operation, eventually should become a BJT.
A small resistor should limit the current on the PWM input (protect Arduino output pin).
A big cap (100µF) over the 7V supply V1 would be nice, your 100pF was the wrong class. Also a 100nF cap at the supply pins of U1.
You strictly separated the current source from the pulse generator - nice ![]()
Eventually M2 should short the positive U1 input to Gnd, with no harm to the DAC when a voltage divider was added. This change will prevent the constant current source from saturation while the load current is blocked. Actually the feedback voltage across R2/M2 will toggle between near 0V and 7V what the opamp won't like on one of its inputs.
DrDiettrich:
You have learned a lotI'd add a voltage divider to the DAC output, to better match the 100mA/V (10 Ohm) feedback range. Modify R2 to match the desired maximum current, a 3.3V feedback may result in too low laser voltage remaining.
M1 is used in linear operation, eventually should become a BJT.
A small resistor should limit the current on the PWM input (protect Arduino output pin).
A big cap (100µF) over the 7V supply V1 would be nice, your 100pF was the wrong class. Also a 100nF cap at the supply pins of U1.You strictly separated the current source from the pulse generator - nice
Eventually M2 should short the positive U1 input to Gnd, with no harm to the DAC when a voltage divider was added. This change will prevent the constant current source from saturation while the load current is blocked. Actually the feedback voltage across R2/M2 will toggle between near 0V and 7V what the opamp won't like on one of its inputs.
Dear Diettrich, thank you
For sure there is a very professional team over here so only left is to hear and learn ![]()
I re-sketched the spice simulation according to your tips (hopefully I managed to understand all, please say if I misunderstood anything)
Right now the voltage divider limits the feedback loop to 1.65,
Could you advise about resistors values scaling? meaning, it should be on 250 and 250ohms, 2.5K and 2.5K Ohm?
Thank you
You mean R3 and R4? They should not overload the DAC output, even in case only R3 is effective when M2 is ON. Higher values are okay but can slow down the pulse slopes. 2.2k to 2.7k looks good to me.
Understood, I will build this circuit tomorrow and update with results.
Thank you.
Hi,
So I modified the PCB to fit the last sketch we agreed on. (Attached again to this post).
The 'ON' state ringing became much better, while the 'OFF' state suddenly rings.
Attached scope measurements measured on R2.
Do you have any idea what could be wrong? maybe it's related now to the PCB design?
It could be related to the MOSFET switching? since the oscillations switched position and in this current design when the MOSFET switch to ON the DAC is shorted to ground
Maybe some sort of LOW pass filter will help?
I see the ON to OFF state switching also on ltspice
when reducing the voltage divider scale from 2.5k to 250 the oscillations becomes flat,
Also when increasing from 2.5k to 5k the oscillations grow even more.
Could be the case also in real life? (attched pictures 01, 02)
Thank you.
No base resistor between TIP120 and opamp ? (or is a mosfet ?)
Have you tried to place a SMALL capacitor in parallel to R2 ? ... (47 to 100pF, not more) ... also, no resistor to the input of the opamp ?
Also, ringing at turn-off seem caused from sometning inductive (like, energy released from inductors when opened), but i don't see inductors in your circuit ... long cables ?
Usually circuits that involves commutations are kept as small and short-connections as possible, right for that reason ... just trying to guess ...
Etemenanki:
No base resistor between TIP120 and opamp ? (or is a mosfet ?)Have you tried to place a SMALL capacitor in parallel to R2 ? ... (47 to 100pF, not more) ... also, no resistor to the input of the opamp ?
Also, ringing at turn-off seem caused from sometning inductive (like, energy released from inductors when opened), but i don't see inductors in your circuit ... long cables ?
Usually circuits that involves commutations are kept as small and short-connections as possible, right for that reason ... just trying to guess ...
Hi,
Indeed currently there are no series resistors to the TIP120 bjt and the inputs of the opamp, I can try to add them .
Is there any thumb rule about their value?
There is no inductors on the circuit and my load is laser diode so no inductance there also..
The ringing is on the turn-off but actually the MOSFET (M2) is turning ON since its shorts the opamp input to gnd, so maybe its related to the mosfet powering on?
longest wires are standard aligator cables as in the picture.
Well, about inductances, it depend from frequency (or, being more precise, from commutation speed, in this case) ... a very quick rise or fall front can "see" as an inductor also a piece of wire (once i made an oscillator where the resonant inductor was a 25mm long wire "U" shaped) ... so that ringing can be caused virtually from anything in that setup, also from the connection wires, if the commutation front is really quick ... when you have to drive a laser diode really fast, usually the driver board is placed or directly soldered to the laser diode, or at the shorter possible distance ...
If you want to do a trial ... place a 100p capacitor in parallel to the sense resistor (R2) ... also, from the opamp to the transistor, place an 1K resistor ... and, from the load resistor to the negative input of opamp, a resistor, or better, two serie resistors with a very small capacitor from the middle of the serie to the output of opamp ... and let see if the ringing will be reduced ... and on the input from the DAC you can use a couple of 1K rsistors ...
Sorry but not having here the same circuit you have for made tests, can only try to suggest tests ...
Hi,
What probes are you using for the scope?
Are they probes in X10 mode and have they been adjusted for compensation?
Thanks.. Tom... ![]()
Etemenanki:
Well, about inductances, it depend from frequency (or, being more precise, from commutation speed, in this case) ... a very quick rise or fall front can "see" as an inductor also a piece of wire (once i made an oscillator where the resonant inductor was a 25mm long wire "U" shaped) ... so that ringing can be caused virtually from anything in that setup, also from the connection wires, if the commutation front is really quick ... when you have to drive a laser diode really fast, usually the driver board is placed or directly soldered to the laser diode, or at the shorter possible distance ...If you want to do a trial ... place a 100p capacitor in parallel to the sense resistor (R2) ... also, from the opamp to the transistor, place an 1K resistor ... and, from the load resistor to the negative input of opamp, a resistor, or better, two serie resistors with a very small capacitor from the middle of the serie to the output of opamp ... and let see if the ringing will be reduced ... and on the input from the DAC you can use a couple of 1K rsistors ...
Sorry but not having here the same circuit you have for made tests, can only try to suggest tests ...
Hi, Thank you for the information.
Frequencies are between 1KHz to 10KHz, is this considered fast to require very short wires (less than the aligator ones)?
I will make a test according to your advise, I know it behaves little like 'black magic' and its hard to manage solve it online, I cant appreciate more your motivation to help.
Thanks
TomGeorge:
Hi,
What probes are you using for the scope?Are they probes in X10 mode and have they been adjusted for compensation?
Thanks.. Tom...
Hi Tom,
The probes are Aliexpress 100MHz probes with X10 mode.
https://www.aliexpress.com/item/32970277067.html?spm=a2g0s.9042311.0.0.97ed4c4du6GjZc
On the function generator output the signal looks square, straight and nice,
but I didn't made the compensation as I didn't found the screw to adjust, maybe I need to search better if can explain the issue.
Thanks
More than the frquency, here is matter of rise and fall times, being a square wave ... but, as i said, is difficult to guess exactly what cause the problem, not having here the circuit for make tests ...
I made some laser drivers in the past, the attached one is one i made for a friend (not the better work i made, he needed it in hurry so no time for optimize it, but it worked), cause my English is not the maximum, an image is better for see what i mean about the filtering part and keep track shorts and larges ... or you can just use and/or modify it as you want ... i just took away the Italian infos (they was personalized for him) and completed it with more clear values ... it had only a maximum power regulation (the trimmer) and a PWM input for turn it off (free running if no PWM), you can simply substitute the TL431 part with the DAC output for regulate also linearly ...

EDIT: those probes have the compensation screw in the little "box" at the connector (there is usually a small hole under it, with a capacitive trimmer that must be turned with a plastic or fiberglass screwdriver, no metal ones) ... IF they have compensation, ofcourse ...
Sorry, forgot to say ... the 10 ohm resistor at the gate must be placed as near as possible to mosfet, and the 4K7 is optional, need to be tested if for your application is better with or without it ...

nirbec89:
Hi Tom,
The probes are Aliexpress 100MHz probes with X10 mode.
https://www.aliexpress.com/item/32970277067.html?spm=a2g0s.9042311.0.0.97ed4c4du6GjZcOn the function generator output the signal looks square, straight and nice,
but I didn't made the compensation as I didn't found the screw to adjust, maybe I need to search better if can explain the issue.Thanks
Your scope should have a digital test point and you should always use that while making the adjustment.
Paul
Etemenanki:
More than the frquency, here is matter of rise and fall times, being a square wave ... but, as i said, is difficult to guess exactly what cause the problem, not having here the circuit for make tests ...I made some laser drivers in the past, the attached one is one i made for a friend (not the better work i made, he needed it in hurry so no time for optimize it, but it worked), cause my English is not the maximum, an image is better for see what i mean about the filtering part and keep track shorts and larges ... or you can just use and/or modify it as you want ... i just took away the Italian infos (they was personalized for him) and completed it with more clear values ... it had only a maximum power regulation (the trimmer) and a PWM input for turn it off (free running if no PWM), you can simply substitute the TL431 part with the DAC output for regulate also linearly ...
EDIT: those probes have the compensation screw in the little "box" at the connector (there is usually a small hole under it, with a capacitive trimmer that must be turned with a plastic or fiberglass screwdriver, no metal ones) ... IF they have compensation, ofcourse ...
Sorry, forgot to say ... the 10 ohm resistor at the gate must be placed as near as possible to mosfet, and the 4K7 is optional, need to be tested if for your application is better with or without it ...
Thank you,
I think that I understood most of the circuit, for sure it can help me with V2.0 of my driver ![]()
Are the 100ohm resistor and 10p ( if i can see correctly) cap at the opamp output use as low pass filter? maybe this can help reducing/removing oscillations?
Regarding the probes compensation, I saw the hole but it seems like there is no screw inside. I will have a better look tomorrow morning once I will be near it. (hopefully I miss looked it and Aliexpress guys didn't forgot it.)
Paul, indeed I have the digital test point on my scope. I will take in mind to test it first thing tomorrow morning.
Thank you.


Well, in the image you posted there is a small plastic screwdriver, it's strange if they add it for compensate probes if needed, and then the probes have no compensation screw ... but with Chinese sellers, all is possible ![]()














