Design of Digital Single Bus Environmental Status Monitoring System

Publisher:亚瑟摩根Latest update time:2010-12-18 Source: 自动化与仪表 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Environmental status monitoring systems are usually used in program-controlled computer rooms, precision instrument rooms, libraries, warehouses, unmanned stations, substations and other places to monitor the temperature, humidity, smoke, water immersion and illegal intrusion in the field environment in real time, automatically alarm and drive related actuators according to the set value. This is an example of a typical application of computers in the field of measurement and control. The usual design is to select a multi-channel data acquisition (A/D) card with performance that meets the requirements, connect it to the parallel port of a PC or a single-chip microcomputer, and then add the analog signals sent by various sensors to the A/D through a multiplexer switch, convert them into digital signals and hand them over to the computer for processing. However, this design has at least two major disadvantages: first, a large number of lines must be pulled to send the signals of the field sensors to the acquisition card, and the wiring construction is troublesome and costly; second, the analog signals transmitted on the line are susceptible to interference and loss. Therefore, the performance price of this solution is relatively low. This article introduces a single bus technology that has only been introduced in recent years, which can effectively overcome the above shortcomings.

1 Introduction to single bus technology

Single bus technology is a new technology introduced by Dallas Semiconductor in the United States in recent years. It combines the address line, data line, and control line into one signal line, allowing hundreds of measurement and control objects to be hung on this signal line. The device chips used for these measurement and control objects are provided by the company. Each chip has a 64-bit ROM. The manufacturer uses laser burning to encode each chip, which contains a 16-bit decimal-coded serial number, also known as the ID number, to ensure that it can be uniquely distinguished and identified after being hung on the single bus. This is a prerequisite for the positioning and addressing device to realize the single bus measurement and control function. The ROM contains a CRC check code to ensure reliable data exchange. The chip also contains receiving, sending control and power storage circuits, and its schematic diagram is shown in Figure 1. The power consumption of these chips is very small. They can work normally by "stealing" a little power from the bus (a few microwatts when idle and a few milliwatts when working) and storing it in a large capacitor, so generally no additional power supply is required. What is more valuable is that these chips digitize the analog signal at the detection point, so that the digital signal is transmitted on the single bus, making the system have good anti-interference performance and high reliability.

It should be pointed out that the single bus technology is based on code division multiple access and serial time-sharing data exchange, so it can only be used in occasions where the speed requirement is not high, and is generally used in measurement and control systems with a rate below 100kbps.

2 System Construction

To design an environmental status monitoring system using single bus technology, just pull a twisted pair (one for the signal line and one for the ground line) from the computer to the monitoring site, and then hang various monitoring objects on it. The schematic diagram is shown in Figure 2. The output in the figure is the serial port of the PC, so an adapter from RS232 to the single bus needs to be connected in series. In fact, the single bus technology also allows output from a certain bit of the parallel port of the PC or single-chip microcomputer. The figure only shows the configuration of a monitoring site, and its wiring connector is the same as that commonly used for telephone lines, which is very convenient to insert and unplug.

The working distance of this technology is usually 300 meters, which can be extended to 2000 meters. It can be built into a micro LAN driven by a PC. The trunk line of the network can be up to 200 meters long and can be connected to 20 branches; the branch line can be up to 50 meters long and can be connected to 30 devices, which can meet the requirements of general monitoring systems.

3 Hardware Configuration

There are many types and models of single bus dedicated chips. You can refer to the data book and CD ROM of Dallas Company to select according to your needs, or you can access it from the Internet. Here is a brief introduction to some device chips used in Figure 2.

3.1 Serial port RS232 to single bus adapter

When using a PC for low-speed measurement and control, it is very convenient to connect with the serial port RS232, but it cannot connect many measurement and control objects at the same time. For this reason, an RS232 to single bus adapter is used to achieve convenient connection with the PC. Dallas Company provides adapters such as DS9097, which can complete the conversion of multiple lines to one line and the conversion of levels.

3.2 Digital Thermometer

Dallas Company provides a variety of digital thermometers. The typical product suitable for single bus applications is DS1820, whose main features are:

·Measurement temperature: -55°C~+125°C
·Resolution: 0.5°C
·Temperature value output: 9-bit digital quantity
·Conversion speed: 200ms/time
·Upper and lower temperature limits are set as user-defined
·No peripheral circuit is required, and the power supply can be provided by the single bus
·Two packaging forms: 3-terminal PR-35 plastic package or 16-pin SSOP package

This thermometer uses the relationship between the frequency of the temperature-sensitive oscillator and the temperature change and counts the oscillation cycle to achieve temperature measurement. In order to expand the temperature measurement range and improve the resolution, a low temperature coefficient oscillator and a high temperature coefficient oscillator are used for counting respectively, and nonlinear accumulators and other circuits are used to improve linearity. Therefore, DS1820 has the above-mentioned good characteristics, and the price is only about one-tenth of the usual analog temperature transmitter.

3.3 A/D converter

Directly hanging an A/D converter on the single bus will greatly enhance the detection function of the system. As long as various physical quantities are converted into voltage quantities through sensors, they can be collected by A/D and sent to the computer for processing via a single bus. The DS2450 recently launched by Dallas is such an A/D converter, and its main features are:

· 4 analog input channels, two analog input ranges:
0~2.56V and 0~5.12V
· One data output port, communicating at a rate of 16.3kbps, and the overspeed mode can reach 142kbps
· Successive approximation transformation principle, 2~16-bit conversion accuracy (optional)
· Use single bus protocol
· Response to analog voltage over-threshold alarm setting
· No need to connect power supply and peripheral circuits
· 8-pin SOIC package

In this way, the above-mentioned temperature and humidity detection can also be realized by connecting the A/D converter DS2450 and analog temperature and humidity sensors in series. The smoke sensor in Figure 2 is used as a fire alarm, usually in two types: ion type and photoelectric type. If its output voltage exceeds the A/D set threshold, it will be used as a fire alarm. Pyroelectric or infrared sensors can be used to prevent illegal intrusion. When someone invades, the output voltage can be judged by A/D to give an alarm.

3.4 Addressable control switch

In the measurement and control system, switch quantity control is the most widely used. For the computer, it sends a 0 or 1 control code signal to trigger the controlled circuit. Usually, the photocoupler is triggered first, and then the relay, thyristor or solid relay is started. The appropriate switch device is selected according to the power of the controlled device.

Dallas Company provides some addressable control switches, such as DS2405, whose main features are:

·Applicable to single bus protocol
·The data on the single bus is used as the switch signal to control the on and off state of the open drain output terminal, as shown in Figure 3.
·The PIO pin absorption capacity is greater than 4mA/0.4V
·No external power supply is required
·Three packaging forms: TO-92 three-pin plastic package; SOT-223 four-pin flat package and C-Lead six-pin surface mount package.

3.5 Silicon serial number DS2401

This chip is actually a ROM silicon chip that complies with the single bus protocol. The manufacturer writes a unique serial number into it, which is used as an identifier for addressing and positioning. For example, in the flood alarm in Figure 2, when the detector placed on the ground is flooded, the DS2401 is short-circuited and connected. After being queried by the computer, a flood alarm will be issued.

3.6 Anti-static protection diode

In order to prevent the open circuit from being easily invaded by static electricity and other interference, a protection diode such as DS9502 is usually connected at the end of the single bus line.

4 Software design

In the single bus measurement and control system, software design is the key to the technology. Simple hardware configuration is supported by complex software. The single bus software design is based on the TMEX software development tool set provided by the software developers (ASDs) authorized by Dallas. TMEX supports various computer platforms of Microsoft Windows and DOS, and can use computer languages ​​such as C, C++, Pascal (Borland Delphi), Microsoft Access and Microsoft Visual Basic. TMEX also supports DS9097U universal serial port converter, DS9097, DS9087E and "real" grounded serial port converter and DS1410E, DS1410D parallel conversion port.

To ensure reliable data transmission, there can only be one control signal or data on the single bus at any time. The single bus protocol should be followed when performing data communication. When a computer operates a certain measurement and control object, there are generally four processes: ⑴ initialization signal; ⑵ transmission of ROM command; ⑶ transmission of RAM command; ⑷ data exchange. Each transmitted data or command is composed of a series of timing signals. There are four timing signals on the single bus: ⑴ initialization signal (reset signal); ⑵ write 0 signal; ⑶ write 1 signal; ⑷ read signal. The design should ensure that the instruction execution time is less than or equal to the minimum time in the timing signal. With the TMEX single bus software development tool, the software design is more standardized and easy to master.

Since the software can be developed on the Windows platform, a beautiful and vivid interface can be designed on the screen. You can see the overall layout of the monitoring system, and you can check the status data and indication signals of a certain monitoring site, thereby achieving a modern and automated management level.

In summary, the use of single bus technology to design an environmental status monitoring system has a higher performance-price ratio than the traditional data acquisition solution. Moreover, it can be seen that the technology has the following characteristics: it is suitable for low-speed measurement and control occasions; the more measurement and control objects, the more it shows its superiority; high cost performance; convenient hardware construction and maintenance; good anti-interference performance; CRC check, high reliability; software design specifications; the system is concise and intuitive, and easy to master. Therefore, actively promoting the application of single bus technology will have good economic and social benefits.

Reference address:Design of Digital Single Bus Environmental Status Monitoring System

Previous article:Design and implementation of a new data recording system control scheme
Next article:Design principles and basic methods of data acquisition system

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号