Skip to content

Instantly share code, notes, and snippets.

@cab404
Last active September 12, 2024 20:38
Show Gist options
  • Save cab404/b7bcbb0cd592a14515493694719de59b to your computer and use it in GitHub Desktop.
Save cab404/b7bcbb0cd592a14515493694719de59b to your computer and use it in GitHub Desktop.
Installing Klipper on TronXY X5SA

Installing Klipper on TronXY X5SA

** obligatory "your warranty in now void" disclaimer ** THIS GUIDE IS FOR CHITU V6 BOARDS ONLY

So, you've decided to upgrade you printer software-wise. You are in for a ride!

What can you expect

You'll get Klipper experience. That includes speeds up to 300 mm/s (I've tested infill at 180, and it was pretty much flawless), proper linear advance, low vibration on high accelerations without relying on approximations like S-Curve, no lags on dense GCode files — it's nothing like Marlin or the stock firmware.

Also, you won't be able to control your printer from it's screen anymore.

IDK, maybe that's a deal breaker for you, but controlling printer from WiFi is much more comfortable IMO.

Getting a Klippy machine (Klipper host)

First of all, you need a Raspberry Pi 2 or later you want to use as a Klipper/Octoprint machine. Other ARM-based computers are good as well — e.g NanoPi, BananaPi, etc.

Follow this guide to get and install OctoPi, and follow this one up to "Building and Flashing" section to get Klipper on your OctoPi.

Use this printer.cfg as your printer config.

Getting Klipper onto the printer

Copy update.cbd onto SD card, insert it into your printer, reboot. If you heard some beeps, and then your screen does not light up anymore — it's been installed!

You can build your own update.cbd, instructions are on top of the config file, follow with regard to "Building and Flashing" section we skipped earlier. If you ever reconsider your life's choices, you can always reflash stock firmware the same way.

Now connect your printer to Pi via USB, and reload host in the Klipper tab in the Octoprint.

Enabling Linear Advance

If you would also want to enable Linear Advance, you'll need

  • Some skills with soldering iron
  • 1k resistor.
  • Serial adapter

You can kind of live without that, especially if you aren't handy with a soldering iron.

Connect to your E-stepper as per this guide. Use ground from PSU, and connect uart pin to one marked with red arrow.

That's an image of E-stepper driver with arrow pointing at third bottom pin

Open OTP tab and write 2.7 and 1.2. This will disable StealthChop, thus allowing you to use Linear Advance feature.

Graz, you successfully reprogrammed your stepper to be usable with Linear Advance! Your lines will look better than ever.

@Phatslam
Copy link

Phatslam commented Oct 4, 2021

Hi we are up and working even got pressure advance set, question - would a Creality or BigTree Tech screen work with the stock X5SA-PRO with Klipper? Kind of miss my screen on the printer... :)

A bit off topic, and can easily be "googled" but you will need to get a screen that will connect to your Pi (or whatever SBC you are using)
https://klipper.discourse.group/t/hardware-known-to-work-with-klipperscreen/35

@ChrisG-hub
Copy link

Got a question, wil this work on a D01 Plus?

@Phatslam
Copy link

Phatslam commented Oct 6, 2021

Got a question, wil this work on a D01 Plus?

We don't know. If it has the same controller board (Chitu V6) , then probably yes.
https://gist.github.com/seya128/6a822dc2607bb20c29951e110ae200e5

@Phatslam
Copy link

Phatslam commented Oct 6, 2021

Small note, the USB to serial converter that I had on hand would not work with the trinamic UART pin. Instead, I used a SP3232 type transceiver/programmer that I had. It needs a 5V supply which I got from pin4 of the WiFi module header (pin1 is ground)

@cab404
Copy link
Author

cab404 commented Oct 6, 2021

Small note, the USB to serial converter that I had on hand would not work with the trinamic UART pin. Instead, I used a SP3232 type transceiver/programmer that I had. It needs a 5V supply which I got from pin4 of the WiFi module header (pin1 is ground)

Which one didn't work?

@Phatslam
Copy link

Phatslam commented Oct 6, 2021

It was a RS232 type branded "ATEN"
I probably should have known better, but I didn't have a FTDI/5V type (other than ones already integrated into an arduino boards)

@lemminator
Copy link

Hello,
I tried installing klipper on a tronxy x5sa 2e. I used the update.cbd on the printer. it beeped and the screen stopped working so I guess it is working. I also used the config.cfg file and placed in the correct directory. but when I connect the printer in octoprint I get a message that the firmware was unable to open the config.cfg file.
does anyone here have an idea what could be wrong

@cab404
Copy link
Author

cab404 commented Oct 10, 2021

Hello, I tried installing klipper on a tronxy x5sa 2e. I used the update.cbd on the printer. it beeped and the screen stopped working so I guess it is working. I also used the config.cfg file and placed in the correct directory. but when I connect the printer in octoprint I get a message that the firmware was unable to open the config.cfg file. does anyone here have an idea what could be wrong

try building fw for yourself, or using this one by Phatslam

@lemminator
Copy link

lemminator commented Oct 11, 2021

Hello, I tried installing klipper on a tronxy x5sa 2e. I used the update.cbd on the printer. it beeped and the screen stopped working so I guess it is working. I also used the config.cfg file and placed in the correct directory. but when I connect the printer in octoprint I get a message that the firmware was unable to open the config.cfg file. does anyone here have an idea what could be wrong

try building fw for yourself, or using this one by Phatslam

when I use the one from Phatslam I get the same error. but when I create my own it says ''lost cummonication with MCU''

@cab404
Copy link
Author

cab404 commented Oct 11, 2021

Hello, I tried installing klipper on a tronxy x5sa 2e. I used the update.cbd on the printer. it beeped and the screen stopped working so I guess it is working. I also used the config.cfg file and placed in the correct directory. but when I connect the printer in octoprint I get a message that the firmware was unable to open the config.cfg file. does anyone here have an idea what could be wrong

try building fw for yourself, or using this one by Phatslam

when I use the one from Phatslam I get the same error. but when I create my own it says ''lost cummonication with MCU''

Can you find your board's name on it? It might be that you have a different board with the same update format.

@lemminator
Copy link

Hello, I tried installing klipper on a tronxy x5sa 2e. I used the update.cbd on the printer. it beeped and the screen stopped working so I guess it is working. I also used the config.cfg file and placed in the correct directory. but when I connect the printer in octoprint I get a message that the firmware was unable to open the config.cfg file. does anyone here have an idea what could be wrong

try building fw for yourself, or using this one by Phatslam

when I use the one from Phatslam I get the same error. but when I create my own it says ''lost cummonication with MCU''

Can you find your board's name on it? It might be that you have a different board with the same update format.

If you mean the processor model in the firmwareconfiguration. Than I used the stm32f446. But I cannot find the real number because its not readable on my processor anymore. And that is the one that I saw on the picture of a board from a reseller of the X5sa 2e printer mainboard. I also tried the stm32f103. Because that is the one most people have with the x5sa.

@Polar-Ted
Copy link

In the printer.cfg why are the fans throttled to 50%?

@cab404
Copy link
Author

cab404 commented Jan 6, 2022

@Polar-Ted IIRC I had 12V fan installed on 24V PSU. I need to fix that. Nice find, thank you!

@Hman32
Copy link

Hman32 commented Feb 6, 2022

@lemminator you have a V10 which is not yet supported i think.
Anyway it's not the same board as the V6 which use a STM32F1 and your is using a STM32F4
The F1 has an ARM M3 and the F4 has a more powerful ARM M4

@lemminator
Copy link

@Hman32 maybe I should have mentioned this earlier. But I got ot working a while ago using the same settings as the standard x5sa. I followed a few more guides and at some point it worked. I cant really say why it didn't work at first. Maybe I forgot a step. I do know that update.cbd mentioned in the in this git. Doesn't work. You do have to make your own for the x5sa 2e

@Outofbox11
Copy link

I've followed the instruction and got my X5SA Pro to work with Klipper with Mainsail interface. It has been working great. I've decided to convert to direct drive. I've installed pancake stepper motor for weight saving. Unfortunately it is getting hot. I think mainly got to do with current being too high. I've tried to adjust current using board tram screw thing but does not change. is there a way to change extruder stepper motor current in klipper config?

@ronnievv82
Copy link

ronnievv82 commented Mar 20, 2022

Got this going on my X5SA-400 Pro. Just was wondering if anyone else had the 400 pro and wanted to share their config. Just want to be sure I’m setting everything properly for the bed. I know the screw locations are off and the mesh leveling I had to play with as well. Thanks everyone.

@Phatslam
Copy link

Phatslam commented Mar 21, 2022

fresh bin/cbd ( v0.10.0-320-g7e654aed march-21-2022 )
https://drive.google.com/file/d/1xCka_tAwyc7LmflkcT1zny_g1bfCRBV_/view?usp=sharing

@cab404
Copy link
Author

cab404 commented Mar 21, 2022

fresh bin/cbd ( v0.10.0-320-g7e654aed march-21-2022 ) https://drive.google.com/file/d/1xCka_tAwyc7LmflkcT1zny_g1bfCRBV_/view?usp=sharing

ty! can you upload it to releases in a fork? I would then add it to the readme. I really don't want to link people to google drive)

@Phatslam
Copy link

Phatslam commented Mar 21, 2022

ty! can you upload it to releases in a fork? I would then add it to the readme. I really don't want to link people to google drive)

Wasn't sure if you wanted me to fork klipper or your gist
https://gist.github.com/Phatslam/ca50ff0883c94c2e324b910ea0ebd8ce#file-update-cbd

@cab404
Copy link
Author

cab404 commented Mar 21, 2022

i just dropped in a klipper fork, but this is good too, ty!

@thawkins
Copy link

Got this going on my X5SA-400 Pro. Just was wondering if anyone else had the 400 pro and wanted to share their config. Just want to be sure I’m setting everything properly for the bed. I know the screw locations are off and the mesh leveling I had to play with as well. Thanks everyone.
@ronnievv82 I have a standard x5sa-400 with glass bed and black sensor, I was planning to start conversion fo klipper in a week of so (when i get time) as I really don't get on with the troxy code. I also have the z-axis syncing hardware mod installed. I have a spare RPI 4 kicking around too.

@ronnievv82
Copy link

ronnievv82 commented Apr 20, 2022

@ronnievv82 I have a standard x5sa-400 with glass bed and black sensor, I was planning to start conversion fo klipper in a week of so (when i get time) as I really don't get on with the troxy code. I also have the z-axis syncing hardware mod installed. I have a spare RPI 4 kicking around too.

@thawkins
Awesome, are you using a Custom board or the original Tronxy Board for the Z-Axis Sync? Would love to add that to mine.

@spid75
Copy link

spid75 commented Aug 2, 2022

any good printer.cfg for x5sa pro 500?

@ralphschuler
Copy link

what about the X5SA 2E ?

@poladrix
Copy link

Hi there,
I wanted to install the firmware, I put on the card to turn on my printer, black screen, no beep, but fan at the bottom.
Since as soon as I turn on my printer, the fans turn on all the way but nothing else and klipper detects nothing.
What do you recommend that I do?

@Phatslam
Copy link

Hi there, I wanted to install the firmware, I put on the card to turn on my printer, black screen, no beep, but fan at the bottom. Since as soon as I turn on my printer, the fans turn on all the way but nothing else and klipper detects nothing. What do you recommend that I do?

Well, the TronXY screen not working is expected behavior. In my experience klipper does not detect printers, the serial port is specified in the printer.cfg

@JustABiologist
Copy link

Hey guys super retarded probably. Have a V6 board. trendy X5SA. But my Z axis won't move either up or down. xy is working like a charm... thanks in advance if anyone can think of a reason!

@JustABiologist
Copy link

Hey guys super retarded probably. Have a V6 board. trendy X5SA. But my Z axis won't move either up or down. xy is working like a charm... thanks in advance if anyone can think of a reason!

Okay now it's getting weirder. Tried reflashing. Does not beep anymore :').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment