Support for xTool M1?

Developer mode you say?

1 Like

Oh! Sorry for the late reply. Here is what XTool support sent me (text and screenshot) I have not tried this avenue yet and take no responsibility if turning on developer mode results in you becoming sterile:

Please note: If the machine has problems caused by using the developer mode, the warranty cannot be guaranteed. So please use it carefully. Press Ctrl+F1 at the same time to enter the developer mode. After selecting the Gcode file, click Send on the left, and then press the button on the fuselage.

Also note - this is using their Laserbox software, not the newer XCS

Thank you. The LaserBox software is all that is compatible with their C02 machine that I have. So this is good info.

I have a pull request for you sir

Has anybody got the camera working in LightBurn? I can take pictures using @fritzw’s xtm1_toolkit, and then I’ve been trying to create a virtual camera using akvirtualcamera to show the captured image. Skype can see my virtual camera but LightBurn can’t.

Yes I’ve got it working, somewhat (see below). However, the maximum camera resolution in LightBurn seems quite low compared to the ~4000x3000 pixels of the M1 camera, so the resulting pictures look quite blurry in LB. Also, lens calibration in LB is a bit tricky because the camera is mounted at an angle, so you need to place the calibration pattern at an angle in the build chamber. Camera orientation calibration was also tricky, because you can’t save the G-code for the calibration pattern in LB, only send it live to the laser cutter. That was the initial reason I went down the ‘virtual serial port’ road (did not understand how TCP worked in LB at the time).

The calibration result appeared okay at first glance, but I did not check accuracy and did not pursue it further. However, the XCS software downloads a file called ‘points.json’ from the laser when starting. My guess is that those are some form of camera lens calibration data. Likely matching coordinates of distorted and undistorted image coordinates or something like that. Understanding that might help in writing a webcam adapter which replaces the lens calibration in LightBurn (or at least makes it easier).

The problem with LB not seeing the camera seems to be that most ‘virtual cameras’ are based on user space video pipelines (e.g. registering a DirectShow source DLL on Windows), but LightBurn talks to the Kernel to enumerate camera devices (at least that’s my educated guess).

The only virtual camera that LightBurn could see was SplitCam on Windows. Haven’t tried on Linux, have no Mac. You can add the camera URL in SplitCam either as an IP camera or as a web browser source, however the SplitCam aspect ratio is always 16:9 and the camera is 4:3 so you always lose image space or the image is distorted (might be fixable through lens calibration).

Yeesh. Good effort. What’s the maximum resolution in LightBurn then?

By the way, xTool support gave me a somewhat more encouraging reply yesterday than what they said to you a week earlier:

M1 can’t support LightBurn at the moment. We are discussing with LightBurn about the possibility of cooperation, it may take some time.

My guess would be FullHD, but I did not really check. The image in XCS is MUCH clearer however.

I‘ve just added camera streaming (very slow) and camera distortion correction to my script.

That does not immediately make it work with LightBurn, but from there it should be easy to stream undistorted JPEG images to SplitCam, which should make the calibration process in LB easier and reduce the blurriness in LB, because no pixels are wasted on areas which are outside the work area anyway.

Can anyone point me in the direction of getting this to work? Never used light burn. But I got years of experience with 3d printing. I Wanna test out light burn on the M1 when I get it tomorrow.

Also thanks for all the work you done with this.

1 Like

I’m a very experienced developer (making games mostly with my own engines for 25 years). I’ll check this out and see what I can offer for support or co-dev. I’ve use Lightburn with my own self-made CNC-router/engraver, and REALLY want it to work with the M1. Xtool’s own software is unbelievably rough and lacking so many obvious features.

I‘ll have to write up a „Getting Started“ section in the Readme some time soon (or maybe someone else will?). But basically it boils down to this:

  • install LightBurn
  • install Python 3
  • install Python packages: pip install pyserial numpy scipy tkinter
  • Import Marlin device from github repository into LightBurn
  • create Design in LightBurn and export G-code
  • run python3 --upload-auto FilenameOfExportedGcode
  • wait until Button on M1 flashes blue
  • press Button to start Laser cutting
  • stand by to switch off laser power immediately if anything goes wrong

Thanks can’t wait to test it out Monday. I took my M1 to work. Going to see about expense reporting it lol. If

I installed Python 3.10.7 and when trying to install the tkinter package I received an error message “Could not find a version that satisfies the requirement tkinter. No matching distribution found for tkinter.” Is this package a critical one to how the scripts function?

tkinter is just necessary when you want to use the --camera-stream option.

Did you have any luck getting Lightburn to work following this? I’m a little hesitant to potentially ruin my M1 but am dying to have Lightburn on it.

I am wondering the same thing. Would really like to send to the M! from Lightburn…

I’m using this all the time to work with LightBurn on the M1. The ability to control the M1 directly from LightBurn is still missing because we have found no way to get the current position from the M1, and LB requires that.

But exporting a G-Code file and framing / cutting that with works fine. Only work placement is a bit finicky because I could not get the camera stream into LightBurn yet. So you have to frame, check, and adjust, until it fits.

Also, you might want to tune the Z offset for your specific machine though, because I found that the default offset of 17 mm is a bit out of focus on mine.

1 Like

In case you didn’t notice, XCS now has an option to import and run Gcode from Lightburn. There’s a tutorial on how to do this at xTool Community

I’ve run two jobs using this so far, and I’m still hammering out the kinks. (I’m a newbie to Lightburn.) The first hurdle was figuring out the focal distance with the triangle prisms. (Basically -17 + 7.7 + material thickness.) I’m trying to figure out Kerf (I’m assuming something like 0.04 since the nominal beam width is 0.08mm.) And I think I need to lower the acceleration because I’ve noticed some distortion while scoring small details like text. If anybody with more experience has some general guidance on specific settings for the M1, I would appreciate that.

1 Like