6. MRM Electronic System
6.3 Spindle Control Modules
The electronic control architecture illustrated in Figure 6.1 was selected for implementation in MRMs. At the head of the control system is a Personal Computer (PC). The advent of faster processors for PCs and a general reduction in their prices have increased the use of PC-based controllers in CNC machines. PC based controllers are generally flexible, open and can be easily integrated into multiple manufacturing configurations [47]. A PC was also selected for implementation due to already existing hardware and software support for Universal Serial Bus (USB) and Ethernet communication. Although Ethernet communication was not implemented in this design, it has been identified as an important supporting feature for MRM integration into factory wide networks.
The electronic hardware is divided into two subsystems that are controlled by the host PC; these are the spindle control system and the servo control system. The desktop PC communicates with both subsystems via USB. The USB 2.0 protocol was implemented due to existing software support, data transfer rates of up to 12 Mb/s and the possibility of port expansion [64]. Further advantages of implementing the USB 2.0 standard include its low cost of implementation and its plug-and-play feature.
The host PC communicates directly with a spindle control module via USB. At any instant there is only one spindle control module attached to the PC and the USB standard provided an acceptable solution. Communication with servo control modules does not occur directly via USB.
The variable number of axes that may be implemented on an MRM created the necessity for a network orientated approach for communication with these control modules. Servo instructions are first obtained from the host PC via USB, the servo communication module formats these instructions according to the Inter-Integrated Circuit Communication (I2C) protocol. These instructions are then placed onto an I2C network (bus) for transmission to servo control modules.
The I2C protocol was selected based on wide support for the protocol in microcontrollers. The I2C bus is a multi-master bus, implying that any device connected to the bus can initiate a transfer of data. The protocols 7-bit address format permits up to 128 servo control modules to be implemented on the network, bounded otherwise by a bus capacitance limit of 400 pF. Data on the bus can be transferred at rates up to 400 kbits/s [65]; providing sufficient bandwidth for the communication of servo control instructions. It should be noted that any mechanical module requiring servo control may be connected to the I2C network, provided that the data packet protocols discussed in Chapter 7 are strictly adhered to. This will allow auxiliary modules other than the machines axes (motion modules) to be connected and controlled via this network.
6.3 Spindle Control Modules
Power Supply
The function of a spindle control module is to control the actuation of MRM cutting heads, as well as provide diagnostic feedback on the cutting process. Spindle control modules map to process modules on a 1:1 basis. A spindle control module is supplied by 12 V DC power, with a low current and high current supply. The low current 12 V supply is internally regulated to 5 V, and powers the internal digital electronics of the control module. The regulated power also provides a source of power to sensors.
76 | P a g e
6.3 Spindle Control Module
The high current 12 V supply, is used to power an internal relay switch from which motors may draw electricity. The separation of the power supply into a low and high current side was to ensure that the digital electronics are not deprived of power by the motors that are driven by the spindle control module. The total power requirement of a spindle control module is 144 watts, or 24 watts if the onboard relay switch system is unused (see Section 6.7).
Figure 6.2: Spindle Control Module
USB Communication
The spindle control module receives instructions and provides feedback to the host PC via USB.
The module consists of a bi-directional USB to USART converter that is based on a FT232RL chip. The chip is USB 2.0 full speed compatible and requires no USB specific firmware programming; the USB protocol is handled entirely by this device [66]. Serial data that has been received by the FT232RL chip is transmitted via USART to the ATmega 32L control board for manipulation.
ATmega 32L Control Board
The main spindle control board was based on the ATmega 32L microcontroller, which operated at 4MHz. The ATmega 32L is a high performance, low power 8-bit RISC chip.
5 V DC power out to sensors
Sensor signals in for A/D conversion
USB 12 V DC input – low current 12 V DC input
– high current
12 V DC power out to motors ATmega 32
Control Board
DC Relay Switch
USB to USART converter 5 V DC Regulator ATmega 32
Dip Socket Relay actuation
terminals
77 | P a g e
6.3. Spindle Control Module
The range of features on this chip is significant, allowing it to be used in both spindle and servo control modules. Features of the ATmega 32L include (but are not limited to):
131 Instructions – most single-clock cycle execution
Up to 16 MIPS throughput at 16 MHz
32 x 8 general purpose working registers
32 K Bytes or flash program memory
1024 Bytes of EEPROM
2 K Bytes internal SRAM
8-channel, 10-bit ADC
Two 8-bit timer/counters
One 16-bit timer/counter
Four channel PWM
Byte Oriented Two Wire Serial Interface
Programmable serial USART
External and internal interrupts
A diagram of the ATmega 32L board is located in Appendix E.2.
Sensor Monitoring and A/D Conversion
The Analogue to Digital Conversion (ADC) facility on the ATmega 32L control boards was used to extract sensor data from the MRM cutting heads. The sensor used for vibration monitoring is the ADXL204 dual-axis accelerometer, discussed in Section 6.6.1. Two of the eight available channels were used on the chip for the measurement of vibrations in both vertical and horizontal directions. Sensor signals were decoded with 10-bit ADC. The vibration data is continuously fed back to the host PC via USB, for process monitoring by the machine operator.
Relay Switches and Actuation
Digital speed control was omitted in process modules (modular cutting heads), with spindle speed and torque ratios being manipulated only by the mechanical mechanisms discussed in Section 5.6.
Process modules were controlled on a simple on/off basis, with the motors being activated by relay switches. The relay switches were in turn activated by 5 V DC signals applied by two output terminals on the ATmega 32L control board. Two terminals were used to provide forward and reverse functionality on the spindle:
Terminal One (off), Terminal Two (off): Spindle stopped
Terminal One (on), Terminal Two (off): Rotate spindle forward/clockwise
Terminal One (on), Terminal Two (on): Rotate spindle in reverse/anticlockwise
Spindle control modules contained onboard relay switches that are capable of supplying 12 V DC power at a maximum of 10 amps to modular cutting heads. In the instance that a module possessed an AC induction motor an AC power box had to be used in conjunction with the spindle control module, this is presented in Section 6.7.
78 | P a g e
6.4 Servo Communication Module