This is some documentation for my CNC motion control board and it is currently an work in progress.
The parts list is kept in a separate file.
The power supply schematic is shown below:
The power supply is pretty mundane. The 110VAC comes in on connector N17 and is hooked in series with a power switch SW1, a fuse F1, and the primary coil of transformer T1. The secondary coil of T1 produces 24VAC at 12 Amps and is routed through the full wave bridge rectifier BR1 and onto the controller board at connector at pins 1 and 5 of N12. A large off-board filter capacitor of 10,000µF (C31) is connected to the controller board at pins 2 and 5 of N12. In addition, a 24VDC cooling fan is connected at pins 3 and 6 of N12. Resistor R12 and red LED D33 will bleed off the charge of C31 when power is turned off. As long as D33 is lit, there is charge on the capacitor and extra care should be taken. The 24V primary coil is rated in RMS (Root Mean Squared), so the actual peak voltage is 24V/.707 or approximately 35 volts. The unregulated voltage is used by the stepper and selenoid drivers as VDC. The unregulated voltage is stepped down through VR1, VR2 and VR3 to produce the 5 volts needed by the digital circuitry. The reason for using 3 voltage regulators is because 1) the stepper motors and selenoid chopper circuits will be causing a fair amount of roughness on the unregulated voltage and 2) the amount of heat generated will be spread across 3 voltage regulators rather than just 1. While the schematic does not show it, there are test points for each of the voltage regulators on the PCB. Lastly, power on is indicated by the green LED D34 which is current limited by R36. LED D34 is mounted off board on the chasis.
The I/O microcontroller schematic is shown below:
The I/O microcontroller U11 is only needed if the user intends to use either the RS-232 connector N9 or the USB (Universal Serial Bus) connector N10. The PIC16C745 is needed to support both USB and RS-232, whereas a simpler PIC16F876A is can be used if only RS-232 support is needed. The microcontroller firmware emulates the 25-pin DB25 parallel port connector N11. The microcontroller can detect the usage of the parallel port when pin 1 of N11 is pulled low; otherwise, the microcontroller detects that there is no parallel port in use by having pin 1 pulled high by R18 and assumes that some form of serial communication is going to be used. All of the RESET lines for all of the microcontrollers are tied together and pulled high by R19. The U17 MAX232 RS-232 level converter chip is used to convert between RS-232 levels and microcontroller logic levels. Connector N10 is used for USB communication. Resistor R16 and capacitor C21 are used to indicate to the USB host that this is a slow speed line. Lastly, N14 is used to connect to an off board red fault LED D35 through current limiting resistor R9.
The RS-422 and limit switch schematic is shown below:
Differential RS-422 is used for off board signalling because of the excellent high noise rejection capabilities. Long wires tend to behave like antennas and pick up the noise from flouresent light bulbs and local HAM radio operators. RS-422 is able to avoid most of those problems. All control and sense operations are bundled into two 8-pin mini-DIN connectors N6 and N7. There was no extra board edge space fore additional conntectors. All logical level signals are converted to RS-422 voltage via the quad differential driver U13. The motor and drawbar signals are routed to N6 and the pump and "other" signal is routed to N7. In addition, two RS-422 signals are converted to regular logic levels by U10. The probe signal comes from N7 and the spindle tachometer signal from N6. Resistors R13 and R14 are line termination resistors. Lastly, any limit switches are connected together in series from N7 pin 2 to N6 pin 2. The switches are normally closed and only open when some sort limit condition is encountered. In addition, the normally closed emergency stop switch is connected across N16. If there is any open circuit in the limit switch and emergency stop chain, the EN enable line is pulled low via R17. Otherwise, the +5 volts on pin 2 of N7 asserts the EN enable line.
The X Axis schematic is shown below:
The X axis is controlled by PIC16F676 microcontroller U1. It drives the L298 H-Bridge U6. Current sensing is done via resistors R1 and R2. The maximum current through the L298 is 2 amps, so the maximum voltage drop across the .5 ohm sense resistors is 1 volt for a maximum total power disappation of 2 watts. L298's do not come with clamping diodes, so those are provided externally via schottky diodes D1 through D8. The stepper signals are send out via 5-pin DIN connector N1. The microcontoller is repsonsible for reading the sense voltage using its ADC (analog to digital converter) and manipulating the H-bridge to ensure that no more than 2 amps average flows through each stepper motor winding. Capacitor C13 provides 470µF of additional filtering of VDC close to the L298.
The Y Axis schematic is shown below:
The Y axis is the same as the X axis above, with different component labels.
The Z Axis schematic is shown below:
The Z axis is the same as the X axis above, with different component labels.
The A Axis schematic is shown below:
The A axis is the same as the X axis above, with different component labels.
The selenoid and motor control schematic is shown below:
All control is performed by microcontroller U9. Since there was no other logical place to put it, resistors R15 and R11 form a voltage divider of approximately 1.25 volts that is fed into the VRef pins of the other axis microcontrollers. Lastly, a reset button can be attached to N8 to reset all microcontollers; this button is for firmware development purposes only and should not be installed on the final chasis. The microcontroller U9 is responsible for sensing if the EN signal on pin 5 goes low and quickly disabiling all of its motor, tachometer, drawbar, and "other" signals.
The printed circuit board files are listed below:
The following issues are present on revision D of the motion controller board: