Jump to content
Ultimaker Community of 3D Printing Experts

OctoPrint plug-in for laser PCB exposure with Ultimaker

Recommended Posts

I own two Ultimaker 2+ and have created a laser attachment for the print head and a control board plus scripts to expose PCBs with the Ultimaker.

It's a small UM firmware mod (on basis of the tinker firmware) that give a "sync" signal on one of the extension ports of the Ultimaker mainboard and a Arduino based controller (Arduino Pro Micro, the quite small thingy) that receives the pixels via USB/serial connection (for example from a Raspberry Pi that's running OctoPrint in parallel) and "streams" them to the laser driver upon receiving the sync signal from the UM.

Essentially the print head is moving with constant speed left-to-right and the laser is switched by the controller independently matching that speed.

So the core idea is to use the mechanics of the Ultimaker 2, but aside of the sync signal not do any larger mods to it. Which even makes it a universal solution for any precise mechanic like that.

I had done one try to get the pixel streaming into the firmware, but there is a conflict between the timer interrupts for motor control and the pixel streaming coming up. Possibly doable to untangle that, but that felt like a painful road so I decided for that external controller, simplifying the thing enormously.

With that solution I can achieve results down to 3-4mil of resolution which is much better than what I could achieve with the regular film printing & exposure methods or toner transfer. See attached photos (thanks to Henner Zeller the creator of the LDgraphy laser exposure device for the excellent test pattern, https://github.com/hzeller/ldgraphy).

Video of the exposure process:


That for the background, now to the question that I have.

Currently the creation of the G-Code for the printer and the "bitstream" file are plain Python scripts I have to call, transfer the files to the OctoPi, run my "bit streamer" and start OctoPi with the G-Code file. Pretty manual process.

Now I would like to integrate all this into a OctoPrint plug-in to use OctoPi as a central UI. That would be much more transparent and comfortable and could also provide the calibration tools to adjust PCB position and focus height in a few clicks.

Would anyone be interested to join in to develop and test this?




P.S. the holder of the laser head attachment bases on the Mark 2 dual head magnetic plate, so it's easily attachable and removable.




Edited by Guest
  • Like 1

Share this post

Link to post
Share on other sites


it's not yet "compact" enough to make it easily doable in all details. That would be my long-term plan after I straightened out the software part with Octoprint.

Generally the solution consists of:

  • a 150mW 405nm laser diode in a cooling housing, mounted to the UM head using the Mark 2 magnetic plate
  • a laser driver with analog control, i.e. you can switch its power with a voltage of 0-5V from standby-current to 100% (both set via pots on the driver)
  • a low pass filter circuit before the control input of the laser driver to convert 65 kHz PWM to 0-5V
  • a control circuit on basis of a "Pro Micro" (Arduino Leonardo clone) which is connected via its USB port to a Raspberry Pi. The circuit receives the pixels to expose line by line from the Rasperry Pi, gets a "sync" signal from the Ultimaker Mainboard when the line begins. Then it "streams" the pixels out, using PWM to set the power (laser driver control voltage) and switching the PWM off and on for the individual pixels. That in parallel to the move of the UM head.
  • a python script on the Raspberry Pi that sends line by line from a prepared file with pixel data to the Atmega on the control circuit
  • OctoPrint on the Raspberry Pi that send the G-Code to move the head left / right and from one line to the next
  • a python script that converts an input PNG with the circuit to be exposed to the G-code file for the head movements and a file with the pixel data for the "bitstream" script
  • a firmware mod to the Tinker firmware that would send a "sync" signal via an extension port of the UM Mainboard when a certain G-Code parameter is added to a G-Code move
  • a cable plugged into that extension port of the UM board, connecting the control circuit to the sync signal

That's all the components in overview. Currently working (more long-term due to time constraints, will take a few months) on creating a Raspberry Pi hat to sit the control circuit on top of the Raspberry Pi and to add the python scripts to Octoprint as a plugin. That would make it much easier to use.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Our picks

    • Architect Design Contest | Vehicles.
      We're open for entries! - Design and submit your 3D designs of architectural entourage - vehicles - for a chance to win a large filament pack. Presenting an idea, an architectural design or something as big as an urban project isn't easy. A scaled model can really help to get your idea across.
        • Like
      • 24 replies
    • What The DfAM?
      I'm Steve Cox, an experienced engineer familiar with 3D printing. I wanted to share some DfAM guidelines with this community to help and make stronger parts.
      I'm also an Autodesk Certified Instructor for Fusion 360, so many of the images in ...
        • Thanks
        • Like
      • 22 replies

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!