Aimed at the current situation that the domestic automatic meteorological data acquisition system is almost based the use of foreign products, a design method of multi-channel meteorological data acquisition system was given which based on ARM and CAN Bus. In the design, it fulfills the acquisition requirements of the analog signals, digital signals and intelligent sensor data through a combination of hardware and software technologies. In order to improve system’s real-time answering capability and multi-task processing capability, it is uses “main collector + external bus + sub-collector + sensors + peripheral equipment” in structure design of hardware. CAN bus is used for communication between the sub-collector and main collector. At the same time, it is completely coded using Embedded C. The system makes use of GPRS modem to send the meteorological data to the server where it can be monitored. The meteorological data is also sent to a pre registered cell phone number. All the components are connected using cables so as to enable the efficient transmission of data.
INTRODUCTION |
Nowadays meteorology has been closely related to the human civil and industrial activities. Meteorological detection plays an
important role in defense, social and economic development. With the gradual implementation of national sustainable
development strategies, meteorology detection is more important for us. Meanwhile, there are ever increasing demands for
meteorological observations especially in the field of agriculture as India is basically an agrarian economy. The traditional design
pattern of meteorological data acquisition system was based on the single-chip microcomputer. In this situation, there are many
problem including system precision, real-time analysis capabilities, the man-machine interface and so on. Computing power,
storage capacity and the amount of information were limited by this technique. Compared with the situations above, the pattern of
using embedded C coding is more preferred as it is small and reasonably simpler to learn, understand, program and debug. C
Compilers are available for almost all embedded devices in use today, and there is a large pool of experienced C programmer.
Unlike assembly, C has advantage of processor-independence and is not specific to any particular system. This makes it
convenient for a user to develop programs that can run on most of the systems. It is fairly efficient and supports access to I/O and
provides ease of management of large embedded projects. This pattern also has many other advantages, such as speeding up the
development of the system, facilitating the works of the future expansion, improving the timeliness and accuracy of the
meteorological observation, and achieving the commands of automatic meteorological observation. |
SYSTEM DESIGN |
As shown in Fig.1, the design of the automated meteorological data acquisition system is based on the GPRS and the CAN bus. |
Node Side: |
Server Side:Embedded Linux is a kind of small operating system, which is composed by a cut-off core (kernel) and several modules that
depended on the needs. Its characteristics are as follows, micro-kernel of only several hundred KB; supporting X86 and more than
30 kinds of 8bit ~ 64 bit of the MPU and MCU, supporting a variety of ROM memory; the features of multi-tasking, multiprocess
and a certain degree of real-time supporting completed communications network; supporting TCP / IP protocol and other
common agreement; supporting self-developed agreement; a graphical user interface (GUI); supporting network, database and multimedia and communicating data by the network and processing data in real time; source opened which can be cut according
to specific needs; a series of development tools; a good property of software open and the program on the Linux host can be
transplanted to embedded Linux system freely, a strong technical support and so on. |
CAN (controller area network) field bus is a kind of serial multi-master communication network. CAN is not only a network, but
also a kind of protocol. Its main features are as follows, the pattern based on the CSMA / CD model, the use of non-destructive
arbitration mechanism, short-frame data structure; the CRC data check function, the data transmission based on the differential
approach, queue priority according to message ID, the system well expansibility, anti-interference ability and reliability. |
The automatic meteorological data acquisition system which is based on the multi-tasking, real-time embedded C and the CAN
network constitutes a building-block structure, facilitating future updates or changes. |
A. System Hardware Design |
As shown in Fig.1 above, automatic meteorological data acquisition system’s hardware consists of main collector, sub controller,
sensors and peripheral equipment (including power supply, [terminal] computer, communications interface and external memory).
The main collector and sub-collector microprocessors are built using LPC 2129 microcontroller. Its frequency is up to 200MHz
and it has a CAN bus controller integrated in chip. Sub-collector is hang on to the main collector through CAN bus. It has a 16 kB
on-chip Static RAM and 128/256 kB on-chip Flash Program Memory. |
In order to achieve the minimum allocation of automatic meteorological data acquisition system, the main collector is joined only
several basic meteorological elements sensors such as the temperature sensor (LM 35), moisture sensor (HS 220) and a pH meter
taking charge of the collection of the basic meteorological data. |
In addition, the main collector is in charge of collecting, controlling, processing, storing, transmitting all kinds of meteorological
factors’ data and fulfilling the function that configures and manages the sub-collector. The sub-colle |
At the same time, it is also responsible for scanning its articulated sensor according to the predetermined sampling frequency in
the working condition and sending the sampling data to the main collector after receiving the synchronization signal which is sent
by the main collector. When the system is needed of being expanded or increasing element sensors as the change of environment
or technology progress, we have no need to change the connection of the existing sensors and wiring. We just need to add new
subcollectors and /or sensors to the system and conduct simple software upgrade or configuration. |
B. System Software Design |
System software includes embedded operating system and application software. Keil provides a broad range of development
btools like ANSI C compiler, macro assemblers, debuggers and simulators, linkers, IDE, library managers, real-time operating
systems and evaluation boards for ARM families. |
The system software is built in the main controller and the sub controller. The main controller includes: Linux program,
initialization process of the anolog to digital converter and the Control Area Network. In addition, there are several functions
needed to be expanded, such as, the achievement of the agreement to CAN master, the achievement to jffs2 file system in the
internal memory and external memory card, the basic collection, processing, storage and internet transmission of the data, the
establishment of the Web server and remote parameter settings, data monitoring, the loading of data files and the main collector
reset. Sub-collector software is needed to achieve the agreement to CAN slave, scans its articulated sensor according to the pre
determined sampling frequency and converts the electric signal obtained into a readable microcontroller signal, gains the sequence
of measurements of meteorological variables, converts the measurements of meteorological variables, changes the sensor output signal into meteorological units, gets the instantaneous sampling values, and sampling values will be sent to the CAN bus
according to CAN agreement.Compilation of the Keil |
Compilation of the Keil |
The compiler translates C source files into relocatable object modules which contain full symbolic information for debugging with
the μVision Debugger or an in-circuit emulator. In addition to the object file, the compiler generates a listing file which may
optionally include symbol table and cross reference information. Most of the preprocessor functions require activation by
including Preprocessor Directives in your source code. However, the preprocessor always: replaces each C comment by a single
space, removes line continuations (indicated by a backslash ('\') at the end of a line) are removed and joins the lines broken apart
for compilation and replaces predefined macro names with their predefined text. In addition to these operations, the preprocessor
in the Cx51 Compiler supports the preprocessor operations: Header Files, Macros, and Conditional Compilation. |
3) Device Drivers |
Operating system is responsible for managing software and hardware of the system. Device drivers play the role as a bridge
between the hardware and user application program. They make the application program have nothing to do with the under lying
hardware through interface function provided by them. For the system, we need to prepare drives for I/O port, serial and CAN
controller. |
4)Application software |
Application software mainly includes system data quality control software, data processing software and Web browser interface.
The data quality control software of the system pre treats the data that collected, removes the unreasonable data. Then the data
obtained is transmitted to data processing software for processing, forming the specified data format. A data browse page for the
users will be provided by Web browser. Users view the data through the browse page. Besides the web page he or she can access
the data through a cell phone. The user would have to pre register his or her cell phone number in the web page for the above
mentioned service. At the same time, users can achieve the function of data query and data retrieval. The implementation of the
system is shown right in Fig.2. |
CONCLUSION |
The system, whose design is based on Embedded C and CAN bus architecture, has a building-block structure and intelligent
function modules. In terms of software design, it supports any combination of system’s function modules. So, there is no need to
change the original hardware and software design, just to add new sub-collector and sensors to the system and conduct simple
software upgrade. The advantages of such a design are as follows, a higher real time of meteorological detection, high precision,
high degree of automation, cost-effective, a long-time and continuous observations, good reliability, high stability, anti-jamming,
etc. |
Figures at a glance |
![Click Here Figure 1](https://www.rroij.com/articles-images/IJAREEIE-479-g001.gif) |
![Click Here Figure 2](https://www.rroij.com/articles-images/IJAREEIE-479-g002.gif) |
Figure 1 |
Figure 2 |
|
|
References |
- Z.L.Ao, âÃâ¬ÃÅThe Design and Implementation of Automatic Meteorological Data Acquisition System Based on CAN Bus.âÃâ¬ÃÂComputer Measurement and Control, pp.491-498,2006.
- Z. K. Hu and J.Q. Li, âÃâ¬ÃÅDesign of Automatic Meteorological Data Acquisition System Based on Embedded LinuxâÃâ¬ÃÂ.Electronics Engineers,Vol. 30, No. 2, pp. 69-71, 2004.
- Z.B. Shu et al, âÃâ¬ÃÅField Bus Motion Control SystemâÃâ¬ÃÂ. Publishing House of Electronics Industry 2006.
|