[FluidNC Issue#1549] Problem: laser on during the startup process

未分类 bolang 4个月前 (10-14) 41次浏览

Issue #1549 | 状态: 已关闭 | 作者: JackHuang021 | 创建时间: 2025-08-20


Wiki Search Terms

laser on when boot

Controller Board

mks tinybee

Machine Description

Laser engraving machine based mks tinybee

Input Circuits


Configuration file

Laser:
  pwm_hz: 5000
  # on 3D Touch connector (has pdwn + PWM)
  output_pin: gpio.2:high:pd
  s0withdisable: true
  tool_num: 0
  speed_map: 0=0.000% 1000=100.000%

Startup Messages

Upload later

User Interface Software

webui

What happened?

firmware version: v3.9.7
laser on during boot, and close after connect to wifi or create ap.
It’s very dangerous when poweron machine, I have to wear laser resistant glasses.
I am try to change laser pwm gpio to gpio.15:high, but it’s still the same problem

GCode File

No response

Other Information

No response


评论 (4)

#1 – JackHuang021 于 2025-08-20

Why does WiFi initialize before laser,and the WiFi connection is blocked,like the log:

[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: Connecting to STA SSID:FRITZBox 7590 VO]
[MSG:INFO: Connecting.]
[MSG:INFO: Connecting..]
[MSG:INFO: No SSID]
[MSG:INFO: WiFi off]
[MSG:INFO: 10V Spindle Ena:NOPIN Out:gpio.32 Dir:NOPIN Fwd:NOPIN Rev:NOPIN Freq:5000Hz Period:8191]

When unable to connect to WiFi for a long time(about 30s), the laser will remain on continuously.


#2 – MitchBradley 于 2025-08-20

FluidNC takes a finite time to start and during that time, the state of the GPIOs is not under FluidNC’s control. Even if the wifi connects quickly, that would not eliminate the problem, but would only shorten the time.

The solution is to design hardware that holds the laser in off state until FluidNC can take control of the pin. I assume that your laser output pin needs to be low to keep the laser off. One way is to use an external pulldown resistor whose value is low enough to overcome any pullups on the laser module and the controller board. On Tinybee, GPIO 2 goes through a buffer chip so it is always driven actively so an external pulldown would not be effective. Even if it was not buffered, GPIO 2 would not work because it is a strapping pin and a pulldown would make the ESP32 boot into flash programming mode.

GPIO 15 also has similar problems; it goes through a buffer and it has special startup behavior that cause pulses to come out during startup.

On Tinybee, the pins that might work are GPIOs 12, 13, and 14. It appears that they go to the connector without a buffer chip in the path. According to http://wiki.fluidnc.com/en/hardware/esp32pinreference#usable-io-pins, GPIO13 is the most likely to work without startup glitches. You will need to add an external pulldown that can hold the laser enable line low against whatever pullup is on the module.


#3 – JackHuang021 于 2025-08-20

Thank you for your reply. I know this issue can be solved by adding a pull-down resistor, but I think the Wi-Fi connection shouldn’t block the initialization of the other hardware; they should run in parallel.


#4 – MitchBradley 于 2025-08-20

Since you seem to feel strongly about how it should work, perhaps you could implement the change and submit a PR.


原始Issue: https://github.com/bdring/FluidNC/issues/1549

喜欢 (0)