(2) background technology:
Data Detection Technology is widely used in every field, and the data of detection are by various sensors, to be converted to the various physical quantitys of electric signal, as temperature, water level, wind speed, pressure etc., can be analog quantitys, can be also digital quantities.Detection mode is generally every a sampling period, same point Data duplication to be detected, and the data of detection are eigenwerts in certain period.Detected after data, data need be sent to main frame, to carry out data analysis, demonstration and processing, detection system mostly adopts industrial RS232 RS485 bus to realize the communication between slave computer and monitoring host computer.The present invention adopts each slave being articulated on power lead through power lead, to main frame, to send the system of detection signal.
(3) summary of the invention:
Detect in real time, to obtain raw measurement data, system can have many slaves to only have a main frame, it commonly adopts RS485, RS232, the communication mode of many single data bus of I2C bus, due to each main frame slave independent timing separately in system, its cumulative errors very greatly also must constantly be corrected by communication, the address signal that adopts inquiry or interrupt mode Receiving Host to send on the other hand, take a large amount of CPU time or hardware resource that some are valuable, this is the problem that must constantly consider for the observing and controlling application system that adopts single-chip microcomputer to form, when required communication rate is not high conventionally, both sides should take the least possible communication port line and CPU time.The present invention adopt each slave be articulated on power lead through power lead by the preset time without cumulative errors, circulation sends the system of detection signal to main frame, need not send a large amount of addresses handshake by main frame, it has feature easy and that save hardware resource.
The present invention relates to a kind of data detection system, it is to consist of a plurality of detecting units and a control module, in system, each detecting unit and control module all start grid cyclic wave eigenwert counting after public power switch is connected, and by the count value of this grid cyclic wave eigenwert the time reference as system synchronization, its eigenwert can adopt to be counted grid cyclic wave zero crossing, because grid alternating current source frequency is low, and only near zero-crossing point judgement, obtain, therefore there is high Stability and veracity.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 obtained as half-wave rectification, another hemiwave time is used between them through power line communication, at step down side, be connected to monolithic processor controlled electronic switch in control module, this electronic switch is connected another hemiwave time at electrical network to the hemiwave time of system power supply and is turn-offed, be used for improving security of system, system is only that detecting unit sends the simulating signal detecting to control module, its A/D converter shares, and be located in control module, the transmission of described detecting unit institute detection signal, according to the needs of system conditions by control module, determine that time and some detecting units of starting to detect need to send detected signal, each control module sends the address signal of several addresses of arranging in order to detecting unit, this address signal is comprised of first address and the address number N of sent address, each detecting unit receives after this address signal, the next hemiwave time of the count value of the grid cyclic wave eigenwert when receiving address signal, for the detecting unit of first address, connect electronic switch and send the signal detecting, 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, obtain altogether N address, each address accounts for a cycle, each detecting unit will determine whether it is addressed behind its N address and address own, its transmitting time is also that the count value of the grid cyclic wave eigenwert while sending by first address adds for 1 to the time that adds the next half-wave after N and starts to send the signal detecting, the count value of grid cyclic wave eigenwert when control module utilizes received detection signal is calculated the address of acquisition detecting unit and is identified this detecting unit, control module is received after detection signal, through signal condition and A/D converter, send again single-chip microcomputer to process, above-mentioned information switching method can be saved a large amount of CPU time.On the passage of its signal transmission of described detecting unit and control module, be all connected to an electronic switch, this electronic switch is only connected when receiving or send detection signal, at electrical network, the hemiwave time to system power supply turn-offs electronic switch, in transmitting-receiving another hemiwave time conducting during detection signal, control module is kept in storer the detection signal of reception and address thereof and time to show or take storer away and read and write by host computer.
Native system consists of following modules:
Rectification diode and electronic switch in public power switch, transformer, rectification unit, as the half-wave rectification of power switch control and power supply.
Control module, by power supply, isolation diode, cycle detection, storer, single-chip microcomputer, electronic switch, A/D conversion and keyboard display, formed, at power supply front end, be connected to isolation diode for isolated DC power supply, A/D convert packets is containing signal condition and A/D conversion, and control module is used for receiving detection signal the preservation after A/D conversion that detecting unit is sent.
Detecting unit, by power supply, isolation diode, cycle detection, toggle switch, single-chip microcomputer, electronic switch, signal condition and sensor, formed, at power supply front end, be also connected to isolation diode for isolated DC power supply, detecting unit is for sending detection signal to control module.
(5) embodiment:
As shown in Figure 1, it is for laboratory multiple spot illumination photometry for a kind of circuit structure block scheme of data detection system, and controller is preserved for deliberation by indoor each point illumination photometry outcome record.This system is by public power switch 1, transformer, rectification diode and electronic switch in rectification unit 2, half-wave rectification and control module A as power switch control and power supply, a plurality of detecting unit B form, its controller A is by isolating diode 3, power supply 4, all wave measurements 5, storer 6, single-chip microcomputer 7 is 89C52, electronic switch 8, A/D conversion 9, keyboard display 10 forms, wherein isolate diode 3 for blocking direct supply high pressure to the passage refluence of signal transmission, wave measurement 5 for triggering grid cyclic wave zero cross signal single-chip microcomputer 7 generation interruptions and grid cyclic wave zero cross signal being counted after shaping week, electronic switch 8 makes it to turn-off in the hemiwave time of system power supply at electrical network under single-chip microcomputer 7 is controlled, another hemiwave time conducting, A/D conversion 9 comprises signal condition and A/D conversion.Detecting unit B forms 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 the effect of wherein isolating diode 13, power supply 14, all wave measurements 15, electronic switch 18 is identical with controller A.The address of each detecting unit B is preset by toggle switch, and the data of detection send to controller A through electronic switch 18.