How to wire Laser Driver and MKS sbase 1.3 with grbl

Hey guys,
i build a laser cutter with a mks sbase and grbl as firmware. Moving works fine but now i cant get behind the secret to wire the Lase Driver with TTL correctly to the sbase. So i hope to finde the key here :slight_smile:

I compliled grbl with the defautl ttl pin 2.5. I powered the mks with 12V, so the power on my system is fine.

My Laser Driver is a cheap 3000mA with 12V and TTL. Its called “Good Laser A-11-4” https://www.amazon.de/Nadalan-405nm-445nm-Treiber-TTL-Modulation/dp/B078KZKZ7N

I try’d the last 2 days to find how to wire it with the mks and grbl, but i cant figure it out.
It would be nice if someone can help me with this.

Thanks
Manuel

With the information that I have this is where I would start.

Use an open drain on the MKS board with a pull-up to drive the laser diode driver TTL input.
The attached hand-drawn schematic diagrams the wiring.
I do not know if the version of SYBASE that I used (see resources below) matches your board.
If not, you can modify these instructions accordingly.

  1. Configure the SBASE board to use the Hotbed output as the lasers I/O driver.
  2. Verify that J4-5V has 5V on it. Connect the hotbed (J17-4) to one side of a 1K resistor whose other end is connected to 5V on J4-5V.
  3. With the machine, running verify that there is a PWM signal on J17-4.
  4. Warning: use laser safety precautions and protect your eyes when performing this step. Verify what polarity the laser driver requires by grounding or pulling up to 5V the TTL input on the driver.
  5. If the polarity of ON for the Laser Driver matches the SBase outputs then connect the output of the SBASE to the Laser Diode Driver and try a job! If not reconfigure the SBASE to match the Laser Diodes ON state.

Some notes on the laser diode and driver.

  • Ensure the driver is not set up to drive the laser diode outside its operating specification. Excessively high voltage or current will destroy the diode instantly.
  • I noticed that some versions of this driver have a heat sync. Ensure that you are not drawing too much current for power limits on the version without the heat sync.
  • The Amazon link I provided has more information on connections and user comments.

I used these resources:

*note: As an Amazon Associate I earn from qualifying purchases

2 Likes

Hey Don, thanks a lot for your advice.
Yes, i have the V1.3 from sbase too.
My Laser Drive have only max Output of 3mW, so i think thats the reason why there is no heatsink.

I made a quick and dirty wiring diagram. Can you have a look on it, if i understand everything right.

Thanks a lot.!

Wiring sbase1.3-laser|690x472

Looks right to me although I do not know which are + & - on the driver board, but I am guessing you do :).

As my post suggested I would test it on circuit at a time :)!

1 Like

Ok, i did the wiring and measuring. It looks like that the TTL Output works.
I set M03 S0, the Voltage of the TTL is round about zero (but not stable?).
Set M03 S300 i get 5V stable. So i set S300 as my max with that i get 5V.

But, if i measure on the Laser Output of the Driver, there is no change. I always get 5V with different S Values.
Also with the Laser connected, he is fireing always with the same power.

So what could be wrong?

Wait… I have had a look to your wiring diagram again.
So, did you wire the 5V J4 with the resistor to -J17 as a voltage divider?
On my diagram the 5V J4 is wired to the +J17.

So i changed it and now i can control the laser power, but in wrong direction. S0 = Full and S300=off
Does that mean i have to use P1.23 instead of P2.5?

So, did you wire the 5V J4 with the resistor to -J17 as a voltage divider?
On my diagram the 5V J4 is wired to the +J17.

The resistor pulls up the output of Mosfet Q4 (pin2*) to 5V, its not a voltage divider. The schematic does not show if pin 2 is the + or the - pin on the “Hotbed” mosfet. My guess is the + on J17 is connected to VBB (12V) not the mosfets output. I think your right the - pin is the output you want.

My screw up #1: in that I did not notice on your drawing that you have a black wire connected from J17 to the laser driver board, that is wrong. Only one wire will be connected from J17 to the TTL input of the driver.

You can verify if the correct pin is the - or the + of J17 by tracing and verifying if it is connected to the drain of Q4. You can also measure the voltage on the + pin with power on and nothing connected to it. If its connected to VBB it will read 12vdc and this is NOT the pin you want.

I do not know for certain but I think the + is probably connected to the boards VBB (+12V) so the - is the correct connection.
Do not connect anything to the other pin on J17. [I assume that is the + pin]

*My screw up # 2: J17 does not have 4 pins :neutral_face:. It has two and they are labeled 1 and 2 in the schematic. I did get the mosfet # right as Q4.

When operating properly you should get an average voltage from J17 that is roughly proportional to the S value where: 5V is max (100%), 2.5V is 50% etc.


So i changed it and now i can control the laser power, but in wrong direction. S0 = Full and S300=off
Does that mean i have to use P1.23 instead of P2.5?

No continue using P2.5, you should just be able to invert the P2.5 pin (J17) in the config file. For smoothie it’s the “!” symbol.
http://smoothieware.org/configuring-smoothie

1 Like

Ok, thanks a lot again, so the powering itself works.

With the correct direction i have to search again. I’m using grbl, not smoothie, and i can’t find a
option to invert the direction in grbl.

I’ll ask in the grbl board for that :slight_smile:

I need help again with this, cant get it work.

I figured out:

  • Between ± on J14 itself have 0-12V with S0-S100 (direction correct)
  • With +J14 and -J14 hooked up to 5V +J4 of course, i got 5-12V with S0-S100 (direction correct)
  • But with -J14 and -MainPower i get 10-0V with S0-S100 (wrong direction)
  • of course, with -J14 hooked up to +J4 5V and -MainPower i get 5-0V with S0-S100 (wrong direction)

– I need 0-5V with S0-S100

Sorry but that is a bit confusing for me.
J14?
Can you sketch the circuit (wiring) for each of these and identify the voltages?

Yes, i’ll make a fresh sketch.
And sorry, i mean J17 of course, not J14.

Measuring direct on J17 i get 0-12V with S0-100

Measuring between -Power an -J17 i get 10-0V with S0-100 (wrong direction)

Measuring on J17 with 5V from J4 i get 5-12V with S0-100

Measuring between -Power and -J17 with +5V from J4 i get 6-0V with S0-100 (wrong direction)

That is the wiring i understand from your sketch. So i get 6-0V (wrong direction)
Ground on the Driver Board are the same at the connectors, thats not extra wired by me.

I hope now it’s understandable what i mean and whats the problem :slight_smile:

A post was split to a new topic: PSU stays enabled even when X42 is high

@ManuelW
Diagram #1: measures between 12V and the PWM signal on the MOSFETS open drain. Not a relevant measure or approach especially if -Bed is not pulled up to 5V.

Diagram #2: measures between the ground and the open drain on the MOSFET. If the -BED was pulled up it should read 0-5 V. If not the MOSFET is floating and the reading is not relevant and undetermined.

Diagram #3:This is the correct circuit and measurement. I do not know where 6V is coming from, it should be 5V? Is the connection at J4 5V?

As I understand it, the circuit at diagram # 3 works it is just the wrong polarity for the diode driver. If you cannot invert the signal that is asserted at -Bed from the configuration file then you will have to add an inverter outside of the board. You cannot invert the signal by only changing how the diode driver is wired to the control board.

Were you not able to find a way to invert the pwm signal in the configuration file?

If not we need to think about adding an inverter to the circuit.

Hey Don, so my last Diagram with the complete wiring is correct?
I can’t find some possibility to invert the PWM Signal in the config :frowning:
I found a sketch how should invert a pwm signal, but cant get it work. https://github.com/gnea/grbl/issues/22#issuecomment-341931756

I connected the

  • +V to J4 +5V
  • Vs to -J17
  • Vo to TTL + on the driver
  • GND to GND on the Power connector

The wrong direction behavior did not changed.

At a glance that looks like it should work?
Are you getting a changing voltage out just with no inversion?

OMG, i dont know what was wrong on my last try.
I did the buildup with the inverter again and oh wonder, it works :slight_smile:
Now i get 0-4.7V in correct direction. I think the missing 0.3V does not matter?

Thanks so much Don.

1 Like

EXCELLENT Work! :+1:

1 Like

Nice you found a solution!

I am the maintainer of grbl-LPC and my advise for people with TTL diode drivers would be to use a different Pin (like P1.23 on J6) and not the bed MOSFET, because the MOSFET inverts the PWM signal and grbl-LPC doesn’t have an option to invert the signal back.

There is even a precompiled version for the SBASE board whith PWM on P1.23 in the releases of my repo: https://github.com/cprezzi/grbl-LPC/releases

1 Like

is the P1.23 pin a TTL or 3v level?