PCB router upgrade and how to implement a “fake” binary Z-axis in Mach3

Many years ago a friend gave me a LPFK 91s circuit board routing machine.

Mechanically it is a decent piece of kit but because the electronics and software is from the stone age it just sat on the shelf for years. At some point I started to use my other CNC machines to make prototype boards and it seemed time to make it a working part of the inventory.

I quickly abandoned the idea of using the original software. It was A) propitiatory and I did not have a license and B) completely useless from a contemporary standpoint. On my other machines I use Mach3 and the toolchain I use for circuit boards  generate G-code which is not compatible with neither the original hardware or software. Eventually I decided to completely hollow out the old electronics and re-build using Mach3 compatible hardware. Luckily the electronics compartment of these machines are easily unplugged and removed:

Original LPFK hardware

Since there was plenty space inside the old compartment I decided to add everything including the computer inside the original box:

Hardware after mod.

Keeping only the original power supply I added a industrial PC, X and Y stepper drivers, spindle power supply and some relays.

The LPFK 91S uses a solenoid for the Z axis. To control its movement speed is uses an air dampener so some amount of delay is needed every time the Z-axis is engaged. Normally an ON/OFF axes in Mach3 is controlled using special macro commands in the G-code. When a job is loaded into Mach3 every line of the G-code is quickly executed to generate a preview of the toolpath. This includes the macro codes. If the macro codes contains delays (wait for the solenoid dampener to engage) these delays are also executed but in real time. making it impractically slow to load a job.

I decided instead to make a “fake Z-axis”. by using a Arduino to pretend to be a stepper motor. In this manner I can decide at which Z-height I want to engage my solenoid and the time it takes for the axis to reach this point can be controlled with the axis speed. This way I do not need to generate special G-code for this machine.

Z-axis faker code for ArduinoUNO

Finished machine


Leave a Reply