bdring / Grbl_Esp32

A port of Grbl CNC Firmware for ESP32
GNU General Public License v3.0
1.71k stars 531 forks source link

Co2 laser compatibility #912

Open yu7tom opened 3 years ago

yu7tom commented 3 years ago

Is it possible to separate PWM out signal to two pins like on co2 laser control boards? It would be easier for connecting with psu.The commercial borads have pwm out that holds the value constant while laser is enabled and laser fire pin. This can be done with some hardware but it would be better to do it in code.

For now i have connected the PWM to IN on laser psu and mist enable to TH. This works for now but there is some delay when engraving because there is a DAC on the input of the psu witch ads some capacitance and makes it respond slower this results in over striking while engraving:






I can give an example of what i need but wuldnt know were to put the code: Lpwm-PWM signal to set the current for the laser Lon - Triger pulse to fire laser S - S value from gcode

If (M3 == TRUE & S > 0)}{ Lpwm = S Lon = HIGH } else: Lon= LOW

If (M5 == TRUE){ Lpwm=0 }

I hope this makes sense.(Its just a sketch)

It can be two new pins so there would be no change to original and u can reed the state of pins and make the other two respond.

I know u can add M3 and M4 for laser on off but not in Light Burn.

I work with lasers and cnc routers big and small i have access to controlers like Ruida but i still like to thinker and diy This will make it much easier for people to wire up there machines and upgrade them.

bdring commented 3 years ago

There are many spindle classes that support different types of spindles. I would think it is relatively easy to create a new class with your requirements. I would start with the laser spindle.

The primary developers are working on a major upgrade to the firmware and probably won't be available to help with this right now.