Computer and Controls


The original computer used on the first servo drive trial table was a hand-me-down that turned out to be a 1995 Cyrix 6x86 133MHz.

This was plenty fast for using TurboCNC as the controller. TurbocCNC can be operated on an ancient 486, so getting started in CNC does not mandate a new computer.

Mach2/3 requires at least Windows XP. An entry level 2004 Compaq w/ AMD Sempron with 256 MB SDRAM is still used here with Mach2, and it is still going strong in the mid 20-teens.

This is mentioned because there once was concern about the processing power required, but now even old computers are fast enough.

This shop is still using Mach2 because Mach3 requires a faster graphics card than the old Compaq has.

Often a newer faster computer is used in the home-office for the CAD work, and an older computer is used in the dust of the shop.
The g-code files can be transferred by USB thumb drives when the shop computer is not networked.

Laptops are not always suitable for CNC because of their ports and power management systems.

Also note that screen savers and other background processes can interfere with the controlling software.


The unit resting on the back of the monitor is a USB numeric keypad. This serves as an inexpensive pendant that controls each axis. It is in a sandwich bag to protect it from dust.

A wireless keypad was tried as a pendant. However, its lack of consistency made it unsafe for all but the most basic moves.
The wired keypad has received the most use because it is dependable.

The keyboard and pendant arrow keys, 4, 8, 6, and 2, move the X and Y axes. The Page Up and Page Down keys move the Z axis in Mach.

Top of Computer Cabinet
Numeric keypad as pendant.

With Mach's Keygrabber, the keypad can be programmed to do a couple of other functions without tying up standard keys.

Auxiliary Relay

relay circuit
This is a simple relay circuit that utilizes a 2N7000 FET.  Its use simplifies the wiring of the relay.

A 5 volt relay can be powered from the 5v PC power supply lead.
This relay can in turn activate a higher current relay or HVAC contactor that controls the spindle, vacuum or other device. sells a variety of contactors.

The diode is a 1N4001, but anything in that ball park will work.
The 5v relay, diode and FET are from They ship in small quantities.

The photo shows a relay with a FET and a diode wired to an Arduino for a non-CNC application. This same relay circuit and its parts have worked well with parallel port and Arduino projects.

The relay shown has been discontinued but there are many options; choose a relay with a low coil-current so it can be powered by the Arduino or computer.

It is important to note that when shutting down the controlling software, the parallel port pin that controls the spindle's relay can change state and turn on the spindle.

This happened here, and was resolved by placing a manual master switch, as well as a master relay switch, between the 5v from the computer and the bank of relays.
Arduino with relay and FET
Relay with FET and diode.

There is also a manual switch between the router-spindle and its relay controlled power supply. Also included is a pilot light that indicates when the relay is activated.

Do not trust the electronics to always control the spindle. Manual overrides save jobs and fingers.

Drive Enclosures

Here are some pictures of different drive and power supply enclosures that have been used over the years. Experience has taught that big boxes make work much easier.

The cases from old computers and home electronics are good raw materials for enclosures.

The components were initially put in panel boxes but the space was too tight for the relays, so a computer case was used.

The boxes below are made of scrap plywood, counter-top laminate, 1/8" tempered hardboard, and yup, that is an old speaker grill used as a vent cover.

Homemade power supply box.

HobbyCNC drive in home-made box
Homemade drive box.

Though not obvious in the photos, there are vent holes in both ends of the boxes so air can pass over the components.

The boxes are not going to win any awards, but boxes, however crude and simple, are definitely a worthwhile ounce of prevention.

These last two images are of the cheapest drive and power supply box you will find. It is a plastic shoe box with the components fastened to the lid, now the base of the box.

Holes were drilled in the side of the clear plastic top to allow air to be inhaled and exhausted by the fan, which blows directly over the drive board.

The steppers are plugged into the receptacles that are mounted on the lid.

The entire assembly hangs off the back of the computer station or the machines by the keyhole hooks made of hardboard.

This hanging orientation keeps dust from falling into the fan holes, and permits the wires to hang without the potential for bending fatigue.

Panel boxes.
Panel boxes hold drives.

Computer cabinet control box.
Computer cabinet control box.

Cabinet with fan vent
Cabinet with fan vent.
Here is the g-code for the fan vent.

Plastic Control Box
Cover made from shoe box.

Plastic Control Box
Holes permit air circulation.