(2) background technology:
Data Detection Technology is widely used in every field, and the data of detection are the various physical quantitys that converted into electric signal by various sensors, like temperature, water level, wind speed, pressure etc., can be analog quantitys, also can be digital quantities.Detection mode generally be at a distance from a sampling period to same point data duplicate detection, the data of detection are eigenwerts in certain period.After having detected data, need data are sent to main frame, so that carry out data analysis, demonstration and processing, detection system mostly adopts industrial RS232 RS485 bus to realize the communication between slave computer and the monitoring host computer.The present invention adopts each slave that is articulated on the power lead through the system of power lead to main frame transmission detection signal.
(3) summary of the invention:
Detect in real time, to obtain raw measurement data, system can have many slaves to have only a main frame; It commonly adopts the communication mode of many single data bus of RS485, RS232, I2C bus; Because the independent separately timing of each main frame slave in the system, its cumulative errors very greatly also must constantly be corrected through communication, adopt inquiry or interrupt mode to receive the address signal that main frame sends on the other hand; Take the hardware resource of a large amount of CPU times or lot of valuable; This is the problem that must consider constantly for the observing and controlling application system that adopts single-chip microcomputer to constitute, and when required communication rate was not high usually, both sides should take the least possible COM1 line and CPU time.The present invention adopts each slave that is articulated on the power lead through the time of power lead by the no cumulative errors that presets, and circulation need not be sent a large amount of addresses handshake by main frame to the system that main frame sends detection signal, and it has characteristics easy and the saving hardware resource.
The present invention relates to a kind of data detection system; It is to be made up of a plurality of detecting units and a control module; Each detecting unit and control module all begin an eigenwert counting to grid cyclic wave in the system after public power switch is connected; And with the count value of this grid cyclic wave eigenwert time reference as system synchronization, its eigenwert can adopt grid cyclic wave zero crossing counting, because the grid alternating current source frequency is low; And only obtain, therefore have high accuracy and stability in the near zero-crossing point judgement.The power supply of each detecting unit and control module, be by electrical network after public transformer transformation, by public rectification diode communication power supply is made half-wave rectification and obtains; In addition hemiwave time is used between them being connected to monolithic processor controlled electronic switch in the control module through power line communication at step down side, and this electronic switch is connected other hemiwave time at electrical network to the hemiwave time of system's power supply and turn-offed; Be used to improve security of system; System only is that detecting unit sends the simulating signal that detects to control module, and its A/D converter is shared, and is located in the control module; The transmission of said detecting unit institute detection signal; Be by the needs of control module according to system conditions, confirm that time and some detecting units of beginning to detect need send the signal that is detected, each control module sends the address signal of several addresses of arranging in order to detecting unit; This address signal is made up of the first address and the address number N of transmission address; After each detecting unit receives this address signal, the next hemiwave time of the count value of the grid cyclic wave eigenwert when receiving address signal, the detecting unit that is used for first address is connected electronic switch and is sent the signal that is detected; Each detecting unit sends detection signal and takies a hemiwave time; The address of the detecting unit that other is addressed is to add 1 to adding N by first address, obtains N address altogether, and each address accounts for a cycle; Each detecting unit determines whether it is to be addressed with its N address and address own after relatively; Its transmitting time also is that the count value of the grid cyclic wave eigenwert when sending by first address adds for 1 to the time that adds the next half-wave behind the N and begins to send the signal that is detected, and the count value of the grid cyclic wave eigenwert when control module utilizes received detection signal is calculated the address that obtains detecting unit and discerned this detecting unit, after control module is received detection signal; Send single-chip microcomputer to handle again through signal condition and A/D converter, above-mentioned information switching method can be saved a large amount of CPU times.All be connected to an electronic switch on the passage of its signal transmission of said detecting unit and control module; This electronic switch is only connected when receiving or send detection signal; Electronic switch turn-offs at the hemiwave time of electrical network to system's power supply; In transmitting-receiving hemiwave time conducting in addition during detection signal, the detection signal that receives and address thereof and time are kept in the storer control module so that demonstration or take storer away and read and write by host computer.
Native system is made up of following modules:
Rectification diode and electronic switch in public power switch, transformer, the rectification unit are as the half-wave rectification of power switch control and power supply.
Control module; Constitute by power supply, isolation diode, cycle detection, storer, single-chip microcomputer, electronic switch, A/D conversion and keyboard display; Be connected to the isolation diode at the power supply front end and be used for the isolated DC power supply; The A/D conversion comprises signal condition and A/D conversion, and control module is used to receive detection signal and the preservation after the A/D conversion that detecting unit is sent.
Detecting unit; Constitute by power supply, isolation diode, cycle detection, toggle switch, single-chip microcomputer, electronic switch, signal condition and sensor; Also be connected to the isolation diode at the power supply front end and be used for the isolated DC power supply, detecting unit is used for sending detection signal to control module.
(5) embodiment:
A kind of circuit structure block scheme of data detection system is as shown in Figure 1, and it is used for laboratory multiple spot illumination photometry, and controller is preserved indoor each point illumination photometry outcome record for deliberation.This system is by rectification diode and electronic switch in public power switch 1, transformer, the rectification unit 2; As the half-wave rectification of power switch control and power supply and control module A, a plurality of detecting unit B formation; Its controller A is made up of for 89C52, electronic switch 8, A/D conversion 9, keyboard display 10 isolation diode 3, power supply 4, all wave measurements 5, storer 6, single-chip microcomputer 7; Wherein isolate diode 3 and be used to block of the passage refluence of direct supply high pressure to the signal transmission; Wave measurement 5 was used for that the grid cyclic wave zero cross signal is triggered single-chip microcomputer 7 after shaping and produced interruptions and the grid cyclic wave zero cross signal is counted week; Electronic switch 8 makes it to turn-off in the hemiwave time of system's power supply at electrical network under single-chip microcomputer 7 controls, and hemiwave time conducting in addition, A/D conversion 9 comprise signal condition and A/D conversion.Detecting unit B constitutes for 89C04, electronic switch 18, signal condition 19, sensor 20 by isolating diode 13, power supply 14, all wave measurements 15, toggle switch 16, single-chip microcomputer 17, and is identical among the effect of wherein isolating diode 13, power supply 14, all wave measurements 15, electronic switch 18 and the controller A.The address of each detecting unit B is preset by toggle switch, and the data of detection are sent to controller A through electronic switch 18.