-
Notifications
You must be signed in to change notification settings - Fork 142
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
DISCUSSION - Could this run Klipper ? I think it really could omg #301
Comments
So quick survey, I found that Klipper, the MCU component of klipper is compatible with old 8mhz arduinos https://github.com/Klipper3d/klipper/tree/2425a74638baa87efef3ca02253804d126101c8a/src/avr I'm not sure, but I think that folder, is the whole thing, as far as the MCU firmware is concerned .... I might be able to port it with some help from chatgpt .... As for ethernet The 3 chips ENC28J60,LAN8720 or W5500 that are most in favour cost about 3-4$ , 2-3$, 4-5$ respectively. These are the libraries, I have no idea how hard it would be to make those work on the CH32V003, perhaps it works out of the box ? https://github.com/ARM-software/CMSIS-Driver |
Explanation of each chip by chatgpt Certainly! The ENC28J60, LAN8720, and W5500 are Ethernet chips commonly used in embedded systems and IoT devices to enable network connectivity. Here’s a breakdown of each:
The ENC28J60 from Microchip Technology is a standalone Ethernet controller with an industry standard Serial Peripheral Interface (SPI). It is designed to serve even low-cost, low-speed, less-complex microcontrollers with Ethernet capabilities. Key Features:
The LAN8720 is a low-power 10BASE-T/100BASE-TX physical layer (PHY) transceiver from Microchip (formerly from SMSC). It interfaces with microcontrollers via the Media Independent Interface (MII) or Reduced Media Independent Interface (RMII). Key Features:
The W5500 from WIZnet is a hardwired TCP/IP embedded Ethernet controller that enables easier Internet connection for embedded systems using SPI. Key Features:
Comparison Summary:
Each of these chips is targeted at different network scenarios, so the choice depends largely on the specific needs and constraints of your project, such as speed requirements, power consumption, and available microcontroller interfaces. |
For future reference, TI has an open source (but license unknown) ethernet to serial firmware, based on lwIP and FreeRTOS https://www.ti.com/lit/an/spma072/spma072.pdf?ts=1713345916020\ "this software for use solely and "You may not combine this software with "viral" open-source So, that will be as a source of inspiration but no copying allowed ! Found firmware for "Serial to ethernet" for the esp8266, but seems to be wifi to serial others in that vein esp8266 https://github.com/jeelabs/esp-link couldn't find firmware but, that's actual serial to ethernet https://www.dfrobot.com/product-2550.html also the tasmotta firmware has serial to ethernet, but whether source is available is unclear https://tasmota.github.io/docs/Serial-to-TCP-Bridge/ also appears to top out a 115200 bauds Also found the CH9121 However, my ultimate goal... or at least hope, is full Klipper on CH32V003 with direct ethernet support SerialToTCP firmware for STM32, that is not quite "it" |
Would you like to join my Discord, to discuss? We have better discussions there than on Discord. You can ping me, my username is Everything I've head about klipper is that it's very heavy weight. Could a CH32V003 do full CNC control with tons of features over ethernet, sure! But, probably not with klipper would be my guess. |
Also, side-note: You know, there are CH32XXX's with ethernet built in, right? Check out the ch32v307 |
Thank you for the invitation, I might stop by discord, but I really do not like discord and what it has done to public knowledge on the internet and do not have an account. I am far more enticed by your video abour VR chat as a kind of internet underground and might meet your there if you still go ! I think you are correct, klipper might be too big for the CH32V003. I have given this a try, to simply compile klipper for the atmega328P, a MCU with 32K (as you know, double that of the CH32V003) They would use this kind of board perhaps I have documented my attempt, and even a mutilated version of klipper, I could not get below 37K and I think that doesn't even include a bootloader (which might be another 4K) gwisp2/klipper-drawbot#1 (comment) Here is the actual code https://github.com/Klipper3d/klipper/tree/master/src/avr I used kiauh on debian 12 to set this up but I had to roll back gcc avr to debian 11 to build at all. However, I think I might have gotten something wrong There people claim that with only the support for the accelerometer they got it down to 2800 bytes https://klipper.discourse.group/t/cannot-build-firmware-for-arduino-uno/7041/7 Perhaps there is hope. I wonder how much space the ethernet would need. I didn't know about the CH32V307RCT6, they are 2.58$CAD in 100qty on ali The package has many more pins however. 10x10mm LQFP-64M That is certainly an option to consider That's a lot of stuff for 2.58$CAD I hope the CH32V003 is still somehow viable ... but wow there is a lot of room to grow here ! |
After chatting with some folks from my server, I think it is viable, but, what's more important than spending time figuring out what processor to use for a project is starting to do projects with a processor and seeing where you land. If you get stuck, someone can probably help out. And Discord is good for a more private thing. We do the best we can to disseminate information when it's prepared for release. |
This is a great idea cheap way to isolate controls on a 3d printer. chv chips are amazing i've already done few project with them with reliable performance at fewest components as possible. My 3d printers are collecting dust right now this might give me some fuel again to start 3d printing again. |
Hi, For now I am investigating using a dedicated serial to ethernet bridge, that is the CH9121 chip. ali item 1005007492381945 The cheapest I could find was 5.32$CAD/each for 10x, so that is already 17 times more expensive than the ch32v003 and you still need a mcu to run klipper proper. The ch32v003 can't run a whole printer on its own, but multiple of them probably could. I would imagine something like, one for the extruder control (1 stepper plus 1 PID controlled heater) and one for X/Y/Z+bed. If these two chips (and many a 3rd one for accessories) could talk some 1mbps ethernet and hook into a nearby switch, that could make managing a whole shelf of printers really convenient and it would work with bottom of the barrel printers. |
Hi,
Klipper is probably 3D printing's most advanced firmware.
It is a two part system where the hard math is done on a real computer, and the real time stuff is done on a microcontroller.
A solution the LinuxCNC project is still in denial about, but I digress.
As a result, the MCU portion of klipper has relatively few functions to implement
https://www.klipper3d.org/MCU_Commands.html
Also one thing to note about Klipper, it can use multiple MCUs at one.
So, instead of one board that has everything, you could have one MCU only do X/Y axis, have another do the Z(1,2,3,4) plus the fans, rgb and bed heater and yet another only do the extruder motor and heater
That means the PCB could be much much simpler than currently monolithic approach
However, nobody in the 3dprinting community has heard of the CH32V003, so there are no such boards yet.
3D printer board are not super complicated. Here are a few of the most popular open source design, based on the MKS Skipr design I believe.
BTT SKR 1.4
BTT SKR V2
BTT SKR V3
BTT SKR mini E3V3
found the SKR Skipr.. I might have been wrong
MKS Skipr
But wait there's more !
The Klipper host and the Klipper MCU, communicate with one another using either serial port or canbus
But I believe it could be using ethernet ALMOST transparently without modifying the Klipper host software, only some ethernet to serial shenanigans in the MCU firmware.
Using the one of ENC28J60,LAN8720 or W5500
I asked about it on the klipper forum and got 0 replies !
https://klipper.discourse.group/t/can-i-add-ethernet-support-to-my-klipper-stm32f103-enc28j60-lan8720-or-w5500/14733
Which I take as a lack opposition, win !
So there already are many firmware do ethernet to serial bridge
https://github.com/oxan/esphome-stream-server
https://github.com/yuri-rage/ESP-Serial-Bridge
https://github.com/AlphaLima/ESP32-Serial-Bridge
https://hackaday.io/project/161491-qmesh-a-lora-based-voice-mesh-network/log/194667-esp32-serial-to-wifi-bridge-complete
oops I have better links for that , but
My computer is about to crash from having this many
tabs open, I will now post and come back after the reboot
The text was updated successfully, but these errors were encountered: