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

Help with a driver I designed...

SAR_mango

New member
Joined
Nov 25, 2019
Messages
3
Points
1
Hi everyone,

First post on LPF! This is for the more electronics-oriented people at least for now, although I will gladly release the design files if this thing works and might even sell finished boards.

I designed a low-mid power (up to 200mA) driver that has a very wide input and output voltage range. I wanted to be able to use two AAA OR two 10440 Li-ion cells in series. The Micro Flexdrive V5 only supports the former while the other buck-boost drivers on DTR's website only support the latter.

Also, since I love the Leadlight Pen Host for my builds, I wanted the driver to have a low battery indicator for the small hole on the host. I measured the switch PCB typically used with the host and designed my board with those dimensions, placing the LED where it would be under the small hole when installed. The board contains the switch as well, so no need for a switch PCB and a separate driver. I tested this and everything is aligned and fits.

Here's a little explanation of my schematic, although it doesn't differ much from other constant-current buck-boost drivers:
  • I used the LTC3129IMSE for its wide Vin and Vout ranges.
  • PWM pin is pulled low for efficiency at low output currents.
  • The power good pin goes low when it detects an undervoltage (batteries too low), which allows the LED to turn on. The pin can't sink much current so the LED has a series resistor to VCC. I tested this and it works fine.
  • The output is AC-coupled to the feedback pin to reduce ripple. Removing that 10pF capacitor had basically zero effect on output waveforms.
  • The output flows through a 1Ω shunt (a little high for a shunt, but still very little power loss if max output current is 200mA)
  • The shunt voltage is amplified by the MAX9938W. See the datasheet for that chip and look at my schematic. I actually set it up for adjustable gain even though it is meant to provide only a fixed gain. Surprisingly, this also worked when I tested it.
  • Gain ranges properly calculated and set to match the output current range I specified in the schematic. I measured this as well; it seems like it's working. I measured it by sending a constant current through the shunt, turning the potentiometer while measuring the output of the amplifier.
  • Output goes to LTC3129's feedback pin, completing the loop.
  • Filter caps everywhere! 22µF should definitely be enough.
So the problem is with the output. It doesn't regulate constant current very well. There is a LOT of low-frequency (audible range, around 13kHz) output ripple throughout the current range. I have no idea what's wrong because the feedback is working as expected. Maybe it is because I pulled the PWM pin low, but that doesn't explain the poor constant current regulation. Anyone have any ideas regarding what I am doing wrong? Any help would be greatly appreciated. I am going to cross-post on the EEVblog forum as well.

*Sorry, I can't post proper links because I don't have enough posts yet.
datasheets.maximintegrated.com/en/ds/MAX9938.pdf
analog.com/media/en/technical-documentation/data-sheets/3129fc.pdf
 

Attachments

  • Universal-Laser-Driver.pdf
    29.2 KB · Views: 22





pcb.sith

New member
Joined
Jul 5, 2021
Messages
1
Points
1
Fantastic post here. My thoughts can be summarized as follows:

Traditional rib-spar (with carbon fiber ribs and a unidirectional carbon fiber spar)? Maybe geodetic ribs? Rohacell core and vacuum-bagged Carboline (or equivalent) skin? Maybe Rohacell sandwich construction (seems pretty advanced)?
 

farbe2

Well-known member
Joined
Oct 3, 2018
Messages
303
Points
63
Post your layout aswell, i have a hunch that it may be related to poor ground and /or loop area.
Could also be that the max9938 is to slow, so the LTC starts to oscillate because the feedback is to late (phase margin).

You could try to increase C5 to 22nF (as you have this already onboard)
This should make it slow, however thats irrelevant for a non modulated current source.
 

SAR_mango

New member
Joined
Nov 25, 2019
Messages
3
Points
1
Post your layout aswell, i have a hunch that it may be related to poor ground and /or loop area.
Could also be that the max9938 is to slow, so the LTC starts to oscillate because the feedback is to late (phase margin).

You could try to increase C5 to 22nF (as you have this already onboard)
This should make it slow, however thats irrelevant for a non modulated current source.
Thank you so much for helping. I won’t have my laptop until Saturday so I can’t post my layout until then (not saved anywhere in cloud), but I’ll do so right when I get it back.

The layout definitely isn’t optimal due to the tiny amount of space and only two layers, but I did try to minimize loop area and keep ground planes large and traces short.

I looked a little more closely at the MAX9938 datasheet and the chip is indeed probably much too slow. I will search for a regular op-amp with low enough input voltage and high enough GBP and slew rate. I’ll switch to low side current sensing if necessary.

I am out of components and I killed the chips on my three PCBs while testing, so I can’t try 22nF C5 yet.

Do you think setting the LTC in PFM mode (burst mode) for light load efficiency is also contributing to the issue? Or will the output ripple due to that be smaller and higher frequency if everything else is working well? If it is an issue I’ll need to make a PCB change.

Thanks again for helping, I really appreciate it.
 

SAR_mango

New member
Joined
Nov 25, 2019
Messages
3
Points
1
Post your layout aswell, i have a hunch that it may be related to poor ground and /or loop area.
Could also be that the max9938 is to slow, so the LTC starts to oscillate because the feedback is to late (phase margin).

You could try to increase C5 to 22nF (as you have this already onboard)
This should make it slow, however thats irrelevant for a non modulated current source.
Forum is finally back up, so here is my layout :)

LTC3129 switching frequency is 1.2MHz. With 1Ω shunt, 1.175V feedback voltage, and 10mA Iout(min), Av(max) is 120V/V. When I select an op-amp or current monitor, should I pay attention to gain-bandwidth product, –3dB bandwidth, or both? What values would you recommend? Gain-bandwidth product of 144? –3dB bandwidth of 1.2MHz?

Sorry, I don't really understand the difference between those specifications as I am not yet an engineer. Just a high school student. I am busy with college applications so I haven't had time to learn more about op-amps.
 

Attachments

  • layout.kicad_pcb.zip
    16 KB · Views: 6

farbe2

Well-known member
Joined
Oct 3, 2018
Messages
303
Points
63
I am not a studied engineer myself, so take everything with a grain of salt.

I dont use Kicad, so it would be easier if you would just upload a picture of the layout.

I don't understand why you want an op with 1,2Mhz. I think about it this way:
The switching frequency is 1,2Mhz, but does that mean that the LTC needs / would be even able to regulate the output voltage with this frequency?
No. Why? The output filter on the LTC (Inductor+capacitor) has the responsibility to filter the pulses that the LTC produces. It should be slow enough to filter them completely (almost) away otherwise you would have bad 1,2Mhz ripple on the output.
So the transfer function of the L/C filter on the output is the limiting factor for maximum "control frequency" of the LTC.
Some switching converters do offer a way of external compensation. These components are calculated based on the output filter. These components than slow/add poles to the loop of the converter. This fits the transfer function of the regulator to its output components.
If the compensation is wrong, overshoots / undershoots / instability could be the case.

As for the Op: -3dB bandwidth is a little misleading for a beginner. It does not guarantee that the op can output this frequency.
-3dB means that the output voltage is 3dB lower than it should be. So the Op is already struggling to maintain desired amplification.
Also: you need to take slew rate into account. Slewrate discribes the ability of the OP to swing the output around. For example: 20V/us.
This means the Op can change its output voltage by 20V per us.
Example: The humble TL072 does 20V/us and 3Mhz -3dB.
So if you expect to do a 1Mhz signal with full -15V to +15V output voltage you would be disappointed. A sine wave with 1Mhz and 30Vpp would need almost 100V change per us to be replicated. The TL can only change its output by 20V/us, so not possible.

There is also a thing called phase margin. It describes the "lag" of the op. If you Op has a delay of say 1ms from input to output, you Op would function fine a 10Hz, the output would be a little laggy but otherwise fine.
If you use this Op at 500Hz you would get oscillation. Because the feedback of the op would be exactly 180° out of phase e.g. late by one half wave. This would make the Op oscillate, the feedback would be wrong 100% of the time so the Op would try its best to change the output to the other polarity but would fail because it would be to late.
Ops have a phase margin diagram to show the behavior with respect to frequency. You need to make sure that you have enough phase margin so you actually amplify the signal and not only make a oscillator.

Also this "delay" adds to the feedback of the LTC, therefor changing its loop response / transfer function. The delay of the LTC adds to the delay of the Op thus reducing the phase margin further. This leads to oscillation and is likely the case here.
Making the Op much slower (adding a lowpass) would avoid the regions of the spectrum that show 180° phase shifts and therefor make it stable but slow.

Have a read on the mentioned topics and you will start to understand.
 




Top