P1ayer2 / CZ-300_On_Steroids

This repository aims to improve the Crazy3DPrint CZ-300 for faster, better and more reliable printing.
GNU General Public License v3.0
5 stars 1 forks source link

No firmware/Marlin pins.h ? #1

Open aweussom opened 1 year ago

aweussom commented 1 year ago

If you have the pins.h file, please add it?

P1ayer2 commented 1 year ago

If you have the pins.h file, please add it?

Hello aweussom! Unfortunately I do not have the pins.h file for the original motherboard of this printer. I do, though, have a fully working firmware for any other motherboard. Simply copy my Marlin version and change the motherboard and display values.

Edit: do note that the firmware I am using does not use the optical limit switches. I use mechanical ones. If you want the files I can add them right away, even though they might not be fully refined.

P1ayer2 commented 1 year ago

Hello again @aweussom ! My current firmware is now added. Although it is working with my printer, please double check all parameters before flashing this firmware. Also, see my previous comment for additional information about my firmware.

Note: The firmware I have created was originally made for a BTT SKR Mini E3 V2 + BTT/FYSETC Mini 12846 Display V1. If you want to use a different motherboard and display combination, make the appropriate changes! Also keep in mind that you may not use TMC2209 drivers.

rootexpression commented 1 year ago

The best bet for this will be contacting support and asking them for the marlin source. If they don't respond, tell them they must, per the marlin license. If they still don't, then at least we know and can warn people. I am still waiting on any response of any kind from them.

If I have time to tear mine down to get at the board, I'll try probing the board to map the pins. Though the result would not necessarily be a 1:1 for marlin. I think they use Arduino pin names, rather than the standard pin names. But that can be solved.

P1ayer2 commented 1 year ago

The best bet for this will be contacting support and asking them for the marlin source. If they don't respond, tell them they must, per the marlin license. If they still don't, then at least we know and can warn people. I am still waiting on any response of any kind from them.

If I have time to tear mine down to get at the board, I'll try probing the board to map the pins. Though the result would not necessarily be a 1:1 for marlin. I think they use Arduino pin names, rather than the standard pin names. But that can be solved.

Hello! I have already tried contacting them months ago, with no response. Then, I contacted them through first contacting the provider of my printer, 3D Prima. 3D Prima managed to get in touch with them but unfortunately they refused to provide any software.

Also, please see the documentation file of my GitHub repo. There, you will find quite a lot of images and close-ups of the motherboard. More images can be provided if needed, as mine is already disassembled and put in storage.

rootexpression commented 1 year ago

I have looked at the photos, and am glad they are available. I was able to identify the microcontroller and the stepper drivers through those photos, and some unused connectors that could be very useful.

I am currently in a bit of a back and forth with crazy3dprint (which is actually XYZprinting). They won't provide any Marlin source or config files because they don't have them it seems. Looks like they took over the company (how that happened I don't know) or it is a second brand just to sell that one printer, but they are according to them not the manufacturer. It isn't a done deal. They initially responded thinking I was talking about the slicer software, and perked up when I explained to them the licensing situation they were in.

I'll try to remember to update you when there is a change. For now it has to make the rounds within their ranks (based on what they've told me). Grain of salt on all of that because who knows how honest they are being or how much the people I'm directly in touch with actually know of the situation.

Either way, I'm like a dog with a bone.

Next time you talk to them, send them this (both the manufacturer and the reseller, because they both may be in violation of the license): https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.1.x/LICENSE

The license for the firmware. It requires them to provide the source in a state to which you can compile it to get exactly what is on the machine (so, configuration files and all), or else they are in violation of the license. Why the extra detail? They may just say "okay, well that github has the source", but it doesn't have the changes they made to it. At that point if they still refuse you may want to "be nice" and offer them the option of replacing the board with a comparable board that you can get configuration files for (just check the marlin example configurations folder in the repository). It wouldn't be a 1:1, because you'd still have to get extensions or re-pin all the connectors to fit the new board, and figure out a new housing for it since its unlikely it'd fit in the stock housing, so those are things to consider. The processor is a 120mhz Arm processor from Atmega, so that gives you a ballpark there, and the steppers are the A5984. So, if you never hear from me again for some reason, that may help. Otherwise, I'll let you know where things land in my talks with them.

rootexpression commented 1 year ago

So, forgot, you already did all the modifications to make use of a new board, but maybe someone else comes across this down the line so I'll leave it as is.

P1ayer2 commented 1 year ago

Great additions! I already made a lot of discoveries about the motherboard though, mostly thanks to @jannoke. I'll try contacting them again and see what happens. I have a pretty good connection to 3DPrima as I've bought multiple printers from them. Also, they have helped me solve a lot of problems, great overall provider. That being said, I already have received a new motherboard as compensation. Like I mentioned, very nice support. The motherboard I received is the one I am using at the moment: the BTT Skr Mini E3 V2. I do know that a reddit user, on my reddit thread, has been working on decoding the pins.h file. If anything new comes up, I will make sure to update the repo.

jnorre commented 1 year ago

I have mapped out the pins in use with a multimeter and looked into a new Marlin, but the problem (or one of the problems) are that the SAM4S8C MCU used on the board is not defined in Arduino which Marlin uses as the framework. The SAM3X used on the Arduino Due is close and could problem be hacked to be used as a foundation for the SAM4S. And I think part of the problem with getting the sources (I've asked as well as was directed to marlinfw.org) could be that they as well just hacked the SAM4S into their local installation of Arduino and this makes it difficult to share the sources in a way, where it actually can be easily compiled on another computer. As the SAM4S series has been replaced by the new SAMx series I don't see the value in making a full implementation of SAM4S into Arduino, so I would hack it as well if I had to. However, the SAM4S8C is supported by Klipper, so this is the way I will follow instead. I have mapped out all pins on the board, including the display (can be used by Klipper) and the SD card (can NOT be used by Klipper) as well as all unused (connectors has be soldered) pins on the mainboard - including the SWD/Debug port, the unused "Sensor" port, the unused "FAN2" port, the LED port, the serial "DEBUG" port and the "Calibration" port. Many of these pin are connected directly to the MCU and can be used as output or input as desired, while some ports (e.g. FAN2) are connected through a FET and can only be used as a output. For my own part, I will add a 3DTouch autoleveling sensor (to Z-endstop and the unused "Calibration" port) and and part cooler fan to FAN2. I've added the unorganised and untestet work so far as an attachment below (just a text file). CZ-300 board (copy).txt

rootexpression commented 1 year ago

@jnorre I was ultimately aiming to get at the Marlin configs to do a conversion to Klipper anyway, so that is excellent (for me at least). You even mapped the LCD. Very well done. Interesting points about potential issues compiling marlin for that MCU.

P1ayer2 commented 1 year ago

@jnorre indeed, exceptional work! Is it okay if I add this text file to the main repository?

rootexpression commented 1 year ago

CZ-300.zip

So, that happened. I'll be shocked if it doesn't wind up in a repo or two.

P1ayer2 commented 1 year ago

CZ-300.zip

So, that happened. I'll be shocked if it doesn't wind up in a repo or two.

Wow! Just wow :O Amazing work! Any chance that you could integrate this in a Marlin repo? I myself aren't experienced enough, yet, for implementing custom libraries. I believe that I speak for the entire community when I say that it would be much appreciated.

rootexpression commented 1 year ago

Already handed it over to the Marlin team, but I don't know if they will add the configs. I'll likely chase down the formal process soon. Been a long day already for me :D All they need I think are the Configuration.h Configuration_adv.h and pins.h so that'll be pretty easy.

jnorre commented 1 year ago

Just to follow up on my previous message, I now have an early working klipper installation for the unmodified CZ-300 with the unmodified main board. My own CZ-300 is teared apart as far as the mainboard goes (it awaits getting pin headers mounted for part-cooling fan for a 3D-touch leveling sensor) and all cables are unattached to the printer (awaiting extra cabling for the fan and 3D-touch and better cable management), but changing to klipper should be possible without opening anything or modifying any hardware, and it is even be possible to go back to the original firmware, if klipper is not for you. To use klipper, follow the instructions on the "install" section on the klipper home page - for my part I used "Mainsail" prepared using "Imager" for Raspberry Pi (remember to configure the image using the "Imager" setup -the GEAR-button- before flashing the sd-card - make sure to enable ssh). Follow the klipper instructions on the Mainsail installation (the klipper source code is already present on the image) to update, configure (make menuconfig, select "SAM3/SAM4/SAM E70 (Due and Duet)" for architecture and "SAM4s8c (Duet Meastro") as processor model), and make the firmware for the main board. Follow the klipper instruction on how to flash, after following the instructions in the CZ-300 manual on how to put the main board into flash (bossa) mode. In "Mainsail" goto the "Machine" tab and upload the "printer.cfg" file below after making two modifications: Rename the file from "printer.cfg.txt" to "printer.cfg" Open the file (can be done from the Mainsail file manager or before you upload it) and change the line "serial=xxxx" under the section "[mcu]" to the correct name for your installation - instructions are on the klipper homepage.

The actual printer.cfg is made from the measurements (in the attached "CZ-300 board.txt" file) and by cross referencing to the marlin source from rootexpression (thanks!).

The following list shows what is working and what you might want to tweek yourselves:

NOTE: For me, everytime I update the printer.cfg and reload the firmware the USB connection to the main board is lost. Turn off/wait for display going black/turn-on the CZ-300 and klipper can see it again. There are no problems during printing at all.

WARNING! I also briefly tried "OrcaSlicer" with its custom "klipper" setup. The default speeds for klipper in OrcaSlicer are insane (or meant for a voron setup). So if you use OrcaSlicer, go through ALL speed settings for the printer AND for the filament and make it (for starters) 10% to 20% of the default values. I've not succeeded making a good OrcaSlicer profile yet and dont want to use a lot of time on it until I've dialed in "Pressure Advance" and "Resonance Compensation", at which point it should be possible to run the CZ-300 a little faster.

The next month or so I'll be buried in work and some vacation, but after that I'll continue with HW improvements (like a second Y-axis rod, but done a little different that your excellent design) and further SW tweekings, including some profiles for the slicers I use. At that time I will make a github for this stuff instead of misusing you github :-)

All my files are free to use by everybody, so you can add it to your repository if you want to.

EDIT (June 25 23:45 CEST): Uploaded new printer.cfg file - changed rotation_distance from 14 to 15 - this seems to fix the over extrusion mentioned above! Adjust all rotation_distance values after printing some cubes until the correct dimensions are met for you printer.

printer.cfg.txt CZ-300 board.txt

lars1182 commented 1 year ago

@jnorre. Nice Work, thanks. I have it installed Yesterday. Did jou have a Picture , how you attacht the Bl Touch in your extruder?

jnorre commented 1 year ago

@jnorre. Nice Work, thanks. I have it installed Yesterday. Did jou have a Picture , how you attacht the Bl Touch in your extruder?

I have not yet completed adding a BLtouch/3D-touch, and will not have time on my hand until around a month from now. After that, I will make a github page with pictures, instructions, configuration files and slicer profiles.

lars1182 commented 1 year ago

I have designed a Base for a dual flow Ender 3 printhead with an Attachment for the bl Touch. I Upload the .stp File in the next days. I just need to make a few minor improvements.

P1ayer2 commented 1 year ago

I have designed a Base for a dual flow Ender 3 printhead with an Attachment for the bl Touch. I Upload the .stp File in the next days. I just need to make a few minor improvements.

Sounds great! Looking forward to your contribution, many thanks :D

lars1182 commented 1 year ago

PXL_20230723_094800459 PXL_20230723_094507144 A short Update.

P1ayer2 commented 1 year ago

Hey @jnorre! Seeing the amazing work you've done for this community I'd like to add you as a contributor to this project. Would that be of any interest?

jnorre commented 1 year ago

No problem :-)

lars1182 commented 1 year ago

He is running. Custom y-axis, Klipper, bltouch and a custom Extruder with a mk8 nozzle

lars1182 commented 1 year ago

How i can Upload Files? i would like to share the stp file of the printhead with you.

P1ayer2 commented 1 year ago

How i can Upload Files? i would like to share the stp file of the printhead with you.

Im pretty new to GitHub myself, but I'm pretty sure you can download the repository and push new changes. I'll just accept the changes then :)

DragonSlayerSE commented 1 year ago

Thank you! i'v been strugling with this many nights this summer... i have edited & commented your printer.cfg and it seams to work.. (i also have my mb on desk waiting for more headerpins attached) i have an Creality Lazer module that i will try to attach later.. started work on onshape... (search for "cz-300") i also wana try to bild an klicky probe as an detacheble tool (since head can move outside of plate it could have a tool docking attached in the front right..

my attached printer.cfg have working "Emergency stop" and does not hang after restart (i think it was the "kill pin")

Klipper_Crazy3DPrint-cz300.zip

DragonSlayerSE commented 1 year ago

SD-card-pins2 PA25 get pulled to gnd if SD card removed