- Programming in C/C++
- PCB design (on Kicad for example)
- Modeling (on FreeCad for example)
- Use software such as Inkscape, LaserWeb, LaserGBL (to create a motif that will be engraved)
- Use firmware like Marlin
These are advisory prerequisites, you can understand the project just by reading this article and accessing the resources available.
IntroductionOur goal is to recover an old unused 3D printer and recycle it into a laser engraver. The latter will equip the “workshop”/”projects platform” and can be used by Polytech Sorbonne students for school, association, or personal projects.
This article details the technical characteristics of all the components necessary to reproduce the project.
HardwareHere is the general connection of the system and the detailed list of connections for each component:
A - Motherboard
A1 - Board
The motherboard we use is an Ender 5 PLUS board available on the merchant site: Creality Silent Motherboard V2.2 for 3D Printer Ender 5 PLUS. We chose it because even if it is initially designed for 3D printers, it can also handle the operation of a laser. Moreover, we can easily reprogram it with Marlin 2.1.2 (see section: Software - Engraver). For the project we have mapped the whole card, here is the description of the different PINs of the card:
A2 - Rack
To fix the card and avoid that it moves during the operation, we have made a rack whose model is in the project files under the name: Rack.FCStd. This one is fixed directly on the floor of the printer at the level of the screw threads provided for this purpose.
A3 - Connection to the board
On the right side of the recorder there are two ports that allow it to connect to the card:
- USB-B: allowing to modify the software and to control the recorder from the computer to check its good functioning, we can thus execute Gcode commands from LaserWEB.
- SD: connected by an extension cable to the motherboard, the SD card allows to give the Gcode files to the recorder without the need to connect the computer.
The USB-B port is the one recycled from the old 3D printer, it is connected to the motherboard through a "home-made" USB-B → USB-miniB adapter, we simply soldered the corresponding wires together according to the following diagram:
The SD extension cable can be bought on the following website: RPI MSD FL50: Raspberry Pi - Rallonge micro SD, flexible, 50 cm, the port must be integrated into the wall of the writer, while the other end must be connected to the motherboard.
B - Power supply
B1 - Power supply 19V
The power supply of the engraver is that of the old 3D printer, the motherboard can be powered in 24V, however, we noticed that it worked very well if it was powered only in 19V.
B2 - Voltage adaptation
Some components such as the ventilation fan, the Arduino board or the laser control board must be powered in 12V, it is therefore necessary to make two power supply adaptations (one could be enough however the laser risks drawing all the available current which would prevent the ventilation fan and the Arduino board from working properly). We have chosen the following circuit for this purpose:
You will need :
- A L7812CV step-down device : L7812CV UMW | Circuits intégrés
- Two capacitors of 22 and 47 µF : Composant électronique (manomano.fr) (22µF) and Composant électronique (manomano.fr) (47µF)
Such a circuit can take in input up to 35V (here 19V) and output 12V with a maximum current of 1.2A. The step-down is linear and the temperature can rise up to 105°C. It is therefore necessary to install heat sinks.
For the power supply of the laser, the control board and the cooling fan, it is necessary to realize a second assembly which will be able to take a more important current. Indeed, at 100% power, the whole consumes 2.1A, we have then realized the following circuit:
For this assembly, the heat sink is essential, you can also get the component LM338K on the following site: LM338 - 5A.
C - Security system
C1 - Ventilation
The whole system is cooled by a fan mounted at the back of the engraver:
This fan is powered in 12V, it is thus necessary to adapt the supply voltage upstream. You can get it on the following link: Ventilateur De Refroidissement, 12v Dc, Sans Balais, Cpu Molex, 3 Broches, 5cm.
C2 - Air filter
In case the surface on which we want to engrave is not wood, it is possible that the engraving emits toxic substances, so we had to apply a charcoal filter on all the spaces where the air can pass. The charcoal filter is available on: Charbon actif à mousse d'uréthane RS PRO.
C3 - Laser protection
The power of the laser is less than 500W (class 3B), it is necessary to protect the eyes and the skin from a direct or reflected ray. For that we chose to put a protection filter on the walls, its color must be complementary to the laser, the ray being blue we had to put an orange filter that you can get on the following site: Film Teinté pour Phare de Voiture 200x30cm Rouge. As you can see, this is a film for car headlight because it is extremely difficult to get something else.
We also bought safety glasses for more security, these are rather expensive however we did not find better: Thorlabs - LG3A Laser Safety Glasses, Light Orange Lenses, 48% Visible Light Transmission, Comfort Style.
C4 - Laser extinction
One of the problems you will encounter is that the laser does not shut off completely. So you will need to add a control circuit that will either let the PWM signal pass to the laser control board or not. We have chosen the following circuit:
When the signal is ON, the transistor is blocked and the board receives the PWM signal, on the other hand when the control signal is OFF, the transistor is passed, the PWM signal is then short-circuited to ground. The PWM signal is directly supplied by PIN D2 of the motherboard, and the ON/OFF signal by PIN D19.
NB : In general, it is better to place the resistor upstream of the transistor to ensure that there are no surprises in the voltage control Grid-Source (VGS), There is however no problem in our case.
You can get the transistor on the following link : Reland Sun Lot de 10 transistors triode BS170 TO-92 TO92.
D - Engraving tray
We used a copper plate (used for printed circuit boards) for the support because the back is made of glass, this allows to block the laser rays so that it does not pierce the components underneath. We also painted the plate black to avoid reflection. You can get the necessary on the following links:
Plaque de cuivre pour circuits imprimés, Simple face CIF, 220 x 100 x 1.6mm, 35μm, FR4
Aérosol spécial hautes températures noir 400 ml
E - Engraver's head
E1 - Modeling
We have modeled a 3D head to arrange the different components of the head. You will find the models in the project files under the name: Laser_Head_Fix.FCStd and Laser_Head_Removable.FCStd. You must fix the first module in place of the 3D printing nozzle. The second module will fit into the first one, this will allow you to easily remove the head to make checks and connections. The laser, the control board, the fan and the BLTouch will be fixed on this head (holes have been provided for this purpose, each element has its own location).
E2 - Laser
The laser is available on the following site: Module Diode Laser ligne bleue haute puissance 300 nm, 500mW, 700mW, 1000mW, avec ventilateur de refroidissement, this one is fixed inside the head. You will notice that there is space on the 3 sides of the laser, this allows better ventilation and cooling of the laser. This laser has a maximum power of 500mW and emits at a frequency of 450nm (blue). 3D printing in plastic is a temporary solution, as the laser heats up during its operation, which can melt the plastic. It is therefore necessary to replace the head with a metal version. The 3D printing will help you to know the dimensions of the head.
E3 - Laser control board
The laser control board is powered by 12V, so it is necessary to adapt the power supply upstream. We decided to fix it also on the head (right) to avoid too long wires. The card is available on : Carte de pilote TTL d'adaptation de tension de courant, diode laser verte et bleue, dissipateur thermique, 12V, 5A. This is not the same board as the one we used because ours is no longer available for purchase.
E4 - Fan
The fan (above) is extremely important because it allows the laser to cool down. We found it more useful to have the fan blow air upwards and not downwards where the engraving is done. The fan used must be powered in 12V by the control board and is fixed on the top of the head. You can get it on : Ventilateur de refroidissement 3010s 12V 30x30x10mm 2Pin DC, longueur de câble 15cm, sans balais, pour pièces d'imprimante 3D Reprap. If you choose another fan, please make sure that the holes to attach it are in the same place, otherwise you will have to modify the head model.
E5 - BLTouch
This component (fixed on the left of the head) is used to make a leveling map of the surfaces to engrave. You can get it on the website: Antclabs Capteur de Nivellement BLTouch - 3DJake France. On our model it is slightly shifted forward in relation to the laser head, this is not intentional, so you can modify it if it bothers you, but you will have to modify the corrective parameter on Marlin.
The role of each wire is as follows:
- black (or red) wire : GND
- white wire (or blue) : Trigger
- brown (or black) wire : GND
- orange (or white) wire: 5V
- yellow wire (or yellow): PWM signal
The component must be connected to the motherboard as follows:
F - IHM
For this part we use an arduino UNO rev3 board available on : Arduino Uno Rev3, as well as a color screen and joystick shield: Shield TFT Couleur 1,8" avec microSD et Joystick. The screen is not tactile because we lacked time to realize the HMI in this way. So you have to move with the joystick. The board is powered in 12V via the step-down circuit that we already use for the ventilation fan. The card is connected as follows:
RX corresponds to PIN D16 on the motherboard, and TX to PIN D17. You will find the file Support_ecran.FCStd which will allow you to attach the screen to the rest of the system.
SoftwareA - Engraver
The board used is an Ender 5 plus 3D printer motherboard, based on an ATMega 2560 microcontroller, which is the microcontroller of an Arduino Mega board. The firmware used by Creality is a reconfiguration of the open source firmware "Marlin" version 1.7.1. This reconfigured firmware is also made available by the printer manufacturers. We have made several reconfigurations to make this firmware suitable for a laser engraver. However, some features (clearly visible in the Marlin documentation) were missing in this version. So we decided to update to version 2.1.2 of Marlin, the latest version. For information, Marlin is a firmware for the microcontrollers embedded in 3D printers to make the link between the G-code generated by the software and the hardware architecture of your printer. It is therefore this software that will read the G-code instructions from your print file and interpret them to physically print your model.
We thus based ourselves on the version 2.1.2 of Marlin for the software of the engraver, we carried out many modifications so that the software meets the characteristics of the engraver. We provide you with our version that you may have to modify if you don't have the same printer model. Below, a procedure to follow to configure the firmware (for the rest of the explanations, the access paths to the files will be referred to the firmware folder "Marlin-2.1.2"):
- Locate the pin map file corresponding to your card, for our card based on a µC ATMega 2560, it is the file "pins_RAMPS.h" that you will find in : \Marlin\src\pins\ramps\pins_RAMPS.h. To know the pin file concerned, we based ourselves on the Creality configuration on version 1.7.1 specifying the motherboard.
You can find the pin map file by browsing the pins.h file and looking for the section about the selected map. You can also find the list of maps already supported by Marlin in boards.h.
NB: Be aware that the Marlin firmware has a SanityCheck file indicating any type of error in the configuration, so don't hesitate to recompile the firmware to find your way around.
- The first step is to assign all the pins corresponding to our new architecture, especially the PWM and ENABLE pins of the laser, for the rest the pin map is already adapted to RAMPS type cards.
In the configuration of the firmware you will often have difficulty finding your way in the monstrous tree of Marlin and its innumerable #define, for that do not forget the shortcut Ctrl+Shift+F allowing to find a text in all the files of a folder, that will allow you to know where to uncomment a define to activate a functionality.
- Once the pins are defined we will configure the printer in "Configuration.h", starting with the dimensions of your machine:
- Platter size, terminals and home direction:
Be sure to check the direction of the home, otherwise the printer will go in the opposite direction and hit a wall, possibly causing damage. Do some tests! Keep the power button under your fingers while testing. This site explains how to do it very well: Configuring Marlin for Unified Bed Leveling (manuelmclure.github.io)
Also check the logic state of your limit sensors, depending on the hardware, the state can change and will have to be reversed in the configuration (which is our case here).
If you are using a BL-Touch (which we highly recommend for a laser engraver so that the home takes into account the thickness of what you want to engrave to keep the laser's focus distance correct). Turn on the BLTOUCH and set up the location of your leveling probe in relation to the laser head. This is pretty well explained by the comments in the code. Be sure to make sure you are viewing the stage in the correct direction though.
- It is also necessary to regulate the feed rate (the speed of the motors) at the time of the home, according to the printers the speed can be different from one axis to another, in particular, the Z axis (which is often controlled by a worm screw, which is not our case here)
- If you wish to print from an SD card, activate the corresponding "SDSUPPORT" option
- Then you have to do the advanced configuration configuration_adv.h :
- Enable the laser features and check the logic state of the laser cut-off pin
⚠ WARNING ⚠ :
Test the levels and PWM signals first with an oscilloscope or logic analyzer, when testing with the laser, ALWAYS WEAR PROTECTIVE GLASSES appropriate for your laser (power and wavelength), your eyes will thank you. Never look at the laser without protection if you are not sure that it will stay off.
- Finally, activate the Gcode motion mode, allowing the printer to read the GRBL engraving gcode files which have the particularity of specifying command options (notably the laser power) without recalling the complete command. You may see "S0" lines alone in the generated files instead of "G1 X10 Y17 S0" for example.
There are plenty of other features on the Marlin firmware, feel free to browse the configuration files to see the possibilities.
B - IHM
The interface we have created allows both to check the operation of the printer, as well as to launch the printing of gcode files. It is user-friendly for each future user. The only element of interaction with the latter is the joystick located on the left of the screen. The joystick has 6 known positions: Neutral (when not touched), Up, Down, Right, Left and Pressed. It allows you to navigate through the different screens and to activate the desired functions. To realize this interface, we used the ST7735 library from Adafruit (for more details about the library follow this link: Overview | 1.8" TFT Display Breakout and Shield | Adafruit Learning System and go to the "Graphics_Library" tab).
In general, after the powering up of the engraver, a startup screen appears, followed by an information screen, then a selection screen. The selection screen allows you to choose one of the two main options (see Figure 1):
- Control: to check the operation of the engraver. This part allows to test the operation of the 3 axes, the auto-home, the laser power and the leveling (see Figure 2).
- Engraving: initially allowing to launch the engraving of a gcode file. This part could not succeed because of a problem related to the SD card, the card not being recognized (see Figure 3). This part would have made it possible to select the file of the pattern to be engraved (which will have been previously put on the SD card). All security conditions must be respected. It would have been possible to pause or stop the engraving at any time (see Figure 4).
The code corresponding to the file Screen.ino has been written on the Arduino IDE and it has been thought as a state machine for each screen. The following screens are therefore arranged as follows:
For the figure 2 :
The writer being controlled by gcode instructions, they are automatically launched (through Serial.write()) when the Press button is pressed. For the Autohome or Leveling screens, it is sufficient to wait for the command to be issued after clicking on Press. For the screen with the axes, it will be enough to modify a number by shifting to the left or right and then up or down, and finally press X, Y or Z according to the value that has been modified so that it can be taken into account. If everything goes well, the tray should move. For the screen related to the laser, it is also sufficient to move up and down and click either on Turn off, on Focus or on Power, to modify the value it is necessary to move to the right, then up or down, and finally return to the left. For the screens related to the axes or the laser, it will be enough to press the Press button once the cursor is on back to go back.
For the figure 3 :
This figure represents the screens that we would have liked to carry out, more precisely the entirety was coded however the choice of the files does not function (here it is only about displayed text and not of real names of files present on the SD card, that is only used to give an outline of how we wanted to implement this part). The file is thus to be selected by moving up and down, to do this when the cursor is on file it is necessary to move to the right then to select the desired file, to move to the left, then to the bottom to be placed on OK and finally to press Press. For the following screens, the operation is always the same, you just have to move up and down and click on the Press button when the cursor is in the right place. A confirmation message appears if the user clicks on "Quit", if he selects "Yes" (by default the position is on No) it will display the final screen and the engraving will be interrupted. In addition, throughout the printing process (after selecting the file), the door of the engraver must remain closed. If the door opens, the engraving will automatically be paused, the user must close the door and click on "Resume" to resume engraviThis figure represents the different screens accessible in the engraving part. First of all, we have the choice of files, we must press directly on the name of the file. Note that the number of files is limited to 8, and that the number of characters is limited to 20, because of the storage capacity of the card and the size of the screen. Indeed, in terms of storage we had to use two tables, one to store the file names recognized by the user (which are displayed on the screen) and another to store the names recognized by the engraver to start the engraving. For example, when we use the gcode command to list the files (M20 L). You can take a look at the Figure 4. In this case, the name of the file recognized by the engraver will be "TEXTTE~1.GCO" the name recognized by the user and displayed will be "TextTest7.gcode". The file should be selected by moving up and down; to do this, when the cursor is on the file, move to the right and select the desired file by pressing the Press button. If the SD card is not inserted or there are no files on the card, the screen will appear but without any file names, so the user must click Back, insert the card with the files, and click Engraving again before making the selection. For the following screens, the operation is always the same, just move up and down and click on the Press button when the cursor is in the right place. A confirmation message appears if the user clicks on "Quit", if he selects "Yes" (by default the position is on No) it will display the final screen and the engraving will be interrupted. In addition, throughout the printing process (after selecting the file), the door of the engraver must remain closed. If the door opens, the engraving will automatically be paused, the user must close the door and click on "Resume" to resume engraving.
ConclusionIn conclusion, this project has been a great experience. We had the opportunity to do a project from A to Z, without being limited in the solution to propose. Although we were not able to complete everything given the short time frame of the project due to the problems encountered.
In the end, we can be happy with what we have done, we hope that this project can be taken up and improved in the future.
ContactIf you have any questions, for additional information you can send an email to the following addresses:
michael.baudeur@etu.sorbonne-universite.fr
caroline.alonso.1@etu.sorbonne-universite.fr






Comments