Enabling laser engraving using Ender 3 S1 Pro

Basic Information:

Printer Model: Ender 3 S1 Pro
MCU / Printerboard: Chip - STM32F401

Describe your issue:

I have been trying to post on Reddit to find an answer but without any luck… I have an Ender 3 S1 Pro, and I would like to use the laser module that comes with it without having to reflash to the original firmware every time. I want to use Klipper instead. Does anyone have an idea of how I can achieve this?

So what I want to achieve are two things:

  1. Apply the branch @Cirromulus has developed to speed things up
  2. Configure printer.cfg correctly
1 Like

For application of the branch, I suggest reading this HowTo for git to understand the commands: How To Checkout Git Pull Request In Three Easy Steps

So basically, for my PR, you first get the code changes in your local repository: git fetch kevin pull/4128/head:pwm_sync_channel.
Then, to actually apply this branch, type git checkout pwm_sync_channel.
(In doubt, to revert to kevin’s main branch, type git checkout master).

To apply, restart the klipper service: sudo systemctl restart klipper.service (assuming you use the systemd service).

As I don’t have your printer, I don’t know the pinout of the laser’s PWM input.
How is the pin called in the original printer’s firmware? You would need to translate that.

Just for Interest, the laser pin seems to be PC0 (see Ender-3S1/pins_CREALITY_S1_F401RC.h at 7ea2f46033db0e9229cbb950e74ce569366dfbef · CrealityOfficial/Ender-3S1 · GitHub).
If someone can test this, would be nice.

I have tried PC0, but I get no response. No error message is shown in the console or log. The command is simply ignored.

I am not the only one with this issue. For anyone interested, take a look at the discussion here (and reply here!):

For setting up the printer.cfg, I used the following as a guide:

If someone has successfully enabled the laser module using either the current Klipper branch or the branch by @Cirromulus, please let us know.

Ok, I see.
It seems that there is (thankfully) a protection circuit (see https://www.reddit.com/r/klippers/comments/xeywbj/comment/ir5y4yp/?utm_source=share&utm_medium=web2x&context=3)
The user reports that the fan turns on immediately when inserting the laser ribbon cable.
This makes sense to me, as most lasers I know are active-low, and without that, the laser would start burning as soon as you plug it in.

Does anyone have a detailed photo of the PCB, or even a layout diagram? There may be a switch that detects a plugged-in laser.

I only have these

Only allows me to upload 1 image per post

That was me, the weird thing is i can’t control the laser with PC0 which is the pin according to Marlin config. I tried all values from 0-255, its always off. I even tried configuring PC0 as a fan and setting the fan speed from GUI, still no output. Works fine with stock Marlin :roll_eyes:

Ok, do you find a Mosfet or something for the “24V in 24V out” (probably GND and VCC)?
Maybe they have a different pin that enables GND and/or VCC to the connector.

I can’t read chinese, but I do not find hints on a software-enabled switch (Probably most interesting area:
Ender-3S1/spindle_laser.h at main · CrealityOfficial/Ender-3S1 · GitHub)
Reading that, I suppose a hardware-solution.
But in any case, it says that the Laser is active low, as expected.

Hi there.

I can confirm the pin is PC0. The worse is, there seems to be a design bug, i had used the laser a few hours. Not with kipper, because i was not able to run klipper without the hotend/extruder, maybe someone can help me out here.

I was using the stock firmware, it’s very buggy, it can turn the laser on unexpected, for example during Z axis tune (focus). Be carefull. Stock commands are M3 (0-1000) and M5. Also M3 I S0 is fine and inline S works.

The problem is my PWM pin stopped working. It seems to be connected directly from the STM from the PC0 pin via 32 Ohm R243 resisor to the PWM pin. It’s late today, but tomorrow i will try to run the board on the desk and measure if the STM pin PC0 is alive.

Hi is there any progress on the topic or is everybody reverting back to stock firmware to use the laser module?

I am back at stock for engraving. Was not able to configure klipper without hotend temperature sensor, and can not connect this when in engraving mode because the extruder is removed then.

Thanks for the info although I am surprised no one managed to get iz going with Klipper since it is a paint to revert back and forth with stock fw and it is kind of hard for me to let go of Klipper and ali things that it brings.

That is true. I even can’t find information how to run klipper without the printhead (without hotend temperature sensor). Possible the development and discussion is somewhere else, discord or any other platform, I dont know.

I still got no success with Klipper + Ender 3 S1 Pro. Maybe it’s just not possible?

Klipper does not need a hotend temperature sensor.
I suggest using a configuration without extruder, then it does not require a temp sensor.

1 Like