Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting the 5MP main board to an external CPU? #25

Open
NicoletoAerials opened this issue Aug 28, 2024 · 11 comments
Open

Connecting the 5MP main board to an external CPU? #25

NicoletoAerials opened this issue Aug 28, 2024 · 11 comments

Comments

@NicoletoAerials
Copy link

Hi @g992,

Have you successfully connected the FF A5M board to an external CPU? I'm looking to connect it to a Raspberry Pi 4 running the latest versions of Klipper, Moonraker, and Mainsail. However, I have a couple of questions.

First, I'm uncertain whether this setup will allow me to connect both the 5M's e-board and the main board. Secondly, I'm considering using TTL to USB converters, but I wonder if it might be better to utilize the Raspberry Pi's GPIOs instead, as it has five available UARTs.

I would really appreciate your insights on this!

Thank you!

@g992
Copy link
Owner

g992 commented Aug 29, 2024

Hi, no, I've made several attempts, but without success, the best option is to install klipper (https://github.com/xblax/flashforge_ad5m_klipper_mod ) and use its web interface

@NicoletoAerials
Copy link
Author

Thanks for your response.

I'm currently using Xblax's Klipper mod, but I'm concerned about the 75% RAM utilization. I've encountered a few instances where the RAM was exhausted, especially during SHAPER_CALIBRATE, causing Klipper to reset.

To address this, I plan to replace the original mainboard and electronics with a BTT Manta M8P and an EBB 42 CANbus for the extruder. I believe these are the only boards I'll need to run a fully functional copy of Klipper on the A5MP and to future-proof the printer for software and firmware upgrades.

@g992
Copy link
Owner

g992 commented Sep 3, 2024

you can also use a native printhead board if you can assemble a klipper for the N32 processor on it (+ having some soldering skills, you need to remove 1 chip and solder another one). there is a UART output implemented, I was able to install a UART-CAN transceiver (scm3425) there as tests and it worked (RPi + CAN adapter saw the board, and the clipper was initialized)
But I couldn't flash the N32, so I put STM32F103 instead.

@NicoletoAerials
Copy link
Author

That’s a great idea! However, I’ve already purchased the EBB42 e-board and think I’ve found space to install it inside the printhead. I’m just waiting for it to arrive and will post some pictures soon. I’ll be using Xblax's Klipper configuration as a base, but I’ll adjust the input/output pins as needed. I still need to figure out the bed pinouts and build a breakout board to connect it to the Manta M8P.

@NicoletoAerials
Copy link
Author

you can also use a native printhead board if you can assemble a klipper for the N32 processor on it (+ having some soldering skills, you need to remove 1 chip and solder another one). there is a UART output implemented, I was able to install a UART-CAN transceiver (scm3425) there as tests and it worked (RPi + CAN adapter saw the board, and the clipper was initialized) But I couldn't flash the N32, so I put STM32F103 instead.

@g992 I like your approach as it’s actually less invasive than mine. Is the STM32F103 a direct drop-in replacement? Do you have any pictures of your setup?

Thanks

@mBlinkii
Copy link

i would also appreciate 1-2 pictures to see how you have implemented it @g992, it should be possible to swap the n32 1 to 1 with the stm32 as the pinout is the same. i would like to know how exactly you managed the communication with rpi.

i plan to swap the mainboard for an mp5, as there is not enough space in the print head for an ebb i wanted to use the original board and just swap the n32 for an stm32.

@Jkbxhero
Copy link

Jkbxhero commented Dec 3, 2024

I am also interested on where this went. Mechanically this is such a robust machine for the price. Firmware and software is awful and sometimes it just doesn't any to print.
I'm running 4 projects due by Christmas, research isn't something I have a lot of time for at the moment

@Astrias57
Copy link

@g992 so, the eboard communicate using CAN with the CPU ? Sound interesting, BTT Manta M5P and M8P mainboard have CAN capabilities. I think I read on the github of xblax than the eboard need to be initialised using a small exchange through the serial port. Your solution looks better because it used the official klipper firmware. Is it hard to solder a STM32 in place of the N32 ?

@g992
Copy link
Owner

g992 commented Dec 7, 2024

board, unfortunately, connection via rs232, I installed f103, and flashed a regular uart there, it did not require any initializations, but I connected it to raspberry, I also connected the main microcontroller via uart, using the flashforge config. but I had problems with flashing the main processor, I could not assemble a stable firmware for n32, and in some places some functions did not work

@Astrias57
Copy link

Thanks for yout fast answer. If I try to replace the N32 by a STM32F103, I imagine it's impossible to flash without a J-Link or ST-link connected to the SWD pins ont the toolhead board. It's impossible via RS232 ?
Have you describe the procedure you used somewhere ? If no, could you explain the main steps ? I need to solve 2 problems, the connection to the toolhead, and the connection to the bed and loadcells. I plan to by a bed and a toolhead board to try.

@JacquesHumule
Copy link

Hello, can you give more information about why you can't flash the n32 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants