I've been struggling for a few weeks now trying to add a PWM option to my CW laser diode driver design which works OK.
When adding a MOSFET or BJT to PWM the output, I'm getting voltage spikes and noise. This is bad for the driver since the laser diode is a very sensitive and expensive component.
I tried three options to PWM the signal, option 1 (MOSFET ATTACHED TO V3 analog input) works the best, but still not good enough.
Currents are 0-250mA, 1kHz - 10kHz operation.
The PWM signal is currently supplied by an industrial function generator to avoid any problems related to MCU low power pins.
Do you have any idea how to wire the switch correctly for best noise performance?
Am I doing something wrong?
Please identify the point on the schematic where you are getting noise and spikes!!!
Paul
Hi Paul,
Thanks for your answer and tip..
In LTSpice the laser diode looks fine,
but the MOSFET area has spikes (picture attached)
In reality I only tested the laser diode and R2 (Current sense resistor),
Both have spikes.
Is the trace timed with you pulse rate? If so, sync the scope trace to the pulses and look at an individual spike.
Paul
IMO C1, C2 and C3 only can cause trouble. C1 shorts U1 output, causing slow rise/fall times and heating of the IC output transistors. C2 and C3 further slow down the operation, possibly causing output overshoots. C4 is simply ridiculous.
Hi, thank you,
I will sure try tomorrow to solder them out one by one and observe the change. (PCB was already manufactured)
I will take scope images also to record the spikes.
C4 was actually added manually after manufacturing the PCB while trying to clean up some noises, from some reason it helped, so i will try to leave it for now just not to add more variables
Regarding the switching options what do you find the most reasonable ?
Thank you !
Uhm ... does the driver need the 3.3V for turn the laser on ? (i mean, it turn the laser on when the 3.3V is present, right ? ) ... if yes, have you tried to simply close R9 to GND with a transistor (or mosfet) for feed the PWM signal to the driver ? (ofcourse it need to be inverted, in that case, driving the transistor on will shut down the laser, so or need to invert via software, or with a second transistor open-collector style) ...
Or to just feed the PWM signal in the 3.3V input ? ...
In any case, probably you also need to reduce the values of C1 and C3 ...
Anyway, have you tried the real circuit or just ltspice simulation ? ... i had some bad results with ltspice in the past, compared to real components ... if you don't want to risk a costly laser diode, just use some common diodes in serie for emulate its voltage dropout ... by the way, what laser diode ? ... you mentioned 250mA, that seem the common current for a 120-140 mW 405nm one ...
Etemenanki:
Uhm ... does the driver need the 3.3V for turn the laser on ? (i mean, it turn the laser on when the 3.3V is present, right ? ) ... if yes, have you tried to simply close R9 to GND with a transistor (or mosfet) for feed the PWM signal to the driver ? (ofcourse it need to be inverted, in that case, driving the transistor on will shut down the laser, so or need to invert via software, or with a second transistor open-collector style) ...Or to just feed the PWM signal in the 3.3V input ? ...
In any case, probably you also need to reduce the values of C1 and C3 ...
Anyway, have you tried the real circuit or just ltspice simulation ? ... i had some bad results with ltspice in the past, compared to real components ... if you don't want to risk a costly laser diode, just use some common diodes in serie for emulate its voltage dropout ... by the way, what laser diode ? ... you mentioned 250mA, that seem the common current for a 120-140 mW 405nm one ...
I'm varying the voltage V3 between 0-3.3v using DAC from MCU, so the current is increasing and decreasing according to the voltage
I already manufactured a PCB with the current design, so the noises are on the real PCB.
250mA is some general number I came into since this driver should be quite universal, right now I have 2x Red lasers, green and blue which operating around 50-100mW.
Thank you!
DrDiettrich:
IMO C1, C2 and C3 only can cause trouble. C1 shorts U1 output, causing slow rise/fall times and heating of the IC output transistors. C2 and C3 further slow down the operation, possibly causing output overshoots. C4 is simply ridiculous.
Hi, As agreed I de-soldered C1,C2,C3 and did a re-test
Actually the results are much much better.
At Freq of 1KHz up to 15KHz (which is the maximum I need) the PWM looks great.
At Freq of 500Hz up to 1KHz I'm getting some overshoot which is not bad and I can live with it, unless you have an idea why it happening ?
Thank you so much.
Attached are some images for reference
2x Images before the Caps de-soldering, just for reference how bad it was before.
and images after the fix, with high frequency of 10KHz its totally smooth,
With frequency of 600Hz there is this overshoot, which is stable peak (when I increase or decrease voltage, the 'ON' level changes, but the peak stays the same.)
In case you have any idea how to manage so smoothen it , it would be great.
Thank you.
Sorry, I have no idea what those screenshots should show - which points in the circuit are you measuring? Which circuit diagram? Can you add the PWM signal at the second channel?
I'd try a faster transistor (MOSFET?) for the TIP120.
Dear Diettrich,
Sorry for being unclear.
All the pictures measured on R2 (current sense resistor), on diagram number 1 while the MOSFET's Drain is connected to the DAC input from the MCU (V3).
Basically right now as I wrote , on frequencies greater then 1KHz the pulse is smooth and nice,
on frequencies of 1KHz and below, I'm getting this small overshoot.
BJT works good for me from driver linearity perspective, Do you have recommendation for faster BJT ?
MOSFET is also an option in case linearity won't be affected.
Thank you so much.
nirbec89:
Dear Diettrich,
Sorry for being unclear.
All the pictures measured on R2 (current sense resistor), on diagram number 1 while the MOSFET's Drain is connected to the DAC input from the MCU (V3).Basically right now as I wrote , on frequencies greater then 1KHz the pulse is smooth and nice,
on frequencies of 1KHz and below, I'm getting this small overshoot.BJT works good for me from driver linearity perspective, Do you have recommendation for faster BJT ?
MOSFET is also an option in case linearity won't be affected.Thank you so much.
I just changed the TIP120 to FQP30n06l, the voltage spikes measured on R2 in low frequencies are still the same.
You can actually see while increasing the function generator frequency how the overshoot is being flattened
The opamp I'm currently using is MCP602, maybe this is the slow component you looked for?
Perhaps the Darlington is responsible for the strange looking signals. In detail with the low currents (6-9mA).
What type is R2? Wire wound will most probably introduce an inductance!
Eventually it will help to put the laser diode in the collector branch of the transistor, swap Q1 and D1.
DrDiettrich:
Perhaps the Darlington is responsible for the strange looking signals. In detail with the low currents (6-9mA).
What type is R2? Wire wound will most probably introduce an inductance!Eventually it will help to put the laser diode in the collector branch of the transistor, swap Q1 and D1.
Hi, I switched to MOSFET and it still overshoots only at low frequencies (less then 1KHz),
Also swapped between Q1 and D1 without change.
Also R2 is Oxide film resistor (which to my google research supposed to have low inductance)
I Swapped my MCP602 to TLV9102 and the overshoots increased in size.
the TLV9102 has higher slew rate, could it help understanding the issue?
Thanks.
That "overshoot" looks like an oscillation on commutation, it can be introduced from basically anything inductive, included wires and/or pcb tracks if too long ... and ofcourse if commutation is more fast, oscillation become worse ... but cannot say too much without make measures or also just see the setup (pcb and connections) ...
Etemenanki:
That "overshoot" looks like an oscillation on commutation, it can be introduced from basically anything inductive, included wires and/or pcb tracks if too long ... and ofcourse if commutation is more fast, oscillation become worse ... but cannot say too much without make measures or also just see the setup (pcb and connections) ...
Hi,
I attached the full PCB design.
The EN (enabled) branch is not used. (BJT is not even soldered),
Q3 was switched to MOSFET instead of BJT,
Q4 is also MOSFET now ,
CURRENT SHUNT was designed as potentiometer but i soldered a 3ohm resistor instead.
Also I de soldered C4, C5, C6 as we agreed.
Hi,
Hint: Make your tracks MUCH wider, they are way too thin, you have a lot of copper there, use it to conduct your current.
Your scope traces are all in the mV, where are you measuring the "spikes"?
Please mark points A, B, C on your circuit diagram where you have connected your scope to get EACH of your traces.
What do you see on the Emitter of Q4?
What is the application of your project?
Thanks.. Tom...
Can you highlight the path of the laser current on the PCB, both sides, from 7V to Gnd? I suspect that it forms a feedback loop that disturbs the output signal.
I'd place the laser current path at one side of the PCB, including power source and laser connectors. Also I'd suggest the typical current source circuit with the load in the collector path.
Have you checked that all opamps can work properly with input voltages near Gnd (Gnd and a few mV above)?
R3+R9 make the feedback signal high impedance, compared to the low 3 Ohm resistor.
The input signal conditioning is horrible. The reference voltage depends more on the base current of Q3 than on the DAC voltage.
Also show the signal at the base/gate of the power transistor - is it a nice or distorted rectangle?
After all I'd suggest that you hire an experienced electronics developer for a better circuit and PCB layout.
Tom, Diettrich,
Thanks for your answers and tips,
I'll be at office on monday and get the relevant measurement.
Diettrich, at the end of the day hiring professional depends on how much you think i'm far from good solution.
i'm already now able to active laser diodes with relatively high currents (110 mA is max i tested on real laser), and the behavior of the DAC is very linear, i'm able to control the current of the laser diode from my PC with variable duty cycle and frequencies in 0.5mA accuracy from 0-250mA (on dummy load) which is great accuracy for my needs.
Also, in the end its all about learning
Thanks,
Nir