Design of Temperature Monitor Device for Dc Source Based on 1-wire Bus

The structure of X6000 DC source system is introduced. A temperature monitor device for its storage pile based on 1-wire bus is designed. Its central processing unit is single chip microcomputer 80296SA in the monitor unit of this DC source. The DS1822 chip, a kind of digital thermometer chip based on 1-wire bus, is used to measure the temperature of the X6000 DC source system storage pile. The hardware, interface and software are designed and the condition description of the interface routine and realization are given. The system possesses of many advantages, including its novel structure, simple circuit and expedient control.


Introduction
X6000 DC power supply system is extensively applied in transformer substations and power plants.It can not only offer work electrical sources for apparatus, meters, relay protection and failure illumination in the secondary loop, but also offer impulse current for breaker switch brake loop.For the system management, various sorts of information need to be monitored by the monitor module which also should control the system and make it in the best status.The temperature monitor module needs to monitor the temperatures of many batteries, send alarms when it finds errors, and the system will continually run after human solves the problems, and accordingly the power supply system can normally work.Thus it can be seen that the temperature monitor equipment possesses important meanings for the system.
The 1-Wire bus temperature sensor DS1822 is the series product made by US Dallas Semiconductor Company.It is a sort of integrate circuit chip only using one signal line with another one return line to realize the interlink communication, and it has characters such as high speed and low cost, and it is very fit to be used in locale application (Zhang, 2007, p.183-185 & Zhang, 2005, p.44-47).It can realize the real time presence monitor to the temperature of the pile when combining the DS1822 with the monitor module of X6000 DC power supply system.

Introduction of X6000 DC power supply system
X6000 DC power supply system is extensively applied in transformer substations and power plants.In these application situations, it can offer 220V DC operation power supply for the first equipment and offer work power supply for the secondary intelligent equipment.The classic frame of X6000 is composed by storage battery, charger, monitor and other assistant equipments.The system chart of X6000 is shown in Figure 1.X6100 is the monitor equipment in the X6000 system, and it assumes many core tasks such as collecting data of various parts, timely sending sound and light alarm when failures happen to the system, and implementing various controls according to the requirements of system management and battery management, and its structure is seen in Figure 2. X6100 can monitor the temperatures of many storage batteries.It supports the temperature testing of 18 storage batteries, i.e. 18 Ds1822 chips are needed to compose the 1-Wire bus network.The system adopts the topological structure, and one single main line starts from the host computer and extends to the furthest DS1822 in the slave computer, and other slave computer parts are linked with the main line through the spur track or branch line with less than 3m.

Design of hardware
The system is linked by one host computer and many slave computers through one line.The host computer completes the addressing, control, data transmission and power supply through the line.The host computer is composed of micro controllers, and slave computers are composed of 1-Wire bus parts offered by Maxim/Dallas.Every 1-Wire bus part has unique address code to realize the addressing of host computer to different slave computers.And the host computer can link with the computer system through various modes.
The X6100 mainboard adopts Intel 80296SA as the core controller, and it uses EPA (Event Processing Array) part to monitor and control events and enhance the efficiency of the host computer.The EPA is very flexible, and it can be used to produce PWM output.The 1-Wire bus interface occupies the EPA of CPU, and EPA works in the comparison mode to realize the time interval of 1-Wire bus.In order to restrain the transient over-voltage on the bus, the transient voltage suppressor (TVS) P6KE6.8A is added on the data line to absorb surge impulse and other transient over-voltages occurred in the bus.The CPU system chart that 80296SA is used in the electric power monitor system is seen in Figure 3.
The system adopts the three-wire system (seen in Figure 4), i.e. power supply VDD, electric wire GND and data line.The X6000 battery screen closes with the monitor screen, and the creepage of parasitic capacitance in the part make the batteries can not work normally when the batteries are centralized to let and the temperature is over 100 centigrade degree.The reason to adopt the three-wire system is that the software structure of X6100 makes the bus reset impulse must continue a sample halt 1.667ms, or else, the presence signal on the slave computers can not be collected.What's more, in the two-wire mode, such a long reset time will be thought as the power-on reset, and one advantage is that whether the transformation ends through inquire can be judged when the start temperature is transformed.
To ensure the electromagnetic compatibility and the safety of mainboard when the most accidental situation occurs, the high-speed light electrical coupling element 6N137 to insulate the 1-Wire bus and the system board.Two I/O ports of single chip microcomputer are occupied to realize this interface.If the parasitic power supply is used, one added I/O port is needed.

Design of software
The software of X6100 monitor equipment adopts the layer system structure which is seen in Figure 5.The lowest layer in the system is the hardware platform, then BIO (rooting program) which answers for hardware initialization, self test and hardware drives.The application program is implemented through the transfer of system monitor, and visits the system services offered by the hardware or the rooting program through the interface of API.
When the system powers on or resets, the BIO runs firstly, and the rooting program initializes CPU and circumambient parts, implements the system self-diagnosis program, judges whether the system program and user course are effective.When the system rooting is successful, the control right is gave to the system program and the user course begins to run.
After deadly errors (such as ROM error and RAM error) occur in the self diagnosis, the rooting program will not run the system program and the user course any longer, and when the human solves the problem, the system can continually run (seen in Figure 6).
The fist step of all 1-Wire bus communication needs that the bus controller sends a reset signal to make the bus in-phase, and then selecting a controlled part to implement the succeeding communication.We can select the controlled part through selecting all controlled parts or selecting one special controlled part to use the series number of this part to implement selection.Once the special part is selected, all other parts are hung on to ignore succeeding communication before the next reset signal is sent out.
Because one sample interval of X6100 is 1.667ms and CPU must deal with other super tasks, 1-Wire bus drive program can not make CPU still wait for the accomplishments of other operations.The task transfer mechanism of X6100 decides the drive program can only realize the read-write of 1 bit in one sample halt.The subprogram produces time interval position on the bus and implements the read-write operation at the same time.One read time interval is just one write time interval, and the salve computer changes 1 into 0, and returns anticipant data according to the requirements.
There is no search of ROM series number of DS1822 in X6100, but it offers the function of Read Rom.In the actual using, one chip is linked in the network, and the series number of the chip is read and memorized in Flash Rom.After reading every DS1822, the system can be run normally.The system sets up 12 bits transformation mode for DS1822, 1LSB corresponds with 0.0625 centigrade degree, and the arithmetic adopt appointed decimal fraction (holding 2-digit decimal fraction) is 100*T=100*Code*0.0625°C=(Code*25/4)centigrade degree.The real temperature can be obtained when the data read from the X6100 in the upper computer divides 100.Because on the 12-digit transformation mode, DS1822 needs 750ms to complete one time transformation, so here the method that the broadcast order sends the transformation to read the real temperature tested by every chip is adopted to realize the temperature circular test of the storage battery.

Conclusions
The technology of 1-Wire bus has incomparable application foreground because of its advantages such as simple circuitry, cheap spending of hardware, low costs and simple software design.The X6000 DC source temperature monitor equipment based on the intelligent temperature sensor DS1822 of 1-Wire bus technology is designed in this article.It can directly export the temperature value of the tested point in the digital form, and the equipment has characters such as small temperature error, high differentiation, strong anti-jamming ability and low costs, and it can also transmit data in long distance.