# Completed ProjectHelp finding fast switching MOSFET for laser PWM on 3D printer

#### SpiderSpartanju

Joined Apr 10, 2009
82
I'm trying to figure out how to find the right MOSFET to drive a laser using PWM on my 3D printer. I have a Creality Ender 3 Pro that came with the 4.2.2 control board. From what I can tell that board used a TSM060N03ECP MOSFET to provide 24V PWM to the part cooling fan. This MOSFET was also large enough to handle my laser.

I recently upgraded to a BTT SKR 2 control board, which uses much smaller AO3400A MOSFETs to provide 24V PWM to the fans, that can not handle powering the laser. I'd like to leave the board unmodified and use the 24V PWM to feed the gate of another MOSFET, which will in turn provide PWM to the laser. I'm not entirely sure what current the laser is drawing, but I had no issues with the TSM060N03ECP. Ideally, I'd like to find an equivalent to the TSM060N03ECP, but that would accept the 24V gate voltage.

Do I have any hope or will I be better off pulling the 5V Gate PWM signal from the SKR 2 to feed a remote TSM060N03ECP? Thanks for any help you can offer.

#### LowQCab

Joined Nov 6, 2012
2,866
How about a Schematic and some pictures ?
Kinda hard to understand, it sounds like You want to use a
PWM Fan-Speed-Controller to control Your Laser ?
.
.
.

#### SpiderSpartanju

Joined Apr 10, 2009
82
How about a Schematic and some pictures ?
Kinda hard to understand, it sounds like You want to use a
PWM Fan-Speed-Controller to control Your Laser ?
.
.
.
This is exactly what I'm looking to do. Here's how I had this wired on the old control board, which worked fine.

It appears the original board used the fet to make a connection to ground on the negative fan pin.

Here's the schematic for the mosfets on the new control board, which I believe shows the Fan negative pin at 24V when the mosfet is off. I think this actually makes my voltage across the diode driver swing between -12V, when the fet is off and +12V when the fet is on in the original circuit.

I feel like this is way more complicated than it should be. I definitely feel like I need an external mosfet, somehow controlled by the fan pin, which swings between -12V and 12V relative to the buck converter 12V supply. I think I'm more confused now than I was before and would appreciate any help anyone can offer. Thanks.

#### LowQCab

Joined Nov 6, 2012
2,866
With no actual Pictures,
and no reason stated for why You want to do this in the first place,
and the the unconnected, block-diagram, Schematic-style,
and no "walk-through" explanation of what is occurring/sequence of operation,
makes it impossible to make any sort of recommendation.

You have to have a very good understanding of what is, or is not, going on with your Machine,
and be able to clearly communicate that to other people who do not own,
or have hands-on experience with,
and your expectations for it's performance.
.
.
.

#### Irving

Joined Jan 30, 2016
3,300
OK, the info is a bit disjointed but its pretty straightforward. The laser is driven from 12v at a constant 1.25A so around 15W input, which isn't so different to a decent 20 or 24W fan.

We can estimate the impact of using the AO3400, which is a 30v/6A device with, from the datasheet, Rds(on) about 50mOhm and a thermal resistance to ambient of 125degC/W. At 1.25A it will dissipate 1.25 * 1.25 * 0.050 = 80mW max Rds(on) losses (assuming 100% duty cycle) and switching losses are <5mW (@ 12v, 1.25A and 20kHz PWM from ref eq 4 & 5). 85mW of losses at 30degC ambient translates to a junction temperature of around 30 +125 * 0.085 = 41degC and a case temperature of around 35degC, which is well within its capabilities assuming there's a reasonable amount of copper on the board.

So my advice is try it. If the AO3400 gets too hot (best measured with an IR thermometer or thermal cam or alternatively, if you can't touch it and a drop of spit boils off) then the alternative is an external MOSFET and BJT pair as shown below. Almost any TO220-cased MOSFET will do, no heatsink needed.

#### Alec_t

Joined Sep 17, 2013
13,315
Are you sure PWM will play nicely with your constant-current laser driver? The driver may well already be using PWM internally to control the current. There may be a conflict.

#### SpiderSpartanju

Joined Apr 10, 2009
82
Are you sure PWM will play nicely with your constant-current laser driver? The driver may well already be using PWM internally to control the current. There may be a conflict.
The driver is This one from survivallaser.com. It worked well on my original control board which had the fan negative pin floating until connected to ground through pwm controlled mosfet. My real issue here is the new board connects the negative pin to 24V while pwm is off. I could lift the PWM output ahead of this mosfet, but I'd kind of like to keep the control board unmodified.

#### Irving

Joined Jan 30, 2016
3,300
My real issue here is the new board connects the negative pin to 24V while pwm is off. I could lift the PWM output ahead of this mosfet, but I'd kind of like to keep the control board unmodified.
No it doesn't. What your seeing is the leakage current through the LED connected from +24v to the switched output. Thats easily solved with a schottky diode like so...

Because your Laser driver is constant current the 0.2v drop of the diode is of no consequence. It will dissipate 0.25W so wont get hot if you choose one rated at 5A or so.

Last edited:

#### SpiderSpartanju

Joined Apr 10, 2009
82
OK, the info is a bit disjointed but its pretty straightforward. The laser is driven from 12v at a constant 1.25A so around 15W input, which isn't so different to a decent 20 or 24W fan.

We can estimate the impact of using the AO3400, which is a 30v/6A device with, from the datasheet, Rds(on) about 50mOhm and a thermal resistance to ambient of 125degC/W. At 1.25A it will dissipate 1.25 * 1.25 * 0.050 = 80mW max Rds(on) losses (assuming 100% duty cycle) and switching losses are <5mW (@ 12v, 1.25A and 20kHz PWM from ref eq 4 & 5). 85mW of losses at 30degC ambient translates to a junction temperature of around 30 +125 * 0.085 = 41degC and a case temperature of around 35degC, which is well within its capabilities assuming there's a reasonable amount of copper on the board.

So my advice is try it. If the AO3400 gets too hot (best measured with an IR thermometer or thermal cam or alternatively, if you can't touch it and a drop of spit boils off) then the alternative is an external MOSFET and BJT pair as shown below. Almost any TO220-cased MOSFET will do, no heatsink needed.

View attachment 261026
Thanks for the detailed response. After looking at it a little more I think I may not have explained it well enough. When the fan pwm signal from the controller IC is on (high) the mosfet is triggered creating a path to ground for the fan pwm ground pin.

When the fan pwm signal from the controller IC is off (low) the mosfet is off, causing the fan pwm ground pin to be 24V.

When the Laser diode driver is connected with the buck converter set at 12V for the positive and the fan_pwm_gnd pin as negative, it's fine when the system is on. When it turns off I end up with about 14V on the laser diode driver negative.

If I drop in a diode, say 1N5404, then the laser diode driver is protected from reverse voltage and I think everything works as expected.

When my new laser diode gets in I'll hook it all up and be sure to report back any unexpected findings. If anyone sees anything I'm missing I certainly welcome the insight. Thanks.

#### SpiderSpartanju

Joined Apr 10, 2009
82
One last question on this setup. I'm estimating the pwm frequency at 329kHz. I'm having a hard time determining if a 1N5404 would respond well in this circuit. Do you have a recommended schottkey diode diode cheaply available in this range?

#### Irving

Joined Jan 30, 2016
3,300
329kHz? I Seriously doubt that. Whats the basis for your estimate? Your constant current driver wouldn't function properly if it was switched on & off at that high a rate. The PWM from the MCU is 329Hz more likely.

#### SpiderSpartanju

Joined Apr 10, 2009
82
329kHz? I Seriously doubt that. Whats the basis for your estimate? Your constant current driver wouldn't function properly if it was switched on & off at that high a rate. The PWM from the MCU is 329Hz more likely.
It's times like these I wish I had a scope so I could just check. This is a BIGTREETECH SKR2 3d printer control board, listed as having a ARM Cortex-M4 CPU STM32F429VGT6 microprocessor with 168MHz frequency. The Marlin firmware that runs the controller calls out the fan pwm frequency as F=F_CPU/(2*255)=168,000,000/(2x255)=329,411.

#### Irving

Joined Jan 30, 2016
3,300
The CPU clock will be pre-scaled before going to the pwm controller. From a quick scan of the posts regarding that laser controller I suspect its more like 1kHz..

A 1n5404 will work though it dissipates 1.5W and loses around 1.2V. A schottky diode like SB540 will lose 0.7W/0.55V and are readily available for $3-$4 for 10 on ebay.

#### SpiderSpartanju

Joined Apr 10, 2009
82
The CPU clock will be pre-scaled before going to the pwm controller. From a quick scan of the posts regarding that laser controller I suspect its more like 1kHz..

A 1n5404 will work though it dissipates 1.5W and loses around 1.2V. A schottky diode like SB540 will lose 0.7W/0.55V and are readily available for $3-$4 for 10 on ebay.
Thanks for all your guidance on this. I'm back up and running. I was able to find a 1N5822 Schottkey diode at a local electronics shop(debco.com). I put that inline along with a 2A glass fuse on the input side of the diode driver. I tested with a diode driver dummy load that with 12V input to the driver I was drawing 1.22A on the output at about 6V and 620mA on the input. Pardon the messy workspace, but here's a picture of the laser in action. It burned through a piece of cereal box cardboard and a piece of foam underneath. And that's before focusing.

#### Irving

Joined Jan 30, 2016
3,300
You're welcome.

Local electronics shops still exist? Sadly few and far between here in the UK - though I'm lucky, within a 25 min drive I have a trade counter of RS Components so I can order online up to midnight and pick up after 2pm next day, or Cricklewood Electronics. There used to be at least 3 or 4 other places within a 30min drive but over the last 20y they've all closed down.