A kind of real-time data acquisition system for handheld deviceTechnical field
The invention belongs to applied power electronics technical field, more particularly to a kind of real-time data acquisition for handheld deviceSystem.
Background technology
With the extensive use and the development of electronic technology of computer, digital technology is widely used in national economy, stateThe every field such as anti-construction and scientific experiment.Compared with simulation system, it is a series of excellent that digital display circuit has that precision is high, stability is good etc.Point.Tested measurement such as temperature, pressure, the position in the external world by all kinds sensor, it is necessary to be converted into the physics such as voltage, electric currentAmount.Because most of sensor output physical quantity is analog quantity, thus needs to be converted to after data signal, then is carried out by computerStorage, processing, display are printed.
Raising with industrial field control to parameter requirement of real-time, people are to data acquisition and the essence of storage systemDegree, capacity, power consumption and anti-interference etc. have higher requirement, therefore various high-performance MCU and memory occur one after another.WithThe development of SOC (system on chip) technology, requires various functions being integrated in one more and more, some well-known manufacturersEmbedded SOC is released one after another.By A/D, the function such as D/A is integrated on MCU, and its great advantage is a simplified system peripherals electricityRoad is designed, and reduces system power dissipation, and system bulk is substantially reduced.Simultaneously with microelectronics and technical development of computer, gradually formMixed type is based on computer acquisition system, and this system architecture is widely used in computer application field and soonThe development of speed.It is made up of computer with microcontroller device, passes through IEEE (such as RS232, RS485, CAN, USBDeng) be connected.By being constituted to data collecting system functional analysis design configurations microcontroller and its peripheral circuit and equipment, main frameDevelopment of Virtual Instrument host computer test software is then used, this data collecting system has man-machine interaction, complicated calculations pointThe task such as analysis, data storage record, figure shows.It is autonomous that there is hybrid computer data collecting system system development to haveProperty, flexible system configuration, the features such as make full use of host computer resource.
At present, another important development trend is to carry out data acquisition using wireless communication technique, and high-frequency radio frequency is knownOther technology is state-of-the-art forth generation automatic identification technology in the world, is that just started to rise and obtain rapid promote in recent years shouldOne new technology.NordicVLSIASA, Freascale, Atmel etc. have the IC lifes manufacturer of international influence successiveShort distance wireless data transceiver communication chip of new generation is proposed, the wireless chip performance by main flow of nRF905, CC1101 is obtainedLarge increase is arrived.Modulating/demodulating chip that newest radio transmitting and receiving chip needs whole radio communications, the amplification of high/low frequencyDevice etc. is fully integrated in the chips, and peripheral components are greatly reduced, it is easy to realization is connected with various model microcontrollers highReliability wireless communication, substantially reduces exploitation wireless product cost, development difficulty is simpler, using more extensive.Generally speakingHigh-frequency radio frequency identification technology has that distance is remote, recognition accuracy is high, recognition speed is fast, strong antijamming capability, service life length, canPenetrate nonmetallic materials, the features such as operation strategies are wide.Therefore the wireless data transmission based on uhf band has been widely applied toEvery field in life.
The content of the invention
It is in view of the above-mentioned drawbacks of the prior art and not enough, it is an object of the present invention to provide a kind of be used for hand-held setStandby real-time data acquisition system, data collecting system of the invention has cost low, and wireless data transmission is simple to operate, numberIn the characteristics of being enriched according to acquisition interface, the mobile real-time testing system that can be widely applied to handheld device.
In order to realize above-mentioned task, the present invention uses following technical solution:
A kind of real-time data acquisition system for handheld device, it is characterised in that including data acquisition module, without line numberAccording to module, data communication module, power module and computer.Described data acquisition module control chip uses modelSTM32F103 32 ARM microcontrollers, the A/D interfaces of the STM32F103 types microcontroller by signal conditioning circuit withMeasured signal is connected, and the USART interfaces of the microcontroller are connected by serial line interface with sensor, the microcontrollerGPIO interface is used to record switch and pulse signal, the SPIx interfaces of the microcontroller and the transmitting electricity in wireless data moduleRoad is connected;Described wireless data module is designed based on radio frequency chip CC1101, and described wireless data module includes nothingLine number is according to transmitting, receiving circuit;Described data communication module selects Silicon Labs patent C8051F340 microcontrollersAs data receiving and transmitting controller, the GPIO interface of the C8051F340 microcontrollers is connected with wireless data receiving circuit, describedThe USB interface of C8051F340 microcontrollers is connected with computer;Described power module is carried out using AMS1117-3.3 chipsVoltage conversion, it is master controller and other chip power supplies to produce 3.3V voltages.
Signal conditioning circuit in system is made up of voltage, current signal conditioning circuit;Described voltage signal conditioning electricityRoad includes voltage reference source circuit, reverse adder unit, High frequency filter unit and voltage follow unit, described reverse addition listMember carries out the amplitude conversion of input signal, and described voltage follow unit is arranged on input and output side, plays isolation and buffering is madeWith described High frequency filter unit constitutes voltage controlled voltage source low pass filter to reduce the high frequency in signal using operational amplifierInterference;Method of the described current signal conditioning unit from precision for 0.1% electric resistance partial pressure obtains voltage signal, and leads toCross diode and carry out input voltage protection.
Voltage reference source circuit in system is designed based on controllable accurate voltage stabilizing source chip TL431 chips, including the first electricityResistance, second resistance, 3rd resistor, the 4th resistance, the 5th resistance, the 6th resistance, LM324 operational amplifiers, 10uF electric capacity and0.1uF electric capacity;The first resistor is that 5K Ohmic resistances, second resistance are that 1k Ohmic resistances, 3rd resistor are 500 ohm of electricityResistance, the 4th resistance are that 10K Ohmic resistances, the 5th resistance are that 10K Ohmic resistances, the 6th resistance are 10K Ohmic resistances;It is describedThe anode of TL431 chips is extremely connected by first resistor with reference, and the negative electrode of the TL431 chips passes through second resistance and referenceExtremely it is connected, the negative electrode of the TL431 chips is connected by 3rd resistor with 5V power supplys;The reference voltage of generation passes through the 5th resistanceIt is connected with the inverting input of LM324 operational amplifiers, the normal phase input end of the LM324 operational amplifiers passes through the 6th resistanceIt is connected to the ground, the output end of the LM324 operational amplifiers passes through the 4th resistance and the inverting input of LM324 operational amplifiersIt is connected;Described 10uF electric capacity and 0.1uF electric capacity is connected in parallel between reference voltage and ground together.Described switch and pulse frequencySignal acquisition circuit is acquired the isolation of signal using PS2801 type photoelectric coupling chips, prevents external voltage from exceeding chip pipePin pressure voltage.
The beneficial effects of the invention are as follows:
The power-supply system of electronic equipment is the basis of whole system, and the steady operation of this part is to whole data collecting systemSteady operation play vital effect.In terms of power supply, level value of each several part even with a part of each pin hasMay be different, it is therefore necessary to understand the power supply requirement of system components.The input power of data collecting plate card is direct current 5V, power supplyDemand be STM32F103VE operating voltages 3.3V, RS232, RS485 chip power supply 3.3V, wireless module power 3.3V etc., it is necessary toPower convert is carried out by voltage conversion chip.5V input voltage carries out voltage conversion by AMS1117-3.3 chips, produces3.3V voltages are master controller and other chip power supplies.AMS1117 is current widely used low-pressure linear voltage-stablizer, its costLow, circuit is simple, using the teaching of the invention it is possible to provide 1A electric current.At chip pin using 10uF electric capacity be used for filter off ripple, 0.1uF electric capacityThe high frequency spurs in circuit are filtered off, the interference to digital circuit is so reduced, improves the efficiency of power supply.
Data acquisition Master control chip have chosen the STM32F103VE microcontrollers based on ARM Cortex-M3 kernels,STM32F103VE is the enhanced product of the 32 8-digit microcontroller STM32 series of ST Microelectronics's production.ARMCortex-M3 is ARM companies towards low cost, low-power consumption, high performance Embedded Application and the product designed, employs ARMThe many newest technologies of company, compared with similar microprocessor, with significant advantage, STM32F103VE is high by external 8MFast crystal oscillator, working frequency is up to 72MHz, and the execution speed under this working frequency is 1.25DMIPS/MHz, built-in 512K bytesFlash memories and 64K bytes SRAM, with 80 enhanced universaling I/O ports and a variety of peripheral hardwares.
The CC1101 less radio-frequency cores that the data transmitting of wireless data acquisition system is produced with receive capabilities by TI companiesPiece realize, CC1101 be it is a be less than 1GHz high-performance radio-frequency transceivers, be widely used at present Detection System for Bridge andIn industry spot monitoring system.CC1101 radio frequency chips mainly have following characteristics.In wireless data acquisition system,CC1101 radio frequency chips connect data acquisition end and PC end, complete the data communication at two ends, including host computer collection lifeOrder, the transmission of acquisition parameter and the passback of gathered data.Data collecting plate card based on STM32F103VE controllers passes throughGPIO port and spi bus interface are connected with CC1101, complete the read-write to CC1101 radio frequency chip registers and working conditionMonitoring, realizes the transmission of gathered data.
PC data communication module has selected Silicon Labs patent CIP-51 microcontrollers C8051F340 as numberAccording to transceiver controller, C8051F340 uses pipeline organization, greatly improves the CISC structure speeds of service, maximum operational speedUp to 48MHz.With the development of sensor and electronic communication, sensor internal be able to will be measured with integrated microprocessing unitAnalog signal be converted to data signal, sent by standard communication protocol interface, can so reduce analog signal transmissionDuring be mixed into interference, improve signal conversion accuracy.Therefore data collecting plate card devises RS232 interfaces and RS485 interfaces, goes here and thereRow data-interface mainly completes 3 kinds of functions:Gather sensor output data;It is connected with unmanned plane serial data communication interface, obtainsTake in unmanned aerial vehicle test process, the measurement data of airborne sensor can also be received in UAV Flight Control SystemControl parameter data, and controlling curve is drawn out, whether access control algorithm is feasible;Debugged at the initial stage of data collecting plate cardIn, it is connected by serial data communication interface with computer, is completed using host computer COM Debug Assistant and data collecting plate cardData communication, checking data collecting plate card each acquisition module whether normal work.
The data collecting system of the present invention has cost low, and wireless data transmission is simple to operate, and data acquisition interface enrichesThe characteristics of, in the mobile real-time testing system that can be widely applied to handheld device.
Brief description of the drawings
The present invention is further explained below in conjunction with the drawings and specific embodiments.
Fig. 1 is the real-time data acquisition system block diagram of the handheld device;
Fig. 2 is the voltage reference source circuit of the system signal modulate circuit;
Fig. 3 is the reverse add circuit of the system signal modulate circuit;
Fig. 4 is the voltage controlled voltage source low pass filter of the system signal modulate circuit;
Fig. 5 is the isolation circuit of the system switching and pulse signal circuit.
Embodiment
Fig. 1 be in the real-time data acquisition system block diagram for handheld device, figure system include data acquisition module, it is wirelessData module, data communication module, power module and computer.Described data acquisition module control chip uses modelSTM32F103 32 ARM microcontrollers, the A/D interfaces of the STM32F103 types microcontroller by signal conditioning circuit withMeasured signal is connected, and the USART interfaces of the microcontroller are connected by serial line interface with sensor, the microcontrollerGPIO interface is used to record switch and pulse signal, the SPIx interfaces of the microcontroller and the transmitting electricity in wireless data moduleRoad is connected;Described wireless data module is designed based on radio frequency chip CC1101, and described wireless data module includes nothingLine number is according to transmitting, receiving circuit;Described data communication module selects Silicon Labs patent C8051F340 microcontrollersAs data receiving and transmitting controller, the GPIO interface of the C8051F340 microcontrollers is connected with wireless data receiving circuit, describedThe USB interface of C8051F340 microcontrollers is connected with computer;Described power module is carried out using AMS1117-3.3 chipsVoltage conversion, it is master controller and other chip power supplies to produce 3.3V voltages.
Data collecting card allows voltage range -10V~+10V of input, it is therefore desirable to input signal is translated and declinedSubtract.Operational amplifier uses LM324, LM324 to be to be internally integrated four with differential input amplifier amplification in signal condition passageThe chip of device, the amplifier can be worked with single supply low to 3V or high under 32V power supply, can also dual power supply be operated inIn the range of ± 1.5V~± 16V, dual power supply is used in Subject Design, is provided using DC-DC power module MDB12-12D12± 12V voltages, voltage signal is when being translated and decaying conversion it is generally necessary to which a reference source, the selection of a reference source can use coreA reference source and outside reference source built in piece, but a reference source driving force that carries of core is smaller and voltage that provide isConstant, therefore selection TL431 produces voltage-reference, TL431 is controllable accurate source of stable pressure, and voltage accuracy, can up to 0.5%With is provided for voltage conditioning passage in high-precision voltage reference, practical application 3V voltages and be converted to using TL431 offers-3V, translates the input voltage with attenuator circuit, voltage reference source circuit figure is as shown in Figure 2 as subsequent voltage.
The function of signal condition passage is will to input to be converted to 0~3V for -10V~10V voltage signals, if signal condition is logicalRoad input voltage is VIN, due to using in-phase adder circuit counting cumbersome, therefore selects reverse add circuit, is realizedIn the conversion of voltage, actual design due to resistance precision not enough, the fine setting of resistance value is carried out using slide rheostat, realizedThe circuit diagram of operation relation such as Fig. 3.According to sampling thheorem, sample frequency, which should be at least, is sampled 2 times of signal frequency, is usuallyGood display test data waveform, general sample frequency should be sampled signal frequency 5~10 times.STM32F103'sADC sample frequencys are up to 1MHz, the effective frequency that such data collecting card can be gathered in 200KHz once, in order to reduce quiltGather the interference of signal high frequency signal and anti-aliasing, to adding a low pass filter in signal condition passage, use fortunePut one voltage controlled voltage source low pass filter of composition as shown in Figure 4.
For the signal condition of current signal, the method from precision for 0.1% electric resistance partial pressure obtains voltage signal, andAnd input voltage protection is carried out by diode.Current-output type sensor output signal is generally 4~20mA, therefore have chosen150 ohm of precision resistance is converted to current signal 0.6V~3V voltage signal, is carried out by STM32F103VE ADCCollection.Signal condition board is designed with 2 current signal acquisition channels.
Need to measure tach signal in unmanned plane test system and represent the on-off model of working condition, usual rotating speedMeasurement coordinates photoelectricity or gear code-disc to use using Hall sensor or photoelectric sensor, the signal measured be usually 5V~15V square-wave signal.Rectangular wave pulse signal can be measured using the general purpose timer of STM32F103VE microcontrollers,STM32F103VE has eight 16 bit timing devices, and peak frequency is 72MHz, can be operated in counter mode, input capture mouldFormula, output comparison pattern etc., wherein input capture pattern can be used to measure external pulse signal frequency.STM32F103VE'sGPIO pins can measure external switch amount signal, and the on-off model amplitude that unmanned plane test system is produced is 5~24V,The input ceiling voltage of STM32F103VE pin is about 3.6V or so, and there is part pin 5V voltages to tolerate characteristic, due to outerPortion's voltage exceeds the PS2801 photoelectricity couplings that the production of RENESAS (Rui Sa) company is have chosen in chip pin pressure voltage, Subject DesignThe isolation that chip is acquired signal is closed, circuit is as shown in Figure 5.PS2801 is a kind of high speed optoelectronic isolating chip, switching speedMore than 100KHz can be reached, the PS2801 minimum input current of diode is 3~5mA, and maximum current is 50mA, therefore is chosenInput resistance is 1K.When making input external voltage for 5~24V, chip being capable of normal work.
Although the present invention gives diagram with regard to its preferred embodiment and illustrated, person skilled in the art is appreciated thatArrive, in the spirit and scope of the present invention limited in the attached claims, the present invention can also be made it is a variety of change andChange.