Virtual Machine Control

An integrated i0 motor driver with captstan-driven motion stage.

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.

i0 bipolar stepper motor driver. network of bipolar drivers.
A bipolar stepper controller board was the first item fabricated on the FabMate in Pune, India. A network of three bipolar drivers are controlled by virtual machines running on an Apple MacBook.
i0 unipolar stepper motor drivers. array of unipolar stepper motor drivers.
This unipolar stepper driver board was built as a testbed for adapting Prof. Neil Gershenfeld's Internet Zero microcode to allow syncronous control of multiple stepper motors over a network. Three networked motor drivers controlled the Foamcore CNC machine (not shown) at Maker Faire 2009 in San Mateo, CA.
misc. boards boards mounted to my senior thesis project.
Several flavors of Internet Zero networked boards were developed as part of my senior thesis: a DC spindle driver, two unipolar stepper drivers, and a jog dial interface. The Low Cost PCB Mill was intended to be controlled by this stack of networked circuit boards.
Virtual machine controller interface. virtual machine controller code written in python.
A rough user interface for the virtual machines was created based on thtp.py written by Prof. Neil Gershenfeld. Python functions are used in leu of gcode to enable easy scripting and advanced functionality.