# Upgrading stock X5SA board to M8P 1.1 / CB1

**URL:** <https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901>\
**Category:** General Discussion\
**Created:** [April 20, 2024, 5:43am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901 "2024-04-20T05:43:05Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [April 20, 2024, 5:43am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/1 "2024-04-20T05:43:05Z")

</div>

### Basic Information:

Printer Model: X5SA  
 MCU / Printerboard: M8P 1.1  
 Host / SBC CB1  
 klippy.log  
[klippy.log](https://klipper.discourse.group/uploads/short-url/o2D67V480DEMwkgfVKNZQqSeEhD.log) (1.7 MB)  
[printer.cfg](https://klipper.discourse.group/uploads/short-url/e8gCmwiILthENZWutmSJbDRnpiw.cfg) (7.4 KB)

Trying to upgrade my X5SA plus with an M8P 1.1 / CB1. The more I mess with this the more confused I get… This printer started as a Tronxy X5SA plus with a direct drive. I replaced the board with a Manta M8P with 2208s, so I could get independent Z motors.

OK, so first issue… I can home the X and Y (I’ll get to the Z axis when I’m done getting the X and Y squared away), but to get it to hit the endstops, I have to increase the position\_max: well past the actual size (330x330). I tried using the settings from the printer.cfg I had for the stock board I had flashed with klipper, and they don’t work for this configuration… when the only thing that changed was the board.

I appreciate any help I can get with this upgrade.

Thank you

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [April 20, 2024, 6:35am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/2 "2024-04-20T06:35:08Z")

</div>

> [@sunbound](#):
>
> when the only thing that changed was the board.

With a different board you can get a different pinout.

> [@sunbound](#):
>
> but to get it to hit the endstops, I have to increase the position\_max:

That is strange for you home to `0` (zero) and not to the max.  
Are you sure the printer homes to the correct direction?

The config is a bit messed up:

In X you have `enable_pin` at normal state, for Y it is inverted.  
In X for the `endstop_pin` you have no pull up, for Y you have.

---

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [April 20, 2024, 5:11pm UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/3 "2024-04-20T17:11:35Z")

</div>

I adjusted the pinouts for the new board…

I pretty much kept the same settings as the original printer.cfg that the printer had before the board upgrade; if they were inverted before, I kept them inverted.

I keep telling myself that eventually I’m going to go to sensorless homing, but part of me says to make sure I get the rest of the printer working first, before I get on that.

I’m not exactly sure what a “pull up” does - to be honest.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [April 21, 2024, 8:29am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/4 "2024-04-21T08:29:50Z")

</div>

> [@sunbound](#):
>
> I’m not exactly sure what a “pull up” does - to be honest.

A pull-up or pull-down makes sure that a pin has a defined state. Only with a defined state, it is possible to detect a change, e.g. the triggering of an end-stop.

So a “pull-up” pulls the pin up to a high level and keeps it there. If the end-stop is triggered, the pin switches to low and the MCU is able to detect that something has happened.

There are two kinds:

- Hardware, i.e. integrated into your board’s electronics. Almost all endstop-pins have this
- Software, denoted in Klipper with the `^`. Needed when connecting, e.g. a bltouch to a pin that does not have a hardware pull-up

---

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [April 21, 2024, 10:41pm UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/5 "2024-04-21T22:41:58Z")

</div>

So, its just used for momentary switches (like an endstop). Thanks. Makes sense.

---

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [April 23, 2024, 4:33am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/6 "2024-04-23T04:33:20Z")

</div>

OK, so I’ve made a few changes, and I’m getting the following error. “Unable to read tmc uart ‘stepper\_z’ register IFCNT”. I get this error after trying to home all axis. If I do a firmware restart  
[klippy.log](https://klipper.discourse.group/uploads/short-url/jBDpA8vx612dMztiCaYjwxRpNLI.log) (1.6 MB)  
[printer.cfg](https://klipper.discourse.group/uploads/short-url/k3BsExWtudMIuoKvg8zseWd7gni.cfg) (7.7 KB)  
, it goes away till I try to home all axis again. Unfortunately, I made some changes a few days ago and cannot remember what I did that made things turn for the worse (I love my job - insert sarcasm). Here are the most recent priner.cfg and klippy files, hoping someone can help me get back on track.

I’m starting to think I overlooked something on the board, but I don’t know what. I think i have the jumpers set the way the book says to have them.

 ![20240423_103615](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/8/8bdac61886038cf68d959c32d535999ae0b968ee.jpeg)  
 ![20240423_103457](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/c/c194d317e06ba36d4ee61a6f9e2c51a72ca3fb21.jpeg)

---

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [April 26, 2024, 3:59am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/7 "2024-04-26T03:59:21Z")

</div>

I’m at a loss. I’ve tried moving jumpers, moving drivers around, changing this and that, and I’m not getting anywhere. I’m tempted to just throw the old stock board back in and get a USB to CANBUS adaptor to get the other z driver, but if hate to just chuck this board in a drawer and let it go unutilized. I’m not sure what I’m missing here. I would really appreciate any help in moving forward with this.

---

<div class="post-metadata">

**Author:** ![LifeOfBrian](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/lifeofbrian/32/2380_2.png) [@LifeOfBrian](https://klipper.discourse.group/u/LifeOfBrian)\
**Post date:** [April 26, 2024, 6:28am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/8 "2024-04-26T06:28:26Z")

</div>

I’m currently setting up the same MCU and SBC with an EBB36 but due to missing parts the hardware can’t be controlled yet.

Keep in mind, as you mentioned independent Z axes, that the third and forth motor connector are both connected to the third stepper driver socket. Meaning, they run in parallel and not independently!

If I see that correct you have all drivers powered via the dedicated motor power source regarding to the jumpers.  
Did you connect respective 24 V power cables there?  
Otherwise you want to try changing the motor current jumpers:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/3/374c8c680b25e3c74cbab3bfdb5db648200838a1.jpeg)

And please put the heatsinks onto the stepper drivers!!!  
A wrong config or some careless tests and you might kill one, if not already…

---

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [May 1, 2024, 5:26am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/9 "2024-05-01T05:26:19Z")

</div>

> [@LifeOfBrian](#):
>
> the third and forth motor connector are both connected to the third stepper driver socket. Meaning, they run in parallel and not independently!

wait… how did I overlook this detail. I wonder if that was one of the reasons I’ve gotten so confused. What parts are you missing?

I originally had success with running RatrigOS, but after burning my fingers on the Z stepper motors, and the X and Y motors making noises i wasn’t comfortable with - and not finding any solutions, I’ve decided to take a step back, and stick with plain klipper. Knowing the detail that those two connectors run off the same driver, that might have led to some of my confusion. I suppose that’s why Ratrig had that configured to use for the extruder.

Earlier tonight, I had convinced myself that the best way foreword was to utilize my stock MCU as a controller for the X, Y, and extruder. I think I’m going to try without that board, -again- with this detail and see if I cant get it all working again. I’m going to stick with the wiring diagram for the ratrig though… I figure that that diagram has been proofed, and works.

Thanks for that detail… that might have been the catalyst for me finishing this project.

---

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [May 1, 2024, 6:28am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/10 "2024-05-01T06:28:37Z")

</div>

After diving into the ratrig configuration files, I think I realized something else that has been a a source of my frustration… caused by my lack of detail… I was using the diagram of the M8P 1.0, vs the 1.1. _eyeroll_

After straightening that out, things are moving… but none of the Z motors move…

I have confirmed that the wiring for my Z steppers is correct, by using the ratrig card (I’m tired of going back and fourth to verify things). I’ve compared both the cfg files, and I don’t see why my Z steppers don’t work under the vanilla klipper install.

I have uploaded both my klippey and printer.cfg files in hopes that someone can help.

[klippy-5-1-24.log](https://klipper.discourse.group/uploads/short-url/s7z7DSJ5R6azjJPIQ93mYQS1Kg8.log) (3.0 MB)  
[klipper-printer-5-1-24.cfg](https://klipper.discourse.group/uploads/short-url/1IOfueVeKNMnVpz8Ceix9lCLOtp.cfg) (9.2 KB)

---

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [May 2, 2024, 5:39am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/11 "2024-05-02T05:39:08Z")

</div>

After looking at some example printer.cfg files, I discovered that the enable pins needed to have a ! before the pin… I don’t understand why the enable pin needs the !.. but now my Z steppers work. it pauses a good 4 seconds before the bed comes back up to hit the microprobe… Not sure how to adjust that.

progress!

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [May 2, 2024, 6:14am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/12 "2024-05-02T06:14:00Z")

</div>

> [@sunbound](#):
>
> I don’t understand why the enable pin needs the !

> [@](#):
>
> ## Micro-controller configuration[¶](https://www.klipper3d.org/Config_Reference.html#micro-controller-configuration)
> 
> ### Format of micro-controller pin names[¶](https://www.klipper3d.org/Config_Reference.html#format-of-micro-controller-pin-names)
> 
> Many config options require the name of a micro-controller pin. Klipper uses the hardware names for these pins - for example `PA4`.
> 
> Pin names may be preceded by `!` to indicate that a reverse polarity should be used (eg, trigger on low instead of high).
> 
> Input pins may be preceded by `^` to indicate that a hardware pull-up resistor should be enabled for the pin. If the micro-controller supports pull-down resistors then an input pin may alternatively be preceded by `~`.
> 
> Note, some config sections may “create” additional pins. Where this occurs, the config section defining the pins must be listed in the config file before any sections using those pins.

from

[https://www.klipper3d.org/Config\_Reference.html](https://www.klipper3d.org/Config_Reference.html)

---

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [May 2, 2024, 6:21am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/13 "2024-05-02T06:21:07Z")

</div>

ok… I guess that makes sense; I mean the other steppers have that on it, so it makes sense that they all do.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [May 2, 2024, 6:42am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/14 "2024-05-02T06:42:34Z")

</div>

> [@sunbound](#):
>
> so it makes sense that they all do.

No, it don’r make sense.

Did you understand the purpose of the **`!`**?

---

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [May 2, 2024, 7:04am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/15 "2024-05-02T07:04:41Z")

</div>

It doesn’t make sense that once the enable pin is defined, it still isn’t enabled… but if it doesn’t work, but the other motors have that, then it makes sense that the one having trouble needs it too. I’m just going to have to bank it in the “it doesn’t make sense, but that’s the way it works” part of my memory.

I understand that the ! reverses things, so even though its enabled, I need the ! to make it move. I don’t understand why it isn’t enabled, until i define the pin, and add the ! - THEN its enabled.

I appreciate you taking the time to explain it.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [May 2, 2024, 7:26am UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/16 "2024-05-02T07:26:08Z")

</div>

Now I see what you mean with _all_.

Yes all stepper drivers must have the **!** in front of the pin names.

It’s the logic of the chip that requires a low signal to enable the stepper.

---

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [May 2, 2024, 10:45pm UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/17 "2024-05-02T22:45:18Z")

</div>

maybe I’m just tired, but I’m determined to push through… I’ve made so much progress in the last 48 hours that I just want to keep going.

Again, I appreciate all the help guys.

little bugs here and there… sometimes when direct one of the axis, it happens to all of them, it seems like its stuck… then it hurries up and plays catch up… like, for example… I have the print bed at 10MM; I want to bring it to 2mm, using the interface; 1 MM at a time… if I quickly press the 1mm button 5 times, it might move the bed up 3, stop for a few seconds, then come up the rest of the way a few seconds later. could this be do to having my printer.cfg file a little messy (tons of notes in it), or does that not matter?

---

<div class="post-metadata">

**Author:** ![sunbound](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@sunbound](https://klipper.discourse.group/u/sunbound)\
**Post date:** [May 17, 2024, 11:58pm UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/18 "2024-05-17T23:58:33Z")

</div>

The printer seems to have settled out, and its not having these other little issues anymore… I’m having a problem finding the correct offset though (seems so basic it shouldn’t be an issue).

-I currently only have two Z steppers, so i set up tilt to use the front two corners (solid and not easily adjusted. After a few back and fourths, it gets within spec.  
-I then go to adjust the back center screw (using screws tilt calculate) to get the bed as trammed to the gantry as I can. So far so good.  
-I go to set up the height-map, and everything looks about as flat as i can hope for using the stock bed, with a 330x330 tronxy glass bed on it.  
-I start printing, and the prime line comes out beautifully, it starts printing and the bed goes down as the print head moves toward the center of the bed, where it would start to print. The result is the printer starts printing millimeters above the bed. As the head moves around the bed, the bed seems to be moving to adjust for the ABL more than it should be. I can get the offset just right for one part of the bed, and its off for another. so much a difference that the filament wont stick to the bed.

Any ideas?

Attached is my current klippy file.

Thanks for all the help so far… I feel like I’m so close to finishing this upgrade, I can practically taste it.  
[klippy - 5-17-24.log](https://klipper.discourse.group/uploads/short-url/g9MXC02x8RQC01yIRC7r3CmYXs7.log) (3.6 MB)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [July 16, 2024, 11:58pm UTC](https://klipper.discourse.group/t/upgrading-stock-x5sa-board-to-m8p-1-1-cb1/15901/19 "2024-07-16T23:58:37Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
