Update de grbl avec un plus grand buffer et un peu de doc en plus
This commit is contained in:
@ -54,8 +54,6 @@ M5 = spindle off
|
||||
|
||||
M3 = spindle on
|
||||
|
||||
Spindle gpio 22 sur l'esp32 boolean 0-3.3v
|
||||
|
||||
Setup le G28 (position safe de la machine)
|
||||
|
||||
En envoyant ? ou en activant le verbose mode grbl report status.
|
||||
@ -67,3 +65,86 @@ Commande de job envoyé par l'interface web
|
||||
|
||||
$J=G91 G21 F1000 X-10
|
||||
<Jog|WPos:9.919,0.000,0.000|Bf:14,64|FS:840,0|Pn:X|WCO:0.000,0.000,0.000>
|
||||
|
||||
###CONFIG GRBL_ESP32 CRA4:
|
||||
- Augmenter le temps de démarrage de la spindle à 3-4sec
|
||||
- Activer la carte sd OK
|
||||
- Ne pas ignorer les pin de contrôle qui sur un esp seul n'ont pas de pullup et pose problème contrairement à ici. Cycle Start | Feed Hold | Reset | Safety Door OK
|
||||
- Inverser la logique de commande de la spindle. 3.3vHIGH = off 0vLOW = on OK
|
||||
- Possibilité de desactivé la pwm sur la spindle qui n'est ici pas utilisé
|
||||
- Augmenter le BLOCK_BUFFER_SIZE et RX_BUFFER_SIZE OK
|
||||
- Comme les capas de filtrages et les résistances de pullup suffisent pas activer ENABLE_SOFTWARE_DEBOUNCE (faudrait des optos coupleurs normalement et des endstop en >12v au lieu de 3.3v) OK
|
||||
|
||||
###PINOUT GRBL_ESP32 CRA4 (v3.5)
|
||||
Stepper disable sur GPIO 2 (c'est celle ou il y a led bleu relié sur l'esp car si utilisé en input il y a des problèmes)
|
||||
X_LIMIT_PIN GPIO_NUM_13
|
||||
|
||||
#ifdef CPU_MAP_ESP32
|
||||
// This is the CPU Map for the ESP32 CNC Controller R2
|
||||
|
||||
// It is OK to comment out any step and direction pins. This
|
||||
// won't affect operation except that there will be no output
|
||||
// form the pins. Grbl will virtually move the axis. This could
|
||||
// be handy if you are using a servo, etc. for another axis.
|
||||
#define CPU_MAP_NAME "CPU_MAP_ESP32"
|
||||
|
||||
#define X_STEP_PIN GPIO_NUM_12
|
||||
#define X_DIRECTION_PIN GPIO_NUM_26
|
||||
#define X_RMT_CHANNEL 0
|
||||
|
||||
#define Y_STEP_PIN GPIO_NUM_14
|
||||
#define Y_DIRECTION_PIN GPIO_NUM_25
|
||||
#define Y_RMT_CHANNEL 1
|
||||
|
||||
#define Z_STEP_PIN GPIO_NUM_27
|
||||
#define Z_DIRECTION_PIN GPIO_NUM_33
|
||||
#define Z_RMT_CHANNEL 2
|
||||
|
||||
// OK to comment out to use pin for other features
|
||||
#define STEPPERS_DISABLE_PIN GPIO_NUM_2
|
||||
|
||||
// *** the flood coolant feature code is activated by defining this pins
|
||||
// *** Comment it out to use the pin for other features
|
||||
#define COOLANT_FLOOD_PIN GPIO_NUM_16
|
||||
//#define COOLANT_MIST_PIN GPIO_NUM_21
|
||||
|
||||
// If SPINDLE_PWM_PIN is commented out, this frees up the pin, but Grbl will still
|
||||
// use a virtual spindle. Do not comment out the other parameters for the spindle.
|
||||
#define SPINDLE_PWM_PIN GPIO_NUM_17
|
||||
#define SPINDLE_PWM_CHANNEL 0
|
||||
// PWM Generator is based on 80,000,000 Hz counter
|
||||
// Therefor the freq determines the resolution
|
||||
// 80,000,000 / freq = max resolution
|
||||
// For 5000 that is 80,000,000 / 5000 = 16000
|
||||
// round down to nearest bit count for SPINDLE_PWM_MAX_VALUE = 13bits (8192)
|
||||
#define SPINDLE_PWM_BASE_FREQ 5000 // Hz
|
||||
#define SPINDLE_PWM_BIT_PRECISION 8 // be sure to match this with SPINDLE_PWM_MAX_VALUE
|
||||
#define SPINDLE_PWM_OFF_VALUE 0
|
||||
#define SPINDLE_PWM_MAX_VALUE 255 // (2^SPINDLE_PWM_BIT_PRECISION)
|
||||
|
||||
#ifndef SPINDLE_PWM_MIN_VALUE
|
||||
#define SPINDLE_PWM_MIN_VALUE 1 // Must be greater than zero.
|
||||
#endif
|
||||
|
||||
#define SPINDLE_ENABLE_PIN GPIO_NUM_22
|
||||
|
||||
#define SPINDLE_PWM_RANGE (SPINDLE_PWM_MAX_VALUE-SPINDLE_PWM_MIN_VALUE)
|
||||
|
||||
// if these spindle function pins are defined, they will be activated in the code
|
||||
// comment them out to use the pins for other functions
|
||||
//#define SPINDLE_ENABLE_PIN GPIO_NUM_16
|
||||
//#define SPINDLE_DIR_PIN GPIO_NUM_16
|
||||
|
||||
#define X_LIMIT_PIN GPIO_NUM_13
|
||||
#define Y_LIMIT_PIN GPIO_NUM_4
|
||||
#define Z_LIMIT_PIN GPIO_NUM_15
|
||||
#define LIMIT_MASK B111
|
||||
|
||||
#define PROBE_PIN GPIO_NUM_32
|
||||
|
||||
#define CONTROL_SAFETY_DOOR_PIN GPIO_NUM_35 // needs external pullup
|
||||
#define CONTROL_RESET_PIN GPIO_NUM_34 // needs external pullup
|
||||
#define CONTROL_FEED_HOLD_PIN GPIO_NUM_36 // needs external pullup
|
||||
#define CONTROL_CYCLE_START_PIN GPIO_NUM_39 // needs external pullup
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,18 @@
|
||||
$0=10 (Step pulse time, microseconds)
|
||||
Probe cncjs
|
||||
; Z-Probe v2
|
||||
G91
|
||||
G38.2 Z-10 F10 ; Vitesse de descente 10, descente de max 10mm
|
||||
G90
|
||||
; Set the active WCS Z0
|
||||
G10 L20 P1 Z0 ; Touch plate sans epaisseur
|
||||
; Retract from the touch plate
|
||||
G91
|
||||
G28 G91 Z0 ; Le z d'abord
|
||||
G28 ; Go G28
|
||||
G90
|
||||
|
||||
|
||||
$0=12 (Step pulse time, microseconds)
|
||||
$1=250 (Step idle delay, milliseconds)
|
||||
$2=0 (Step pulse invert, mask)
|
||||
$3=0 (Step direction invert, mask)
|
||||
@ -27,21 +41,8 @@ $110=5000.000 (X-axis maximum rate, mm/min)
|
||||
$111=6000.000 (Y-axis maximum rate, mm/min)
|
||||
$112=6000.000 (Z-axis maximum rate, mm/min)
|
||||
$120=200.000 (X-axis acceleration, mm/sec^2)
|
||||
$121=200.000 (Y-axis acceleration, mm/sec^2)
|
||||
$121=250.000 (Y-axis acceleration, mm/sec^2)
|
||||
$122=200.000 (Z-axis acceleration, mm/sec^2)
|
||||
$130=300.000 (X-axis maximum travel, millimeters)
|
||||
$131=210.000 (Y-axis maximum travel, millimeters)
|
||||
$132=100.000 (Z-axis maximum travel, mi
|
||||
|
||||
Probe cncjs
|
||||
; Z-Probe v2
|
||||
G91
|
||||
G38.2 Z-10 F10 ; Vitesse de descente 10, descente de max 10mm
|
||||
G90
|
||||
; Set the active WCS Z0
|
||||
G10 L20 P1 Z0 ; Touch plate sans epaisseur
|
||||
; Retract from the touch plate
|
||||
G91
|
||||
G28 G91 Z0 ; Le z d'abord
|
||||
G28 ; Go G28
|
||||
G90
|
||||
$132=100.000 (Z-axis maximum travel, millimeters)
|
Reference in New Issue
Block a user