CN201689408U - Signal detecting control circuit based on SPI interface of embedded microprocessor - Google Patents

Signal detecting control circuit based on SPI interface of embedded microprocessor Download PDF

Info

Publication number
CN201689408U
CN201689408U CN2009202640083U CN200920264008U CN201689408U CN 201689408 U CN201689408 U CN 201689408U CN 2009202640083 U CN2009202640083 U CN 2009202640083U CN 200920264008 U CN200920264008 U CN 200920264008U CN 201689408 U CN201689408 U CN 201689408U
Authority
CN
China
Prior art keywords
embedded microprocessor
circuit
control circuit
spi
microprocessor
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.)
Expired - Lifetime
Application number
CN2009202640083U
Other languages
Chinese (zh)
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.)
China National Electric Apparatus Research Institute Co Ltd
Original Assignee
China National Electric Apparatus Research Institute 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 China National Electric Apparatus Research Institute Co Ltd filed Critical China National Electric Apparatus Research Institute Co Ltd
Priority to CN2009202640083U priority Critical patent/CN201689408U/en
Application granted granted Critical
Publication of CN201689408U publication Critical patent/CN201689408U/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Analogue/Digital Conversion (AREA)

Abstract

The utility model discloses a signal detecting control circuit based on an SPI interface of an embedded microprocessor, which is characterized in that: the signal detecting control circuit comprises the embedded microprocessor, an AD (analog-digital) sampling module and a DA (digital-analog) control module; both the AD sampling module and the DA control module are connected with the embedded microprocessor by an SPI (serial peripheral interface) bus, and the microprocessor carries out switching between different CS (chip selection) signals to realize communicating connection with different SPI devices. Under the premise of ensuring the communication ratio, the signal detecting control circuit not only effectively saves system resources, but also improves the sampling precision and output control accuracy.

Description

Input control circuit based on embedded microprocessor SPI interface
Technical field
The utility model relates to a kind of input control circuit, particularly a kind of input control circuit based on embedded microprocessor SPI interface.
Technical background
At present, in general mini-system, general what adopt is the scheme of " single-chip microcomputer+sampling device or control device " based on the hardware systems framework mode of signals collecting and processing, be that single-chip microcomputer communicates to connect by the sampling A of its general I/O interface with the periphery, though this scheme implements simply, its shortcoming also is tangible:
1, its communication interface must cause traffic rate very slow by writing corresponding scm software reality;
2, the different components of same-interface can not shared some signal wire, causes the original just very limited Single Chip Microcomputer (SCM) system of resource to seem nervous more;
3, because traffic rate is slow, sampling and control seem that all real-time is not strong, can't be full of the higher application scenario of requirement of real-time control.
Along with the continuous development of SIC (semiconductor integrated circuit) technology, new high performance device constantly occurs, and makes above problem obtain a good solution.The utility model proposes under such background just, not only can effectively solve above problem, all is greatly improved in speed, precision aspect sampling, the control.
Based on the embedded microprocessor of ARM be at present should be wider microprocessor, be widely used in each field such as various Industry Control, consumer electronics, Aero-Space, it is travelling speed, abundant internal resource, extensibility and good cost performance simply and easily faster, make it use constantly and enlarge, and have and progressively replace the trend that the conventional one-piece machine controller becomes the control platform of main flow.
At DA (number-Mo) aspect the control, general way is to select the DA device of respective type for use according to the needs of controlling object, in the occasion of accurately control, select general DA device for use because the error that device itself exists causes accuracy can't satisfy all the time, traditional way became and selected the DA device that various performances are higher, precision is higher for use this moment, thereby caused cost high all the time.
The utility model content
The purpose of this utility model provides a kind of input control circuit based on embedded microprocessor SPI interface, can improve the communication speed between microprocessor and the controlled device and solve the problem of its interface resource anxiety.
The purpose of this utility model can realize by following technical measures: a kind of input control circuit based on embedded microprocessor SPI interface comprises: embedded microprocessor, AD sampling module, DA control module; Described AD sampling module, DA control module all are connected with embedded microprocessor by spi bus, and embedded microprocessor switches between different chip selection signals to be realized communicating to connect with different SPI devices.
By SPI interface integrated in the microprocessor, realization AD sampling module is sampled to the controlled device current and voltage signals, obtain exporting control data after the computing of sampled data process microprocessor, the output control data is undertaken by the DA control circuit, thereby realizes the control to controlled device.
As to further improvement of the utility model, described DA control module is made up of DA governor circuit and DA compensating circuit; Output control signal data by the DA governor circuit is to controlled device, by the output of DA compensating circuit output compensating signal data to the DA governor circuit; Realization is to the output compensate function of controlled device, thereby realization is to the accurate control of controlled device.This circuit can effectively satisfy the needs that present routine sampling detects control system, and the precision of its sampling and control can reach in the 0.5mV under 5V reference voltage condition, has realized higher performance with lower cost.
As to further improvement of the utility model, also comprise the photoelectricity coupling buffer circuit that is used for input/output signal is carried out light-coupled isolation, to reach the purpose of protection microprocessor system.
Compare with original technology, the utility model has the advantages that: made full use of the SPI interface that has in the high-performance microprocessor, realize communicating to connect with same interface with three peripheral SPI devices, realization has realized the accurate control to controlled device simultaneously to the input sample and the output control of controlled device simulating signal.Under the prerequisite that guarantees traffic rate, effectively save system resource, improved the precision of sampling and the precision of output control.
Description of drawings
Fig. 1 is a theory diagram of the present utility model.
Fig. 2 is the circuit theory diagrams of the used photoelectricity of input/output signal coupling buffer circuit in the utility model.
Fig. 3 is the circuit theory diagrams of AD sample circuit in the utility model.
Fig. 4 is the circuit theory diagrams of DA main control circuit in the utility model.
Fig. 5 is the circuit theory diagrams of DA compensating circuit in the utility model.
Fig. 6 is the circuit theory diagrams that the DA compensating circuit is realized compensation in the utility model to the DA governor circuit.
Embodiment
As shown in Figure 1, be theory diagram of the present utility model, comprise based on the input control circuit of embedded microprocessor SPI interface: embedded microprocessor, AD sampling module, DA governor circuit, DA compensating circuit.The AD sampling module will import microprocessor system into through the built-in spi bus of embedded microprocessor from the data that controlled device is obtained, and DA governor circuit, the control data of DA compensating circuit after the built-in spi bus of embedded microprocessor is handled microprocessor system export controlled device to.
Embedded microprocessor is an embedded OS based on ARM9, is the core of whole application system, comprises that one of composition such as ARM9 embedded microprocessor, SDRAM, FLASH finish the necessary main devices of system.By the operation real time operating system, realize various general utility functions and specific function, in the embedded system as TCP/IP network service, usb data storage, file storage and management, graphical interfaces, signals collecting and control, algorithm computing etc.
It is AT91RM9200 that embedded microprocessor adopts model, it is the embedded microprocessor chip that includes the ARM9 kernel of a high-performance, low-power consumption, high reliability, low price, its frequency of operation is 189MHz, reach as high as 208MHz, possesses profuse peripheral hardware resource, as: the serial ports of sdram controller, Memory Controller, ethernet controller, multichannel, SPI controller, IIC controller, SD/MMC controller etc. are widely used in numerous Industry Control occasions.
The AD sampling module is responsible for voltage (if the current signal of the equipment of finishing to all detected objects, then to convert voltage signal earlier to) sampling, the AD sampling module adopts 16 precision 8 passage AD conversion chip ADS8344, this chip and master controller sampling serial SPI communication mode, its maximum sampling rate is 100kHz, the SPI serial communication maximum communication clock that chip is supported is 2.4MHz, and very at a high speed mould/number conversion and data-transformation facility can be provided.
The DA main control circuit is realized the output control to the controlled device current/voltage, makes it to finish response control according to the current/voltage numerical value of setting.The DA converter that the utility model adopts is 16 precision four-way DA converter DAC8554, adopts serial SPI communication mode between this chip and the microprocessor, and the maximum communication clock can reach 25MHz.
The Analog Output Chip of DA compensating circuit adopts the DA converter MB88347 of 8 passages, 8 precision, and serial SPI communication mode is adopted in communicating by letter between this chip and the master controller equally.
DA main control circuit and DA compensating circuit are superimposed by certain circuit design, finish the output control to the controlled device voltage signal jointly, and its precision can reach 0.5mV.
As shown in Figure 2, be the circuit theory diagrams of the used photoelectricity coupling buffer circuit of input/output signal in the utility model, photoelectricity coupling buffer circuit mainly comprises device OP17.Described OP17 adopts quick optocoupler isolator 6N137S, and the highest switching frequency can reach 10MHz; The OP17 left end is the input signal end, and right-hand member is an output signal end, and the electric power system at two ends is separate.What described optocoupler isolator OP17 adopted is the homophase isolation design, promptly when input signal is high level, the not conducting of light emitting diode on the OP17 left side makes the triode not conducting equally on OP17 the right, and the output signal of OP17 the right output is kept and drawn high level; When input signal was low level, the diode current flow on the OP17 left side activated the triode conducting on the right, and output is connected to ground by the triode of conducting, so output signal is a low level.
Two mutual disjunct power-supply systems are adopted at the two ends of described optocoupler isolator OP17, be the 3.3V system on one side, 5V system on one side, photoelectricity coupling buffer circuit can make the signal between the system of two varying levels realize the zero defect transmission, and anti-stop signal mistake occurs transmitting because of level differences.The very important effect of another one of photoelectricity coupling buffer circuit is anti-interference, because signal is transmitted by light in the two ends of photoelectricity coupling buffer circuit, even therefore the signal of input end has been subjected to interference, as long as its interference signal intensity is unlikely to influence light emitting diode, the interference of signal just can not be along with original signal reaches the other end.In commercial Application, controlled device tends to be easy to receive the interference of various interference sources, and this design can guarantee very effectively that the core control system of equipment can not be subjected to the influence of external disturbance, is an Anti-interference Design method commonly used in the industrial circuit design.
As shown in Figure 3, be the schematic diagram of AD sample circuit in the utility model, comprise modulus conversion chip U22, filter capacitor C99~C108, resistance R 114~R118, R120~R124, optocoupler isolator OP4~OP8 and reference voltage source U23.The analog sampling signal is by inserting 1~3,5,6 pin of described analog-to-digital conversion module U22 behind described filter capacitor C100~C104, the C106; Insert 11 pin of described U22 behind the filtering circuit of output pin 6 pin of described reference voltage source U23 by capacitor C 107 ground connection composition in parallel with C108; 17~19 pin of described U22 are connected with 6 pin of described OP6~OP4 respectively; 15,16 pin of described U22 link to each other with 3 pin of described OP8, OP7; 3 pin of described OP4~OP5,6 pin of OP8, OP7 are connected with the related port of embedded microprocessor.
Described U22 adopts modulus conversion chip ADS8344, and its right side interface is the SPI interface that communicates with microprocessor, at first isolates through high speed optoelectronic coupling isolator spare during signal and communication, and its left side interface is an input end of analog signal.The signal of sampling has 5 passages, wherein, and 2 channel voltage signals, 2 channel current signals, 1 channel temperature signal (current signal and temperature signal also are transformed into the correspondent voltage signal by circuit before conversion).In the practical application, maximum sampled signal is 8 passages.Described reference voltage source U23 model is REF02BU, and more accurate 5V reference voltage output can be provided, and its input voltage is 12V, can effectively improve the sampling precision of sampling A.
Shown in 4, the circuit theory diagrams of DA main control circuit in the utility model mainly comprise DA conversion circuit U35, reference voltage source U36, reverse voltage converter U37, capacitor C 136~C139, resistance R 270~R272, adjustable resistance VR1 and voltage-type amplifier U38~U40.Output pin 1 pin of described DA modular converter U35 inserts input pin 2 pin of described reverse voltage converter U37; 2,7,8 pin of described U35 insert in-phase input end 3 pin of described voltage-type amplifier U38~U40 respectively by resistance R 270~R272; 9~11 pin of described U35 are connected with the corresponding port of embedded microprocessor system respectively; Insert 3 pin of described U35 behind the filtering circuit of output pin 6 pin of described reference voltage source U36 by capacitor C 137 ground connection composition in parallel with C139.
It is the DA conversion chip of DAC8554 that described U35 adopts model, and its function is for converting the voltage signal of specific digital quantity to the voltage signal of analog quantity.The DA main control circuit can be realized the simulation output control of 4 passages, its input signal comprises that data input signal, clock signal, chip selection signal are all produced by microprocessor, be input to described DA conversion circuit U35 after coupling is isolated through photoelectricity, finish output conversion and control by described U35 at last.The effect of described reference voltage source U36 is the conversion accuracy that improves described U35.Described reverse voltage converter U37 model is INA132U, original positive voltage signal conversion can be output into negative voltage signal.Described voltage-type amplifier U38~U40 model is OP07CD, and it act as the burning voltage output signal.
As shown in Figure 5, be the circuit theory diagrams of DA compensating circuit in the utility model, comprise DA converter U52, voltage stabilizing diode VD1, filter capacitor C42, C35, resistance R 49, R51~R53.The 5V power supply is through being connected with ground connection voltage stabilizing diode VD1 behind the described divider resistance R49,8 pin VDD by the described U52 of access behind the filter capacitor C35 of ground connection between described R49 and the VD1; 12~14 pin of described U52 link to each other with the corresponding port of microprocessor by resistance R 53~R51; The 5V power supply inserts the 9 pin VCC of described U52 by described filter capacitor.
Described DA converter adopts the MB88347 of 8 passages, 8 precision, and its effect is the voltage signal that the voltage signal of specific digital quantity is converted to analog quantity.Described DA compensating circuit can be realized the simulation output control of 8 passages, its input signal comprises that data input signal, clock signal, chip selection signal are produced by microprocessor, be input to U52 in the DA converter through behind the optocoupler isolator, finish output conversion and control by U52 at last.Described voltage stabilizing diode VD1 produces the relatively stable voltage of 2.5V, and its effect is the conversion accuracy that improves U52.
As shown in Figure 6, for the circuit theory diagrams of DA compensating circuit in the utility model, comprise resistance R 72~R76, capacitor C 50, C55 and operational amplifier U32A to DA governor circuit realization compensation.The analog voltage signal of the output of DA governor circuit and DA compensating circuit connects the inverting input of described operational amplifier U32A respectively by described resistance R 72, R73; Be connected to inverting input and the output terminal of described U32A after described resistance R 74 and described capacitor C 50 are in parallel; The in-phase input end of described U32A is by described resistance R 75 ground connection; The output terminal of described U32A is exported by described resistance R 76; Insert filter capacitor C55 between two supply pins of described U32A.Resistance by configuration operational amplifier periphery superposes the two-way voltage signal and exports according to certain ratio.
Selected device is not the unique selection that realizes the present utility model purpose in the foregoing description, all can be replaced by other device with identical function.
The utlity model has very strong versatility, can be applied in the various systems about electric current and voltage detection and control, the realization of hardware and software is all very convenient and simple.Each module and the functional interface of circuit have very strong independence, can carry out cutting and replacement according to actual operating position; All devices have all used the packing forms of standard, and various input/output interfaces have all used the communication protocol and the device of standard, meet the standardization requirement of product.

Claims (7)

1. the input control circuit based on embedded microprocessor SPI interface is characterized in that, comprises embedded microprocessor, AD sampling module, DA control module; Described AD sampling module, DA control module all are connected with embedded microprocessor by spi bus, and microprocessor switches between different chip selection signals to be realized communicating to connect with different SPI devices.
2. a kind of input control circuit based on embedded microprocessor SPI interface according to claim 1 is characterized in that described DA control module is made up of DA governor circuit and DA compensating circuit; Output control signal data by the DA governor circuit is to controlled device, by the output of DA compensating circuit output compensating signal data to the DA governor circuit.
3. a kind of input control circuit based on embedded microprocessor SPI interface according to claim 1 and 2 is characterized in that, is provided with photoelectricity coupling buffer circuit between described AD sampling module, DA control module and the embedded microprocessor.
4. a kind of input control circuit based on embedded microprocessor SPI interface according to claim 1 is characterized in that described embedded microprocessor is AT91RM9200.
5. a kind of input control circuit according to claim 1 based on embedded microprocessor SPI interface, it is characterized in that, the AD sampling module adopts 16 precision 8 passage AD conversion chip ADS8344, the employing serial SPI communication mode of communicating by letter between this chip and the described embedded microprocessor.
6. a kind of input control circuit according to claim 2 based on embedded microprocessor SPI interface, it is characterized in that, the DA converter that described DA governor circuit adopts is 16 precision, 4 passage DA converter DAC8554, and serial SPI communication mode is adopted in communicating by letter between this chip and the microprocessor.
7. a kind of input control circuit based on embedded microprocessor SPI interface according to claim 2 is characterized in that described DA compensating circuit adopts the DA converter MB88347 of 8 passages, 8 precision.
CN2009202640083U 2009-12-02 2009-12-02 Signal detecting control circuit based on SPI interface of embedded microprocessor Expired - Lifetime CN201689408U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009202640083U CN201689408U (en) 2009-12-02 2009-12-02 Signal detecting control circuit based on SPI interface of embedded microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009202640083U CN201689408U (en) 2009-12-02 2009-12-02 Signal detecting control circuit based on SPI interface of embedded microprocessor

Publications (1)

Publication Number Publication Date
CN201689408U true CN201689408U (en) 2010-12-29

Family

ID=43377686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009202640083U Expired - Lifetime CN201689408U (en) 2009-12-02 2009-12-02 Signal detecting control circuit based on SPI interface of embedded microprocessor

Country Status (1)

Country Link
CN (1) CN201689408U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111459058A (en) * 2019-07-24 2020-07-28 德诺杰亿(北京)生物科技有限公司 Singlechip anti-interference circuit and high-voltage control system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111459058A (en) * 2019-07-24 2020-07-28 德诺杰亿(北京)生物科技有限公司 Singlechip anti-interference circuit and high-voltage control system

Similar Documents

Publication Publication Date Title
CN102243801A (en) Multifunctional wireless acquisition controller
CN204903045U (en) Detect pressure test system
CN201689408U (en) Signal detecting control circuit based on SPI interface of embedded microprocessor
CN203179279U (en) Remote transparent data acquisition and transmission system based on optical fiber
CN206114003U (en) Data acquisition device and moving carrier
CN104467181B (en) I type electric energy efficiency management terminal and system
CN204206213U (en) A kind of HART communication modem that ring current is provided
CN209232137U (en) A kind of parallel signal acquisition digital transmitter of multi-channel high-accuracy
CN204241910U (en) Based on the remote terminal unit unit test system of LPC1764 single-chip microcomputer
CN204422016U (en) A kind of intelligent water-level meter
CN209265221U (en) Five road Lora of one kind communicate concentrator
CN204241452U (en) A kind of with storing and four gas-detecting devices of parameter adjustment
CN106352924A (en) Data collection device and moving carrier
CN104133797B (en) A kind of environmental monitoring data adapter of Based PC 104 bus
CN208937946U (en) A kind of gateway turning Ethernet for MVB
CN207650584U (en) A kind of multichannel recording instrument without paper
CN205317400U (en) Stable form intelligence pressure sensor
CN207991999U (en) High precision two line system industrial dust detection device
CN202110653U (en) Multifunctional wireless acquisition controller
CN104570811A (en) Multifunctional wireless acquisition controller
CN205899299U (en) Four ways analog output device based on CIB BUS bus
CN109375563A (en) Protein purification instrument Driving Using High-Torque Power Stepping Motors and pressure detecting module
CN208399952U (en) A kind of dedicated wind powder signal acquisition SCM system
CN203502774U (en) Computer control multichannel signal-generator
CN216486060U (en) Intelligent building controller based on STM32

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: CHINA NATIONAL ELECTRIC APPARATUS RESEARCH INSTITU

Free format text: FORMER NAME: CHINA NATIONAL ELECTRIC APPARATUS RESEARCH INSTITUTE

CP01 Change in the name or title of a patent holder

Address after: 510302 Xingang West Road, Guangdong, China, No. 204, No.

Patentee after: China National Electric Apparatus Research Institute Co., Ltd.

Address before: 510302 Xingang West Road, Guangdong, China, No. 204, No.

Patentee before: China National Electric Apparatus Research Institute

CP03 Change of name, title or address

Address after: 510302 No. 204 Xingang West Road, Haizhu District, Guangzhou City, Guangdong Province

Patentee after: China Electrical Appliance Research Institute Co., Ltd.

Address before: 510302 No. 204 West Xingang Road, Guangdong, Guangzhou

Patentee before: China National Electric Apparatus Research Institute Co., Ltd.

CP03 Change of name, title or address
CX01 Expiry of patent term

Granted publication date: 20101229

CX01 Expiry of patent term