Hello again. Not so long ago, I laid out instructions for creating a laser engraver from a CD or DVD-rom. The first version of the laser engraver was completely working, but not without a number of problems. Firstly, I used the L9110S engine driver, thereby losing the ability to use the microstep of the engine, and as a result, the resolution of the engraving was limited. There was also a problem with the incompatibility of the engraver software with standard engraver programs. In the second version, I removed all the flaws, and the engraver began to meet the standards and also obey G-codes. The basis has remained the same; the electrics and software have changed. And I present you with instructions for refitting the previous one or creating a new laser engraver.
We have to:
- DVD-ROM or CD-ROM
- Plywood 10 mm thick (6 mm can also be used)
- Wood screws 2.5 x 25 mm, 2.5 x 10 mm
- Arduino Uno (compatible boards can be used)
- Arduino CNC Shield v3
- Laser 1000mW 405nm Blueviolet
- A4988 stepper motor drivers with radiators 2 pcs.
- 5V power supply (I will use an old, but working computer power supply)
- Transistor TIP120 or TIP122
- Resistor 2.2 kOhm, 0.25 W
- connecting wires
- Connector 2.54 mm Dupont
- Eletrolobzik
- drill
- Drills for wood 2mm, 3mm, 4mm
- Screw 4 mm x 20 mm
- Nuts and washers 4 mm
- soldering iron
- Solder, rosin
Step 1 We assemble the case, mechanics and prepare the power supply.
Here we do everything exactly as in the first, second and third steps of the instruction "Laser engraver from old DVD-Rom".
The fourth step can be omitted, since we do not need a joystick. We will send all commands through the terminal.
Step 2 Preparing the engines.
About how to remove stepper motors and carriages you read in the first article. So, as there we solder the wires to the engines. Dupon connectors must be riveted at the other end of the wires:
If there is, it is convenient to use a plastic case for them, on four wires. If not, you can, like me, just put a heat shrink on each of the wires.
Step 3 We collect the electrician.
The brain of our engraver is Arduino Uno.
Install it in the back of the engraver:
One of the most important parts is the Arduino CNC Shield. We will use the third version of this expansion card. Thanks to her, we will significantly reduce the number of wires and simplify the assembly of the engraver:
And on the flip side:
We put Arduino CNC Shied v3 on top of Uno:
Jumpers should be included with the expansion board. Before installing the driver, you must install jumpers on the X and Y axes. Namely, jumpers MS0, MS1 and MS2 must be installed on the X and Y axes.Thus, we will set the microstep to 1 \ 16. If you get confused a little instruction on this expansion board:
View online file:
Dravers look like this:
First, install the radiators on the driver:
And then we put them in place for the X and Y axes. Pay attention to the position of the driver. Since it can be easily installed is not true. The EN key on the driver must match the same socket on the expansion board:
I recommend buying immediately a kit consisting of Arduino Uno, CNC Shield and A4988 drivers with radiators. This is cheaper and you don’t have to wait until the next component comes up.
The finished laser we bought with a driver and a cooling radiator consumes up to 500 mA. It cannot be directly connected to the Arduino. To solve this problem, take a TIP120 or TIP122 transistor. The 2.2 kOm resistor is included in the gap between the Base of the transistor and pin 11 of the Arduino. On the CNC Shield, this pin is designated as Z +. This is not a typo. Here's the thing. Looking ahead, I’ll say that we will work with the GBRL 1.1 firmware. CNC Shield v3 was made for an earlier version of this firmware. In version GBRL 1.1, the developers decided to redo the port numbering, and therefore it differs from what is written on the board. Namely, they interchanged Z + (D12) and Spn_EN (D11). The spindle is connected to D11, which is a PWM port, for controlling the engine speed, or laser power in our case. Image with modified pins:
Base - R 2.2 kOm - pin 11 Arduino (Z + CNC Sheild)
Collector - GND Laser (Black Wire)
Emitter - GND (Common Power Supply)
+5 laser (red wire) - +5 power supply
The circuit is not complicated, so we solder everything in weight, insulating the wires and legs of the transistor, broadcasting it to the back, on the side
Setting up GBRL firmware is not an easy task, especially for a beginner. And with a laser, like matches, children are not toys. Even with a reflected beam, the eye can be seriously damaged. Therefore, I recommend working with the laser only in goggles, and for the time of tests and settings, connect a regular LED instead of the laser. Color does not matter. Having included a suitable resistor in the gap of the positive wire of the diode, we connect an LED instead of a laser:
Safety glasses and a test diode will minimize incidental problems with the engraver.
Step 4 Setting the motor current limit.
Setting the current strength is necessary to reduce noise when operating at high currents, to get rid of shear at low currents, and also to reduce the heating of the stepper motor.
We connect the negative wire of the multimeter to the GND contact, and press the positive wire to the body of the tuning resistor on the driver. Twist the tuning resistor with a small screwdriver, measuring the voltage Vref. Thus, we set the correct current for our stepper motor driver.
The Vref formula for the A4988 depends on the value of the resistors installed on them. This is usually an R100.
Vref = Imax * 8 * (RS)
Imax - current of the stepper motor
RS is the resistance of the resistor.
In our case:
RS = 0.100.
The recommended current strength of the stepper motors is 0.36A. But I prefer to increase it a little.
Imax = 0.4
Vref = 0.5 * 8 * 0.100 = 0.32 V.
Step 5 Fill GBRL 1.1.
It is most convenient to write a ready-made HEX firmware file to Arduino Uno.
To do this, you need the XLoader program:
Run the program. Select the previously downloaded HEX file. Below, we select our controller from the list, namely Uno (ATmega328). Next, select the com port to which Arduino is connected. We set the speed to 115200 and click Upload. After waiting for the completion of the fill, you can proceed to the verification and configuration.
Step 6 Settings.
The parameters included in the firmware differ from the parameters of our machine. The terminal window is used for configuration. You can use any that you like. I prefer the Arduino IDE. Download it from the official site of the project:
https://www.arduino.cc/en/Main/Software
No libraries are required, we only need a terminal from the Arduino IDE. In the Tools tab, select our board - Arduino Uno, then select the com port to which it is connected. After that, launch the terminal located in the Tools - Port Monitor tab. In the terminal window, set the parameter CR (carriage return) and a speed of 115200 baud.The following line should come:
Grbl 1.1f ['$' for help]
If you saw her, then the firmware has become successful and you can proceed to the setup. So, we use stepper motors from DVD or CD drives. They are referred to as PL15S020 or compatible with this:
View online file:
To view the current firmware settings, enter:
$$
This engine has 20 steps per revolution. The screw pitch is the distance the carriage travels in one revolution, in our case, 3 mm. We calculate the number of steps per 1 mm: 20/3 = 6.6666666666667 steps per 1 mm. On the a4988 drivers, we installed microstep 16. Therefore, 6.666666666666767 * 16 = 106.67 steps per 1 mm. We write this data into the firmware. To do this, in the terminal window, enter:
$100=106,67
$101=106,67
$102=106,67
The last parameter is optional, it is for the Z axis, but it’s more understandable then to view the parameters. Then turn on the laser mode with the command:
$32=1
Set the maximum laser power to 255:
$30=255
To test the laser (it is better to first connect the LED), enter the command:
M3 S255
Turn off the laser with the command:
M5
Then we set the maximum burning size. For our engraver, this is 38 x 38 mm:
$130=38.000
$131=38.000
$132=38.000
Again, the last parameter is optional; it is for the Z axis.
I spread the working parameters of our engraver so that you can compare:
$0=10
$1=25
$2=0
$3=0
$4=0
$5=0
$6=0
$10=1
$11=0.010
$12=0.002
$13=0
$20=0
$21=0
$22=0
$23=0
$24=25.000
$25=500.000
$26=250
$27=1.000
$30=255
$31=0
$32=1
$100=106.667
$101=106.667
$102=106.667
$110=500.000
$111=500.000
$112=500.000
$120=10.000
$121=10.000
$122=10.000
$130=38.000
$131=38.000
$132=38.000
Step 7 Prepare the image.
To burn something you need to prepare your chosen picture, namely, translate it into a G-code. To do this, we will use the CHPU program:
Download and tear off the program. Click "Import Image" and select your picture. In the “Change Resolution” section, set “Width” and “Height” to a maximum of 38 mm. “Density” can be tried differently, in my opinion the optimum is 6:
Go to the “Burn” tab. Select "ON on black." In the section "Preliminary commands" should be the following entries, without explanation in brackets:
%
G71
S255 (Laser power to maximum)
G0 F200 (Idling Speed)
G1 F100 (Burn Speed)
(F-burning speed)
You can try different burning speeds. For plastic, F100 is enough; for wood, less may be needed. Click "Save G Code" and specify the storage location. Important! Resolution should choose ".nc".
Step 8 Burning.
To burn and control the engraver, we will use the GrblController program:
Download and install it. Click "Open." After checking that everything works, using the arrows and the laser turn-on command, select the file you saved and send it to burn by pressing “Begin”:
Video engraver: