-
-
Notifications
You must be signed in to change notification settings - Fork 495
Laser Wiring
This guide is designed to help those who have difficulty with the connections necessary to use the laser. It is very difficult to completely cover all the possible existing hardware configurations, however we can find a common scheme in all systems.
- There is a grbl control board which is made up of an arduino/atmega microcontroller and some motor driver (usually a4988 or drv8825). This board receive GCode commands from LaserGRBL and produce signals for driving stepper motor and laser (or CNC spindle). Here is some board samples:
- Connected to this control board, we can find a laser driver board. Laser driver regulate power to give the right current to laser diode without damaging it. There are a lot of different driver for various power and types, here is some driver samples:
To get the most from your laser you should have a laser driver board with TTL/PWM control pin. TTL and PWM are used as a synonym to indicate a technique with which the laser power is modulated to obtain different levels of engraving. If your laser driver does not allow PWM modulation please go to the "Work without PWM" section of this document.
The connection between GRBL control board and laser driver should look like this.
A common GND between control board and driver is required. When PWM pin is 5v (logic level 1) the laser should turn ON at full power, when PWM pin is 0v (logic level 0) the laser should be OFF. Different laser power levels are obtained by switching the laser ON and OFF at high frequency (1KHz) with different duty-cycles. That's all.
If you want to test your driver PWM ability you can detach the wire from control board side and connect the pwm pin to +5V and GND of control board. Laser should turn ON and OFF respectively.
PWM controls come from arduino/atmega pin D11. If you have doubt test it with a multimeter.
To use PWM in LaserGRBL you should configure the number to be used to indicate max and min of power. I suggest the usage of 255-0 because those numbers map 1:1 the precision of hardware PWM generator in arduino (arduino is able to generate only 256 different PWM value) but those value are arbitrary: one can use 1000-0 and arduino will scale internally to 100% - 0% of power.
When you import an image and use "line2line engraving" you can specify what range of power use for S-Min and S-Max: LaserGRBL will suggest the same values configured and use the full laser power to map the grayscale values of the image (black pixels will be mapped to S-Max and white pixels to S-Min) and it is good to left it as-is.
The real job is done by a very powerful software called "grbl" that run inside your control board. You can't see it because it have not an interface, but it is the one that actually move your motors and drive your laser.
Since GRBL is born for usage with CNC milling machine since v0.9 it have some issues that made it not so suitable for use with laser engraver. For example with CNC spindle when you change PWM power you need some time before the spindle reach the required RPM speed, so GRBL add some delay after each power change. As because laser react immediately to power changes this is not good for laser engraving.
GRBL developer does a lot of job in v1.1 to enable a new "laser mode" that made GRBL more usable with laser, so best result are obtained with GRBL v1.1 and laser mode enabled.
TODO