Timișoara 2019 Universitatea Politehnica Timișoara [613376]

Timișoara 2019 Universitatea Politehnica Timișoara
Facultatea de Mecanică
Departamentul de Mecatronică

Lucrare de licență

Studiul și construcția u nui dispozitiv
de gravare cu laser.

Coordonator: Student: [anonimizat].dr.ing. Fl orina Pop Andrei -Iulian Doboș

2

Timișoara 2019 Cuprins

Cuprins ………………………….. ………………………….. ………………………….. …………………. 2
Introducere ………………………….. ………………………….. ………………………….. …………….. 3
Tehnologii ………………………….. ………………………….. ………………………….. ……………… 5
Descrierea standului ………………………….. ………………………….. ………………………….. …9
Construcția standului ………………………….. ………………………….. ………………………….. 22
Concluzii ………………………….. ………………………….. ………………………….. ……………… 30
Bibliografie ………………………….. ………………………….. ………………………….. ………….. 31
Anexe ………………………….. ………………………….. ………………………….. ………………….. 32

3

Timișoara 2019 Capitolul 1
Introducer e

Ce este Mecatronica?
Noțiunea de “mecatronică” ( MECA NICĂ + ELEC TRONICĂ ) a fost conceput ă în
1969 de un inginer din cadrul firmei japon eze Yaskawa Electric ș i brevetat până în 1982 ca
marcă înregistrată a acestei firm e. La început, fă cea referire la comple tarea sistemelor
mecanice din construcția dispozitivelor cu co mpon ente electronice. La ora actuală este
definită ca o știință inginerească interdisciplinară , având la bază completarea echilibrată a
elementelor aparținând construcției de mașini din cadrul stiințelor de electrotehnică si
informatică, cu scopul îmbunătățirii performanțelor tehnice. Așadar, termenul a fost
prezentat oficial în Larousse, Franța 2005. [1]

Ca și în multe alte domenii de complexitat e ridicată , în literatura de specialitate nu
există o definiție universală a noțiunii de mecatronică. În IEEE/ASME Transactions on
Mechatronics (1996) me catronica a fost definită în felul următor: “Mecatronica este
integrarea siner getică1 a ingineriei mecanice cu controlul electronic ș i cel inteligent cu
calculatoa re în proiectarea și fabricaț ia produselor ș i proceselor .’’[2]

Fig. 1.1 Diagrame ce ilustrarea ză noțiunea de mecatronică: a) Conceptul Universității
Stanford; b) Conceptul Universității Missouri -Rolla; c) Conceptul Universității Purdue

1 Sinergetic – asocierea a mai multor organe sau țesuturi pentru îndeplinirea aceleiași funcțiuni.

4

Timișoara 2019 1. Contextul alegerii temei

În prezent , orice produs de pe piața globală ce provine din industrie trebuie să fie
marc at/etichetat corespunzător î n conformitate cu normele și directivele aplicate î n
statul din care pr ovin. Această marcare sau etichetare s e realizează în multiple cazuri,
fie direct pe ambalajul cu care este împachetat produsul , fie direct pe produs. Î n
ambele cazuri pot fi aplicate/lipite etichete sau etiche tarea să fie integrată deja î n
componența produsului.
În cazul etichetării lipite există riscul de pierdere/deteriorare a etichetei deoarece ,
ele fiind lipite pe produs sau pe ambalajul produsului, pot fi dezlipite cu ușurință. Un
alt risc ce poate fi întâlnit este copierea și falsificarea etichetelor, ceea ce po ate imita
caracteristicile produsului cu marca înregistrată dar de o calitate net inferioară. Metoda
etichetei lip ite este una dintre cele mai comune alegeri pe piața globală.
În cazul etichetării care face parte din componența produsului sau a ambalajului,
riscul deteriorării este mult mai scăzut deoarece ea este parte integrată a produsului
nefiind un corp exterior și ieșit î n relief. Această metodă nu este încă foarte răspâ ndită
în toate domeniile.

Inscripționarea directă a etichetei se poate realiza prin diferite mijloace după cum
urmează :

 Prin ș tanțare – eticheta este presată pe corpul produsului luând forma m atriței;
 Prin frezare –eticheta este inscripționată după modelul introdus mașinii de
frezat ;
 Prin gravare laser – eticheta este inscripț ionată prin înlă turarea unui strat
superficial de material cu ajutorul unui fascicul laser;
Cea mai pretabilă variant ă din punctul meu de vedere este prin gravare cu fascicul
laser , deoarece calitatea etichetării este una foarte bună, se face direct pe corpul
produsului, este foarte dificil de înlaturat și falsificat.

5

Timișoara 2019 Capitolul 2
Tehnologii

Pe parcursul studiului , în care va fi prezentat un sistem de gravare cu laser , voi avea în
vedere conlucrarea gravării cu laser și comanda numerică computerizată(CNC).
2.1 Gravarea cu laser
Este un procedeu special de inscripționare a obiectelor formate din mai multe tipuri de
materiale și anume :
 Metal
 Sticlă
 Plastic
 Lemn
 Hârtie
 Materiale nobile (aur, platină, argint)

Principiul de funcționare al gravurii cu laser este format din fascicule de lumină
transmise perpendicular cu suprafața ce urmează a fi inscripț ionată.
Practic prin acest procedeu , raza laser este focalizată pe materialul ce se do rește a fi
gravat, deplasarea fiind controlat ă cu ajutorul unui software sp ecializat care are ca efect
înlăturarea/arderea unui strat superficial al acelui material. Gravarea poate varia intre 0,01 –
3mm după caz , prin reglarea parametrilor specifici , astfel gravura fiind mai superficială sau
mai profundă.
Gravura cu laser produce o imagine permanentă( cu efect ireversibil) și cu o
rezoluție de până la 1200 dpi(puncte pe țol).Rezoluția este importantă atunci când se
realizează fotogravura deo arece realizează o reprezentare fină a detalii lor (contururi,
muchii etc.). [3]
Avantajul ma jor al gravurii cu laser este că material ul gravat nu necesită prinderi
speciale deoarece asupra lui nu sunt ap licate forțe semnificative , ci doar cele de deplasare a
mesei de lucru , acolo unde este cazul. U n alt avantaj ar mai fi costurile reduse de
întreținere al e sistemului, fiind necesare doar unele calibrări periodice. De obicei gravura
cu laser se realizează pe 2 axe(x, y) în sistemul de coordonate xoy.

6

Timișoara 2019 Dezavantajul gravării cu laser e ste complexitatea procedeului și costurile ridicate
de achiziție a componentelor sistemului (laser, sistemele de comandare a axelor etc. ).

2.2 Comanda numerică computerizată(CNC)

Un echipament este dotat cu comandă numerică dacă comenzile care permit
funcționalitatea maș inii sunt transmise în form ă codificată. Conform cu această definiție,
prima maș ină unealtă cu coman dă numerică a fost războiul de țesut a lui Jacquard (1800)
care avea ca port program o bandă perforată.
Primul tip de maș ină unealtă care a folosit comanda numer ică a fost concepută în
anul 1952 (MIT). Începând cu anul 1942 în USA mașina unealtă a fost dezvoltată pentr u
satisface rea nevoilor industriei aeronautice. D e exemplu , pentru realizarea suprafeț elor
complexe, cum ar fi paletele elicei elicopterelor sau buzunarele de diverse forme în panouri
mari de aluminiu.
Inițial, echipamentele de comandă erau alimentate pri n cablu, iar introd ucerea
comenzilor se făcea prin cartele perforate. Odată cu apariț ia microprocesoarelor ș i cu
progresul electronicii, costul acestor echipamente a scăzut pâ nă prin anul 1970. Suporturile
și transmiterea de date au put ut fi asigurate cu ajutorul disch etelor, a benzilor magnetice
etc. Această evoluț ie, care a asigurat prelucrarea datelor în timp real , a permis creș terea
posibilităț ilor o ferite de acest tip de comandă ș i a favorizat integrarea acestora în
construcț ia de echipamente automati zate.
Folosirea comenzilor nume rice nu se opresc doar la maș ini unelte cu care se
îndepărtează mater ial specific mașinilor așchietoare , dar este prezentă și în cadrul
instalațiilor de tăiere cu fascicul laser , la prelucrare prin electroeroziune cu fir sau electrod,
la operațiunile de asamblare etc. Ea mai poate fi întâlnită în prezent la comanda rea meselor
mașinilor de măsurat 3D, în robotică și în cadrul altor echipamente în care poate fi
integrată comanda numerică .[4]

7

Timișoara 2019
Fig1.2 – Schema bloc a unui echipament clasic cu comandă numeri că

În prezent producția pieselor mici nu ar putea fi realiz ată dacă mașinile unelte cu
comandă numerica nu ar exista . Datorită acestor mașini unelte se pot produce repere de
orice formă cu o precizie considera bilă. Mașinile unelte cu comandă numerică pot atinge
precizii ridicate de prelucrare a reperelor de ±(0,015 – 0,02) mm în centre specializate de
prelucrare.
Mașinile unelte convenționale prelucrau suprafețe com plexe fiind necesar ă
realizarea un ei machete din lemn sau alt material înainte de procedeul de prelucrare
propriu -zis, care ulterior este scanat și reprodus cu o precizie variabilă în noua piesă. Acest
procedeu necesită o perioadă îndelungată de timp , uneori anga jații lucrau timp de mai
multe zile pentru un reper cu o geometrie mai complexă , astfel consumul d e materiale și
mâna de lucru fiind foarte crescut. Dar datorită tehnologiei actuale de prelucrare, timpul de
prelucrare este redus considerabil iar precizia este ridicată. În locul machetei nece sare
mașinilor convenționale, tehnologia actuală necesită un model construit cu ajutorul unui
program de tip CAD. [5]
Comanda rea unei mașini unelte prin Comandă Numerică Computerizată are la bază
utilizarea de litere, numere și simboluri. Mărimile programa te sunt direct introduse și
memorate în sistem cu un anumit format ca mai apoi în mod automat să fie citite ș i

8

Timișoara 2019 decodificate pentru setarea mișcărilor de comandă ale mașinii pe toate axele din
componența sistemului.
O mașină unealtă cu comandă numerică co mputerizată poate avea 3 axe comandate (x,y,z)
sau 5 axe comandate care în plus față de cea cu 3 axe axele x și y pot fi rotite . Totuși
numărul axelor nu se opresc doar la 5 , datorită robotizării putând ajunge la mult mai multe.

Un exemplu de cod mașină unealtă :

Fig1.3 Inserarea unui G -code din format text în coordonate mașină

În ex emplul din fig.1.3 se observă fiecare dintre cele 3 axe comandate x,y,z cărora
le corespund valorile în i ncremenți, fiecare mașină unealtă transformă unitatea de măsurare
mm în incremenți ceea ce rezultă și în precizia mașinii.

9

Timișoara 2019 Capitolul 3
Descrierea standului

3.1 Modul de funcționre
Sistemul de gravare cu laser pe care aș dori sa îl realizez funcționează cu 2
ansambluri cu motoare de tip pas cu pas cu ghidaje care for fi comandate de placa de
dezvoltare prin intermediul unor drivere dedicate î n acest sens.
Cele 2 ansambluri cu motoare sunt folosite astfel:
o Un ansamblu cu motor ca su port pentru obiect ul gravat (axa y);
o Un ansamblu cu motor pentru de plasarea laser -ului c are gravează
(axa x);
Toate componente le sunt legate la o placă de dezvoltare care rulează 2 programe și
anume, unul este strict legat de placa de dezvoltare , iar cel de -al 2 –lea program este legat
de transpunerea fig urii ce urmează a fi inscripționată pe material. Cea mai importantă piesă
din acest ansamblu este laserul fără de care gravarea nu poate fi realizată.
Tot standul va fi alimentat la rețeaua obisnuită de tensiune(220V ~) urmând ca
tensiunea sa fie coborâtă la 12 V (c.c) respectiv 5V (c.c), aceste tensiuni alimentează dupa
cum ureamză:
 5V- Placa de dezvoltare, driverele, laserul ;
 12V-Driverele, motoarele , ventilatoarele;
Standul este un ansamblu metalic format din cornier lat in forma de U fixat pe o
placă de pal melaminat. Stuctura este una rigidă , proiectată să reziste tuturor forțelor care
apar în sistem.
După alimentare a standului ambele ansambluri care dispun ca suport pentru laser-ul
respectiv , suportul pentru suprafața ce urmează a fi gravată trebuie aduse manual în poziția
de 0 absolut. Astfel dupa inițializarea și rularea programelor începe procedeul de gravare
propriu -zis.

10

Timișoara 2019 Din pricina încălzirii componentelor hardware din cadrul standului, el nu poate fi
funcționa mai mult de 10 minute consecutive. Componenta care ajunge la cea mai mare
temperatură este laser -ul ,acesta atingând temperaturi de până la 300 C˚.
3.2 Părți componente
În cadrul con strucției stand ului am ales urmă toarele componente:

Tabel componente
Nr.crt Denumire Buc.
1 Ansamblu cu motoare pas cu pas și ghidaje 2
2 Cornier lat 25×25 mm 1m aluminiu eloxat 2
3 Poliță PAL melaminat stejar bronze, 500 x 250 x16 mm 1
4 DK – 8 – KZ 1000mW laser cu lumin ă violet de mare putere 1
5 Cablaj de Test 180 x 300 mm 1
6 Placă de Dezvoltare compatibilă cu Arduino Nano (ATmega328p și
CH340) + Cablu 30 cm 1
7 Header de Pini Mamă 8p 2.54 mm 4
8 Header de Pini Mamă 16p 2.54 mm 2
9 Fludor la tub 1mm 10 gr 1
10 Driver pentru Motoare Pas cu Pas A4988 Verde 2
11 Pastă Siliconică 1g Argintie 1
12 Tranzistor IRFZ46N 1
13 Rezistor 0.25W 10KΩ 1
14 Rezistor 0.25W 47 Ω 1
15 Ventilator 12V c.c 62x64x60 mm 1
16 Ventilator 12V c.c 39x39x24mm 1
17 Set fire 1
18 Șurub cap hexagonal M6x14 6
19 Șurub cap hexagonal M6x25 4
20 Piuliță hexagonală M6 10
21 Șaibe plate M6x12x16 20

11

Timișoara 2019 22 Șurub cap hexagonal M4x40 4
23 Piuliță hexagonală M4 4
24 Șaibe elastice grower M4 8

3.3 Descrierea componentelor
În cele ce urmează vor fi prezentate componetele principale după cum urmează:
1. Motor pas cu pas;
2. Laser;
3. Driver motoare pas cu pas ;
4. Placă de dezvoltare;
1. Motor pas cu pas
Motorul pas cu pas poate fi asemănat cu un convertor de tip electromecanic în care
pe baza impulsurilor de comandare , fiecare dintre cele 4 bobine sunt acționate
independent pe baza trenurilor de impulsuri de tip PWM(Pulse width modulation)
numite faze.
Motoare le pas cu pas sunt clasificate î n 3 categorii:
► Cu reluctan ță magnetică variabilă
► Cu magnet permanent
► Hibrid
Motor pas cu pas cu reluctanță magnetică variabilă – aceste tipuri de motoare au în
componența lor un rotor pasiv pe suprafața căruia se pot regăsi dinți și unele
crestături. Pe partea statorică se află înfășurări concentrate sau d istribuite . Se
concentreză în serie bobinele polilor diametral i opuși și sunt alimentați de o sursă de
curent co ntinuu prin intermediul unui co mutator electronic.

12

Timișoara 2019

Fig. 3.1 Secțiune transversală a unui motor pas cu pas cu reluctanță magnetică variabilă

Odată cu alimentarea fazei statorice (ex. 1 -1’), rotorul se va roti în așa fel încât
circuitul magnetic să reprezinte o reluctanță magnetică minimă ( axa unor dinți roto rici să
coincidă cu axa înfașurării alimentate). Oprind alimentarea fazei 1-1’ și mai apoi
alimentând faza 2 -2’, noua poziție a rotorul ui va îndeplini cerința minimă de reluctanță
rotundu -se cu un unghi ‘θ’-ceea ce reprezintă pasul unghiular. Mărirea numă rului de poli
statorici și rotorici are ca și consecință o micșorare a pasului ungiular. O altă modalitate ar
mai fi prin reunirea de seturi independente(el ectric și magnetic) de rotoare ș i statoare
spațial decalate între ele cuprinse în același ansamblu. [6]
Principalele avantaje ale motorului pas cu pas cu reluctanță magnetică variabilă
sunt:
-viteze ridicate datorită frecenței maxime de comandă ce ating limite ridicate ;
-simplitatea construcției mecanice;
-permite realizarea cu o gamă variată de pași ung hiulari;
-dacă dispune de un număr mărit de faze poate fi bidirecțional;
-în lipsa alimentării fazelor statorice nu dezvoltă cuplu eletromagnetic iar poziția nu este
memorată în nici un fel ;
-la alimentarea unei singure faze statorice au loc oscilații impo rtante ale rotorului la un
moment dat;
Motor pas cu pas cu magnet permanent -alimentând faz a de comandă statorică este
creat un flux care inter acționează cu cel al magnetului permanent. Rotorul este rotit în așa
fel încât poziția ocupată să corespundă reluctanței minime pentru circuitul magnetic.

13

Timișoara 2019

Fig. 3.2 Secțiunea transversală a motorului pas cu pas cu magnet permanent
Avantajele acestui motor sunt:
-cuplul de fixare al rotorului chiar și în cazul neliniaritații fazelor;
-consum energetic redus;
-o mișcare amortizată a rotorului datorită magnetului permanent;
Dezavanta jele acestui motor sunt:
-sunt afectate perfomanțele motorului din cauza variației mag neților permanenți;
-tensiunea electromotoare indusă prezintă valori ri dcate în înfașurarea de comandă;
Motoare pas cu pas hibride – referitor la construcț ia motoarelor pas cu pas se mai
pot aminti variantele constructive ale motoarelor pas cu pas elect romecanice ( o combinaț ie
compactă motor pas cu pas ș i reductor armonic cu angrenare radială =motor pas cu pas
RESPONSYN, sau angrenaj frontal= motor pas cu pas MEASURMATIC) ș i a motoarelor
pas cu pas electrohidraulice (combi nație motor pas cu pas cu amplificator de cuplu
hidraulic cu piston axial) .[7]
Motoarele din cadrul standului fac parte din categoria motoarelor pas cu pas cu
magnet permanent datorită mișcării amortizate a rotorului , fapt ce satisface nevoia de
precizie în orice fază , fie ea și una neliniară, și a consumului energetic redus deoarece nu
este nevoie de un cuplu motor foarte mare însă precizia este un criteriu foarte important.

14

Timișoara 2019
2. Laser
Termenul laser este un acronim ce înseamnă Light Amplification by Stimulated
Emission of Rad iation în traducere ” amplificarea luminii prin stimularea emisiei de
radiație ” dar această denumire are la bază termenul de maser care la rândul lui este un
acronim care înseamnă Microwave Amplification by Stimulated Emission of Radiation în
traducere ” amplificarea microundelor prin stimularea emisiei de radiație ” reprezentând
un dispozitiv care funcționează în domeniu microundelor.
Albert Einstein , în anul 1916 , a formulat principiile de funcționare ale laserului,
prin a evalua consecințele legilor radi ației ale lui Max Planck, astfel introducând
conceptele de emisie stimulată și emisie spon tană.
Theodore Maiman a construit primul laser funcțional în anul 1960, având ca mediu
activ un cristal sintetic de rubin pompat cu pulsații luminoase generate de o lampă care
avea ca descărcare în xenon.
Ion I. Agârbiceanu a condus un colectiv de cercetare care a reușit în anul 1961 să
realizeze un laser pe teritoriul României.
Principiul de funcționare al laserului este format dintr -un mediu activ ce poate fi
lichid, solid sau gazos și o cavitate optică rezonantă. Cu o compoziție și parametrii bine
determinați mediul activ asimilează energie din exterior acest fapt se numește pompare.
Pomparea este realizată optic sau electric, utlizând o sursă de lumină , ca de
exemplu un flash sau chiar ș i alt laser , producând astfel o excitare a atomilor în mediul
activ și ca o consecință a acestui fapt , o parte din electro nii din atomii mediului, vor urca
pe niveluri superioare de energie. Fasciculul de lumină care tranzit ează acest mediu activ
este amplificat prin dezexcitarea stimulată a atomilor, proces în care fotonul care
interacționează cu atomul excitat provoacă apariția unui nou foton de aceeași lungime de
undă, direcție, fază și stare de polarizare. Așadar posibili tatea ca pornind de la doar un
singur foton, generat prin emisie spontană, să se obțină unui fascicul cu un număr enorm
de fotoni, având același proproetăți ca foto nul generat inițial, este crescută.
Cavitatea optică rezonantă este formată din 2 oglinzi conca ve dispuse la
extremitățile capă tului activ și are rolul de selecție a fotonilor generați pe o anumtă
direcție , mai exact pe axa optică a cavitații și de a -i recircula cât mai mult în mediul activ.

15

Timișoara 2019 Tranzitul fotonilor prin mediul activ produce dezex citarea atomilor, astfel micșorând
factorul de amplificare a l mediului optic.
Astfel se ajunge la o echilibrare activă, datorită pompării numărul ui atomilor excitați,
identic cu numărul atomilor dezexcitați prin emisie stimulată, fază în care laserul aj unge la
o intensitate con stantă. Ținând cont de faptul că în cavitatea optică și în mediul activ au
loc pierderi prin absorbție, împrăștiere, reflecție parțială, difracție, există un nivel minim,
de prag al energiei , furnizat de mediul activ pentru a se ob ține efectul laser. [9]

Fig. 3.3 Schema principială a unui dispozitiv laser

În funcție de mediul activ ș i modul de pompare a l acestuia laserul poate funcționa
în 2 moduri: -cu undă continuă ;
-cu impulsuri;
Particularitățile fasciculului laser :
Intensitate – în funcție de aplicația pentru care a fost realizat și modelul de laser,
puterea fascicului poate fi foarte diferită. Așadar, dacă puterea diodelor de tip laser
folosite pentru citirea unor CD -uri sunt de doar 5mW, în cazul dispozitivelor laser cu CO 2
adesea folosite în aplicații industriale în special pentru tăierea metalelor , puterile pot varia
între 100W – 6000W. În cercetare sau aplicații speciale se pot atinge v alori mult mai mari,

16

Timișoara 2019 recordul celui mai puternic dispoziti v cu laser fiind raportat în anul 1996 ,care avea o
putere de 1.25 PW (Petawatt=105W).
Monocromaticitate – o gama largă de emiță tori laser, care au un spectru de emisie
foarte îngust, ca rezultat a l modului lor de funcționare . Ca urmare , numărul mic de foto ni
inițiali este multiplicat prin ”copiere” exactă rezultând un număr mare de fotoni identici.
În unele cazuri spectrul poate fi atât de îngu st încât fasciculul laser își pă strează proporția
de fază pe distanțe foarte mari. Acest fapt permite utilizarea di spozitivelor laser în
metrologie, având o precizie extrem de ridicată pentru mă surarea distanțelor, prin
interferometrie.
Directivitate – lumina unei surse comune(tub fluorescent, bec cu incandescență sau
lumina solară) poate fi cu greu transformată într -un fascicul paralel c u ajutorul sistemelor
de colimare 2, lumina laser este emisă de la început sub forma unui fascicul paralel. Acest
fapt explică acțiunea cavității optice rezonante doar acei fotoni care sunt propagați cu axa
cavității.
De exemplu un re flector tradițional de luminat , orientat de pe Pămant spre Lună,
suprafața luminată de pe Lună se întinde pe 27.000 km în diametru, în comparație cu un
fasciculul unui dispozitiv cu laser cu helio -neon care luminează pe Lună o suprafață de
numai 2 km în di ametru, lumina fasciculului laser este de 13,5 ori mai concentrată în acest
caz. Utilizând emițători cu laser de performanțe ridicate, iar suprafața lunii fiind
retroreflectoare3 având posibilitatea de determinare a distanței dintre Pămant și luna cu o
precizie ridicată.
Măsuri de sănătate și securitate în muncă
Cei care utilizează echipamente cu laser trebuie să fie informați și să identifice din
care categorie face parte laser ul folosit. Acesta poate provoca pericole destul de grave
asupra operatorului uman în special la nivel ul retinei oculare și a pielii.
Emițătorii laser sunt repartizați în 4 clase distincte, această clasificare nu este
adoptată la nivel global dar se fac demersuri pentru adoptarea unui standard global în acest
sens. Utilizarea emițătorilor cu laser care reprezintă un pericol ridicat sunt necesari

2 Colimare – transformare a unui fascicul divergent sau convergent într -unul paralel, a determina o anumtă
direcție.
3 Retroreflector – dispozitiv optic care ref lectă lumina în direcție apropiată de cea incidentă.

17

Timișoara 2019 ochelari speciali de protecție care pot absorbi radiația luminoasă a lungimii de undă emisă
și permit vederea c elorlalte regiuni ale spectrului.
Clasa I este caracter istic echipamentelor industriale care au în zona de acționare a
fasciculului cu laser acoperită în totalitate, deci posibilitatea apariției unor reflexii nedorite
sunt inexistente . Această clasă este c ea mai sigură și nu necesită din partea op eratorilor
umani care utilizează echipamentul laser să poarte echipament e speciale de protecție
optică (mască sau ochelari ).
Clasa II
Clasa IIIA
Clasa IIIB
Clasa IV – sunt dispozitive laser care nu sunt prevăzute cu nici o formă de protecție
optică, fiind echip amente care pot fi ușor integrate oricărui tip de prelu crări industriale.
Aceste echipamente cu laser pot fi ușor de identificat datorită etichetei lipite pe camera
rezonantă pe care este inscripționat cuvântul OEM, alături de care se regăsește cuvântul
CLASS IV.
Emițătoarele cu laser pot emite radiații cuprinse în intervalul de 400 -700 nm.
Aceste dispozitive cu laser sunt utili zate într -o mare varietate de d omenii după cum
urmea ză:
– Metrologie ;
– Holografie;
– Geologie, seismologie și fizica atmosferei;
– Spectroscopie;
– Fotochimie;
– Fuziune nucleară;
– Microscopie;
– Aplicații militare;
– Medicină: bisturiu cu laser, înlăturarea tatuajelor, stomatologie, oftalmologie,
acupun ctură;

18

Timișoara 2019 – Industrie și comerț: prelucrări de metale si materiale textile, cititoare de coduri de bare,
imprimare;
– Aplicații industriale: gravarea cu laser, marcarea cu laser, sudarea cu laser, tăierea cu
laser, crestarea cu laser, sinterizarea selectivă cu laser, sinterizarea prin scânteie cu laser;
– Comunicații prin fibră optică;
– Înregistrarea și redarea CD -urilor și DVD -urilor;

3. Driver motoare pas cu pas
Acest circuit electronic numit driver este defapt o interfațare între placa de
dezvoltare și motoare. Placa de achiziție având în componența sa un microcontroler
sau microprocesor, tensiunea și curentul furnizate de aceasta au valori mici (tensiune
3-5v si curenți de ordinul zecilor de mA) care nu îndeplinesc cerințele motor(tensiune
12V-24V si curenți de până la câțiva Amperi ).

Fig 3.4 Schemă bloc a de comandare a motoarelor cu driver
În figura 3.4 este ilustrat cum motoarele sunt comandate prin intermediul driverului
de placa de dezvoltar e. Semnalul transmis de către placă este recepționat de către
driver care ulterior comandă motoarele. Alimentarea plăcii de dezvoltare se realizează
cu tensiunea de 5V curent continuu iar driver -ul este alimentat atât cu 5V cât și cu 12V
curent continuu, alimentarea de 5V este pentru comunicația cu placa de dezvoltare, iar
alimentare cu 12V este necesară pentru comandarea motoarelor.

19

Timișoara 2019
Practic driverul este un amplificator curent. Acestea acționează ca o punte între
placa de dezvoltare și motoare într -o un itate de comandare ale motoarelor. Driverul
este fabricat din componente discrete care sunt integrate în interiorul unui circuit
integrat. Intrarea în circuitul integrat al driveruli motorului este un semnal de curent
scăzut. Funcția circuitului este trans formarea semnalului de curent scăzut într -un
semnal de curent ridicat. Acest semnal de curent ridicat este dat apoi motorului.
Motorul poate fi un motor de curent continuu fără perii (brushless ) , motor de curent
continuu cu perii și nu în ultimul rând mot or de curent continuu pas cu pas în cazul de
față.
Avantajele folosirii driverului pentru motoare :
– funcționalitate la nivel înalt;
-performanțe sporite;
-furnizează tensiunea și curentul necesare coma ndării motoa relor;
-includ protecții impotriv a defecțiunilor apărute în circuit;
4. Placa de dezvoltare
O placă de dezvoltare cu microprocessor este o placă de circuite imprimate care
conține un microprocesor și logica minimă de suport necesară unui inginer
informatician pentru a se familiariza cu microprocesorul de pe placă și pentru a învăța
să îl programeze. De asemenea, a servit utilizatorilor microprocesorului ca o metodă
de prototipare a aplicațiilor în produse .
Spre deosebire de un sistem cu destinație generală , cum ar fi un PC , de obicei, o
placă de dezvoltare conține o mica parte hardware sau chiar deloc dedicat ă unei
interfețe de utilizator. Va avea unele dispoziții pentru a accepta și a rula un program
furnizat de utilizator, cum ar fi descărcarea unui program printr -un port serial în
memorie flash sau o formă de memorie programabilă într -un soclu din sistemele
anterioare.
Motivul pentru existența unei plăci de dezvoltare a fost doar acela de a oferi un
sistem de învățare pentru a folosi un microprocesor nou, nu pentru divertisment. Deci,
totul era inutil p entru a menține costurile scăzute .

20

Timișoara 2019 Chiar și o incintă nu a fost furnizată, nici o sursă de alimentare. Acest lucru se
datorează faptului că placa ar fi utilizată doar într -un mediu "de laborator", astfel înc ât
nu avea nevoie de o incintă, iar placa ar putea fi alimentată de o sursă tipică de
alimentare pe bancă deja dis ponibilă unui inginer electronist .

Fig. 3.5 Placă de dezvoltare cu microprocesor tip arduino uno
În figura 3.5 avem ilustrată o placa de dez voltare tip arduino uno care conține
urmatoarele:
1-Port USB pentru conexiunea cu PC -ul asigura încărcarea codului și alimentarea
plăcii cu o tensiune de 5V si un curent de 500 mA;
2-Convertor USB/TTL ATMega 16U2 -MU asigura conunicarea serială între PC și
microcontroler ;
3-Oscilator de tip cristal cu cuarț
4-Adaptor pentru alimentare suplimentară suportă tensiuni între 7 -12V, 1A;
5-Pini auxiliary
6-Porturi analogice (6)
7-Microcontroler ATMega 328 de tip SMD

21

Timișoara 2019 8-Conectori pentru pini de tip ICSP( In-Circuit Serial Programming) pentru
microcontroler ;
9-Buton RESET;
10-Porturi digitale(14 din care 6 cu funcții PWM);
11- Conectori pentru pini de tip ICSP (In-Circuit Serial Programming) pentru PC;
Microcontroler -ul are în componența sa 3 tipuri de memorii:
-2 tipuri de memorie programabilă Flash și EEPROM ;
-1 tip de memorie volatilă SRAM ;
Orice plac ă de dezvoltare poate fi programată doar în limbajul de programare al
microcontroler -ului de exemplu plăcile arduino folosesc un limbaj propriu bazat pe
limbajul CI++ care este încărcat prin protocoale specfice de comunicare iar
programarea se realizează printr -o interfață dedicată fiecărui limbaj în parte.

Fig. 3.6 Ex emplu de interfață pentru limbajul de programare Arduino

22

Timișoara 2019 Capitolul 4
Construcția standului

1. Proiectarea mecanică

În primă faza standul a fost proiectat într -un program de tip CAD ca mai apoi pe
baza modelului proiectat să fie realizat și fizic.

Fig. 4.1Modelul 3D al standului.

Baza standului este dereptunghiulară cu dimensiule 200×2 500×16 mm, scheletul
format din corinere de aluminiu cu dimensiunile de 25x25mm este fixat în 4 puncte de
bază. Scheletul este în formă de U întors format din 5 elemente:
-2 elemente care sunt fixate de baz a standului cu lungimea de 200mm;
-2 elemente fi xate independent vertical pe cele 2 elemente fixate pe baza standului cu
lungimea de 250 mm;
-1 element fixat pe cele 2 elemente verticale, care practic închide forma de U întors;

23

Timișoara 2019 Acestă variantă de construcție este una rigidă care rezista tuturor forțel or generate de
întregul sistem.

Fig. 4.2 Fotografie cu standul realizat fizic.

Toate cornierele sunt fixate c u șuruburi te tip M6 și sunt de 2 lungimi cele de
prindere a cornierelor cu baza sunt de 25mm iar cele care prind cornierele între ele sunt de
14mm. Gabaritul total al standului este 250x200x276.8 mm.

24

Timișoara 2019 2. Proiectare hardware
Circuitul imprimat sau PCB(Printed circuit board) este realizat pe un cablaj de
testare deoarece nu sunt multe componente care realizează circuitul deci traseele circ uitului
nu sunt complicate. Pe circuitul imprimat sunt urmatoarele componente electronice :
-Plăcuța de dezvolatre arduino nano care este alimentată la 5V iar comunicarea serială cu
PC-ul se realizează prin portul mini USB;

Fig. 4.3 Placuță de dezvoltare arduino nano

-Driver -ul necesar pentru comandarea motoarelor pas cu pas A4988 care are rolul
de interfațare între placa de dezvoltare arduino și motoare și este alimentat cu 5V pentru
comunicarea cu microcontroler -ul pe de -o parte iar pe cealaltă parte cu 12V pentru
comandarea motoarelor pas cu pas;

Fig. 4.4 Driver motoare A4988

25

Timișoara 2019 Restul componentelor nu fac parte din circuitul imprimat . Aceste componente
electronice sunt înafara circuitului imprimat deoarece sunt în mișcare sau necesita un regim
de răcire special pentru ca disiparea de energie sub formă de căldură este una destul de
ridicată precum este tranzistorul pentru emiterea de senmal PWM (Pulse Width
Modulation) pentru laser și laserul în sine. Aceste componente sunt urmatoarele :

-Laserul cu puterea de 1000 mW care se alimentează la 5V și cu lungimea de undă în
spectrul vizual de 405 nm ceea ce înseamnă culoarea violet care este încadrată între 400 –
450 nm

Fig. 4.5 Laser 1000mW 405nm violet

Pentru utilizarea laserului este nevoie de ochelari speciali pentru protejarea retinei
deoarece clasa din care face parte laserul este clasa IV fiind extrem de periculos chiar și în
contact cu pielea raza emisă poate produce arsuri seriose.

26

Timișoara 2019 -Tranzistorul IRFZ46N care are rolul de interfațare între placa de dezvoltare Arduino și
laser, acesta furnizând un semnal de tip PWM către laser. Acesta este fixat pe un cooler
format din radiator și un ventilator alimentat la 12V.

Fig. 4.6 Tranzistor IRFZ46N fixat pe un răcitor

Acest Tranzistor se încinge foarte tare deoarece laserul funcționează la o tensiune de 5V iar
puterea nominală fiind de 1W iar curentul absorbit este de 1 Amper, toate aceste
caracteristic i fac ca circuitul basculant al tranistorului sa oscileze foarte rapid de aici reiese
si viteza de gravare foarte mare a acestui dispozitiv.

27

Timișoara 2019 -Ansamblu l care este format din motor pas cu pas și mecanismul pinion cremalieră are
rolul de transmite rea mișcării controlate de către placa de dezvoltare Arduino interfațată de
către driver. Aceste ansamble fiind 2 vor asigura mișcarea laserului cât și a stativului pe
care se află obiectul de gravat.

Fig 4.7 Ansamblu compus din motor pas cu pas cu mecnism pinion cremalieră

Aceste ansamble provin din dezmembrarea unor unități de citire scriere a DVD –
urilor, ele sunt alimentate la 12V . Motorul pas cu pas impreună cu mecnismul pinion
cremalieră, pentru deplasarea pinionului pe distanța de 1mm sunt ne cesari 16 pași efectuați
de motor, cee ace reprezintă o precizie foarte ridicată.

28

Timișoara 2019 Schema electrică după care a fost realizat tot cablajul a fost realizat într -un program
dedicat realizării de circuite imprimate si anume fritzing.

Fig. 4.8 Schema eletrică – cablajul realizat în fritzing

Cablajul este relizat astfel:
Motoatrele pas cu pas legate la driverele specifice, si anume pentru axa x au fost
urmatoarele legaturi: bobina 1 la pinii 1A -1B, bobina 2 la pinii 2A -2B; alimentarea
driverului la sursa de tensiune la tensiunile de 5V prin înserierea pinilor MS1 -MS2 -MS3,
iar la 12V pentru motoare ; iar pinii pentru direcție DIR si pentru pași STEP au fost
conectați la pinii D5 respectiv D2 ai plăcii de dezvolatre Arduino .
Aceleași legătu ri au fost realizate si pentru motorul care deplasează axa y cu excepția
conexiunilor DIR și STEP care au fost conectate la pinii D6 respectiv D3 ai plăcii de
dezvoltare Arduino .
Laserul este conectat la transistor la colector și alimentat la 5V.
Tranzisto rul este conectat la cu baza la 2 rezistente una 47 Ώ iar cealaltă de 10k Ώ, laserul
este conectat la collector iar la emitor este conectat la pinul D11 al plăcii de dezvoltare
Arduino.
Ventilator este conectat direc la sursa de alimentare la 12V.

29

Timișoara 2019 3. Proiecta re software
Softul pentru realizarea gravării este open source realizat de către firma Laser
GRBL, pentru plăcuța de dezvoltare este o intreagă bibliotecă care comunică direct cu
aplicația Laser GRBL, astfel din interfața aplicației se introduce fotograf ie pentru
convertire în coordonate tip CNC după care se transmit datele aferente gravării.

Fig 4.9 Interfața programului Laser GRBL

Fiecare axă se poate ajusta dupa preferinte chiar si manual accesând indicatorii din
stânga jos. Este un soft intuitiv si ușor de utilizat.
Conectarea dintre Interfața programului si placa de dezvoltare adruino se realizează
prin accesarea aceluiași port USB.
Codul sursă este prezentat în anexe.

30

Timișoara 2019 Capitolul 5
Concluzii

Acest dispozitiv poate îndeplini sarcina de a grava eticheta , de a personaliza lucruri
personale etc. Pentru utilizarea lui este nevoie de familiarizarea cu interfața și de
construirea efectivă a standului.
Dificultatea construirii acestui stand este una medie dar este un dispo zitiv foarte complex
care necesită atenție maximă la t oți pașii care trebuie parcurși temeinic.
Cu această alternativă se pot evita pro blemele etichetării, dar investiția la început este una
destul de semnificativă, în timp i nvestiția este amortizată.

31

Timișoara 2019 Bibliografie
https://www.instructables.com/id/Arduino -CNC -Laser -Enrgaver -From -DVD -Drive
data accesării 10.06.2019
[1]-[2]http://webbut.unitbv.ro/Carti%20on -line/BSM/Dumitriu_BSM_2006.pdf data
accesării:11.06.2019
[3] https://ro.wik ipedia.org/wiki/Gravur%C4%83_laser data accesării: 13.06.2019
Liviu Morar, Emilia Câmpean, Editura Utpress, Cluj -Napoca 20015, Programarea
echipamentelor CNC
[4]-[5]https://www.ttonline.ro/revista/masini -unelte/avantajele -utilizarii -masinilor -unelte –
cu-comanda -numerica data accesării 15.06.2019
Patrick Hood -Daniel, James Kelly, Editura Apress,2009 Buil d Your Own CNC Machine
http://www.rasfoiesc.com/inginerie/electronica/Un -ghid-al-utilizatorului -pent16.php
data accesării:19.06.2019
[6]-[7] http://mec.upt.ro/dolga/cap1.pdf data accesării 20.06.2019
https://en.wikipedia.org/wiki/Microprocessor_devel opment_board data accesării: 20.06.2019
Dan C.Dumitra ș, Editura All, 2004, Ingineria fasciculelor laser
[9] https://ro.wikipedia.org/wiki/Laser data accesării 21.06.2019
[10] http://lasergrbl.com/en/

32

Timișoara 2019 Anexe

1.Desenul 2d de gabarit al standului:

2.Codul folosit

/*
config.h – compile time configuration
Part of Grbl

Copyright (c) 2012 -2016 Sungeun K. Jeon for Gnea Research LLC
Copyright (c) 2009 -2011 Simen Svale Skogsrud

Grbl is free software: you can redistribute it and/or modify

33

Timișoara 2019 it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Grbl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A P ARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/

// This file contains compile -time configurations for Grbl's internal system. For the most
part,
// users will not need to directly modify these, but they are here for specific needs, i.e.
// performance tuning or adjusting to non -typical machines.

// IMPORTANT: Any changes here requires a full re -compiling of the source code to
propagate them.

#ifndef config_h
#define config_h
#include "grbl.h" // For Arduino IDE compatibility.

// Define CPU pin map and default settings.
// NOTE: OEMs can avoid the need to ma intain/update the defaults.h and cpu_map.h files
and use only
// one configuration file by placing their specific defaults and pin map at the bottom of this
file.
// If doing so, simply comment out these two defines and see instructions below.

34

Timișoara 2019 #define DEFA ULTS_GENERIC
#define CPU_MAP_ATMEGA328P // Arduino Uno CPU

// Serial baud rate
// #define BAUD_RATE 230400
#define BAUD_RATE 115200

// Define realtime command special characters. These characters are 'picked -off' directly
from the
// serial read data str eam and are not passed to the grbl line execution parser. Select
characters
// that do not and must not exist in the streamed g -code program. ASCII control characters
may be
// used, if they are available per user setup. Also, extended ASCII codes (>127), which are
never in
// g-code programs, maybe selected for interface programs.
// NOTE: If changed, manually update help message in report.c.

#define CMD_RESET 0x18 // ctrl -x.
#define CMD_STATUS_REPORT '?'
#define CMD_CYCLE_START '~'
#define CMD_FEED_HOLD '!'

// NOTE: All override realtime commands must be in the extended ASCII character set,
starting
// at character value 128 (0x80) and up to 255 (0xFF). If the normal set of realtime
commands,
// such as status reports, feed hold, reset, and cycle start, are moved to the extended set
// space, serial.c's RX ISR will need to be modified to accomodate the change.
// #define CMD_RESET 0x80
// #define CMD_STATUS_REPORT 0x81
// #define CMD_CYCLE_START 0x82
// #define CMD_FEED_HOLD 0x83

35

Timișoara 2019 #define CMD_SAFETY_DOOR 0 x84
#define CMD_JOG_CANCEL 0x85
#define CMD_DEBUG_REPORT 0x86 // Only when DEBUG enabled, sends debug
report in '{}' braces.
#define CMD_FEED_OVR_RESET 0x90 // Restores feed override value to 100%.
#define CMD_FEED_OVR_COARSE_PLUS 0x91
#define CMD _FEED_OVR_COARSE_MINUS 0x92
#define CMD_FEED_OVR_FINE_PLUS 0x93
#define CMD_FEED_OVR_FINE_MINUS 0x94
#define CMD_RAPID_OVR_RESET 0x95 // Restores rapid override value to 100%.
#define CMD_RAPID_OVR_MEDIUM 0x96
#define CMD_RAPID_OVR_LOW 0x97
// #de fine CMD_RAPID_OVR_EXTRA_LOW 0x98 // *NOT SUPPORTED*
#define CMD_SPINDLE_OVR_RESET 0x99 // Restores spindle override value to
100%.
#define CMD_SPINDLE_OVR_COARSE_PLUS 0x9A
#define CMD_SPINDLE_OVR_COARSE_MINUS 0x9B
#define CMD_SPINDLE_OVR_FINE_PLUS 0x9C
#define CMD_SPINDLE_OVR_FINE_MINUS 0x9D
#define CMD_SPINDLE_OVR_STOP 0x9E
#define CMD_COOLANT_FLOOD_OVR_TOGGLE 0xA0
#define CMD_COOLANT_MIST_OVR_TOGGLE 0xA1

// If homing is enabled, homing init lock sets Grbl into an alarm state upon power up. This
forces
// the user to perform the homing cycle (or override the locks) before doing anything else.
This is
// mainly a safety feature to remind the user to home, since position is unknown to Grbl.
#define HOMING_INIT_LOCK // Comment to disable

// Define th e homing cycle patterns with bitmasks. The homing cycle first performs a
search mode

36

Timișoara 2019 // to quickly engage the limit switches, followed by a slower locate mode, and finished by a
short
// pull -off motion to disengage the limit switches. The following HOMING _CYCLE_x
defines are executed
// in order starting with suffix 0 and completes the homing routine for the specified -axes
only. If
// an axis is omitted from the defines, it will not home, nor will the system update its
position.
// Meaning that this allows for users with non -standard cartesian machines, such as a lathe
(x then z,
// with no y), to configure the homing cycle behavior to their needs.
// NOTE: The homing cycle is designed to allow sharing of limit pins, if the axes are not in
the same
// cycle , but this requires some pin settings changes in cpu_map.h file. For example, the
default homing
// cycle can share the Z limit pin with either X or Y limit pins, since they are on different
cycles.
// By sharing a pin, this frees up a precious IO pin for other purposes. In theory, all axes
limit pins
// may be reduced to one pin, if all axes are homed with seperate cycles, or vice versa, all
three axes
// on separate pin, but homed in one cycle. Also, it should be noted that the function of
hard limits
// will not be affected by pin sharing.
// NOTE: Defaults are set for a traditional 3 -axis CNC machine. Z -axis first to clear,
followed by X & Y.
#define HOMING_CYCLE_0 (1<<Z_AXIS) // REQUIRED: First move Z to
clear workspace.
#define HOMING_CY CLE_1 ((1<<X_AXIS)|(1<<Y_AXIS)) // OPTIONAL: Then move
X,Y at the same time.
// #define HOMING_CYCLE_2 // OPTIONAL: Uncomment and add axes
mask to enable

// NOTE: The following are two examples to setup homing for 2 -axis machines.
// #define HOMING_CYCLE_0 ((1<<X_AXIS)|(1<<Y_AXIS)) // NOT COMPATIBLE
WITH COREXY: Homes both X -Y in one cycle.

37

Timișoara 2019
// #define HOMING_CYCLE_0 (1<<X_AXIS) // COREXY COMPATIBLE: First home
X
// #define HOMING_CYCLE_1 (1<<Y_AXIS) // COREXY COMPATIBLE: Then home
Y

// Number of homing cycles performed after when the machine initially jogs to limit
switches.
// This help in preventing overshoot and should improve repeatability. This value should be
one or
// greater.
#define N_HOMING_LOCATE_CYCLE 1 // Integer (1-128)

// Enables single axis homing commands. $HX, $HY, and $HZ for X, Y, and Z -axis
homing. The full homing
// cycle is still invoked by the $H command. This is disabled by default. It's here only to
address
// users that need to switch between a two -axis and three -axis machine. This is actually
very rare.
// If you have a two -axis machine, DON'T USE THIS. Instead, just alter the homing cycle
for two -axes.
// #define HOMING_SINGLE_AXIS_COMMANDS // Default disabled. Uncomment to
enable.

// After homing , Grbl will set by default the entire machine space into negative space, as is
typical
// for professional CNC machines, regardless of where the limit switches are located.
Uncomment this
// define to force Grbl to always set the machine origin at the home d location despite
switch orientation.
// #define HOMING_FORCE_SET_ORIGIN // Uncomment to enable.

// Number of blocks Grbl executes upon startup. These blocks are stored in EEPROM,
where the size

38

Timișoara 2019 // and addresses are defined in settings.h. With the curren t settings, up to 2 startup blocks
may
// be stored and executed in order. These startup blocks would typically be used to set the
g-code
// parser state depending on user preferences.
#define N_STARTUP_LINE 2 // Integer (1 -2)

// Number of floating decimal points printed by Grbl for certain value types. These settings
are
// determined by realistic and commonly observed values in CNC machines. For example,
position
// values cannot be less than 0.001mm or 0.0001in, because machines can not be physica lly
more
// precise this. So, there is likely no need to change these, but you can if you need to here.
// NOTE: Must be an integer value from 0 to ~4. More than 4 may exhibit round -off errors.
#define N_DECIMAL_COORDVALUE_INCH 4 // Coordinate or position value in inches
#define N_DECIMAL_COORDVALUE_MM 3 // Coordinate or position value in mm
#define N_DECIMAL_RATEVALUE_INCH 1 // Rate or velocity value in in/min
#define N_DECIMAL_RATEVALUE_MM 0 // Rate or velocity value in mm/min
#define N_DECIMAL_SETT INGVALUE 3 // Decimals for floating point setting values
#define N_DECIMAL_RPMVALUE 0 // RPM value in rotations per min.

// If your machine has two limits switches wired in parallel to one axis, you will need to
enable
// this feature. Since the two switches are sharing a single pin, there is no way for Grbl to
tell
// which one is enabled. This option only effects homing, where if a limit is engaged, Grbl
will
// alarm out and force the user to manually disengage the limit switch. Otherwise, if you
have one
// limit switch for each axis, don't enable this option. By keeping it disabled, you can
perform a
// homing cycle while on the limit switch and not have to move the machine off of it.
// #define LIMITS_TWO_SWITCHES_ON_AXES

39

Timișoara 2019
// Allows GRBL to track and report gcode line numbers. Enabling this means that the
planning buffer
// goes from 16 to 15 to make room for the additional line number data in the plan_block_t
struct
// #define USE_LINE_NUMBERS // Disabled by default. Uncomment to enable.

// Upon a successful probe cycle, this option provides immediately feedback of the probe
coordinates
// through an automatically generated message. If disabled, users can still access the last
probe
// coordinates through Grbl '$#' print parameters.
#define MESSAGE_PROBE_COORDINATES // Enabled by default. Comment to disable.

// Enables a second coolant control pin via the mist coolant g -code command M7 on the
Arduino Uno
// analog pin 4. Only use this option if you require a second coolant control pin.
// NOTE: The M8 flood coolant control pin on analog pin 3 will still be functional
regardless.
// #define ENABLE_M7 // Disabled by default. Uncomment to enable.

// This option causes the feed hold input to act as a safety door switch. A safety door, when
triggered,
// immediately forces a feed hold and then safely de -energizes the machine. Resuming is
blocked until
// the safety door is re -engaged. When it is, Grbl will re -energize the machine and then
resume on the
// previous tool path, as if nothing happen ed.
// #define ENABLE_SAFETY_DOOR_INPUT_PIN // Default disabled. Uncomment to
enable.

// After the safety door switch has been toggled and restored, this setting sets the power -up
delay
// between restoring the spindle and coolant and resuming the cycle.

40

Timișoara 2019 #define SAFETY_DOOR_SPINDLE_DELAY 4.0 // Float (seconds)
#define SAFETY_DOOR_COOLANT_DELAY 1.0 // Float (seconds)

// Enable CoreXY kinematics. Use ONLY with CoreXY machines.
// IMPORTANT: If homing is enabled, you must reconfigure the homing cycle #define s
above to
// #define HOMING_CYCLE_0 (1<<X_AXIS) and #define HOMING_CYCLE_1
(1<<Y_AXIS)
// NOTE: This configuration option alters the motion of the X and Y axes to principle of
operation
// defined at (http://corexy.com/theory.html). Motors are assumed to positioned and wired
exactly as
// described, if not, motions may move in strange directions. Grbl requires the CoreXY A
and B motors
// have the same steps per mm internally.
// #define COREXY // Default disabled. Uncomment to enable.

// Inverts pin logi c of the control command pins based on a mask. This essentially means
you can use
// normally -closed switches on the specified pins, rather than the default normally -open
switches.
// NOTE: The top option will mask and invert all control pins. The bottom o ption is an
example of
// inverting only two control pins, the safety door and reset. See cpu_map.h for other bit
definitions.
// #define INVERT_CONTROL_PIN_MASK CONTROL_MASK // Default disabled.
Uncomment to disable.
// #define INVERT_CONTROL_PIN_MASK
((1<<CONTROL_SAFETY_DOOR_BIT)|(1<<CONTROL_RESET_BIT)) // Default
disabled.

// Inverts select limit pin states based on the following mask. This effects all limit pin
functions,
// such as hard limits and homing. However, this is different from overall invert limits
setting.

41

Timișoara 2019 // This build option will invert only the limit pins defined here, and then the invert limits
setting
// will be applied to all of them. This is useful when a user has a mixed set of limit pins
with both
// normally -open(NO) and normally -closed(NC) switches installed on their machine.
// NOTE: PLEASE DO NOT USE THIS, unless you have a situation that needs it.
// #define INVERT_LIMIT_PIN_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)) //
Default disabled. Uncomment to enable.

// Inverts the spindl e enable pin from low -disabled/high -enabled to low -enabled/high –
disabled. Useful
// for some pre -built electronic boards.
// NOTE: If VARIABLE_SPINDLE is enabled(default), this option has no effect as the
PWM output and
// spindle enable are combined to on e pin. If you need both this option and spindle speed
PWM,
// uncomment the config option USE_SPINDLE_DIR_AS_ENABLE_PIN below.
// #define INVERT_SPINDLE_ENABLE_PIN // Default disabled. Uncomment to enable.

// Inverts the selected coolant pin from low -disabled/high -enabled to low -enabled/high –
disabled. Useful
// for some pre -built electronic boards.
// #define INVERT_COOLANT_FLOOD_PIN // Default disabled. Uncomment to enable.
// #define INVERT_COOLANT_MIST_PIN // Default disabled. Note: Enable M7 mist
coola nt in config.h

// When Grbl powers -cycles or is hard reset with the Arduino reset button, Grbl boots up
with no ALARM
// by default. This is to make it as simple as possible for new users to start using Grbl.
When homing
// is enabled and a user has insta lled limit switches, Grbl will boot up in an ALARM state
to indicate
// Grbl doesn't know its position and to force the user to home before proceeding. This
option forces

42

Timișoara 2019 // Grbl to always initialize into an ALARM state regardless of homing or not. This op tion
is more for
// OEMs and LinuxCNC users that would like this power -cycle behavior.
// #define FORCE_INITIALIZATION_ALARM // Default disabled. Uncomment to
enable.

// At power -up or a reset, Grbl will check the limit switch states to ensure they are not
active
// before initialization. If it detects a problem and the hard limits setting is enabled, Grbl
will
// simply message the user to check the limits and enter an alarm state, rather than idle.
Grbl will
// not throw an alarm message.
#define CHECK _LIMITS_AT_INIT

// –––––––––––––––––––––––––––––
// ADVANCED CONFIGURATION OPTIONS:

// Enables code for debugging purposes. Not for general use and always in constant flux.
// #define DEBUG // Unc omment to enable. Default disabled.

// Configure rapid, feed, and spindle override settings. These values define the max and
min
// allowable override values and the coarse and fine increments per command received.
Please
// note the allowable values in t he descriptions following each define.
#define DEFAULT_FEED_OVERRIDE 100 // 100%. Don't change this value.
#define MAX_FEED_RATE_OVERRIDE 200 // Percent of programmed feed rate
(100-255). Usually 120% or 200%
#define MIN_FEED_RATE_OVERRI DE 10 // Percent of programmed feed rate (1 –
100). Usually 50% or 1%
#define FEED_OVERRIDE_COARSE_INCREMENT 10 // (1 -99). Usually 10%.
#define FEED_OVERRIDE_FINE_INCREMENT 1 // (1 -99). Usually 1%.

43

Timișoara 2019 #define DEFAULT_RAPID_OVERRIDE 100 // 100 %. Don't change this value.
#define RAPID_OVERRIDE_MEDIUM 50 // Percent of rapid (1 -99). Usually 50%.
#define RAPID_OVERRIDE_LOW 25 // Percent of rapid (1 -99). Usually 25%.
// #define RAPID_OVERRIDE_EXTRA_LOW 5 // *NOT SUPPORTED* Percent of
rapid (1-99). Usually 5%.

#define DEFAULT_SPINDLE_SPEED_OVERRIDE 100 // 100%. Don't change this
value.
#define MAX_SPINDLE_SPEED_OVERRIDE 200 // Percent of programmed spindle
speed (100 -255). Usually 200%.
#define MIN_SPINDLE_SPEED_OVERRIDE 10 // Percent of programmed spindle
speed (1 -100). Usually 10%.
#define SPINDLE_OVERRIDE_COARSE_INCREMENT 10 // (1 -99). Usually 10%.
#define SPINDLE_OVERRIDE_FINE_INCREMENT 1 // (1 -99). Usually 1%.

// When a M2 or M30 program end command is executed, m ost g -code states are restored
to their defaults.
// This compile -time option includes the restoring of the feed, rapid, and spindle speed
override values
// to their default values at program end.
#define RESTORE_OVERRIDES_AFTER_PROGRAM_END // Default ena bled.
Comment to disable.

// The status report change for Grbl v1.1 and after also removed the ability to
disable/enable most data
// fields from the report. This caused issues for GUI developers, who've had to manage
several scenarios
// and configuratio ns. The increased efficiency of the new reporting style allows for all data
fields to
// be sent without potential performance issues.
// NOTE: The options below are here only provide a way to disable certain data fields if a
unique
// situation demands i t, but be aware GUIs may depend on this data. If disabled, it may not
be compatible.
#define REPORT_FIELD_BUFFER_STATE // Default enabled. Comment to disable.

44

Timișoara 2019 #define REPORT_FIELD_PIN_STATE // Default enabled. Comment to disable.
#define REPORT_FIELD_CURRE NT_FEED_SPEED // Default enabled. Comment to
disable.
#define REPORT_FIELD_WORK_COORD_OFFSET // Default enabled. Comment to
disable.
#define REPORT_FIELD_OVERRIDES // Default enabled. Comment to disable.
#define REPORT_FIELD_LINE_NUMBERS // Default enabled . Comment to disable.

// Some status report data isn't necessary for realtime, only intermittently, because the
values don't
// change often. The following macros configures how many times a status report needs to
be called before
// the associated data i s refreshed and included in the status report. However, if one of these
value
// changes, Grbl will automatically include this data in the next status report, regardless of
what the
// count is at the time. This helps reduce the communication overhead invo lved with high
frequency reporting
// and agressive streaming. There is also a busy and an idle refresh count, which sets up
Grbl to send
// refreshes more often when its not doing anything important. With a good GUI, this data
doesn't need
// to be refreshed very often, on the order of a several seconds.
// NOTE: WCO refresh must be 2 or greater. OVR refresh must be 1 or greater.
#define REPORT_OVR_REFRESH_BUSY_COUNT 20 // (1 -255)
#define REPORT_OVR_REFRESH_IDLE_COUNT 10 // (1 -255) Must be less tha n or
equal to the busy count
#define REPORT_WCO_REFRESH_BUSY_COUNT 30 // (2 -255)
#define REPORT_WCO_REFRESH_IDLE_COUNT 10 // (2 -255) Must be less than or
equal to the busy count

// The temporal resolution of the acceleration management subsystem. A high er number
gives smoother
// acceleration, particularly noticeable on machines that run at very high feedrates, but may
negatively

45

Timișoara 2019 // impact performance. The correct value for this parameter is machine dependent, so it's
advised to
// set this only as high as needed. Approximate successful values can widely range from 50
to 200 or more.
// NOTE: Changing this value also changes the execution time of a segment in the step
segment buffer.
// When increasing this value, this stores less overall time in the segm ent buffer and vice
versa. Make
// certain the step segment buffer is increased/decreased to account for these changes.
#define ACCELERATION_TICKS_PER_SECOND 100

// Adaptive Multi -Axis Step Smoothing (AMASS) is an advanced feature that does what its
name implies,
// smoothing the stepping of multi -axis motions. This feature smooths motion particularly
at low step
// frequencies below 10kHz, where the aliasing between axes of multi -axis motions can
cause audible
// noise and shake your machine. At even lowe r step frequencies, AMASS adapts and
provides even better
// step smoothing. See stepper.c for more details on the AMASS system works.
#define ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING // Default enabled. Comment
to disable.

// Sets the maximum step rate allowe d to be written as a Grbl setting. This option enables
an error
// check in the settings module to prevent settings values that will exceed this limitation.
The maximum
// step rate is strictly limited by the CPU speed and will change if something other th an an
AVR running
// at 16MHz is used.
// NOTE: For now disabled, will enable if flash space permits.
// #define MAX_STEP_RATE_HZ 30000 // Hz

// By default, Grbl sets all input pins to normal -high operation with their internal pull -up
resistors

46

Timișoara 2019 // enabled. This simplifies the wiring for users by requiring only a switch connected to
ground,
// although its recommended that users take the extra step of wiring in low -pass filter to
reduce
// electrical noise detected by the pin. If the user inverts the pin in Grbl settings, this just
flips
// which high or low reading indicates an active signal. In normal operation, this means the
user
// needs to connect a normal -open switch, but if inverted, this means the user should
connect a
// normal -closed switch .
// The following options disable the internal pull -up resistors, sets the pins to a normal -low
// operation, and switches must be now connect to Vcc instead of ground. This also flips
the meaning
// of the invert pin Grbl setting, where an inverted setti ng now means the user should
connect a
// normal -open switch and vice versa.
// NOTE: All pins associated with the feature are disabled, i.e. XYZ limit pins, not
individual axes.
// WARNING: When the pull -ups are disabled, this requires additional wiring w ith pull –
down resistors!
//#define DISABLE_LIMIT_PIN_PULL_UP
//#define DISABLE_PROBE_PIN_PULL_UP
//#define DISABLE_CONTROL_PIN_PULL_UP

// Sets which axis the tool length offset is applied. Assumes the spindle is always parallel
with
// the selected axis w ith the tool oriented toward the negative direction. In other words, a
positive
// tool length offset value is subtracted from the current location.
#define TOOL_LENGTH_OFFSET_AXIS Z_AXIS // Default z -axis. Valid values are
X_AXIS, Y_AXIS, or Z_AXIS.

// Enables variable spindle output voltage for different RPM values. On the Arduino Uno,
the spindle

47

Timișoara 2019 // enable pin will output 5V for maximum RPM with 256 intermediate levels and 0V when
disabled.
// NOTE: IMPORTANT for Arduino Unos! When enabled, the Z -limit pin D11 and
spindle enable pin D12 switch!
// The hardware PWM output on pin D11 is required for variable spindle output voltages.
#define VARIABLE_SPINDLE // Default enabled. Comment to disable.

// Used by variable spindle output only. This forces the PWM output to a minimum duty
cycle when enabled.
// The PWM pin will still read 0V when the spindle is disabled. Most users will not need
this option, but
// it may be useful in certain scenarios. This mini mum PWM settings coincides with the
spindle rpm minimum
// setting, like rpm max to max PWM. This is handy if you need a larger voltage difference
between 0V disabled
// and the voltage set by the minimum PWM for minimum rpm. This difference is 0.02V
per P WM value. So, when
// minimum PWM is at 1, only 0.02 volts separate enabled and disabled. At PWM 5, this
would be 0.1V. Keep
// in mind that you will begin to lose PWM resolution with increased minimum PWM
values, since you have less
// and less range over the total 255 PWM levels to signal different spindle speeds.
// NOTE: Compute duty cycle at the minimum PWM by this equation: (% duty
cycle)=(SPINDLE_PWM_MIN_VALUE/255)*100
// #define SPINDLE_PWM_MIN_VALUE 5 // Default disabled. Uncomment to enable.
Must be greater than zero. Integer (1 -255).

// By default on a 328p(Uno), Grbl combines the variable spindle PWM and the enable into
one pin to help
// preserve I/O pins. For certain setups, these may need to be separate pins. This configure
option uses
// the spindle direction pin(D13) as a separate spindle enable pin along with spindle speed
PWM on pin D11.
// NOTE: This configure option only works with VARIABLE_SPINDLE enabled and a
328p processor (Uno).

48

Timișoara 2019 // NOTE: Without a direction pin, M4 will not have a p in output to indicate a difference
with M3.
// NOTE: BEWARE! The Arduino bootloader toggles the D13 pin when it powers up. If
you flash Grbl with
// a programmer (you can use a spare Arduino as "Arduino as ISP". Search the web on how
to wire this.),
// this D13 LED toggling should go away. We haven't tested this though. Please report how
it goes!
// #define USE_SPINDLE_DIR_AS_ENABLE_PIN // Default disabled. Uncomment to
enable.

// Alters the behavior of the spindle enable pin with the
USE_SPINDLE_DIR_AS_E NABLE_PIN option . By default,
// Grbl will not disable the enable pin if spindle speed is zero and M3/4 is active, but still
sets the PWM
// output to zero. This allows the users to know if the spindle is active and use it as an
additional control
// inp ut. However, in some use cases, user may want the enable pin to disable with a zero
spindle speed and
// re-enable when spindle speed is greater than zero. This option does that.
// NOTE: Requires USE_SPINDLE_DIR_AS_ENABLE_PIN to be enabled.
// #define SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED // Default disabled.
Uncomment to enable.

// With this enabled, Grbl sends back an echo of the line it has received, which has been
pre-parsed (spaces
// removed, capitalized letters, no comments) and is to be immediatel y executed by Grbl.
Echoes will not be
// sent upon a line buffer overflow, but should for all normal lines sent to Grbl. For
example, if a user
// sendss the line 'g1 x1.032 y2.45 (test comment)', Grbl will echo back in the form '[echo:
G1X1.032Y2.45]'.
// NOTE: Only use this for debugging purposes!! When echoing, this takes up valuable
resources and can effect
// performance. If absolutely needed for normal operation, the serial write buffer should be
greatly increased

49

Timișoara 2019 // to help minimize transmission wai ting within the serial write protocol.
// #define REPORT_ECHO_LINE_RECEIVED // Default disabled. Uncomment to enable.

// Minimum planner junction speed. Sets the default minimum junction speed the planner
plans to at
// every buffer block junction, except for starting from rest and end of the buffer, which are
always
// zero. This value controls how fast the machine moves through junctions with no regard
for acceleration
// limits or angle between neighboring block line move directions. This is useful for
machines that can't
// tolerate the tool dwelling for a split second, i.e. 3d printers or laser cutters. If used, this
value
// should not be much greater than zero or to the minimum value necessary for the machine
to work.
#define MINIMUM_JUNCTION_SPEED 0 .0 // (mm/min)

// Sets the minimum feed rate the planner will allow. Any value below it will be set to this
minimum
// value. This also ensures that a planned motion always completes and accounts for any
floating -point
// round -off errors. Although not re commended, a lower value than 1.0 mm/min will likely
work in smaller
// machines, perhaps to 0.1mm/min, but your success may vary based on multiple factors.
#define MINIMUM_FEED_RATE 1.0 // (mm/min)

// Number of arc generation iterations by small angle ap proximation before exact arc
trajectory
// correction with expensive sin() and cos() calcualtions. This parameter maybe decreased
if there
// are issues with the accuracy of the arc generations, or increased if arc execution is
getting
// bogged down by to o many trig calculations.
#define N_ARC_CORRECTION 12 // Integer (1 -255)

50

Timișoara 2019 // The arc G2/3 g -code standard is problematic by definition. Radius -based arcs have
horrible numerical
// errors when arc at semi -circles(pi) or full -circles(2*pi). Offset -based arcs are much more
accurate
// but still have a problem when arcs are full -circles (2*pi). This define accounts for the
floating
// point issues when offset -based arcs are commanded as full circles, but get interpreted as
extremely
// small arcs with aroun d machine epsilon (1.2e -7rad) due to numerical round -off and
precision issues.
// This define value sets the machine epsilon cutoff to determine if the arc is a full -circle or
not.
// NOTE: Be very careful when adjusting this value. It should always be gre ater than 1.2e –
7 but not too
// much greater than this. The default setting should capture most, if not all, full arc error
situations.
#define ARC_ANGULAR_TRAVEL_EPSILON 5E -7 // Float (radians)

// Time delay increments performed during a dwell. The defau lt value is set at 50ms, which
provides
// a maximum time delay of roughly 55 minutes, more than enough for most any
application. Increasing
// this delay will increase the maximum dwell time linearly, but also reduces the
responsiveness of
// run -time com mand executions, like status reports, since these are performed between
each dwell
// time step. Also, keep in mind that the Arduino delay timer is not very accurate for long
delays.
#define DWELL_TIME_STEP 50 // Integer (1 -255) (milliseconds)

// Creates a delay between the direction pin setting and corresponding step pulse by
creating
// another interrupt (Timer2 compare) to manage it. The main Grbl interrupt (Timer1
compare)
// sets the direction pins, and does not immediately set the stepper pins, as it would in
// normal operation. The Timer2 compare fires next to set the stepper pins after the step

51

Timișoara 2019 // pulse delay time, and Timer2 overflow will complete the step pulse, except now delayed
// by the step pulse time plus the step pulse delay. (Thanks langw adt for the idea!)
// NOTE: Uncomment to enable. The recommended delay must be > 3us, and, when added
with the
// user -supplied step pulse time, the total time must not exceed 127us. Reported successful
// values for certain setups have ranged from 5 to 20 us.
// #define STEP_PULSE_DELAY 10 // Step pulse delay in microseconds. Default
disabled.

// The number of linear motions in the planner buffer to be planned at any give time. The
vast
// majority of RAM that Grbl uses is based on this buffer size. Only increase if there is
extra
// available RAM, like when re -compiling for a Mega2560. Or decrease if the Arduino
begins to
// crash due to the lack of available RAM or if the CPU is having trouble keeping up with
planning
// new incoming motions as they are executed.
// #define BLOCK_BUFFER_SIZE 16 // Uncomment to override default in planner.h.

// Governs the size of the intermediary step segment buffer between the step execution
algorithm
// and the planner blocks. Each segment is set of steps executed at a constant velocity over
a
// fixed time defined by ACCELERATION_TICKS_PER_SECOND. They are computed
such that the planner
// block velocity profile is traced exactly. The size of this buffer governs how much step
// execution lead time there is for other G rbl processes have to compute and do their thing
// before having to come back and refill this buffer, currently at ~50msec of step moves.
// #define SEGMENT_BUFFER_SIZE 6 // Uncomment to override default in stepper.h.

// Line buffer size from the serial input stream to be executed. Also, governs the size of
// each of the startup blocks, as they are each stored as a string of this size. Make sure

52

Timișoara 2019 // to account for the available EEPROM at the defined memory address in settings.h and
for
// the number of de sired startup blocks.
// NOTE: 80 characters is not a problem except for extreme cases, but the line buffer size
// can be too small and g -code blocks can get truncated. Officially, the g -code standards
// support up to 256 characters. In future versions, this default will be increased, when
// we know how much extra memory space we can re -invest into this.
// #define LINE_BUFFER_SIZE 80 // Uncomment to override default in protocol.h

// Serial send and receive buffer size. The receive buffer is often used as another streaming
// buffer to store incoming blocks to be processed by Grbl when its ready. Most streaming
// interfaces will character count and track each block send to each block response. So,
// increase the receive buffer if a deeper receive buffer is needed for streaming and avaiable
// memory allows. The send buffer primarily handles messages in Grbl. Only increase if
large
// messages are sent and Grbl begins to stall, waiting to send the rest of the message.
// NOTE: Grbl generates an aver age status report in about 0.5msec, but the serial TX
stream at
// 115200 baud will take 5 msec to transmit a typical 55 character report. Worst case
reports are
// around 90 -100 characters. As long as the serial TX buffer doesn't get continually maxed,
Grbl
// will continue operating efficiently. Size the TX buffer around the size of a worst -case
report.
// #define RX_BUFFER_SIZE 128 // (1 -254) Uncomment to override defaults in serial.h
// #define TX_BUFFER_SIZE 100 // (1 -254)

// A simple software debounc ing feature for hard limit switches. When enabled, the
interrupt
// monitoring the hard limit switch pins will enable the Arduino's watchdog timer to re –
check
// the limit pin state after a delay of about 32msec. This can help with CNC machines with
// problematic false triggering of their hard limit switches, but it WILL NOT fix issues with

53

Timișoara 2019 // electrical interference on the signal cables from external sources. It's recommended to
first
// use shielded signal cables with their shielding connected to gro und (old USB/computer
cables
// work well and are cheap to find) and wire in a low -pass circuit into each limit pin.
// #define ENABLE_SOFTWARE_DEBOUNCE // Default disabled. Uncomment to
enable.

// Configures the position after a probing cycle during Grb l's check mode. Disabled sets
// the position to the probe target, when enabled sets the position to the start position.
// #define SET_CHECK_MODE_PROBE_TO_START // Default disabled. Uncomment to
enable.

// Force Grbl to check the state of the hard limit switches when the processor detects a pin
// change inside the hard limit ISR routine. By default, Grbl will trigger the hard limits
// alarm upon any pin change, since bouncing switches can cause a state check like this to
// misread the pin. When hard li mits are triggered, they should be 100% reliable, which is
the
// reason that this option is disabled by default. Only if your system/electronics can
guarantee
// that the switches don't bounce, we recommend enabling this option. This will help
prevent
// triggering a hard limit when the machine disengages from the switch.
// NOTE: This option has no effect if SOFTWARE_DEBOUNCE is enabled.
// #define HARD_LIMIT_FORCE_STATE_CHECK // Default disabled. Uncomment to
enable.

// Adjusts homing cycle search and l ocate scalars. These are the multipliers used by Grbl's
// homing cycle to ensure the limit switches are engaged and cleared through each phase of
// the cycle. The search phase uses the axes max -travel setting times the
SEARCH_SCALAR to
// determine dista nce to look for the limit switch. Once found, the locate phase begins and
// uses the homing pull -off distance setting times the LOCATE_SCALAR to pull -off and
re-engage

54

Timișoara 2019 // the limit switch.
// NOTE: Both of these values must be greater than 1.0 to ensure p roper function.
// #define HOMING_AXIS_SEARCH_SCALAR 1.5 // Uncomment to override defaults
in limits.c.
// #define HOMING_AXIS_LOCATE_SCALAR 10.0 // Uncomment to override defaults
in limits.c.

// Enable the '$RST=*', '$RST=$', and '$RST=#' eeprom restor e commands. There are
cases where
// these commands may be undesirable. Simply comment the desired macro to disable it.
// NOTE: See SETTINGS_RESTORE_ALL macro for customizing the `$RST=*`
command.
#define ENABLE_RESTORE_EEPROM_WIPE_ALL // '$RST=*' Default enabled.
Comment to disable.
#define ENABLE_RESTORE_EEPROM_DEFAULT_SETTINGS // '$RST=$' Default
enabled. Comment to disable.
#define ENABLE_RESTORE_EEPROM_CLEAR_PARAMETERS // '$RST=#' Default
enabled. Comment to disable.

// Defines the EEPROM dat a restored upon a settings version change and `$RST=*`
command. Whenever the
// the settings or other EEPROM data structure changes between Grbl versions, Grbl will
automatically
// wipe and restore the EEPROM. This macro controls what data is wiped and re stored.
This is useful
// particularily for OEMs that need to retain certain data. For example, the BUILD_INFO
string can be
// written into the Arduino EEPROM via a seperate .INO sketch to contain product data.
Altering this
// macro to not restore the bu ild info EEPROM will ensure this data is retained after
firmware upgrades.
// NOTE: Uncomment to override defaults in settings.h
// #define SETTINGS_RESTORE_ALL (SETTINGS_RESTORE_DEFAULTS |
SETTINGS_RESTORE_PARAMETERS | SETTINGS_RESTORE_STARTUP_LINES |
SETTINGS_RESTORE_BUILD_INFO)

55

Timișoara 2019 // Enable the '$I=(string)' build info write command. If disabled, any existing build info
data must
// be placed into EEPROM via external means with a valid checksum value. This macro
option is useful
// to prevent this data from being over -written by a user, when used to store OEM product
data.
// NOTE: If disabled and to ensure Grbl can never alter the build info line, you'll also need
to enable
// the SETTING_RESTORE_ALL macro above and remove
SETTINGS_RESTORE_BUILD_INFO fr om the mask.
// NOTE: See the included grblWrite_BuildInfo.ino example file to write this string
seperately.
#define ENABLE_BUILD_INFO_WRITE_COMMAND // '$I=' Default enabled.
Comment to disable.

// AVR processors require all interrupts to be disabled duri ng an EEPROM write. This
includes both
// the stepper ISRs and serial comm ISRs. In the event of a long EEPROM write, this ISR
pause can
// cause active stepping to lose position and serial receive data to be lost. This
configuration
// option forces the p lanner buffer to completely empty whenever the EEPROM is written
to prevent
// any chance of lost steps.
// However, this doesn't prevent issues with lost serial RX data during an EEPROM write,
especially
// if a GUI is premptively filling up the serial RX buffer simultaneously. It's highly advised
for
// GUIs to flag these gcodes (G10,G28.1,G30.1) to always wait for an 'ok' after a block
containing
// one of these commands before sending more data to eliminate this issue.
// NOTE: Most EEPROM write command s are implicitly blocked during a job (all '$'
commands). However,
// coordinate set g -code commands (G10,G28/30.1) are not, since they are part of an active
streaming

56

Timișoara 2019 // job. At this time, this option only forces a planner buffer sync with these g -code
commands.
#define FORCE_BUFFER_SYNC_DURING_EEPROM_WRITE // Default enabled.
Comment to disable.

// In Grbl v0.9 and prior, there is an old outstanding bug where the `WPos:` work position
reported
// may not correlate to what is executing, because `WPos:` is based on the g -code parser
state, which
// can be several motions behind. This option forces the planner buffer to empty, sync, and
stop
// motion whenever there is a command that alters the work coordinate offsets
`G10,G43.1,G92,G54 -59`.
// This is the s implest way to ensure `WPos:` is always correct. Fortunately, it's
exceedingly rare
// that any of these commands are used need continuous motions through them.
#define FORCE_BUFFER_SYNC_DURING_WCO_CHANGE // Default enabled.
Comment to disable.

// By default, Grbl disables feed rate overrides for all G38.x probe cycle commands.
Although this
// may be different than some pro -class machine control, it's arguable that it should be this
way.
// Most probe sensors produce different levels of error that i s dependent on rate of speed.
By
// keeping probing cycles to their programmed feed rates, the probe sensor should be a lot
more
// repeatable. If needed, you can disable this behavior by uncommenting the define below.
// #define ALLOW_FEED_OVERRIDE_DURIN G_PROBE_CYCLES // Default disabled.
Uncomment to enable.

// Enables and configures parking motion methods upon a safety door state. Primarily for
OEMs
// that desire this feature for their integrated machines. At the moment, Grbl assumes that
// the parki ng motion only involves one axis, although the parking implementation was
written

57

Timișoara 2019 // to be easily refactored for any number of motions on different axes by altering the
parking
// source code. At this time, Grbl only supports parking one axis (typically th e Z-axis) that
// moves in the positive direction upon retracting and negative direction upon restoring
position.
// The motion executes with a slow pull -out retraction motion, power -down, and a fast
park.
// Restoring to the resume position follows these set motions in reverse: fast restore to
// pull -out position, power -up with a time -out, and plunge back to the original position at
the
// slower pull -out rate.
// NOTE: Still a work -in-progress. Machine coordinates must be in all negative space and
// doe s not work with HOMING_FORCE_SET_ORIGIN enabled. Parking motion also
moves only in
// positive direction.
// #define PARKING_ENABLE // Default disabled. Uncomment to enable

// Configure options for the parking motion, if enabled.
#define PARKING_AXIS Z_A XIS // Define which axis that performs the parking motion
#define PARKING_TARGET -5.0 // Parking axis target. In mm, as machine coordinate [ –
max_travel,0].
#define PARKING_RATE 500.0 // Parking fast rate after pull -out in mm/min.
#define PARKING_PULLOUT_RA TE 100.0 // Pull -out/plunge slow feed rate in mm/min.
#define PARKING_PULLOUT_INCREMENT 5.0 // Spindle pull -out and plunge distance
in mm. Incremental distance.
// Must be positive value or equal to zero.

// Enables a special set of M -code commands that enables and disables the parking motion.
// These are controlled by `M56`, `M56 P1`, or `M56 Px` to enable and `M56 P0` to
disable.
// The command is modal and will be set after a planner sync. Since it is g-code, it is
// executed in sync with g -code commands. It is not a real -time command.
// NOTE: PARKING_ENABLE is required. By default, M56 is active upon initialization.
Use

58

Timișoara 2019 // DEACTIVATE_PARKING_UPON_INIT to set M56 P0 as the power -up default.
// #def ine ENABLE_PARKING_OVERRIDE_CONTROL // Default disabled.
Uncomment to enable
// #define DEACTIVATE_PARKING_UPON_INIT // Default disabled. Uncomment to
enable.

// This option will automatically disable the laser during a feed hold by invoking a spindle
stop
// override immediately after coming to a stop. However, this also means that the laser still
may
// be reenabled by disabling the spindle stop override, if needed. This is purely a safety
feature
// to ensure the laser doesn't inadvertently remain pow ered while at a stop and cause a fire.
#define DISABLE_LASER_DURING_HOLD // Default enabled. Comment to disable.

// Enables a piecewise linear model of the spindle PWM/speed output. Requires a solution
by the
// 'fit_nonlinear_spindle.py' script in the /d oc/script folder of the repo. See file comments
// on how to gather spindle data and run the script to generate a solution.
// #define ENABLE_PIECEWISE_LINEAR_SPINDLE // Default disabled. Uncomment
to enable.

// N_PIECES, RPM_MAX, RPM_MIN, RPM_POINTxx, and RPM_LINE_XX constants
are all set and given by
// the 'fit_nonlinear_spindle.py' script solution. Used only when
ENABLE_PIECEWISE_LINEAR_SPINDLE
// is enabled. Make sure the constant values are exactly the same as the script solution.
// NOTE: When N_P IECES < 4, unused RPM_LINE and RPM_POINT defines are not
required and omitted.
#define N_PIECES 4 // Integer (1 -4). Number of piecewise lines used in script solution.
#define RPM_MAX 11686.4 // Max RPM of model. $30 > RPM_MAX will be limited to
RPM_MAX.
#define RPM_MIN 202.5 // Min RPM of model. $31 < RPM_MIN will be limited to
RPM_MIN.

59

Timișoara 2019 #define RPM_POINT12 6145.4 // Used N_PIECES >=2. Junction point between lines 1
and 2.
#define RPM_POINT23 9627.8 // Used N_PIECES > =3. Junction point between lines 2
and 3.
#define RPM_POINT34 10813.9 // Used N_PIECES = 4. Junction point between lines 3
and 4.
#define RPM_LINE_A1 3.197101e -03 // Used N_PIECES >=1. A and B constants of line
1.
#define RPM_LINE_B1 -3.526076e -1
#defi ne RPM_LINE_A2 1.722950e -2 // Used N_PIECES >=2. A and B constants of line
2.
#define RPM_LINE_B2 8.588176e+01
#define RPM_LINE_A3 5.901518e -02 // Used N_PIECES >=3. A and B constants of line
3.
#define RPM_LINE_B3 4.881851e+02
#define RPM_LINE_A4 1.203413e -01 // Used N_PIECES = 4. A and B constants of line
4.
#define RPM_LINE_B4 1.151360e+03

/* –––––––––––––––––––––––––––––
OEM Single File Configuration Option

Instructions: Paste the cpu_map and default setting definitions below without an
enclosing
#ifdef. Comment out the CPU_MAP_xxx and DEFAULT_xxx defines at the top of this
file, and
the compiler will ignore the contents of defaults.h and cpu_map.h and use the definitions
below.
*/

// Paste CPU_MAP definitions here.
// Paste default settings definitions here.
#endif

Similar Posts