g992 / flashforge-ad5m-5mpro-research

Hardware and software researches and upgrades for Flashforge adventurer M5/M5 PRO
69 stars 5 forks source link

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

Open NicoletoAerials opened 2 months ago

NicoletoAerials commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 3 weeks ago

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.