Early on during the testing phase I determined that the safety system needs to be give #1 priority.
The wakeup call was when one side of the Y Gantries jammed and the other did not causing the X gantry to fall out of it's cradle.
This was not a disaster as there was the construction frame holding everything up but it did show a flaw in my design.
As a result I focused on the safety system.
There are a number of mechanical switches used to sense the various error conditions
if any of these contact open during operation it shuts off the power circuit shutting down the machine and will not restart until problem is fixed.
The other concern was connecting the router to the computer.
The power supplies are running at 36V and are rated at 750W.
These motors can produce some serious EMF transients and may damage the controlling computer.
To prevent this I used fibers between the computer and the machine itself.
There are some electronics on the machine but limited to the bare minimum.
There are 4 motors (X, YL, YR & Z) and the X and two Y motors are closed loop with optical feedback to the controller. The Z motor is closed loop and feedback is not used.
Each of the 4 motors have 4 fibers from the computer interface.
Two of the four Fibers carry step, direction and enable data to the motor interfaces. One fiber is the main while the other is for redundancy.
Equally there are two fibers from the motor interface to the computer.
These are again main and redundant channels which carry position information.
The fiber data is bi-phase modulated.
Encoding and decoding is managed by a Xilinx FPGA and a Microchip PIC24JF does the low end monitoring and reporting.
As part of the safety mechanism the 2 quadrature outputs from the motor position encoders is returned to the FPGA so the position can be sent to the computer interface.
At this point the positions of the two Y Gantry positions are continuously compared and if the count is not equal it halts the machine. This is another indication that the two sides are getting out of position with each other.