MMU2S with Klipper

Hi everyone!
The topic of using MMU2S with a clipper. Since I recently started using Klipper on my MK3S+ prusa, I started looking for a solution that would allow me to use MMU2S with the new system. I found solutions, regarding the replacement of the motherboard with another one. However, I came to the conclusion that I didn’t spend so much money on the MMU to spend even more now. Therefore, I concluded that it would be good to try to find a solution myself. I’m writing this topic because maybe there will be some interested people here or people who would be able to help me complete the knowledge, but going back to the topic:
After a long struggle with the diagrams, I came to the conclusion that the MMU2S has the same processor as the Arduino Leonardo, making it possible to program it with the Arduino IDE. Below I attach a link to the schematic of the MMU motherboard:

I also found it possible for gcode to call scripts in SSH, which allows you to open a serial port and send information via USB.
The idea is to write a program in the Arduino IDE for the Arduino Leonardo that will process the information it receives through the serial USB port. Then the communication between the Raspberry Pi and the MMU will remain to be done. Once this is done, it will be necessary to add Gcode, which are regularly used in the slicer for the MMU.

I am currently in the stage of programming MMU2S using Arduino IDE. I have already managed to implement almost everything I need to use the hardware with a minimum of options. Currently, I am able to use virtual end stops, load the appropriate filament to the height of the MMU filament sensor. All this using commands sent via Serial Port. I will add button support and error signaling and move on to writing the communication between the Raspberry Pi and the MMU2S itself.

If anyone has any comments or ideas, please let me know in a private message or under this post. It will be easier to accomplish something by working in a group. It’s not exactly Klipper, but if the solution is going to help at least a few people, I’ll be happy.

In the near future I will try to attach here some files and/or video that shows the functioning of the whole system.

See Multiple tools - GCode standardization possible? - #2 by Sineos
in particular “Happy Hare”

1 Like

Thank you, I will definitely test this once it is available for the prusa MMU, in the meantime I have dabbled a bit in this project and will most likely finish it to learn something new in the process.

Today I conducted the first tests on the execution of commands received by the serial port, at first I restarted the unit to “lose” its position, and then gave it the command “T0”, at which it should now load the filament from slot number 1 to the height of the filament sensor, and then withdraw it. Then I commanded MMU2 to load filament number 4 to the height of the sensor.
If anyone is interested, I have attached the video below:

2 Likes

@NikodemN You Sir, are doing the work of God! Right now I’m frustrated that I don’t have the knowledge and experience to help with this project, and also that not enough people show interest for this!
I’d love to be able to use my MMU2 with Klipper on my MK3S+ … in fact, this is the only thing holding me back from klipper (and you can imagine the frustration, considering that I can’t benefit of input shaper, for example).

Due to the beginning of the academic year, I had less time, but I managed to do something on the project again and here is the progress. I managed to connect the MMU to the Raspberry Pi and use Klipper to invoke custom gcodes. In a word - I managed to communicate everything with each other. Just a few more cosmetic changes to the program and I will be able to test the first version of the software. For the first use, I still need to solve the problem of detecting the loading of the filament into the nozzle (reading from the sensor), write a feedback loop to detect possible errors in loading and unloading the filament, and enter the loading lengths in the Arduino program. Later I will want to enter and update them using Klipper. For those interested, I’m attaching a video from today. Also thant you for support @derei :slight_smile:

1 Like

@NikodemN This is amazing progress! Having a mmu2 that works reliably with klipper will basically turn any mk3s into mk4 :smile:.
My programming knowledge is basic at best, and I doubt there is much I could do to help in that regard, and I never used Klippee before (I want to, though… but if possible, together with mmu).
However, if you believe there may be other ways to help, send me a DM.

And you should probably offer publicly some means for people to financially support your efforts, because at this moment, from everything I saw, your attempt to connect mmu2 with klipper appears to be the most promising.

Hello, today I managed to carry out the first tests, there is still a lot left, I have not yet managed to connect the filament sensor from the printer to the system to have information whether the filament was loaded correctly, but during printing no error occurred that would force the printing to stop. I’m going back to testing and looking for solutions, maybe I’ll post more photos or some recordings today.


1 Like



1 Like

I will write how to install it in my free time (1-2 weeks). There will be also all the files needed to run mmu with klipper.

3 Likes

hello
great job!!!
but i don’t understand how install ( files .cfg?)
sorry, i’m newbee

1 Like

I posted instructions on github on how to upload it. Test it and please let me know if you managed to get everything working. If necessary, you can write here or to the email address:
nikodemnokielski@gmail.com