A 3D printer is very similar to a CNC mill, both mechanically and electronically. Both machines run G-code and move in three axes using stepper motors — or motors with encoders in the case of “real” CNC mills. The only major differences are the power of the motors, and the structural rigidity of the frames. But, for light-duty engraving in soft materials, a 3D printer should be sufficient. In this video, YouTuber RCLifeOn demonstrates how he converted a Creality CR-10 3D printer into a CNC engraver, and the same steps should work for any other FFF 3D printer.
The most important modification, as you’d expect, is to replace the 3D printer’s extruder and hot end with a motor and chuck. In the CNC world, that’s called a spindle, but really any DC motor will work. The speed can be set with a simple PWM controller, and you’ll need some way to attach engraving tools. A chuck designed for Dremels and other rotary tools will probably work the best. You could even use an entire Dremel. Then just attach your DIY spindle to the 3D printer’s extruder carriage with a 3D-printed mount.
Generally, CNC machines take G-code toolpaths that are created with CAM (computer-aided manufacturing) software. But, that would require different firmware on the machine. Instead, if you’re just engraving a simple 2D image like RCLifeOn, you can “trick” the 3D printing slicer into doing the job. First create a 3D model of your design and bring it into the slicing software. Then, give it a height of just a single layer. Set your Z-height appropriately, and you can engrave your art as the machine thinks it’s printing one layer of plastic.