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

Here is a try with and without Klipper.out added

In the instructions, the device has a long serial number. I just get m8p
6.3.2 Update using DFU If the MCU klipper device ID can be found by ls /dev/serial/by id/id/, we can input: make flash FLASH_DEVICE= /dev/serial/by id/usb Klipper_stm32g0b1xx_190028000D5041583332 3520 if00
to update firmware (NOTE: Replace /dev/serial/by id/xxx with the actual ID found in the previous step)

Thanks !!

Hi Mark,
From the screenshot it looks like you are missing the - symbol between parts of the path. It’s unlikely there should be any spaces from the ‘flash_device=/’ right the way to the end.
Don’t include klipper.out, that’s for when you want to generate a file which you would transfer manually with an SD card, you are trying to write directly to the device over “USB serial”.

So after a fair amount of head banging I’ve got the manta flashed. I started over with a new SD card image.
It turns out that you have to do both of the methods; the SD card and then the make flash. The BTT written instructions were not too clear but I found a video. The video shows that for the SD card part you use a SECOND card and then put it in the “mcu “ card slot near the camera connection. Only then did I get the serial number for the m8p board, and make flash worked.
Next I need to put your config files back in and pay attention to pin outs.
So only a couple questions:
Is there a reason why you used motor drivers 1,2,4,5,6 for x,x1,y,y1,z?
Where did you get the speeds and acceleration values, or are they just guess placeholders?
Thanks!

Congrats Mark!
Do you have a v1.1 or a v1.0 board?
I have the 1.0, and I did the initial set up powering the board with the USB connector, which meant I had to have the VUSB jumper pin in place. I know I didn’t have to use the SD card in the second slot, so I’m wondering if powering from USB or having that jumper closed on a v1.0 board allows you to flash. For the v1.1 version of the board, there’s a set of steps in the manual under 4.3.2 where you change the DIP switch positions for flashing (not sure if that’s what you meant by the pins). I don’t have any DIP switches on a V1.0 board… but in that position on my board is the VUSB jumper location… hmmmm
Of course if you have a V1.0 board and tried the same steps as I, that completely blows my idea out of the water!

As for the reasoning for the stepper motors, yes there is a reason, the numbers refer to the socket numbers. If you look at the board you’ll notice you have 9 sockets but we know the board is only capable of driving 8 steppers. That’s because the board is based on people using for a 3d printer with X and Y on stepper drivers 1 and 2, while stepper driver 3 can drive to steppers with identical steps in the Z axis.
Depending on what future enhancements I choose to do, I figured I’d bypass using the “dual motor” driver incase that’s useful in the future.

As for the speeds and acceleration, basically, I started slow and slowly increased until my setup started making a noise I didn’t like :slight_smile:

Guys & Gals, Loving this build and just starting mine with the same plan. Was tossing up between building a Voron 0.1 or an MPCNC giveb the amount of spares I have left over from my ever developing V2.4 and am going to join the MPCNC club.

Going to be using an Octopus 1.0, LDO 2504’s and a Makita router. Will keep following this one with interest.

Well done.

Adrian

4 Likes

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.

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