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 · 110 comments
Open

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

yifandianzi opened this issue Sep 14, 2023 · 110 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

$R17(RP75{YUAZL@AH53}_K
LWBLHC%UA8_@USF6~{AW47B

@svenhb
Copy link
Owner

svenhb commented Nov 20, 2024

You need to seperate between "work" (big digits) and "machine" (small digits) coordinates:
image

The origin of Work coordinates can be set with the buttons "Zero XY" etc.
The origin of machine coordinate will be found during "Home" and can not be changed.
Tool change position must be given in machine coordinates, to be independent of "zeroing" the origin.

I hope this helps: https://grbl-plotter.de/index.php?id=auto-pen-change&setlang=en

@yifandianzi
Copy link
Author

Hello, this is the coordinate for resetting the machine to zero
IMG_20241121_220342
PU{~YCY{6AMUA(6A_H1 BCB

@svenhb
Copy link
Owner

svenhb commented Nov 21, 2024

So this is your configuration? And Position as shown in screen shot?
image

Then you can take over this values vor the shown machine area.
image

@yifandianzi
Copy link
Author

Yes, this is my configuration, X \ Y is like this, but after following your prompt and configuring it, it looks like this
_}B~J6O VB%A{ SH(XN1E_I
)GP4$)2SZXJJY4_U)M)FU

@svenhb
Copy link
Owner

svenhb commented Nov 21, 2024

You took the wrong numbers - you need the small numbers for machine coordinates
image

@svenhb
Copy link
Owner

svenhb commented Nov 21, 2024

Then you move to your tool change position, read the machine coordinate for use here:
image

@yifandianzi
Copy link
Author

Hello, I've finished setting it up. Here's how it is
(_(E9 WT)}5P$W`HORQ
L~F1 ~_IZPN1LZELMHP}2WY

@svenhb
Copy link
Owner

svenhb commented Nov 22, 2024

Ok, now you need to adapt your pen holder positions:
image

@yifandianzi
Copy link
Author

Hello, I changed the X coordinate of the tool to 0, but it still shows in the common color area
M%0PL){{GMHUNMO(8S0WO

@svenhb
Copy link
Owner

svenhb commented Nov 22, 2024

Just compare your screenshots - pen holder graphic moved to the right direction.
Now change X to ca. 800 and Y to ca. 350:

image

@yifandianzi
Copy link
Author

Hello, where is this not set correctly? When the fixture in front of the pen is moved after zeroing, Z is lifted to the limit position and then moved to the pen position to start gripping the pen. When writing, Z is almost lifted to the Z limit position. After writing, when placing the pen, Z is lifted again to trigger the Z limit position
https://www.youtube.com/watch?v=YUySwfs-eN8

@svenhb
Copy link
Owner

svenhb commented Nov 22, 2024

you need to set new origin for the Z work coordinate: move Z a little bit down (at least the "Save Z" value + the $27 value), then press "Zero Z".
image

At the moment the work "0" is too close to the end switch.

Also, you may adapt $132 to the real mechanical dimensions, I assume Z can move 20 mm at all? But is not so important for the moment.

@yifandianzi
Copy link
Author

Hello, the pen clip got loose while writing. Where do I need to set it up
https://studio.youtube.com/video/-ziqMox3jBs/edit

@svenhb
Copy link
Owner

svenhb commented Nov 23, 2024

Perhaps you changed something else?
Can you show your G-Code?
Which scripts do you use here - and did you modify them?
image

@yifandianzi
Copy link
Author

Hello, this is the script I am using
8{ODWOELSNAT_3)6JDV1UFB
A 8SUZ3{32E)~@GPHME1N6](https://github.com/user-attachments/assets/150dcece-cc87-437b-88d4-2a0f56749625) ![QI9)MWPXAXL88_@T$RL04L

@yifandianzi
Copy link
Author

A 8SU`Z3{32E)~@GPHME1N6

@svenhb
Copy link
Owner

svenhb commented Nov 23, 2024

And the G-Code from the edit-box?

@yifandianzi
Copy link
Author

Hello, the problem I am currently facing is: when selecting the pen for the first time, I can correctly grip it to write. However, when gripping the pen for the second time, there is an error in Z, and Z cannot fall to the specified undetermined value during writing. When gripping the pen for the third time, it cannot touch the paper at all. Can this offset value be adjusted

@svenhb
Copy link
Owner

svenhb commented Nov 24, 2024

So you have step loss on Z because your mechanical range is too small.
You may adapt Z movement in scripts to your needs:
image
image

@yifandianzi
Copy link
Author

Okay, thank you. Thank you for your help. I will continue to make adjustments

@yifandianzi
Copy link
Author

Hello, I suddenly reported a malfunction while writing. Is it a problem with the driver
1

@svenhb
Copy link
Owner

svenhb commented Nov 30, 2024

ALARM:1

During your plotting process an end-switch was triggered. Perhaps your drawing is too big?
You need to press "Kill Alarm".
You may disable $21 to avoid hard limit alarm. https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration#21---hard-limits-boolean

@yifandianzi
Copy link
Author

Thank you for your help

@yifandianzi
Copy link
Author

Hello, I find this watercolor a bit interesting. Do you have any relevant information? I would like to try making it
DW1WZR3K7Y{1HK6)T4Y AQG

@svenhb
Copy link
Owner

svenhb commented Dec 4, 2024

It is my foldable plotter: http://svenhb.bplaced.net/?CNC___Klappbarer_Plotter
Together with some settings - Note the values in the screenshot may not the same, used in the video:

  • Accurate PWM setup for different height positions
  • Drag tool compensation for the brush
  • Split original moves to insert water-color refresh script

image

image

image

@yifandianzi
Copy link
Author

Okay, thank you. I'll refer to it

@yifandianzi
Copy link
Author

Hello, is the sound emitted by the servo motor an electric current sound? How can I eliminate it
https://www.youtube.com/watch?v=prI3imqAP7Q

@svenhb
Copy link
Owner

svenhb commented Dec 5, 2024

This looks very good!!! I'm happy that you solved all problems!
You can speed up everything by:

  • Use higher acceleration, perhaps 500 or 1000 for $120, 121
  • Use higher XY-Feedrate in GRBL-Setup

The servo noise is normal: the servo is trying to reach its target position when grabbing the pin, but the pin is in the way. Maybe adjust the grip position value a bit.

@svenhb
Copy link
Owner

svenhb commented Dec 5, 2024

For the gripper value try "S10" or "S20" or higher, you need to figure out:
image

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