“The true essence of things
lies in the masterful guidance
of the dance of their natures.”
— Amonemhep: Wisdom of Ptahhotephef.
The control unit for a machine, in some ways, is a thing unto itself. In many cases, it is an entirely standalone device equipped with universal interfaces for interaction with both humans and machines. This characteristic was particularly important to me at this stage, as the control unit being developed was intended to be cloned in the future and applied, without significant modifications, to another machine already present in my workshop. But let’s take it step by step…
The original control unit for this machine was utterly inadequate.

Details about it were covered in the first part of the story. For the restored version of the machine, not a single component was taken from it. In fact, there wasn’t even anything worth saving for future use, apart from the transformer. And even that…
Ultimately, the new control unit was built entirely from scratch. This is what the discussion will focus on next.
During the general assembly phase, a temporary control unit was constructed, incorporating all the key components of the future control system:

Many of these elements had to be recreated, but in a more rational and polished form. The exception was the spindle control system. At the temporary stage, it was implemented exclusively to support the old spindle: transformer → rectifier → control board. All of this would become obsolete. The new spindle relies on different components:

Although, in essence, the components serve the same purpose. They’re simply wrapped in modern packaging. Instead of a transformer with a rectifier, there’s a proper power supply. Instead of a homemade control board, there’s a driver with a much wider range of functions (including a display showing RPM), and so on.
The only components of the temporary control unit that will be used later are the controller itself and the motor drivers.
When designing the new control unit, it was important to aim for maximum universality. And here’s why: for my mid-size CNC wood router, I plan to carry out a similar “upgrade” in the future — replacing all the stock electronics with exactly the same setup being developed for this project. Consequently, it will require an identical control unit with only minor modifications. To avoid duplicating work, it was essential to standardize everything possible — so there wouldn’t be a need to reinvent anything later.
Moreover, potential future requirements had to be taken into account, as they might arise during the machine’s operation. Right now, the machine is 4-axis (X, Y, Z, and A) — but there’s a chance I might want to add another axis later on. Even more likely, though, is the desire to incorporate an automatic tool changer and a coolant supply system. These possibilities had to be factored in from the start, ensuring that the control unit would be expandable. For now, it might look like an unnecessarily large, half-empty box — but in the future, it’s expected to pay off… theoretically.
With these considerations in mind, a design was developed that could accommodate two power supply units, a control board, numerous relays, and up to 8 standard-sized drivers:


It’s worth noting that the control board, along with the FluidNC firmware, supports a maximum of 6 axes. The inclusion of space for 8 drivers in the control unit’s design is essentially a way to reserve additional capacity for future system expansions:

For this particular machine, 5 of the 8 slots will be occupied: drivers for the X, Y, Z, and A axes, plus the spindle driver. Three slots will remain “reserved.” In this context, it’s convenient to think in terms of these “driver” slots — since they are relatively standardized, like rack units in a server cabinet. Any device built in the form factor of such a “unit” will fit into one of the slots in the control unit’s chassis.
Thus, the control unit can be conditionally divided into 7 main components:

- Front panel
- Power supply compartment
- Service compartment
- Driver compartment
- Controller compartment
- Rear panel
- Casing
All of this was carefully worked out at the level of a 3D model, taking into account the existing assemblies and components.
Front Panel
For the sake of universality and potential modification, the front panel was designed to be “modular.” It consists of a primary structural part and two insertable subpanels:

In general, the main structural part always remains unchanged, while the subpanels can be configured however needed, depending on current requirements. Buttons, switches, indicator lights — all of these can be arranged in any desired layout. Moreover, there’s absolutely nothing preventing changes to the configuration in the future with minimal effort and without affecting other components of the unit. For instance, if an additional switch is needed, it’s enough to reprint the subpanel with the new holes and install it in place of the old one.
The base for the structural part was printed as a single piece — fortunately, the printer’s bed size allows this:

The upper subpanel of this structural part is dedicated to controls specific to this machine (for a different machine, it would have a different setup).


The main power switch is self-explanatory. It turns the entire system on or off.
The emergency stop button below it cuts power to all motors, regardless of the controller’s state. It is entirely independent of the controller and physically interrupts the power supply circuit for all relays connected to the motor drivers. With no power, the relays — all of which are “normally open” — disengage, and everything comes to a stop. No electricity, no movement.
Always remember: we remain the dominant species on this planet only as long as we can pull the plug on the robot!
The rest of the control elements were dictated by the available features of the spindle control components. The system was wired so that the spindle’s on/off state and speed can be controlled either automatically — via the controller using G-code execution — or manually, bypassing the controller.
This manual mode is especially useful when the machine is being used as a small “manual” milling machine.
On my larger machines, I often found this functionality indispensable — particularly when fabricating a simple one-off prototype. Typically, some random scrap metal would be used as the starting material. Naturally, before cutting, this scrap would need to be turned into a basic workpiece, at least by machining one flat surface for proper positioning. Instead of spending half an hour designing a model of the random scrap and creating toolpaths for a single face-milling pass, it was much quicker to manually set the spindle speed and simply crank the axis handle manually, using the machine in a primitive old-school fashion. A couple of minutes, and the flat surface is ready.
The good news is that the RPM display included with the driver shows the actual current spindle speed, not just the value set by the controller or manually. The bad news is that there’s no feedback mechanism. That is, if the spindle speed drops due to material resistance, the driver won’t automatically adjust it. However, it will at least display the real speed — which is already helpful. For a machine of this size and power, you wouldn’t expect dramatic deviations in RPM anyway. Minor speed drops can always be compensated manually during operation via external control.




Another point to remember: the spindle’s on/off switch operates independently of whether the machine is in “manual” or “automatic” mode. If it’s off, it’s off. Period. In any mode. This is because I’m a paranoid lunatic with an intense fear of fast-spinning objects with razor-sharp edges. The machine doesn’t yet have automatic tool changing, and I want to be absolutely certain that during manual tool changes, no dumb electronic system will suddenly decide to spin up the spindle. Sure, nothing like this has ever happened to me — but as they say, even a blind squirrel finds a nut once in a while.
Yes, of course, the same effect could be achieved by pressing the emergency stop button. But that would also cut power to the axis motors. Additionally, the controller would register an emergency stop signal and “freeze” all its functions — which is usually unnecessary, especially during tool changes. When you change tools manually, it’s all too easy to accidentally move the carriage with the motors powered off. This would inevitably cause the machine to lose its cutting coordinates, requiring a complete re-alignment. The dedicated spindle switch solves this issue — keeping the axis motors active while ensuring your fingers stay safe.
Overall, the set of controls on the unit is kept as minimal as possible.


The lower subpanel on the front panel functions as an air intake:

In practice, though, it’s a reserved space for additional controls, should they ever be needed in the future.
For now, this subpanel is a simple frame with a very fine stainless steel mesh stretched across it — the kind typically used as a fan filter. It only allows through extremely fine dust.


This setup should be sufficient to protect against metal shavings and similar debris. However, if it turns out in the future that this isn’t enough, I’ll add a filter made from a nylon “scrubber.” Time will tell.
Rear Panel
The rear panel of the control unit is also kept as simple as possible. It houses only the connectors for connecting to the machine and the main power input. As with the front panel, the main structural part of the rear panel was printed in a single piece:

Similarly, the “modular” principle was applied here — one common structural base and several subpanels mounted on it.

It wasn’t mentioned earlier, but all such subpanels are 3D-printed parts onto which a vinyl film is applied, featuring labels or pictures printed on a standard printer:




One significant advantage of the “modular” approach in this context is that there’s no need to work with a soldering iron deep inside the unit’s enclosure. You can simply remove the subpanel with its components, place it on the workbench, and assemble or solder everything neatly in a comfortable environment. As a result, all the wire harnesses leading from the connectors and controls were assembled as neatly as possible, using heat shrink tubing, nylon sleeves, terminal connectors, and so on.



This is particularly important when assembling the high-voltage section, where utmost precision is required. Clearly, it’s much easier to work when such elements are freely accessible from all sides:


About the Fans… I have to admit, I might have overdone it here. A single small fan would’ve been enough. But somehow, I ended up in the very center of an Euler-Venn diagram (“Science, Bitch!”):

I used server-grade 120mm fans. I have an entire box of them stashed away. There’s an interesting story behind how I ended up with so many, but I won’t bore you with it here. The most important thing is — I have more of these fans than I know what to do with! As a result, the excessive use of these fans in ridiculous quantities in inappropriate places became inevitable.


This is precisely why the front panel needed that massive “air intake.” Without it, the powerful server fans would create a near-vacuum inside the enclosure — something close to cosmic levels. And vacuum, as we all know, is a poor conductor of heat. Cooling requires the circulation of a substance… Of course, I’m exaggerating. In reality, with a smaller intake, the control unit started emitting an annoying whistle. The options were either to slow down the fans or enlarge the intake. I couldn’t bring myself to do the former, so I did the latter. And now it looks like this.
Honestly, if I attach simple wings to the enclosure, it might even be able to fly.
Drivers Compartment
The drivers compartment occupies the majority of the space inside the control unit:

Essentially, it’s just a lot of open space with mounting points for stepper motor drivers. Most of these drivers adhere to fairly standard dimensions, meaning anything else with the same size and mounting configuration can also be installed in this area.

For example, the spindle driver has nothing in common with motor drivers, but since it shares the same form factor, it fits perfectly in this compartment.

In this case, I used DM542T motor drivers from STEPPERONLINE:



Unfortunately, these drivers don’t come with heatsinks. I had to find suitable ones myself, drill holes, tap threads for mounting screws, and install them:




That said, if I ever need to add a new component to the system in the future — let’s say, a special control unit for a coolant pump, complete with an aquarium for tiny rough-shelled shrimp — I’d simply need to design it in the same form factor as these motor drivers, and it would fit seamlessly onto the pre-existing chassis in the enclosure.
Controller Compartment
This is where the controller resides — the very brain that manages the rest of the system. And nothing else.

The design isn’t tied to this specific controller configuration, and there’s enough space in the compartment to accommodate just about any other controller. For now, it’s set up as follows:
- ESP-WROOM-32 based on ESP-32S
- 6 Pack 2.0 External control board by bdring
- Control board modules (spindle, input, output) also by bdring
At present, the controller is equipped with all the modules, just in case:

The input and output modules are not actively used in the current system configuration. They’re simply there for now. The default I/O available on the mainboard is sufficient, with even a couple of spare pins left unused. So, if there’s ever a need to expand the controller’s functionality, there’s room for that…
Typically, people use these “extra” I/O pins for basic control buttons, such as “Stop,” “Pause,” “Cycle,” etc. However, I decided against placing such buttons on the control unit. First, they wouldn’t fully cover all the control needs for the machine. Second, as mentioned earlier, there will be a separate large operator console for this purpose.
Power Supply Compartment
This is the second largest compartment inside the control unit, designed to house two standard “bricks.” Two power supplies are necessary because the spindle requires one voltage (48V), while everything else runs on another (24V). Moreover, both systems demand a significant amount of power. Thus, it’s simpler to use two separate, full-power supplies rather than relying on a single unit paired with a bunch of questionable converters.

Unfortunately, I forgot to take photos during the assembly stage, but there wasn’t much to capture anyway. It’s just two aluminum bricks, each secured to the supporting frame with four screws.
Service Compartment
This compartment houses various auxiliary equipment necessary for maintaining the operation of the primary components and providing additional service functions.

At the moment, this is where the relay block resides. It has 8 “channels” and is primarily used to operate the “emergency stop button.” When pressed, it cuts off the power to all the motor drivers (essentially, it disconnects power to the entire relay block, sending all the relays into their “normally open” state).

Five relays handle the power supply to each individual driver (“divide and conquer!”). One relay is repurposed to send a conditional signal to the controller when the emergency button is triggered. While the controller can’t actually do anything to resolve the situation (the motors will inevitably stop without power), it will at least be informed of this unfortunate event and pause the current program. In theory, the controller could still attempt to perform some ill-advised actions, but at that point, nothing will be at risk, and the controller can simply flail helplessly until it’s reset.
Turning everything off with the emergency button isn’t a great idea — it removes the ability to investigate what went wrong. The emergency button’s role is to stop the machine’s kinematics while keeping its logic intact. Often, this allows you to make adjustments to the machine’s behavior and resume the cutting operation without losing all progress prior to the incident.
Additionally, this compartment houses a step-down converter for the controller board:

In principle, the controller board can operate directly on 24V from one of the power supplies. However, 24V is its maximum rated input. It’s better not to stress the electronics unnecessarily if it can be avoided. With the step-down converter bringing the voltage to a comfortable 12V, everything runs much smoother. Plus, the LEDs for illumination need a power source too!
Enclosure
The enclosure consists of a set of external panels. The key feature here is that none of these panels serve as a structural support for the internal components. The design ensures that to access any part of the control unit, there’s no need to disassemble the entire enclosure. You only need to remove one front/rear panel and one side/top/bottom panel (depending on what you need to reach). Everything else can stay in place, which greatly simplifies maintenance.
For example, accessing the controller:

Or adjusting the settings on the stepper motor drivers:

Convenient…
Conclusion

As mentioned at the very beginning, this control unit was designed not just for this specific machine but also for the “woodworking” machine, which is already queued up as the next project.
But even with this current machine, the story is far from over. So…
The conclusion of the series can be found here…