The Challenge: Develop a highly expandable and easy to use control system for the rapid development of fabrication machines.
Technical Approach: This ongoing project has been embodied in several forms during the course of its development alongside many of my machine-building endeavors. The common thread is the real-time control of machine elements (such as stepper motor drivers) over a network by virtual machines running on an attached computer. Above, a networked stepper motor driver is shown integrated into the capstan-driven axis of my PCB milling machine. To its right is a first pass at a virtual machine interface. Virtual machines are small programs which understand both the inner workings of and how to communicate with their matching physical machines. For example, a virtual motor controller knows how to cause its real motor controller to spin a motor at various rates. Multiple virtual machines and real machines can be connected over a network to generate simultaneous multi-axis motion. The advantage of this approach is the ease with which functionality can be added and manipulated. The use of Python as the programming language for the virtual machines opens many opportunities for capitalizing on an immense set of libraries in a user-friendly syntax.
Selected Design Features: Over the course of this project, a variety of physical and virtual machines have been developed. The focus has been primarily on stepper motor controllers/drivers: boards have been made which control unipolar and bipolar stepper motors using methods ranging in sophistication from discrete MOSFETs to current-controlled driver ICs. Whenever a module is attached to the network, it assigns itself a randomized IP address which is reported to the virtual machine interface running on a PC. This address can then be assigned to either the X, Y, or Z axis within the collection of virtual machines. Motion commands are provided in Python rather than traditional g-code because of the language's flexibility. A rough user interface (shown above) has been implemented using Python's Tk package.