Professional Documents
Culture Documents
CAN Field Bus For Industrial-Controls Applications in High-Energy Physics Experiments
CAN Field Bus For Industrial-Controls Applications in High-Energy Physics Experiments
W.P.J.Heubers, H.Boterenbrood, J.T.van Es, R.G.K.Hart NIKHEF National Institute for Nuclear and High-Energy Physics Amsterdam, The Netherlands ABSTRACT
CAN bus, a popular field bus choice in industry, has gained momentum in high-energy physics research for industrial-controls-like applications in experiments and accelerators. This paper describes at first the controls problems which next-generation particle-physics experiments are facing. It will then discuss the hardware and software developments of prototype systems for analogue sensor readout by the CERN-recommended CAN field bus.
INTRODUCTION
The Large Hadron Collider (LHC) at CERN is a particle accelerator that will collide beams of protons with an energy of 7 TeV. Four high-energy physics particle detectors will be installed on well-defined locations in the 27-km long accelerator ring. These detectors will be designed, built and operated under responsibility of large collaborations with participants from all over the world. Because of the extremely long time scale, the start of LHC operation is foreseen in 2005, and the complexity of the instrumentation one has to take care that when possible, widely accepted industrial standards and solutions will be implemented. Reliability and maintainability have to be ensured during the many years of operation. A typical area where one can not select standard industrial solutions is the inner part of the detector, where space is limited and environmental conditions are hostile. Especially the amount of radiation and constraints concerning low-power dissipation and limited space, require custom designed and radiation-hard electronics for the readout of the large number of data channels. In the outer parts of the detectors the environmental conditions are somewhat better and one can consider the use of commercially available electronics, such as micro controllers as intelligent nodes connected to a field bus. Physicists and engineers cannot enter the caverns where the detectors are installed to inspect the functioning of the instrumentation when LHC is operating. A reliable and redundant control system is required to be able to set and monitor the estimated number of several 100,000 I/O points remotely from the control rooms. Mixing of the control data with the physics data on the high bandwidth data channels from the detector to the counting rooms must be avoided, to prevent a blocking of the control signals in case of congestion in the data channels.
tems (most likely VME) with connections to field bus networks and PLC systems.
Apart from the temperature sensors and Hall probes, output from other sensors, such as strain gauges or gas pressure sensors, can be digitized and collected by the CAN nodes as well.
After a short description of the DCC and the Quad-HV, we will give a more detailed description of the Crystal CAN system for analogue sensor readout in the next chapters.
analog in n selection
sensor 1
Analog Mux
sensor 2 n
Controller Module
1 SCLK SDI SDO 3 selection 8 3 2 3
sensor 2
Sensor Module #1
Digital Mux
analog in n selection
sensor 1
Analog Mux
sensor 2 n
sensor 2
Sensor Module #2
SCLK,SDI,SDO
analog in n selection
sensor 1
Analog Mux
sensor 2 n
sensor 2
Sensor Module #8
delivered with the module. The controller module also contains a multiplexer chip to enable connections to several sensor modules. One controller module may control up to eight sensor modules. A digital multiplexer-chip is used to switch the controllers serial interface I/O port to any of the connected sensor modules. The CRYSTAL CS5525 ADC [7] is the heart of the Sensor Module that digitizes the analogue quantities to be measured. This 16-bits ADC contains an instrumentation amplifier, a programmable gain amplifier, a digital filter and calibration circuitry. It also has four output latch pins, which are used to control an external analogue multiplexer to directly select any of up to 16 analogue inputs. In our case we use the CPD output as a fifth bit to be able to select even up to 32 analogue inputs. The CS5525 can perform conversions with rates of 3.76, 7.5, 15, 30, 60, 123, 169 and 202 Hz with voltage input ranges of 25 mV, 55 mV, 100 mV, 1 V and 5 V, unipolar as well as bipolar. The CS5525 is controlled through a three-wire serial interface that is compatible with SPI and MicroWire standards. The interface signal lines are connected to I/O ports of the micro controller in the controller module, which runs software implementing the protocol across these lines [8].
System configuration
Figure 1 shows a schematic of a general configuration of a Controller Module and a number of Sensor Modules. Typically the sensor modules are located a variable but relatively small distance from the controller module and connected by a cable, carrying the control signals and power. The individual sensors either are part of the sensor module or are connected to the sensor module by a cable. The controller module is connected to the outside world through a CAN field-bus. The CAN-bus can extend several hundred meters with its -in this applicationforeseen 125 Kbit/sec transfer rate and can connect up to about 64 controller modules, thus providing the required distributed control capability. Figure 2 shows a possible configuration of a local control station as part of the DCS of the ATLAS detector. It is a hierarchical system: the controller modules monitor the sensors, the Bus-to-CAN interfaces possibly may possess some intelligence and monitor the controller modules on their CAN-bus and the host controller monitors the various CANnetworks through the system-bus interfaces and may provide a local (graphical) user interface. The whole system is remotely monitored and controlled by the central DCS.
controller + sensors
controller + sensors
controller + sensors
controller + sensors
Host Controller
Bus-to-CAN interface
CAN bus
CAN bus
Bus-to-CAN interface controller + sensors
controller + sensors
controller + sensors
controller + sensors
ATLAS detector
B-field sensors
The B-field Sensor Module [9] consists of six Hall elements, a reference element, a temperature sensor and the CS5525 ADC, multiplexer and some additional electronics. There are a total of eight analogue quantities to measure: six B-field values, a reference resistor for calibration and an NTC temperature sensor. The hall probes are calibrated regularly for a full scale of 1,4 Tesla with a resolution of 50 microTesla. The maximum scan frequency is in the order of 10 Hz and is determined mainly by the time needed for the analogue signal to stabilise after switching the analogue multiplexer. The components of the sensor module do not contain materials that disturb the magnetic field.
Device NODE CAN RS232 ADC PWM WD PAR_IO DIG_IO HEX HV BST CS5255
Number 1 1 1 1 1 1 1 4 1 4 1 8
Description General status of the node CAN controller/interface Serial I/O port 10-bits internal ADC Pulse-width modulator output Watchdog timer 8-bit parallel I/O port 1-bit I/O port On-board hex switches High-voltage supply controller JTAG port with BST functions 16-bits CRYSTAL ADC
Temperature sensors
The temperature sensor module [10] consists of a small box containing the ADC, multiplexer, reference resistors for the calibration inputs, some additional electronics and 30 connectors for the NTC temperature sensors, which can be spatially distributed around the module (distances between NTCs and box are typically up to several meters). There are a total of 32 analogue quantities to measure. The input voltage to the ADC on the module as a function of the temperature of the NTC temperature sensor is a non-linear function, requiring a lookup table. Table 1. Software devices defined for our applications. can handle a status request, although the format of the status returned depends on the type of the device. Two types of devices can be distinguished in our applications: 1. Simple or standard devices mapping directly to the 80C592's I/O-devices, like the ADC or the 8-bit I/O ports, or mapping to the hardware layout, like the hex-switches which are mapped to I/O port 0 (via a buffer with enableinput) or the on-chip watchdog. Specialized devices that combine certain 80C592 on-chip I/O-devices in combination with specific hardware to form the functionality of a more complex kind of device, e.g. a high-voltage supply (with a ramping function, a trip-monitor function and a calibration function) or a JTAG interface with Boundary Scan Test (BST) functionality.
SOFTWARE ASPECTS
Higher-level standards for communication across the CAN-bus are available from several suppliers in the market. Examples of these communication standards are Smart Distributed System SDS from Honeywell, DeviceNet from Allen-Bradley and CAL/CANopen from the CAN users and manufacturers association CAN in Automation. Nevertheless it was decided to develop our own simple protocol in order to get started quickly. It was also assumed that the overhead of a high-level standard for the relatively simple applications we planned would be too costly. Moreover, the high-level standard preferred by us -the non-proprietary CANopen protocol- was not available at the time that we started developing our first CANbus applications. Actually, it is seen as one of the advantages of the CAN-bus that it is so easy to implement one's own application-specific protocol and quickly get to a working system. All software written for the CAN nodes has been written in the C-language. The software is designed in a device-oriented manner: a CAN module can be viewed as a collection of devices, each device being of a certain device-type (class), capable of handling certain commands (processing certain received messages) and sending certain messages or replies. In line with the object-oriented approach is that commands can be given to any or to several device-types although the exact action performed by a device depends on its device type. E.g. almost any device 2.
Table 1 lists examples of devices that have been defined for our applications. The Number column indicates the quantity of a certain device type present in the node. This number can vary according to the requirements of the application. Besides this notion of devices, the functionality of the software includes network management capabilities, like remote reset of nodes, remote configuration of CAN-controller baud rate, connecting / disconnecting individual nodes and node guarding. The values of devices (e.g. a temperature value) can either be monitored periodically by the network host or can be reported asynchronously by individual CAN nodes when the value exceeds a preset minimum/maximum value.
FUTURE DIRECTIONS
We expect CAN field bus networks be implemented on a large scale in those parts of the future high-energy physics particle detectors, where radiation levels are below a certain level (which is not quantified yet). This excludes the inner parts of the detector, includes probably the outer parts, such as the MUON detector and includes certainly the large number of crates and racks in the counting rooms. In the developments so far we used a commercially available CAN hardware building block based on a type of micro controller we were familiar with, offering ample memory and I/O to ease and speed up development of hardware as well as software. Keeping in mind the large number of sensors required in the coming high-energy physics experiments, in future developments we aim to minimize the hardware in terms of cost, power dissipation and space requirement, however without loosing completely the flexibility we now have. The emphasis will be put on the development of hardware for true -general purpose- control and monitoring tasks, not so much for special purpose tasks like the Detector Control Card we described in this paper, whose main task is to configure hardware on behalf of the data-acquisition system. Conformance to an open high-level standard for the CAN communication protocol used in the CAN application software will certainly be beneficial, especially when the number and the size of the applications will grow, as well as the number of people involved in the project will grow. Moreover the possibilities of integration of commercially available CAN equipment as well as supervisory tools and other (commercial) utilities will be greatly increased when using an open standard. The CANopen communication and device protocol [11] defined by the CAN in Automation users and manufacturers
group (CiA) is a likely candidate to be used as the communication layer standard. CANopen offers -if needed- complete configurability of device and communication parameters, while at the same time allowing on the same network very simple minimal capability devices, because the mandatory minimum requirements for a device to function in a CANopen network are only few. The CANopen standard has the capability of mixing real-time data with non-real-time on the same network without compromising the real-time behavior.
REFERENCES
[1] ATLAS Muon Spectrometer, Technical Design Report (chapter 11), CERN/LHCC-97-22, 5 June 1997 [2] Recommendations for the use of field buses at CERN, Guy Baribaud et al, CERN-ECP/96-11 [3] Road Vehicles Interchange of Digital Information Controller Area Network (CAN) for high-speed communication, Document ISO/DIS 11898, International Standard Organization, 1993 [4] CV002 VME, MicroSys Electronics GmbH [5] 20CN592 80C592 based micro module with an on board CAN bus controller, MicroKey B.V. 1996 [6] Boundary Scan Test, H.Bleeker et al, Kluwer Academic Publisher, 1993 [7] CS5525/CS5526 16-bit/20-bit multi-range ADC with 4-bit latch, data sheets, Crystal Semiconductor Corporation, Sept 1996 [8] Interfacing the CS5526 to the 80C51 Micro controller, AN74, Crystal Semiconductor Corporation, Sept 1996. [9] 3D Magneetveld meter, J.T. van Es, NIKHEF-ETR 97-05 [10] NTC-Temp.sensor Scanner and Conditioner. J.T. van Es, NIKHEF-ETR-97-03 [11] CANopen, CAL-based Communication Profile For Industrial Systems, CiA, DS 301 Version 3.0, October 1996