Skip to content
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

DIY Pen Plotter with Automatic Tool Changer | CNC Drawing Machine #361

Open
yifandianzi opened this issue Sep 14, 2023 · 74 comments
Open

DIY Pen Plotter with Automatic Tool Changer | CNC Drawing Machine #361

yifandianzi opened this issue Sep 14, 2023 · 74 comments

Comments

@yifandianzi
Copy link

IS7P0{A9 K{LO IH4V_C0IF

May I ask how to set the tool table above the Y-axis? After setting, the pen position in the tool table is negative, and all the tool tables in the pictures are in the negative direction of the Y-axis

@svenhb
Copy link
Owner

svenhb commented Sep 14, 2023

Tool table positions must be set in machine coordinates - homig of the plotter is needed (or manual "homig" via hard reset on lower left position):
image

image

@yifandianzi
Copy link
Author

O}NQQ}~{) D5XA9QEF(NX Y
8J XH4IJA{V8ZSVI19L%QVX
O36J %X%2ELS30LSQN06_S

The above image is set by me, and the following image is set by me referring to another producer

@svenhb
Copy link
Owner

svenhb commented Sep 14, 2023

Just change the 277 to 0

@yifandianzi
Copy link
Author

H%09TL5$IN20}Y}6D9 GJPB

1694698454095.mp4

Hello, this is a demonstration set to 0

@svenhb
Copy link
Owner

svenhb commented Sep 14, 2023

You are right, there is a bug and the offset is not shown, but processed during streaming. Will fix it soon.

@svenhb
Copy link
Owner

svenhb commented Sep 14, 2023

@yifandianzi
Copy link
Author

output_multi_video_1694780403069_1694780417484_VI.mp4

Hello, there is another issue now, which is that it can return to its normal position when returning to zero. When starting to work, the Z motor will rotate in the opposite direction, and then it can surprise the next step normally

@svenhb
Copy link
Owner

svenhb commented Sep 15, 2023

I don't exactly understand this issue. I assume the problem is the servo-position, when PWM is off.
Compare behavior of PWM on/off here:
image

Compare behavior of PWM low/high here:
image

@svenhb
Copy link
Owner

svenhb commented Sep 15, 2023

Now I could watch your video on a PC - it's not a servo...
I thing you need to "Zero Z" your Z axis before starting streaming.

@yifandianzi
Copy link
Author

BD$3O7WH~ 093QO9ZLO_5QG
Hello, I have reset all X, Y, and Z here to zero, but when starting work, they still rotate in the opposite direction. I think it may be due to incorrect settings elsewhere, and it should not be rotated without selecting a pen

@svenhb
Copy link
Owner

svenhb commented Sep 16, 2023

It is normal that the Z axis move to a save position on start.
Example code after importing a simple line:
image

Line 14 G00 Z2.00 move Z upwards to save position
Line 17 move to start position
Line 18 G01 Z-1 move Z down, to start drawing
Line 19 draw the line
Line 20 G00 Z2.00 mive Z upwards

@yifandianzi
Copy link
Author

7S7WXMXO~T9A%)U84`9ORX0
XG43{Y)IQRDA_2H)(D%O84L
Did I make the right changes here

@svenhb
Copy link
Owner

svenhb commented Sep 16, 2023

I don't know your hardware, I didn't saw a servo for a gripper...
Do your gripper opens with M3 S100?

Did you check my site? https://grbl-plotter.de/index.php?id=auto-pen-change&setlang=en

@yifandianzi
Copy link
Author

IMG_20230916_230411
Hello, I have looked at your website and it is slightly different from the position where I lifted and clamped the pen

@svenhb
Copy link
Owner

svenhb commented Sep 16, 2023

Looks like the Z-stepper should turn for a half turn maximum to move from lowest Z to highest Z.
Did you setup $102 correctly?

@yifandianzi
Copy link
Author

@svenhb
Copy link
Owner

svenhb commented Sep 16, 2023

Last video is not visible. I don't know your driver settings for micro-steps.
Usually a stepper-motor needs 200 steps for a full turn, If I interpret your design correctly, you have a half turn for about 20mm Z-change. With full-step-mode you may set $102 = 5 (100 steps/half-turn divided by 20 mm)
If you have half-step mode: $102 = 10

If your Z axis is spring loaded to keep it up, you may have a problem with step loss at the Z motor.

@yifandianzi
Copy link
Author

https://www.youtube.com/watch?v=ZJZuB_4S9PE
Hello, setting $102=10 and $102=5 will prompt an error, while setting $102=40 will not cause an error

@yifandianzi
Copy link
Author

I have set these three places in the firmware
RA4K2ELA)IJ@}4A)US2) E7

Do you think it's correct

@svenhb
Copy link
Owner

svenhb commented Sep 17, 2023

I don't understand how your z-axis works, in your video time 0.04, the stepper is moving, but the z-wagon is not moving....
Also I don't see an end-switch for z. So you can't use homing for z.
You need to set: #define HOMING_CYCLE 0 ((1<<X_AXIS) | (1<<Y_AXIS)) if you have end-switches there

@yifandianzi
Copy link
Author

https://www.youtube.com/watch?v=NDZsdDLbDDo
Normally, it should start working after resetting to zero, and then X Y starts moving to the pen selection position and Z starts lifting. The problem now is that when the start button is clicked, the Z stepper motor has already started working, and then the Z limit is set off

@yifandianzi
Copy link
Author

https://www.youtube.com/watch?v=ZxeStwRespc&list=RDCMUCJHZY4Tl6ovsnBrNocdDbAg&start_radio=1&rv=ZxeStwRespc&t=65
The author's point is that the Z-lift motor does not work when starting work after resetting to zero

@svenhb
Copy link
Owner

svenhb commented Sep 17, 2023

The main problem is, that pen selection positions are machine coordinate, which needs homing.
Also the linked video shows a working z-homing - you need to change your mechanics...
image

@yifandianzi
Copy link
Author

Thank you for your great help. When you pointed out the location, I also raised the Z limit position to zero. Now, just as I was preparing to start the work, the Z stepper motor continued to raise and then raised again, triggering a limit fault

@yifandianzi
Copy link
Author

https://www.youtube.com/watch?v=QQNdMw_KsNo
After all X Y Z are reset, the execution starts at 0:53, and the Z stepper motor continues to rise

@svenhb
Copy link
Owner

svenhb commented Sep 17, 2023

After Z-homing, Z stays at top position which you may want to have at +2mm in work coordinates.
After Z homing move 2mm down and press "Zero Z".
Also important the choosen travel way for import - small enough for your hardware?:
image

@yifandianzi
Copy link
Author

VO{S~}7XIUGC@X%3%V(9Q%O
Hello, where is the white area set and where can I reach the coordinates

@yifandianzi
Copy link
Author

https://www.youtube.com/watch?v=qdFgPm4bOkc
This is my complete operation steps, but there are still problems and I don't have a clue now

@svenhb
Copy link
Owner

svenhb commented Sep 18, 2023

Looks good so far.

  1. set your travel ranges via $130, 131, 132. https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration#130-131-132--xyz-max-travel-mm
    This will influence your homing machine coordinates:
    image

After this you go to setup and take over the ranges:
image

@svenhb
Copy link
Owner

svenhb commented Sep 18, 2023

Here you need a value, close to your homing Y-value = ca. 350:
image

@yifandianzi
Copy link
Author

https://www.youtube.com/watch?v=WWQc27jp7ks
Thank you. After picking up the pen, the servo released it and it got stuck while writing. Where can I cancel this step

@svenhb
Copy link
Owner

svenhb commented Sep 23, 2023

I don't know where the last movement comes from.

  • from footer setup?
    image

Switch on this check box and watch sent commands:
image

@yifandianzi
Copy link
Author

Hello, I have tried to modify these places, but they still don't work and I will loosen the pen
${2JXW3A}6C6OCQ}AY52TH0

@yifandianzi
Copy link
Author

In this way
95)XUC$NS 5DJN}}O7{D07E

@yifandianzi
Copy link
Author

https://www.youtube.com/shorts/gHtDPaVl4kA
It's Like That

@yifandianzi
Copy link
Author

I am using a special version of firmware with servo support
https://github.com/cprezzi/grbl-servo

@svenhb
Copy link
Owner

svenhb commented Sep 23, 2023

I made a mistake in my last post...You need to use Z axis and disable spindle use.
image
image

@yifandianzi
Copy link
Author

Hello, is that the case
T(VJ`L3JGP~RX$4JH}1 A%4

@yifandianzi
Copy link
Author

Hello, I just tried to turn on the Z-axis and disable the spindle like that, but the effect is still the same. I will release the pen

@svenhb
Copy link
Owner

svenhb commented Sep 23, 2023

Can you show the generated gcode

@yifandianzi
Copy link
Author

Hello, is that the case This is preparing to write after zeroing
https://www.youtube.com/shorts/GNgGmXgAvh8

@svenhb
Copy link
Owner

svenhb commented Sep 23, 2023

I mean a screenshot like this
image

@yifandianzi
Copy link
Author

~E2X} QZDDHYL2M3CDAZIH9
In this way

@svenhb
Copy link
Owner

svenhb commented Sep 23, 2023

And the last lines of the code?

@svenhb
Copy link
Owner

svenhb commented Sep 23, 2023

If you watch my video https://youtu.be/tVS8A3_E2IY?t=141
the last action is, removing the pen, then end of program "M30" which causes the servo to move...

@yifandianzi
Copy link
Author

{A)A2}@JAZF9TEO$ON~TV`N
Hello, it's from the 27-47 paragraph

@yifandianzi
Copy link
Author

Execute M30 only after complete writing
3Q4)OV7L}E~ J7E4P1U9P@M

@svenhb
Copy link
Owner

svenhb commented Sep 23, 2023

Try new version https://github.com/svenhb/GRBL-Plotter/blob/master/GRBL-Plotter_Setup_1_7_0_2_k.exe
It removes the final M05 in line 1354

@yifandianzi
Copy link
Author

image
Hello, my version you sent me will still have the same issue after installation

@svenhb
Copy link
Owner

svenhb commented Sep 23, 2023

The M05 should be gone:
image

There is still M30 which is needed. You can try to edit the code mnually to see what happens:
Set edit mode:
image

remove last line, then update 2D-view:
image

@yifandianzi
Copy link
Author

image
Hello, I am trying to delete M3 and the same problem will occur again

@yifandianzi
Copy link
Author

https://www.youtube.com/watch?v=9yI0MYlkZ20
This is the process of starting work after resetting to zero, and it is from the process of the image that the servo starts to release the pen holder
image

@svenhb
Copy link
Owner

svenhb commented Sep 24, 2023

Hello, I am trying to delete M3 and the same problem will occur again

The idea was to remove the final M30

Your code still shows this M3 1000 - this controls your servo after pen change
image

You must check this box!
image

@yifandianzi
Copy link
Author

https://www.youtube.com/watch?v=zTcfYmqEp1U
Hello, here are my settings. Where else do I need to adjust them

@svenhb
Copy link
Owner

svenhb commented Sep 24, 2023

Sorry, I forget to check with option enabled "Add Tool change command".
I found a bug, please check https://github.com/svenhb/GRBL-Plotter/blob/master/GRBL-Plotter_Setup_1_7_0_2_m.exe
also setup window bug fix

@yifandianzi
Copy link
Author

Hello, when writing normally, what should I set for this Z-rise
https://www.youtube.com/watch?v=QgFRFkiDSZA

@svenhb
Copy link
Owner

svenhb commented Sep 24, 2023

When pen is in gripper, move down with joystick an press button "Zero Z"

@svenhb
Copy link
Owner

svenhb commented Sep 24, 2023

BTW: you can set the custom buttons to perform the scripts (right click on desired button):
One button to select pen nr - press this first:
image

One button to start the script (set the path to your script:
image

@yifandianzi
Copy link
Author

https://www.youtube.com/watch?v=6uB7rexIIOU
Thank you very much for your help. The plotter is now working, but the problem is that the pen clip is not tight enough, and the pen will come up when writing. I am trying to find a way to change the problem with the pen clip

@svenhb
Copy link
Owner

svenhb commented Oct 1, 2023

The problem is, you press the pen down and the pen can't evade. You may invert your mechanics and let the pen press down by the spring and lift by the servo.
My plotters uses gravity to move the pen down: https://youtu.be/7Nvf4UwK_yk?t=112
And evade by an extra linear guide https://youtu.be/XZIN8dHrgjg?t=11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants