Secrets of CNC Control Board Electronics

The CNC Mother Board is a one stop solution, housing the great majority of blocks you will need to put pretty much any CNC machine together. That is CNC routers or mills, CNC plasma cutters, CNC lathes, etc. In this article, I will detail all the electronics behind one of these implementations working with a powerful CNC software controller such as MACH3. But before we get started, let me show you a block diagram containing the electronic segments said typical implementation will be made of.

The figure above shows the parallel port which more than often is implemented in the form of a breakout board with or without isolation and providing multiple access points to wire the different signals in question. From these access points you will wire the stepper motors control signals (STEP, DIR and ENABLE), each axis home sensor input, the Emergency Stop Input and relays to enable the spindle or a plasma torch. In some cases, a charge pump is added to ensure the relays do not fire in an inadvertently fashion. This could be very dangerous.

As stated previously, the CNC Mother Board offers all of these blocks in a single system. The modules, however, are detachable as I have been parting from the premise that we will only add those modules we need on a per machine basis. For example, some machines such as lathes and some plasma cutters can work perfectly fine with two control axis. CNC routers and mills, as well as the most typical CNC plasma will use three axis. And if you want to work on round stock, a fourth axis will make this an easier endeavor. Other than that, we are ready to take a look at how each one of these blocks operate.

To follow along this article, you may take a look at the pictures below, or you can download the full schematic in PDF format here: AE-CNC_MotherBoard_RevE2

The parallel Port:

On the CNC Mother Board we will use the rather old and almost extinct parallel port to supply all of the control signals. Do not be confused. The parallel port is not gone. Although most CNC enthusiasts have a large lot of old computers with parallel ports, new computers can be upgraded with a PCI parallel port expansion card for less than $20.

The parallel port gives us a series of inputs and outputs we will configure to operate as our control signals. How to configure these signals within MACH3 is explained on a separate blog posting.

The CNC Mother board will have a male DB25 connector to connect to your PC computer running the MACH3 CNC control software. There is also a 18 pin header connector housing the signals. This connector is put in place to work as a future expansion connector, but has also work wonders during the debugging stage.

The USB connector is used to provide 5V power to the logic signals at the computer side. Since capacitive isolators will be used to ensure data integrity, we need a power supply that is isolated from the main power supply.

Power Inputs and Rails:

The CNC Mother board uses four voltage rails. We discussed the first one under the Parallel Port section, as this is the 5V rail we will need to power up the computer side of the isolator circuitry. The other three rails are:

VPWR+, which becomes VM (VMotor) after the PTC fuse, and is used to power up the other two rails and the stepper motor driver modules. The PTC fuse is rated at 5A, but an 8A version can also be used. The PTC fuse is put in place, along with a diode in parallel with the input power, to protect the entire system in case the power is wired backwards into the back plane board.

12V is the relay driver power. The two 30A relays have a 12V coil and a DRV8803 device is used to enable/disable these relays. A conventional 7812 regulator is used to step down from the VM rail.

3.3V is the CNC Machine Logic side rail. 3.3V are used while a TL2575, with 3.3V fixed ouput, Buck Converter regulator is used. A 5V version is available in case the user prefers said rail voltage. However, the modules designed at the moment are 3.3V compatible so this rail was chosen.

Inputs and Outputs:

The CNC Mother Board’s flexibility is based on a back plane topology which allows for different modules to be interfaced into the main board. Female header connectors supplying control signals, as well as VM and 3.3V power, offer this connection.

In this portion of the schematic we can also see the home sensor connectors. There is one per axis, as well as the Emergency Stop. Do note that although these inputs have been labeled as home sensors, is up to the user how they are employed. All of these inputs have been pulled up. When an external switch closes, an asserted LO signal is recognized by the controlling software.

Relay Driver:

Two 30A solenoids are provided to power up large inductive loads such as routers, vacuum cleaners, pumps, etc. The two solenoids are labeled as Spindle and Spare. These are just names and can be associated as necessary within the controlling software’s configuration menus.

A DRV8803 device is used to enable/disable the relay coil. An important aspect of the DRV8803 is that we can enable it with a control signal. We are using an MSP430G2210 small microcontroller to operate as a watchdog function, also known as the Charge Pump. MACH3 is capable of providing a 12.5 KHz signal whenever it is in control. This is important as we want to ensure these relays are not enabled unless MACH3 is in control. A lack of this feature could result in a very dangerous scenario. Regardless, it is advised for the user to follow proper safety guidelines while operating any CNC equipment and we cannot be made liable if such safety guidelines are not followed.

The MSP430 is continuously sampling pulses and increasing a variable every time a rising edge on CP is received. At the same time, an internal timer is decrementing the variable. If the variable goes above certain threshold, then the DRV8803 is enabled. If MACH3 stops to work, the 12.5KHz dissapears and the internal timer takes the variable below another threshold which is a command to disable the DRV8803 driver.

Each relay has a 250VAC varistor used to limit the voltage across the relay terminals. When an inductive load is switched off, the current cannot be made zero instantaneously. Since the path is broken, voltage increases to “infinity”. The varistor takes on the current and clamps the voltage to 250V, which is a safe value for the relay.


Although the stepper driver modules are protected against all sorts of problems (Over Temperature, Over Current, etc), there is always a chance that the computer side will be hit with high voltage. Since this is very dangerous for the computer, it is always a good idea to isolate the computer from the rest of the CNC machine. To achieve this, we are using ISO72xx which take advantage of Texas Instruments Silicon Isolation barrier. The advantages of this topology are many and out of the scope of this article. However, do note they are excellent for this kind of application.

The ISO72xx devices require 2 voltage rails: one for the input side and one for the output side. We are using the 5V from the USB connection as the input side rail (PC Computer side) and the regulated 3.3V as the output side rail (CNC Machine side).

3 comments for “Secrets of CNC Control Board Electronics

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.