CN105527893B - A kind of anti-interference multichannel analog amount sample circuit and method - Google Patents

A kind of anti-interference multichannel analog amount sample circuit and method Download PDF

Info

Publication number
CN105527893B
CN105527893B CN201510915408.6A CN201510915408A CN105527893B CN 105527893 B CN105527893 B CN 105527893B CN 201510915408 A CN201510915408 A CN 201510915408A CN 105527893 B CN105527893 B CN 105527893B
Authority
CN
China
Prior art keywords
chip
data
spi
controller
switch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510915408.6A
Other languages
Chinese (zh)
Other versions
CN105527893A (en
Inventor
周晓峰
王建新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Super Information Co Ltd
Original Assignee
Hunan Super Information Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Super Information Co Ltd filed Critical Hunan Super Information Co Ltd
Priority to CN201510915408.6A priority Critical patent/CN105527893B/en
Publication of CN105527893A publication Critical patent/CN105527893A/en
Application granted granted Critical
Publication of CN105527893B publication Critical patent/CN105527893B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25232DCS, distributed control system, decentralised control unit

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Analogue/Digital Conversion (AREA)

Abstract

The invention discloses a kind of anti-interference multichannel analog amount sample circuit and method, anti-interference multichannel analog amount sample circuit includes controller, A/D converter, M SPI chip and N number of sensor;The data output end DoutaM of m-th SPI chip meets the checking signal input terminal Douta of controller.M SPI chip cascade is formed into daisy chain sampling structure, to can control the sampling for any one sensor;Isolating chip is equipped between first SPI chip and controller;Isolating chip is equipped between A/D converter and controller.The isolating chip uses ADuM1411 chip, and the SPI chip uses ADG739 chip, and the A/D converter uses AD7793.The anti-interference multichannel analog amount sample circuit and method are easy to implement, and anti-jamming effectiveness is prominent.

Description

A kind of anti-interference multichannel analog amount sample circuit and method
Technical field
The invention belongs to industry automatic control, monitoring system, process control fields, are related to a kind of anti-interference multichannel analog Measure sample circuit and method.
Background technique
In industrial processes automated system, industry spot need monitoring voltage, electric current, temperature, pressure, stress and The various fields physical quantity such as flow, overall cost and applicability consider that I/O board and signal transmission of DCS etc. is related to letter Number acquisition part all use multichannel analog acquisition technology.In temperature acquisition, thermal resistance is industrially generallyd use (RTD) or temperature transition is electric signal by the temperature sensors such as thermocouple (TC), then using dedicated system for detecting temperature into Row detection, and temperature control is carried out with this.In temperature control, the precision and reliability of temperature detection are then particularly important.In PLC In market, just there is the thermal module dedicated for this kind of temperature acquisition and control.The thermal module passes through at analog-to-digital conversion (ADC) Unit sampling is managed, the electric signal that temperature sensor generates is converted into digital signal, is then delivered in control system, then convert For temperature value, temperature detection is finally realized.Temperature acquisition and control are widely used in the every field of Industry Control, especially exist The fields such as metallurgy, chemical industry, thermal power plant, industry manufacture, and can often be related to electromagnetic interference, transient state in industry spot application environment Signal, common-mode voltage and current potential astatically may will affect temperature acquisition system, reduce measurement accuracy.Temperature acquisition and control The quality of system, runnability it is suitable whether, product quality, equipment operating efficiency etc. will be directly influenced.
The type of the application range of temperature acquisition system more and more, involved measuring signals and signal source in recent years Requirement more and more wider, to measurement is also higher and higher.The system that the country has many temperature measurements and acquisition now, but many systems There is the problems such as having a single function, acquisition channel is few, acquisition rate is low, complicated for operation and more demanding to test environment in system.People Need it is a kind of have a wide range of application, the multichannel temperature acquisition system that strong antijamming capability, cost performance are high.
The ADC of the multichannel temperature acquisition controller of the field bus type of my company is the core using SPI type at present Analog-digital converter of the piece as high speed, what is transmitted on SPI communication link is all digital signal, due to interfering noise, So that " 1 " becomes " 0 ", " 0 " becomes " 1 ", to influence the performance of SPI chip, even SPI chip cannot normal work Make.In certain special environment, such as thermal power plant smelts metallurgy industry, and live uncertain factor is more, and signal is easy by dry It disturbs, regardless of obtaining from theory analysis, or from experience, SPI chip does not have verifying function, and therefore, anti-interference ability is weak, therefore, It is necessary to design a kind of anti-interference multichannel analog amount sample circuit and method.
Summary of the invention
Technical problem to be solved by the invention is to provide a kind of anti-interference multichannel analog amount sample circuit and methods, should Anti-interference multichannel analog amount sample circuit and method are easy to implement, and anti-jamming effectiveness is prominent.
The technical solution of invention is as follows:
A kind of anti-interference multichannel analog amount sample circuit, including controller, A/D converter, M SPI chip and N number of biography Sensor;M and N is the integer greater than 2;M is even number;N≤2*M;
The chip select terminal (CSai, i=1,2 ..., M) of M SPI chip with the chip selection signal output end CSa phase of controller Even;
The clock signal input terminal (CLKai, i=1,2 ..., M) of M SPI chip is exported with the clock signal of controller CLKa is held to be connected;
The cascade of M SPI chip: M SPI chip is arranged in sequence;
The data input pin Dina1 of first SPI chip meets the serial data output terminal Dina of controller;First SPI The data output end Douta1 of chip meets the data input pin Dina2 of second SPI chip;The data of second SPI chip are defeated Outlet Douta2 meets the data input pin Dina3 of third SPI chip;And so on, until the data of the M-1 SPI chip Input terminal Dina (M-1) meets the data output end Douta (M-2) of previous SPI chip;The data output of the M-1 SPI chip End Douta (M-1) meets the data input pin DinaM of m-th SPI chip;
SPI chip has input shift register and 2 groups of analog switches, i.e. A analoglike switch and B analoglike switch;Often Group analog switch includes 4 analog switches;First group of analog switch has a common end DA;
First group of analog switch has a common end DB;
M SPI chip is divided into 2 groups of the identical front and back of quantity in order, and preceding M/2 SPI chip is first group, rear M/2 SPI chip is second group;
The common end DA and common end DB of first group of SPI chip meet 2 terminals IOUT1 and IOUT2 of constant-current source respectively; Preferably, 2 terminals IOUT1 and IOUT2 of constant-current source are derived from IOUT1 the and IOUT2 pin of A/D converter;
The common end DA and common end DB of second group of SPI chip meet 2 input signal end AIN1 of A/D converter respectively (+) and AIN1 (-);
The signal of A/D converter connects:
Chip select terminal CSb1, clock signal terminal CLKb1 and the data output end Doutb1 of A/D converter connect controller respectively Chip selection signal output end CSb, clock signal output terminal CLKb and data input pin Doutb;The signal of sensor connects:
There is first group of SPI chip M*2 A analoglike switch and M*2 B analoglike to switch [first group of SPI chip in total The port numbers of corresponding A analoglike switch are S (i) AI, and the port numbers of B analoglike switch are S (i) BI];M*2 A analoglike is opened Close the first end that most multipotency respectively connects M*2 sensor;Most multipotency connects the of M*2 sensor to M*2 B analoglike switch respectively Two ends;[S1AI in such as Fig. 4, S1BI;And S2AI, S2BI etc.];
Second group of SPI chip has M*2 A analoglike switch and M*2 B analoglike switch, [second group of SPI core in total The port numbers of the corresponding A analoglike switch of piece are S (i) AV, and the port numbers of B analoglike switch are S (i) BV];M*2 A analoglike Switch the first end that most multipotency respectively connects M*2 sensor;Most multipotency connects M*2 sensor to M*2 B analoglike switch respectively Second end;[S1AV in such as Fig. 4, S1BV;And S2AV, S2BV etc.].
The data output end DoutaM of m-th SPI chip meets the checking signal input terminal Douta of controller.
Isolating chip is equipped between first SPI chip and controller;Between A/D converter and controller be equipped with every Off-chip piece.
The isolating chip uses ADuM1411 chip, and the SPI chip uses ADG739 chip, the A/D Converter uses AD7793.
The M=4, N=8.
The sensor is thermoelectricity occasionally thermal resistance, is also possible to other kinds of sensor, such as pressure sensor, wet Spend sensor etc..
Controller is single-chip microcontroller or DSP.
Sample detailed process:
(1) for do not need load constant-current source sensor;A certain SPI in second group of instruction control is issued by controller 2 analog switches of chip are connected, so that the both ends of one of sensor are believed by the analog switch extraction voltage of the conducting Number to A/D converter 2 input signal end AIN1 (+) of signal input part and AIN1 (-), A/D converter output digit signals Data sampling is completed to controller;
(2) for needing to load the sensor of constant-current source;
It is first connected by 2 analog switches that controller issues a certain SPI chip in first group of instruction control, so that wherein The both ends of one sensor are separately connected 2 terminals IOUT1 and IOUT2 of constant-current source by the analog switch of the conducting;
It is connected again by 2 analog switches that controller issues a certain SPI chip in second group of instruction control, so that wherein The both ends of one sensor are defeated by signal input part 2 of analog switch extraction voltage signal to the A/D converter of the conducting Enter signal end AIN1 (+) and AIN1 (-);A/D converter output digit signals complete data sampling to controller.
Jamproof process is realized by checking procedure:
Controller is m_DATA_OUT_PRE by the data that pin Dina is exported;
The data that controller passes through the Douta readback of checking signal input terminal are m_DATA_OUT_CUR;
Compare m_DATA_OUT_PRE and m_DATA_OUT_CUR, if equal, then it represents that data output is normal, otherwise, table Registration is interfered according to output, retransmission data.
A kind of anti-interference multichannel analog amount method of sampling, it is real using anti-interference multichannel analog amount sample circuit above-mentioned Existing data sampling;
M SPI chip cascade is formed into daisy chain sampling structure, to can control the sampling for any one sensor;
By the checking signal input terminal Douta readback that the data output end DoutaM of m-th SPI chip is connect to controller Data;
Controller is m_DATA_OUT_PRE by the data that pin Dina is exported;
The data that controller passes through pin Douta readback are m_DATA_OUT_CUR;
Compare m_DATA_OUT_PRE and m_DATA_OUT_CUR, if equal, then it represents that data output is normal, otherwise, table Registration is interfered according to output, retransmission data;It is anti-interference by comparison mechanism above-mentioned and retransmission mechanism.
As shown in Figure 1, whole network is divided into two-stage, level-one is control system topological diagram based on PLC or DCS Monitoring software and logic control system, it includes that various execution structure field devices and multichannel temperature are adopted that in addition level-one, which is field level, Collect controller, the span of whole system is very broad, and each mistake of walking out of all may cause the system failure.The input number of whole system According to flow direction since acquiring thermal resistance or thermocouple temperature sensor, lead can preferably be eliminated using three-wire system acquisition mode The influence of resistance is most common in industrial control process.Live multiplex temperature collection measuring signal passes through controller multichannel Pass through fieldbus after the analog-to-digital conversion and logical operation process of temperature acquisition controller and transfers data to PLC/DCS logic Control system is shown finally by the monitoring that Ethernet is connected to upper computer software offer temperature acquisition data.Data pass through layer The conversion of layer, each network have the reliability of the peculiar verification scheme guarantee data of oneself.Multichannel temperature acquisition controller Internal topology figure is as shown in Figure 2;
CPU acquires switching circuit by SPI communication interface (band isolation) control multichannel temperature, logical by switching acquisition Road, moment scan the real time data in each channel.
Due to SPI chip not or only simple verification scheme, so may cause control system in SPI communication The non-intellectual of behavior, the timing diagram of SPI communication such as Fig. 3.
From figure 3, it can be seen that the data output of SPI chip is there are two process, the displacement that output data is sent to SPI chip is posted After storage, output control register is output to by enabled output pin, the data of readback shift register is first passed through, guarantees just It is exported again after really, then does and handle in next step again.So software processing should all be carried out in shift register.
Multichannel temperature acquisition hardware circuit as shown in Figure 4, in hardware design, the acquisition control of controller multichannel temperature Device CPU processed mainly uses the ARM7 chip ST32F103ZET6 of CORTEX-M3 kernel, controls the acquisition between multi-route measuring temperature channel Switching between SPI interface and multichannel collecting switching circuit mainly by being communicated, the collected simulation of multi-route measuring temperature circuit Signal by the AD7793 analog-digital converter of ADI company is converted into digital signal and passes through again to carry out between SPI communication interface and CPU Data exchange.Constant-current source IOUT1, IOUT2 needed for three-wire system RTD thermometric channel by AD7793 can software configuration output be 10 μ A, 210 μ A or 1mA.ADC reference voltage reference source selects AD7793 internal reference 1.17V.In order to enhance entire temperature measurement circuit Electrical anti-interference ability, select ADI company iCoupler technology 4 channel number word isolators [ADuM1411 four-way number every From device] electromagnetic isolation is carried out to the SPI communication interface between CPU and peripheral circuit.Multichannel collecting switching circuit mainly uses The integrated chip ADG739 of ADI company, it is a CMOS, 4 channel analogy matrix switch of two-way, equipped with Serial Control Three-wire type interface.Conducting resistance matching between switch is stringent, and in entire range of signal, conducting resistance curve is very flat It is smooth.ADG739 can be by several this devices with chrysanthemum using the output of shift register DOUT using three-wire type serial line interface Chain form is connected.
The SPI daisy chain communication link that 4 ADG739 analog switch chips are constituted is realized between 8 channel Temperature Measuring acquisition channels Be switched fast, when temperature transducer type be RTD when, CPU by software programming control ADG739 1. with ADG739 2., by constant current Source IOUT1, IOUT2 are successively switched in turn on 8 road RTD sensors, variable resistance signal are changed into voltage signal, then pass through 3. ADG739 with the ADG739 4. successively voltage signal on 8 road RTD thermometric channel of switched scan, finally believes collected voltage Number by ADC analog-to-digital conversion process be sent to CPU carry out data analytic operation.When temperature transducer type is TC, then it is not required to Constant-current source IOUT1, IOUT2 are successively switched in turn on 8 road TC sensors, directly by ADG739 3. with ADG739 4. according to Collected voltage signal is finally passed through ADC analog-to-digital conversion process by the voltage signal on secondary 8 road TC thermometric channel of switched scan CPU is sent to through row data analytic operation.
Thermocouple English Thermocouple, abbreviation TC, working principle is: with temperature change output linear millivolt letter Number.Signal amplification is scaled temperature signal by instrument.Thermal resistance English Resistance abbreviation RTD, working principle is: resistance With temperature change linear change occurs for value.
In software design, the number of the Douta4 pin readback of the daisy chain of the last one SPI chip output can be passed through According to, it is available from the daisy chain principle of SPI chip, identical data are input into the daisy chain network of the same SPI chip, The available previous data being input into of output Dout pin of the last one SPI chip.Obtained data are carried out every time Compare, equal expression current data can correctly export.
CPU first is stored in m_DATA_OUT_CUR when powering on the shift register data for being output to SPI for the first time afterwards, leads to Cross SPI_DOUT pin readback shift register data m_DATA_OUT_BACK confirmation it is equal with m_DATA_OUT_CUR after, It is stored in m_DATA_OUT_PRE in variable, the content for then enabling shift register is output to output control register, completes Primary correct output.
Secondly whether second and its later output, it is equal with m_DATA_OUT_PRE to compare m_DATA_OUT_CUR, There are two types of situations herein:
A is equal: then the output behavior of SPI chip is consistent with preceding primary output behavior, so unnecessary output data, A possibility that greatly reducing interference while reducing the burden of CPU.B is unequal: passing through SPI_BIN mouthfuls of output data m_ DATA_OUT_CUR is stored in m_DATA_OUT_BACK in the data of SPI_DOUT readback simultaneously, then m_DATA_OUT_BACK is protected What is deposited should be the equal data of m_DATA_OUT_PRE, compare m_DATA_OUT_CUR whether with m_DATA_OUT_PRE phase Deng;Unequal, expression is interfered, and at this moment output data can enter SPI chip until m_DATA_OUT_CUR and m_ again DATA_OUT_BACK is equal.
Register is controlled to output finally by the content of the enabled output pin Output Shift Register of SPI chip, it is complete At primary correctly output
Such as first sensor, S1AI and S1BI load constant-current source is first had to, it is necessary to so that ADG739-1# The corresponding analog switch conducting of S1AI and S1BI, meanwhile, to read the voltage value of first sensor, it is necessary to ensure simultaneously The corresponding analog switch conducting of the S1AV and S1BV of ADG739-3#;
RTD/TC sampling
RTD/TC controller has 8 common sampling channels, is realized by 4 cascade ADG739 chips to sampling channel Sequence switching, to realize to the real-time sampling in 8 channels.
RTD/TC sample circuit is divided into two parts
1. channel switching circuit
We choose multiplexer ADG739 to realize that multiplexer channel switches herein, and every 8 paths are one group, with 2 Piece ADG739 cascade, which is realized, (actually uses 4, when sampling to thermal resistance, needs with wherein two panels switchable current source to thermoelectricity Resistance, to generate potential difference), channel switching software section is designed as every 200ms and carries out a subchannel switching.
2. sampling A/D chip partial circuit
Sampling A/D chip selects AD7793, has 4 configurable pseudo-differential sampling channels, herein matches its first passage It is set to sampling input terminal, there are two configurable current output sources for itself tool, so as to realize sampling thermal resistance both ends electricity Potential difference.
Important data structures
The data structure of 1.SPI chip communication
Software block diagram is as shown in Figure 5.
The utility model has the advantages that
The present invention devises a kind of anti-interference multichannel analog amount sample circuit and method, anti-interference multichannel analog amount are adopted Sample circuit mainly uses the analog switch chip ADG739 of ADI company, in view of the problems of the existing technology, will be in the communication technology Time-division multiplex technology is introduced into multichannel temperature signal acquisition switching circuit, and multiplex temperature collection data are transmitted through same channel To ADC digital analog converter, using the powerful software and hardware function of controller multichannel temperature acquisition controller by the data of acquisition into After row analysis and processing, data are uploaded by fieldbus, the final real time temperature monitoring for realizing field device reaches field level The temperature of equipment controls.The disadvantages of hardware resource is big, waste is serious is occupied when this method overcomes multichannel while acquiring.Have Effect has saved system resource, so that complicated control system is become simple, it is easy to accomplish flexible production.The present invention devise it is a kind of by The daisy chain data transmission structure [daisy chain ring] that multi-disc SPI integrated chip is composed is electric to realize multichannel temperature acquisition switching Hardware spending is not only reduced when designing hardware in road, can also be returned by the daisy chain output interface of the last one SPI chip To the input interface of CPU, can guarantee in this way output data can again readback to CPU.
To sum up, anti-interference multichannel analog amount sampling plan of the invention is easy to real using existing integrated chip It applies, in addition, realizing that the switching of analog switch and sampled data are transmitted using universal serial bus, the port resource of consuming is few, is easy to Programming is realized, using unique daisy chain architecture, is avoided corrupt data based on data back verification and retransmission mechanism, therefore, is resisted dry It disturbs and has excellent performance, thus the present invention is especially suitable for the occasions of bad environments.
Detailed description of the invention
Fig. 1 is multichannel temperature acquisition controller system topological figure;
Fig. 2 is multichannel temperature acquisition controller internal topology figure;
Fig. 3 is the timing diagram of SPI communication;
Fig. 4 is the hardware circuit diagram of anti-interference multichannel analog amount sample circuit;
Fig. 5 is the flow chart of data check and repeating transmission.
Specific embodiment
The present invention is described in further details below with reference to the drawings and specific embodiments:
Embodiment 1: a kind of anti-interference multichannel analog amount sample circuit, including controller, A/D converter, 4 SPI cores Piece and 8 sensors;
The chip select terminal (CSai, i=1,2 ..., M, M=4) of 4 SPI chips with the chip selection signal output end of controller CSa is connected;The clock signal input terminal (CLKai, i=1,2 ..., M, M=4) of 4 SPI chips is believed with the clock of controller Number output end CLKa is connected;
The cascade of 4 SPI chips: 4 SPI chips are arranged in sequence;
The data input pin Dina1 of first SPI chip meets the serial data output terminal Dina of controller;First SPI The data output end Douta1 of chip meets the data input pin Dina2 of second SPI chip;The data of second SPI chip are defeated Outlet Douta2 meets the data input pin Dina3 of third SPI chip;And so on, until the data of the 3rd SPI chip are defeated Enter to hold Dina3 to meet the data output end Douta2 of previous SPI chip;The data output end Douta3 of 3rd SPI chip connects The data input pin Dina4 of 4 SPI chips;
SPI chip has input shift register and 2 groups of analog switches, i.e. A analoglike switch and B analoglike switch;Often Group analog switch includes 4 analog switches;First group of analog switch has a common end DA;First group of analog switch has one A common end DB;
4 SPI chips are divided into 2 groups of the identical front and back of quantity in order, and preceding 2 SPI chips are first group, rear 2 SPI cores Piece is second group;
The common end DA and common end DB of first group of SPI chip meet 2 terminals IOUT1 and IOUT2 of constant-current source respectively; Preferably, 2 terminals IOUT1 and IOUT2 of constant-current source are derived from IOUT1 the and IOUT2 pin of A/D converter;
The common end DA and common end DB of second group of SPI chip meet 2 input signal end AIN1 of A/D converter respectively (+) and AIN1 (-);
The signal of A/D converter connects:
Chip select terminal CSb1, clock signal terminal CLKb1 and the data output end Doutb1 of A/D converter connect controller respectively Chip selection signal output end CSb, clock signal output terminal CLKb and data input pin Doutb;The signal of sensor connects:
First group of SPI chip has 8 A analoglike switches with 8 B analoglike switches in total, and [first group of SPI chip is corresponding A analoglike switch port numbers be S (i) AI, B analoglike switch port numbers be S (i) BI];8 A analoglike switch difference Connect the first end of 8 sensors;8 B analoglike switches connect the second end of 8 sensors respectively;[S1AI in such as Fig. 4, S1BI;And S2AI, S2BI etc.];
Second group of SPI chip has 8 A analoglike switches and 8 B analoglike switches, [second group of SPI chip pair in total The port numbers for the A analoglike switch answered are S (i) AV, and the port numbers of B analoglike switch are S (i) BV];M*2 A analoglike switch The first end of 8 sensors is connect respectively;8 B analoglike switches connect the second end of 8 sensors respectively;[S1AV in such as Fig. 4, S1BV;And S2AV, S2BV etc.].
The data output end DoutaM of 4th SPI chip meets the checking signal input terminal Douta of controller.
Isolating chip is equipped between first SPI chip and controller;Between A/D converter and controller be equipped with every Off-chip piece.
The isolating chip uses ADuM1411 chip, and the SPI chip uses ADG739 chip, the A/D Converter uses AD7793.
The sensor is thermoelectricity occasionally thermal resistance, is also possible to other kinds of sensor, such as pressure sensor, wet Spend sensor etc..
Controller is single-chip microcontroller or DSP.
Sample detailed process:
(1) for do not need load constant-current source sensor [such as RTD];It is issued in second group of instruction control by controller 2 analog switches of a certain SPI chip are connected, so that the both ends of one of sensor are drawn by the analog switch of the conducting For voltage signal to 2 input signal end AIN1 (+) of signal input part of A/D converter and AIN1 (-), A/D converter exports number Word signal completes data sampling to controller;
(2) for needing to load the sensor [such as TC] of constant-current source;
It is first connected by 2 analog switches that controller issues a certain SPI chip in first group of instruction control, so that wherein The both ends of one sensor are separately connected 2 terminals IOUT1 and IOUT2 of constant-current source by the analog switch of the conducting;
It is connected again by 2 analog switches that controller issues a certain SPI chip in second group of instruction control, so that wherein The both ends of one sensor are defeated by signal input part 2 of analog switch extraction voltage signal to the A/D converter of the conducting Enter signal end AIN1 (+) and AIN1 (-);A/D converter output digit signals complete data sampling to controller.
Jamproof process is realized by checking procedure:
Controller is m_DATA_OUT_PRE by the data that pin Dina is exported;
The data that controller passes through the Douta readback of checking signal input terminal are m_DATA_OUT_CUR;
Compare m_DATA_OUT_PRE and m_DATA_OUT_CUR, if equal, then it represents that data output is normal, otherwise, table Registration is interfered according to output, retransmission data.
A kind of anti-interference multichannel analog amount method of sampling, it is real using anti-interference multichannel analog amount sample circuit above-mentioned Existing data sampling;
4 SPI chip cascades are formed into daisy chain sampling structure, to can control the sampling for any one sensor;
By the checking signal input terminal Douta readback that the data output end Douta4 of the 4th SPI chip is connect to controller Data;
Controller is m_DATA_OUT_PRE by the data that pin Dina is exported;
The data that controller passes through pin Douta readback are m_DATA_OUT_CUR;
Compare m_DATA_OUT_PRE and m_DATA_OUT_CUR, if equal, then it represents that data output is normal, otherwise, table Registration is interfered according to output, retransmission data;It is anti-interference by comparison mechanism above-mentioned and retransmission mechanism.
ADG739[2.5 Ω, low pressure, three-wire type Serial Control, 4 access matrix of two-way switch] it is that a CMOS, two-way 4 are logical Road analog matrix switch, the three-wire type interface equipped with a Serial Control.Conducting resistance matching between switch is stringent, and In entire range of signal, conducting resistance curve is very flat.
ADG739 uses three-wire type serial line interface, and and SPITM、QSPITM、MICROWIRETMAnd some dsp interface marks Standard is compatible.Using the output of shift register DOUT, several this devices can be connected in the form of daisy chain.It is interior when powering on Portion's shift register is complete zero, and all switches are in off-state.
When connection, each switch is identical in the electric conductivity of both direction, therefore this device is both suitble to multiplexing, also fits Close demultiplexing application.Each switch is switched on or switched off by individual position, therefore this device is also configurable to cubicle switchboard Formation formula, eight switch in it is any or all switch can closing or opening at any time.Input reference signal can be extended to electricity Source voltage range.
All channels are all made of break-before-make formula switch, prevent that instantaneous short-circuit occurs when switching channels.ADG739 uses 16 Pin TSSOP encapsulation.

Claims (10)

1. a kind of anti-interference multichannel analog amount sample circuit, which is characterized in that including controller, A/D converter, M SPI core Piece and N number of sensor;M and N is the integer greater than 2;M is even number;N≤2*M;
The chip select terminal CSai, i=1,2 ... of M SPI chip, M are connected with the chip selection signal output end CSa of controller;
The clock signal input terminal CLKai, i=1,2 ... of M SPI chip, M with the clock signal output terminal CLKa of controller It is connected;
M SPI chip is arranged in sequence;
The data input pin Dina1 of first SPI chip meets the serial data output terminal Dina of controller;First SPI chip Data output end Douta1 meet the data input pin Dina2 of second SPI chip;The data output end of second SPI chip Douta2 meets the data input pin Dina3 of third SPI chip;
And so on, until the data input pin Dina (M-1) of the M-1 SPI chip connects the data output of previous SPI chip It holds Douta (M-2);The data output end Douta (M-1) of the M-1 SPI chip connects the data input pin of m-th SPI chip DinaM;
SPI chip has input shift register and a 2 groups of analog switches, i.e. first group of analog switch is A analoglike switch and the Two groups of analog switches are B analoglike switch;Every group of analog switch includes 4 analog switches;First group of analog switch has one Common end DA;Second group of analog switch has a common end DB;
M SPI chip is divided into 2 groups of the identical front and back of quantity in order, and preceding M/2 SPI chip is first group, rear M/2 SPI core Piece is second group;
The common end DA and common end DB of first group of SPI chip meet 2 terminals IOUT1 and IOUT2 of constant-current source respectively;Second The common end DA and common end DB of group SPI chip meet 2 input signal end AIN1 (+) and the AIN1 of A/D converter respectively (-);
Chip select terminal CSb1, clock signal terminal CLKb1 and the data output end Doutb1 of A/D converter connect the piece of controller respectively Select signal output end CSb, clock signal output terminal CLKb and data input pin Doutb;
First group of SPI chip has M*2 A analoglike switch and M*2 B analoglike switch in total;M*2 A analoglike switch Most multipotency connects the first end of M*2 sensor respectively;Most multipotency connects the second of M*2 sensor to M*2 B analoglike switch respectively End;
Second group of SPI chip has M*2 A analoglike switch and M*2 B analoglike switch in total;M*2 A analoglike switch Most multipotency connects the first end of M*2 sensor respectively;Most multipotency connects the second of M*2 sensor to M*2 B analoglike switch respectively End.
2. anti-interference multichannel analog amount sample circuit according to claim 1, which is characterized in that m-th SPI chip Data output end DoutaM meets the checking signal input terminal Douta of controller.
3. anti-interference multichannel analog amount sample circuit according to claim 2, which is characterized in that in first SPI core Isolating chip is equipped between piece and controller;Isolating chip is equipped between A/D converter and controller.
4. anti-interference multichannel analog amount sample circuit according to claim 3, which is characterized in that the isolating chip Using ADuM1411 chip, the SPI chip uses ADG739 chip, and the A/D converter uses AD7793.
5. anti-interference multichannel analog amount sample circuit according to claim 3, which is characterized in that the M=4, N= 8。
6. anti-interference multichannel analog amount sample circuit according to claim 3, which is characterized in that the sensor is Thermoelectricity occasionally thermal resistance.
7. anti-interference multichannel analog amount sample circuit according to claim 3, it is characterised in that: controller is single-chip microcontroller Or DSP.
8. according to the described in any item anti-interference multichannel analog amount sample circuits of claim 2-7, it is characterised in that:
(1) for do not need load constant-current source sensor;It is issued by controller a certain in instruction second group of SPI chip of control 2 analog switches of SPI chip are connected, so that the analog switch extraction voltage that the both ends of one of sensor pass through the conducting Signal is to 2 input signal end AIN1 (+) of A/D converter and AIN1 (-), A/D converter output digit signals to controller Complete data sampling;
(2) for needing to load the sensor of constant-current source;
First be connected by 2 analog switches that controller issues a certain SPI chip in instruction first group of SPI chip of control, so that The both ends of one of sensor are separately connected 2 terminals IOUT1 and IOUT2 of constant-current source by the analog switch of the conducting;
It is connected again by 2 analog switches that controller issues a certain SPI chip in instruction second group of SPI chip of control, so that 2 input signals that the both ends of one of sensor pass through the analog switch extraction voltage signal of the conducting to A/D converter Hold AIN1 (+) and AIN1 (-);A/D converter output digit signals complete data sampling to controller.
9. anti-interference multichannel analog amount sample circuit according to claim 8, it is characterised in that:
Controller is m_DATA_OUT_PRE by the data that pin Dina is exported;
The data that controller passes through the Douta readback of checking signal input terminal are m_DATA_OUT_CUR;
Compare m_DATA_OUT_PRE and m_DATA_OUT_CUR, if equal, then it represents that data output is normal, otherwise, indicates number It is interfered according to output, retransmission data.
10. a kind of anti-interference multichannel analog amount method of sampling, which is characterized in that described in any item using claim 2-9 Anti-interference multichannel analog amount sample circuit realizes data sampling;
M SPI chip cascade is formed into daisy chain sampling structure, to can control the sampling for any one sensor;
By the checking signal input terminal Douta readback number that the data output end DoutaM of m-th SPI chip is connect to controller According to;
Controller is m_DATA_OUT_PRE by the data that pin Dina is exported;
The data that controller passes through pin Douta readback are m_DATA_OUT_CUR;
Compare m_DATA_OUT_PRE and m_DATA_OUT_CUR, if equal, then it represents that data output is normal, otherwise, indicates number It is interfered according to output, retransmission data;It is anti-interference by comparison mechanism above-mentioned and retransmission mechanism.
CN201510915408.6A 2015-12-10 2015-12-10 A kind of anti-interference multichannel analog amount sample circuit and method Active CN105527893B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510915408.6A CN105527893B (en) 2015-12-10 2015-12-10 A kind of anti-interference multichannel analog amount sample circuit and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510915408.6A CN105527893B (en) 2015-12-10 2015-12-10 A kind of anti-interference multichannel analog amount sample circuit and method

Publications (2)

Publication Number Publication Date
CN105527893A CN105527893A (en) 2016-04-27
CN105527893B true CN105527893B (en) 2018-12-21

Family

ID=55770185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510915408.6A Active CN105527893B (en) 2015-12-10 2015-12-10 A kind of anti-interference multichannel analog amount sample circuit and method

Country Status (1)

Country Link
CN (1) CN105527893B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108490842B (en) * 2018-05-04 2019-10-18 中国核动力研究设计院 A kind of dynamic diagnostic device and method of multichannel ADC crosstalk
CN111225476A (en) * 2020-03-11 2020-06-02 深圳市明微电子股份有限公司 LED drive control circuit and lamp
CN111638665B (en) * 2020-04-28 2021-11-26 恒信大友(北京)科技有限公司 Dynamic data acquisition system and method
CN112472042B (en) * 2020-11-06 2024-05-10 无锡闻心电子科技有限责任公司 Wearable human body characteristic acquisition device, detection device and detection underwear
CN112953773B (en) * 2021-02-25 2022-05-31 重庆长安新能源汽车科技有限公司 Ring daisy chain communication fault processing method of BMS
CN113503270A (en) * 2021-06-08 2021-10-15 大庆特博科技发展有限公司 Special controller for air suspension fan

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1276339C (en) * 2004-05-24 2006-09-20 武汉大学 Multi-channel data collecting method and apparatus
US7705756B2 (en) * 2006-11-03 2010-04-27 Slicex, Inc. Multi-channel analog-to-digital converter
CN101901203B (en) * 2009-11-30 2013-05-01 哈尔滨工业大学 Multi-channel and high capacity parallel data acquisition device
CN202906875U (en) * 2012-11-21 2013-04-24 福州昌晖自动化系统有限公司 Industrial instrument with signal isolation among multipath acquisition channels

Also Published As

Publication number Publication date
CN105527893A (en) 2016-04-27

Similar Documents

Publication Publication Date Title
CN105527893B (en) A kind of anti-interference multichannel analog amount sample circuit and method
CN101872193B (en) Multifunctional measurement and control module based on field bus
CN205748484U (en) A kind of multichannel data acquisition system based on FPGA
CN103916116A (en) Interface level switch device
CN103063954A (en) Multi-sensor array monitoring system on states of power equipment
CN101452048B (en) Integrated circuit chip temperature test device and method
CN206975092U (en) A kind of Auto-Test System impedance voltage test device
CN109282856A (en) It is a kind of while detecting temperature/voltage/current signal single-chip sensor
CN206161032U (en) Sensor is automatic correcting device in batches
CN201698397U (en) Data acquisition card based on ISA bus
CN107687905B (en) Platinum resistance temperature acquisition device
CN107478349A (en) Temperature polling instrument
CN111175687A (en) Nonlinear load standard electric energy meter
CN201421653Y (en) Wireless data acquisition unit
CN105527036A (en) Intelligent temperature transmitter based on CMC (code for magnetic characters)
CN110955164A (en) Single-channel multi-channel signal acquisition circuit
CN204287285U (en) Capture card measured by a kind of multimeter
CN207367015U (en) A kind of battery pack information acquisition system
CN115459754A (en) Current-mode and voltage-mode analog quantity signal acquisition switching circuit and control method
CN205483303U (en) Intelligence temperature transmitter based on CMC
CN106335452B (en) A kind of general mobile unit collection of simulant signal processing system
CN205485465U (en) Resistance analog circuit
CN209562536U (en) The circuit and electronic product of multiple signals are detected using single I/O port
CN207718203U (en) A kind of 24 channel 4-20mA data collectors of full isolation
CN209247192U (en) A kind of Thermocouple Temperature Measure System

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Anti-interference multi-channel analog sampling circuit and method

Effective date of registration: 20190522

Granted publication date: 20181221

Pledgee: Bank of Communications Co.,Ltd. Hunan Branch

Pledgor: HUNAN SUPER INFORMATION Co.,Ltd.

Registration number: 2019430000045

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20201214

Granted publication date: 20181221

Pledgee: Bank of Communications Co.,Ltd. Hunan Branch

Pledgor: HUNAN SUPER INFORMATION Co.,Ltd.

Registration number: 2019430000045

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: An anti-interference multi-channel analog sampling circuit and method

Effective date of registration: 20221101

Granted publication date: 20181221

Pledgee: Huarong Bank of Xiangjiang Limited by Share Ltd. Changsha branch

Pledgor: HUNAN SUPER INFORMATION Co.,Ltd.

Registration number: Y2022430000095

PM01 Change of the registration of the contract for pledge of patent right
PM01 Change of the registration of the contract for pledge of patent right

Change date: 20240726

Registration number: Y2022430000095

Pledgee after: Bank of Hunan Co.,Ltd. Changsha Branch

Pledgee before: Huarong Bank of Xiangjiang Limited by Share Ltd. Changsha branch