Files
drawbot_LY/POSITIONING_FIX.md
devdesk f42d9a35dd Fix: Add settling delay to improve positioning stability
- Added settling-delay parameter (default: 0.15s) to allow mechanical settling after rapid movements
- Modified plotter-lod.py to insert settling delay (G4 P0.15) before pen-down command
- Updated plotter-lod.inx to expose settling delay in UI
- Created POSITIONING_FIX.md with detailed explanation and tuning guide

This fixes position offset issues caused by immediate pen-down after rapid travel (G4 P0 -> M3 S1000).
New sequence allows motors to stabilize before pen engages, improving drawing accuracy.
2025-12-08 20:47:28 +02:00

2.5 KiB

Position Stability Fix for LY Drawbot

Problem Identified

Your G-code showed positioning instability because the machine was not given enough time to mechanically settle after rapid movements before the pen was lowered.

Original G-code sequence:

G1 F3000          # Fast travel to position
G1 X-194.2381 Y40.11
G4 P0             # NO settling delay! ← PROBLEM
M3 S1000          # Pen down immediately
G4 P0.2           # Delay after pen down
G1 F2000.000000   # Start drawing

The G4 P0 provided zero delay for mechanical settling, causing position offsets.

Solution Implemented

Added a new settling delay parameter that allows the machine to stabilize after movement before lowering the pen.

New G-code sequence:

G1 F3000          # Fast travel to position
G1 X-194.2381 Y40.11
G4 P0.15          # 150ms settling delay ← FIX
M3 S1000          # Pen down after settling
G4 P0.2           # Pen-on delay
G1 F2000.000000   # Start drawing

Changes Made

  1. plotter-lod.py: Added settling-delay parameter (default: 0.15s)
  2. plotter-lod.inx: Added UI control for "Settling Delay After Movement"

Based on mechanical behavior, try these settings:

Parameter Recommended Value Purpose
Settling Delay 0.15 - 0.25s Allow motors/mechanics to stabilize
Pen-On Delay 0.2 - 0.3s Allow pen to fully engage surface
Pen-Off Delay 0.2s Allow pen to fully retract

Tuning Guide

If you still see position offsets:

  • Increase Settling Delay to 0.2s or 0.25s
  • Test with slower travel speed (reduce from 3000 to 2000)

If drawing is too slow:

  • Reduce Settling Delay to 0.1s (minimum recommended)
  • Keep at least 0.05s for mechanical dampening

For very precise work:

  • Settling Delay: 0.25s
  • Pen-On Delay: 0.3s
  • Travel Speed: 2000 mm/min

For faster sketches:

  • Settling Delay: 0.1s
  • Pen-On Delay: 0.15s
  • Travel Speed: 3000 mm/min

Testing

After regenerating your G-code with these settings, you should see:

G1 F3000
G1 X-194.2381 Y40.11
G4 P0.15          # ← Settling delay now present
M3 S1000
G4 P0.2

Monitor the first few rectangles in your drawing to verify positioning accuracy.

Additional Notes

  • The settling delay is applied before every pen-down operation
  • This ensures consistent positioning across all drawing operations
  • Slight increase in total drawing time (~10-15%) but much better accuracy
  • Can be adjusted per-drawing based on complexity and precision needs