USB TTL connection to UART pins of MKS Gen L v1

Basic Information:

Printer Model: Artillery Sidewinder X1
MCU / Printerboard: MKS Gen L v1
klippy.log not applicable yet,

Describe your issue:

Hi All
I searched the web up and down, didn’t find anything to help me out.

My setup is an Odroid XU4 with Debian Bullseye as SBC with an Artillery Sidewinder X1 that has the stock MKS GenL board as MCU.
The special thing about it is that I do NOT want to connect via a regular USB cable, as I dont like the cable sticking out of the printer (got the XU4 inside the printer).
Instead I use a USB TTL adapter and run GND, RX and TX directly to the GND, RX and TX pins of the AUX1 connector of the GenL. (which is normally in use by the stock TFT28 touchscreen)
I did use this setup under Marlin and it worked perfectly, even had the TFT connected to pins D16 and D17 of EXT1 and was able to see print progress on the screen, even though Octoprint was doing its job through the aforementioned connection.
Baud rate was set to 250000.
But as I said, that was under Marlin…

Now I want to move to Klipper.
Klipper install via KIAUH worked flawlessly, so did Moonraker and Mainsail.
But when I want to flash the board, I can choose whatever UART port I want (0-3), baud rate 250000 or 115200, I run into timeouts.
KIAUH does detect the USB TTL correctly as /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 but cannot connect to the MCU.
And just to make sure it was not the XU4s fault, I tried the same procedure with a Raspberry Pi3b, same result.

It does work with a regular USB cable connected to the USB port of the GenL, but that is so ugly.
If it wouldnt have worked with Marlin, I might have given up, but since Marlin can do it, Klipper surely can, too?

I appreciate any help or pointers in the right direction.
Thanks
Markus

Use UART0 and connect to the RX / TX pins on the ATmega (PE0 / PE1). You do not even need to use an USB2TTL adapter but can connect directly to the Odroid pinout (GPIO 15 and 16)

Hi Sineos,
thanks for the reply.
with pe0/pe1 you mean these here?
image

I did try the direct connection on both the XU4 (where I needed a level shifter due to the 1.8v) and the RPi, both did not work.
In any case, if I use the rx/tx pins on the SBC, I choose UART (not on MCU, but on the SBC) for the connection, right?
When I tried that, it still did not work.
But I will give it another try.
Thanks

Yes, should be D1 and D2

What a design f%$§ up. Why is anyone doing something like this? Oh well … Level shifter do not make sense (many are too slow) unless using one dedicated for such buses.

Generally, during make menuconfig you tell the firmware on which pins it shall expect the connection to the host. According to the definition in:

it should be UART0

An alternative would be LCD_RS and LCD_EN (PH1 and PH0) that should correspond to UART2

Make sure your Klipper Linux user is part of the dialout group.

Hi Sineos

Thanks again for clarifying the pins.
It is working now. I did not do anything that I havent done before, but apparently I must have done something wrong before.
After flashing for the 500th time (or so it feels), I did now flash via the USB, then shutdown the XU4, replaced the USB cable with the USB2TTL connected to the D0 and D1 pins, voila, everything is connected.
Now I am off for the config and the tweaks (want to get the built-in TFT28 working too).
Thanks again for pointing me (again) in the right direction

Oh, that got me thinking, you dont have somehow a ready todo list for using the built-in stock tft28 working with Klipper, do you?

TFT / LCDs especially with touch are not exactly Klipper’s strong side.
I do not know the TFT of this printer but from the look alike I would say it is not supported.

ok, noted.
what do you think of this one here?

I havent tried it yet, but sure want to gove it a try.

2 Likes

Would love to get feedback if this works.

will let you know as soon as I get any results

Hi Sineos

I promised to get back to you with any results.
It really works. I can do most control via the built-in TFT28, including heat, move, home, fan-control, flow adjustment, probably even more.
It also works the other way, the print progress is displaying on the screen:

Freakydude did now publish his blog for the project, here is the link:
online

Some stuff is still in the works, but for me it achieved already all I needed to make the jump from Marlin to Klipper without sacrificing the built-in TFT.

2 Likes

Nice. Good work. Thanks for sharing. :+1:

The good work was not done by me, I am just the beneficiary who wants to spread the word.
Freakydude did all the hard work.
I hope this will bring more people to switch over to Klipper.
I have to admit, at first, it was a drag, being used to Marlin and all.
But now, having the same quality (or even better) with 150mm/s instead of 50mm/s, made it totally worth it.
Now I can put that Voron off my mind until next winter, having scratched the scratch for something new just with changing my Artillery X1.
Thanks again for your help here.

How did you connect the display? Did you have to make any special adjustments for the X1? I could Install the klipper-serial-btt bridge and its running but the display say there is no connection to the printer