New MPCNC build: Primo + Manta MP8 + Klipper in BC, Canada

Neil,
FYI here is the link to the video: Guide:Unboxing/Wiring/Firmware Installation of CB1&M8P(Voron 2.4 as an example) - YouTube The use of the second SD card is at 9:15

I have the v1.1 board. I put the jumper on to use USB power for setup. I bought the board and CB1 directly from BTT. So I ignored section 4.3.2 because it’s all about the Raspberry CM4. (is that what you have?)
I looked carefully at the sketches and photos in the instructions comparing v1.0 to v1.1. I don’t see 9 sockets on either one. I haven’t seen anything anywhere about motor driver 3 being different. i know that 3dp builds rarely use 2 x or y motors, but commonly use 2 or more for Z (and they have extruders). But I think the m8p is more generic.

I think that the difference in boards mean that I shouldn’t try to use your config files directly, but rather just follow the gist of what you’ve changed. I’ll document what I end up with on my build thread when I work it all out.

Have you included anything for dual end stops and self squaring?

Thanks
Mark

Thanks for sharing the video, that will be helpful to others following this post in the future.
I still feel that to flash the firmware to the Manta board you have two options;

  1. Rename and copy klipper.bin to firmware.bin to an second SD card place in the other slot and power cycle
  2. Flash directly via the serial port path using the DFU method.
    I use the same DFU method on my Voron and Ender 3 which both have serial connections between a raspberry Pi and Octopus/SKR mini E3.
    Not sure why you weren’t able to, did you say you were able to flash with the DFU method after you’d flashed via SD?

With regards to the stepper ports, the video shows them using motor port 3a and skipping 3b. I personally chose to skip both 3a and 3b as I’ve labeled in the image, simply so I have the option for a future enhancement to my MPCNC to use either 3a, or 3a and 3b, where the two steppers need to turn identically. There’s absolutely no reason why you can’t use 3a for this project, but assuming you are planning to use end stops for squaring, you’ll need to skip the 3b port.

Anyone following should only follow my config files as a starting point, but understand/validate each line in there own setup (even if that means commenting out any you don’t understand when you power up)… so yes, follow the gist :slight_smile:

As for dual endstop / auto squaring, yes I had that working out of the box as the endstop_pin’s were configured for each motor, which included Z. All I had to correct was the direction pin for each motor, you may need the ! or you may not need it, that reverses the direction towards zero. Then I used STEPPER_BUZZ STEPPER=stepper_x in the klipper console to slowly move the steppers back and forth 1mm starting with positive direction. You also may need to invert the enable_pin by adding or removing the ! if your stepper doesn’t move. This is a very useful guide which you can apply to getting going (Configuration checks - Klipper documentation)

. Important note

  • Make sure your endstops trigger under the machine page before you attempt to home
  • If you home all axis and Z end stop is hooked up, make sure you are ready to close the circuit, as it will home X then Y, followed by Z… which will keep moving until you trigger the end stop (unless you have a small position_max and it should stop moving once it’s traveled that amount.
  • If you are nervous, set your homing_speed smaller than mine so it will give you time to pull the plug. If you start with the gantries in the middle of their ranges, it should give you plenty of time.

Final comment, you’re right about 4.3.2 for the Raspberry CM4, and no I don’t have one, I’m using the CB1 like you.

I got everything to flash properly and then when I put the serial number in the MCU.cfg I have Klipper running without any errors.

I copied in your config files and put them in the right folders

Next step : bump motors to check wiring and pinout.

Everything’s good until I get to the Z . The stepper buzz command ( STEPPER_BUZZ stepper=stepper_z) is supposed to make motor jog alternating pulses forward and back 10 times.

That’s how it works with X and why but what happens with ending up with 20 pulses forward.

I checked the motor and the driver. All ok. If I turn the motor plug over, I get 20 backward pulses

If I switch the Y1 and the Z, I confirm that the issue is not hardware.

Any ideas what to look for?

Thanks

1 Like

Sound like it’s related to the direction pin, maybe check your config to confirm you have specified the right pin label? Because it sounds like it’s not toggling the direction.

If you add/remove the ‘!’ from infront of the pin label for direction pin, restart klipper, and buzz the motor again, do the 20 pulses flip direction?

My direction pin (‘dir_pin’) for Z is set to ‘PD15’, but if you didn’t skip motor 3 like I did, you’re Z motor is likely on motor 5 for which I think the ‘dir_pin’ is ‘PC8’… But please check that yourself before trying.

1 Like

Hi Neil
I did skip 3 and 3a so I’m using the same pins as you , supposedly. I’ve tried reverting the direction pin, and other pins in steppers.cfg.
I also tried changing the limit values No luck.
I tried FORCE MOVE too. No luck.
I queried the end stops and all are open. (Because I don’t have any wired yet)
Is it possible that Z should be normally closed?
Mark

Can you clarify what you mean by “Z normally closed”?
To confirm your problem: Z motor only moves in one direction

  • after rotating the physical plug by 180degrees, the Z motor moves the opposite direction
  • if you connect an X motor to the Z driver socket, does that X motor only move in one direction?
  • if you rotate the X motor plug in the Z driver socket, does the direction switch to the opposite direction?
  • when you plug the Z motor into the X motor plug it moves in both directions 10 forward and 10 back?

Can you share the current config files, which you believe should work?


Neil
I’m sure I’ve seen that the limit switches on X and Y are wired to the NO (normally open) contacts. I’m not sure about Z. In the screenshot you can see that all 5 are open circuit, so in my poor understanding of what is going on; one possible cause is that the limit switch is “triggered” by being open, and It is preventing the motor from going further in one direction

The answer to your 4 questions is Yes in every case.

I’ll paste in the cfg files in a minute
thanks
Mark

Neil, I’m not sure which other ones you might need; let me know
Below are printer.cfg and steppers.cfg (in the Hardware folder)

printer.cfg

[include mainsail.cfg]
[include Hardware/MPCNC.cfg]
[include Hardware/mcu.cfg]
[include Hardware/steppers.cfg]
[include Hardware/homing.cfg]
[include Hardware/fans.cfg]
[include Hardware/leds.cfg]
[include Hardware/thermistors.cfg]

[include Macros/mainsail_variables.cfg]
[include Macros/neils_macros/m600.cfg]


steppers.cfg

[endstop_phase]

# Motor 1
[stepper_x]
step_pin: PE2
dir_pin: !PB4
enable_pin: !PC11
microsteps: 16
rotation_distance: 32
endstop_pin: ^!PF3
position_endstop: 0
position_max: 620
homing_speed: 40
homing_positive_dir: false

# Motor 2
[stepper_x1]
step_pin: PF12
dir_pin: PF11
enable_pin: !PB3
microsteps: 16
rotation_distance: 32
endstop_pin: ^!PF4
#position_endstop: 0
#position_max: 235
#homing_speed: 40

# Motor 4
[stepper_y]
step_pin: PD3
dir_pin: PD2
enable_pin: !PD5
microsteps: 16
rotation_distance: 32
endstop_pin: ^!PC0
position_endstop: 0
position_max: 345
homing_speed: 40
homing_positive_dir: false

# Motor 5
[stepper_y1]
step_pin: PC9
dir_pin: !PC8
enable_pin: !PD1
microsteps: 16
rotation_distance: 32
endstop_pin: ^!PC1
#position_endstop: 0
#position_max: 235
#homing_speed: 40

# Motor 6
[stepper_z]
step_pin: PA10
dir_pin: PD15
enable_pin: !PA15
microsteps: 16
rotation_distance: 8
endstop_pin: ^!PC2
position_endstop: 0
position_max: 5 # 90 when legs are in first wooden board
position_min: 0
homing_speed: 3
second_homing_speed: 3
homing_retract_dist: 3


########################################
# TMC2209 configuration
########################################

[tmc2209 stepper_x]
uart_pin: PC10
##diag_pin: PF3
run_current: 0.700
stealthchop_threshold: 999999

[tmc2209 stepper_x1]
uart_pin: PF13
##diag_pin: PF3
run_current: 0.700
stealthchop_threshold: 999999

[tmc2209 stepper_y]
uart_pin: PD4
##diag_pin: PF4
run_current: 0.700
stealthchop_threshold: 999999

[tmc2209 stepper_y1]
uart_pin: PD0
##diag_pin: PF4
run_current: 0.700
stealthchop_threshold: 999999

[tmc2209 stepper_z]
uart_pin: PF8
##diag_pin: PF5
run_current: 0.650
stealthchop_threshold: 999999

This may be redundant I thought I sent the config files, but I don’t see them
This is just printer.cfg and steppers.cfg let me know if you want to see anything else.
They should look very familiar to you :smile:


printer.cfg

[include mainsail.cfg]
[include Hardware/MPCNC.cfg]
[include Hardware/mcu.cfg]
[include Hardware/steppers.cfg]
[include Hardware/homing.cfg]
[include Hardware/fans.cfg]
[include Hardware/leds.cfg]
[include Hardware/thermistors.cfg]

[include Macros/mainsail_variables.cfg]
[include Macros/neils_macros/m600.cfg]



steppers.cfg   (in the Hardware folder)

[endstop_phase]

# Motor 1
[stepper_x]
step_pin: PE2
dir_pin: !PB4
enable_pin: !PC11
microsteps: 16
rotation_distance: 32
endstop_pin: ^!PF3
position_endstop: 0
position_max: 620
homing_speed: 40
homing_positive_dir: false

# Motor 2
[stepper_x1]
step_pin: PF12
dir_pin: PF11
enable_pin: !PB3
microsteps: 16
rotation_distance: 32
endstop_pin: ^!PF4
#position_endstop: 0
#position_max: 235
#homing_speed: 40

# Motor 4
[stepper_y]
step_pin: PD3
dir_pin: PD2
enable_pin: !PD5
microsteps: 16
rotation_distance: 32
endstop_pin: ^!PC0
position_endstop: 0
position_max: 345
homing_speed: 40
homing_positive_dir: false

# Motor 5
[stepper_y1]
step_pin: PC9
dir_pin: !PC8
enable_pin: !PD1
microsteps: 16
rotation_distance: 32
endstop_pin: ^!PC1
#position_endstop: 0
#position_max: 235
#homing_speed: 40

# Motor 6
[stepper_z]
step_pin: PA10
dir_pin: PD15
enable_pin: !PA15
microsteps: 16
rotation_distance: 8
endstop_pin: ^!PC2
position_endstop: 0
position_max: 5 # 90 when legs are in first wooden board
position_min: 0
homing_speed: 3
second_homing_speed: 3
homing_retract_dist: 3


########################################
# TMC2209 configuration
########################################

[tmc2209 stepper_x]
uart_pin: PC10
##diag_pin: PF3
run_current: 0.700
stealthchop_threshold: 999999

[tmc2209 stepper_x1]
uart_pin: PF13
##diag_pin: PF3
run_current: 0.700
stealthchop_threshold: 999999

[tmc2209 stepper_y]
uart_pin: PD4
##diag_pin: PF4
run_current: 0.700
stealthchop_threshold: 999999

[tmc2209 stepper_y1]
uart_pin: PD0
##diag_pin: PF4
run_current: 0.700
stealthchop_threshold: 999999

[tmc2209 stepper_z]
uart_pin: PF8
##diag_pin: PF5
run_current: 0.650
stealthchop_threshold: 999999

V1 firmware by dedault uses NC switches, with the Z axis on the Primo as the exception. The Z is NO because it is intended to use the Z touch plate and trigger when the comtacts are shorted.

The X and Y axes us NC so that they will report as triggered if they become unplugged or the wire is damaged.

Hi Dan, thanks for jumping in. That’s interesting and makes sense but I’m still struggling to see how it causes the problem I observe. ALL my limits are open, because I haven’t wired them yet. X and Y steppers are working properly and they’re in the “triggered” state .
Also the same “one direction “ movement happened even with FORCE MOVE.
THANKS Mark

Mark,
I was really hoping toggling the direction pin in the config was the easy fix.

  • It sounds the there’s no issue with the motors

  • The config files look familiar to mine and the right pins as per the manual!

  • Are you reusing the Z motor wiring when you test the X motor?

Try commenting out all include files except the motor and required ones incase you have something in another include that’s conflicting.
Try configuring motor 7 as Z instead of 6, do you’ll need to change your config pins, wiring socket and driver chip.
Try switching your Z driver chip with the X driver chip.

Looks like under your stepper_z config you have position_max set to 5 (5mm that would be). That doesn’t seem to be enough distance for it to move when doing the stepper_buzz. When you say ‘pulses’ do you mean slight movements?

A ‘stepper buzz’ only moves 1mm forwards and back so shouldn’t matter, but I think Mark had already tried changing the limit to a higher number?

When you tried performing a force move, does it move the same direction when you provide either a positive or negative translation, or does it do nothing when you request the direction it won’t travel in?

Neil, Matt,
I can answer some of this now, I’ll try the “commenting out” idea this evening.

by “pulses” I mean the slight movements normal behavior of STEPPER_BUZZ. THE Xs and Ys all do 10 forward and back. The Z always does forward and forward, with the same sort of timing.

X X1 Y Y1 do f b f b f b… 10 times
Z does f f f f f f… 10 times

My motors have 1 meter wires directly attached, so for now that is plugged into the board. I’ll have to make extensions when I wire it properly. I plan to use the tape measure trick for wire routing.

so the wire gets changed with the motor.

I also did try switching out the 2209 driver board, with one of the 3 left over.

I haven’t tried moving the Z to be motor 7. Where is the pinout documentation for that?
The small values for position_max are from me trying something. I originally had larger values, same as in Neil’s cfg files near the top of this thread.

with FORCE_MOVE I get rotation in one direction only when I put in a positive value to move. If I put in a negative, it still moves in the same direction.

I was able to get an error statement if I had the position max at 0. it was something like “positive homing direction could not be inferred” and it didn’t move

The pin outs for the motors can be found in the green table on page 10 of the manual.

Everything is pointing to the direction pin not mapped right or fault on the board for that pin.

Unfortunately, I’m still working on the drag chains so mine isn’t wired up to try and reproduce the issue.

Just an update on how my build is going… and why I’m not able to try and help reproduce Mark’s issue at the moment.
I almost have the design for the drag cable chain mounts the way I want them, which includes the ambient lighting from from the cool white (not blue light as it looks in the picture) LED strips which I hope to wire into one of the fan ports on the board.

The support for the guide rails are an aluminium I-beam which I’ve 3d printed a cover to slide over them providing a channel for the chain to sit in and for the wires that need to run the full length a space to hide underneath.

The LED strips slide into a printed translucent holder which then slides into the guide. There will be a strip light on the 2 Y rails, the rear X and the Y gantry. I chose the Y gantry over the X as it was higher up and so made the clearance easier to deal with and it was shorter.

In addition to the lighting I’m also planning to use some compressed air to help clear the chips away from the cutting bit, however I haven’t finalized my idea. I have left space under the I beams to run a 6mm pneumatic hose but will have to carry out some tests to see how effective is be able to clear with blowing air.

All the parts are independent of Ryan’s, either resting on them or gripping the inside of the tube.



2 Likes

Lights look GREAT!

And by the way…I FINALLY FOUND THE PROBLEM WITH Z !!!
You are running a manta v1.0 I have 1.1 when I look at the pinout diagrams on page 10 I see that ALMOST everything is the same but the direction pin for motor 6 is different. one small edit and it twitches properly when I do STEPPER_BUZZ

:smile: :smile::tada: :confetti_ball: :tada: :confetti_ball: :tada: :confetti_ball: On to the wire ways !!

1 Like

That’s great news!

Easy oversight, I checked your config against the manual… But I may have used the local copy I had on my phone rather than the latest version on my laptop or the link I shared!

Neil,
I’ve made quite a bit of progress, I’ll update my build page soon.
I’ve got motors and endstops working properly

Could you send the gcode for something simple (such as the crown) so I can look at the header and footer?
I may have to write or edit a post processor for Vectric. OR I’ll make the leap and start using Fusion for CAM
thanks
Mark