Hi folks,
Here the thing, I’m looking for a solution to apply glue on my 3D printed products which usually take up lots of my time. (The glue part is unavoidable, because I need to glue metal wire on a resin-based product)
However, I came across someone uses a desktop CNC with a 3D printed glue dispenser head. Unfortunately my product requires a bit more precision and therefore it’s not a viable option.
So I’m wondering if is it possible to swap out the CNC drill module and use G-code to control my glue dispenser module?
The procedure should works as follow:
customised module move the coordinate
a stepper motor with worm drive press a syringe with UV resin in it while module move slowly along a straight line
3)reverse the stepper motor a little.
4)block the tip with a small cup/lid/cover with a small motor/magnetic shut to prevent dripping
5)turn on a UV led and move backward on the straight line.
G-code is new to me, but I have some experience with C/C++ arduino/stepper motor.
And then here comes a several questions:
does G-code control every motor? For CNC module, 1)is it sending a variable or 2)PWM right away or 3) an abstract command like “DRILL”/“G84”?
There is 8 pins on the cable and I guess the 2 thick pins are pwr/gnd, but how about the other 6?
is it one way connection or bi-direction?
The cable carries 24V power, the bi-directional CAN bus (CAN_H/CAN_L), and four lines which are connected to GPIO pins of the MCU in the controller, and which I seem to understand can have different functions depending on the module attached. For the linear modules they carry the stepper signals, for laser the PWM signal, for heated bed the thermistor etc.
I guess you have two options: You can emulate an existing toolhead (e.g. the 3DP head) and “abuse” certain GCode commands and the printer’s reactions for your own purpose, e.g. map the Extruder control to your syringe and the Fan control to your UV diode. Advantages: No need to change the firmware of the printer, and you may even use a standard slicer to generate your toolpaths. Disadvantages: You are restricted to how Snapmaker implemented the GCode interpretation.
Option 2: You implement your own module into the firmware. The firmware is open source and you can modify it - other users have done so, you’ll find this in the forum, e.g. Skreelink’s post: Full Lightburn Control Guide. Advantage: You have full control over GCode interpretation, and can even remap cable pin functions. Disadvantage: You fork from the official firmware, and it is a learning curve.
Thanks alot, that is everything I need to know. May I ask did snapmaker publish its API between toolhead and controller or it is buried in its firmware to be found out?