In my opinion P1.23 is 3V and a Levelshifter is needed, right @cprezzi ?
I have a new little Problem, but i think thats from the Laser Driver. After a while the Laser is running,
he looses Power. If a new line starts, he start burn an getting lower to off. With next new line he starts
again for a few seconds. If i power all off, wait a few minutes and start lasering again, all works as expected for a while, then this behaviour starts again. I cooled the Driver active with a fan, but nothing changes.
I think this cheap Driver is garbage, or any other ideas?
Yes, P1.23 is 3.3V but TTL high is defined as >=2.4V so it should work as long a the driver is really TTL and not analog.
About the power loss: Did you adjust the maximum current of the driver to the spec of your laser diode? If the diode gets too much current, it will overheat and degrade or get destroyed.
Thanks Claudio.
The problem are, I donât know the specs of this diode, because I get she out of a old laser device. I only know that she have a max of 3 Watt. Iâll lower the amps and have a try again.
I assume P1.23 comes directly from the processor. Its my view that a safe practice is to buffer any outputs from the processor that need to leave the board. I would even use an optocoupler. Overkill perhapsâŚ
Hey Guys, I found this thread after trying to get a chinese 15W PWM diode laser working on a Mks-sbase with grbl-lpc.
I want to share my solution to the inverted behaviour and logic level differences.
The Problem:
This laser has a pull up resistor on its control board. So the Laserâs disconnected PWM line measures 5v. This also means the laser is at 100% power, when disconnected - Dangerous.
When itâs connected to the Sbase, its also firing, unless itâs set to PWM 100% (M3 S1000).
The solution.
5k resistor, spare wire, side cutter.
remove mosfet heatsink (wont need this, since PWM is low current unlike hot ends and heat beds)
Desolder R30 resistor (or the respective mosfetâs resistor in line with its respective LED)
Clip the Ground pin on the mosfet and desolder the excess leg. Its the pin on the Mosfet nearest to the big Capacitors side of the board.
Solder a resistor of 2kOhm - 6kOhm or between the clipped Mosfet leg and the ground pad it used to be connected to.
Also solder the PWM wire (or connector) to the clipped Mosfet pin.
Connect the Mosfet output (e.g. Hot bed -) to 5V (unused endstop V pin, set to 5V with J4 jumper)
How it works:
Typically the Mosfets complete a 12V circuit, by connecting the load(laser pwm line) to ground. PWM @ 100% = 0V.
What these steps do is pull the Load(laser pwm line) to ground with a resistor by default. PWM @ 0% = 0V.
When PWM @100%, the Mosfet âswitches onâ, and pulls up the PWM signal to 5V.
Might sound complex but it worked- weâre effectively swopping the side of the mosfet that weâre working with. This inverted behaviour works perfectly for my laser now.
Another thing I had to learn was that the PWM would not fire (e.g. M3 S1000), unless the machine was homed and jogged. This was frustrating to learn.
What you did is basically change the mosfet from a âpull down switchâ to a âpull up switchâ. This might work, but I would rather change the (cheaper) laser driver than the expensive controller board!
If you replace the pullup resistor on the laser driver input with a pulldown resistor, the laser will be off when the input is disconnected. Then add an optocuppler to the 3.3V pin P1.23 configured as a pull up switch for the laser driver.
For a laser, you should use M4 instead of M3. M4 only fires on G1-3 with power adapted to feed (accelleration/decelleration).
I agree with you that I did some severe hacking to the control board, but it was my preference above modifying the laser! In my case I scrapped the Sbase for some reason before from a 3d printer build- so I was lucky to have it work when I tried it with the laser.
Despite this, do you think this fix could hold up?
Thanks for the advice about M4 and M3- its just a easy command I use when test firing the laser. M4 should be used when doing jobs!
@Sergio_C I would, as a moderator, have just moved your comment to a new post, but it also is asking about endstops yet has zero information about how you have wired them, so it canât possibly have enough information to help. Photos that clearly show the full wiring routes would be a good first step; diagrams if anything isnât clear from the photos.