CN206440658U - A kind of humidity measuring circuit based on equal precision measuring frequency way - Google Patents

A kind of humidity measuring circuit based on equal precision measuring frequency way Download PDF

Info

Publication number
CN206440658U
CN206440658U CN201720111297.8U CN201720111297U CN206440658U CN 206440658 U CN206440658 U CN 206440658U CN 201720111297 U CN201720111297 U CN 201720111297U CN 206440658 U CN206440658 U CN 206440658U
Authority
CN
China
Prior art keywords
humidity
input
timer chip
frequency
controllable
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 - Fee Related
Application number
CN201720111297.8U
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.)
Chongqing College of Electronic Engineering
Original Assignee
Chongqing College of Electronic Engineering
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 Chongqing College of Electronic Engineering filed Critical Chongqing College of Electronic Engineering
Priority to CN201720111297.8U priority Critical patent/CN206440658U/en
Application granted granted Critical
Publication of CN206440658U publication Critical patent/CN206440658U/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Investigating Or Analyzing Materials By The Use Of Electric Means (AREA)

Abstract

The utility model discloses a kind of humidity measuring circuit based on equal precision measuring frequency way, including humidity sensor, humidity collection module and CPLD controllers;Humidity sensor is HS1101 sensors, and humidity collection module is timer chip;The threshold value input of timer chip and the triggering input of timer chip, which link together, constitutes the input IN of humidity collection module, and the output end of timer chip is the output end OUT of humidity collection module;CPLD controllers include the first controllable counter unit, the second controllable counting unit, frequency unit and d type flip flop;The counting clock end of second controllable counter unit is connected with the output end of timer chip.The utility model has measurement independent of software, and measurement accuracy is high, and system architecture is simple, debugs easy advantage.

Description

A kind of humidity measuring circuit based on equal precision measuring frequency way
Technical field
The utility model is related to a kind of humidity measuring circuit, specifically a kind of to realize HS1101's based on equal precision measuring frequency way The circuit of the Humidity Detection of humidity sensor output square-wave signal measurement, belongs to hardware circuit design technical field.
Background technology
Humidity Detection is respectively provided with the demand of being widely applied in various industrial circles, such as, in storage field, humidity parameter must Accurate acquisition must be obtained to ensure that it is rotten that goods keeps away from moisture.The application of humidity sensor is essential in Humidity Detection 's.HS1101 humidity sensors have fast response time, high reliability and long-time stability feature, it is not necessary to the characteristics of calibrating. HS1101 humidity sensors are equivalent to a capacitor C in circuit, and its electric capacity increases and increased with the humidity of surveyed air, Relative humidity is in the range of 0%-100%RH, the capacity of electric capacity changes to 200pF by 160pF, and its Humidity Detection error is little In ± 2%RH, the response time is less than 5s, and temperature coefficient is 0.04pF/ DEG C.Physical circuit generally passes HS1101 humidity when designing Sensor is placed among 555 oscillating circuits (a kind of timer chip), and the change of its electric capacity is converted into the square wave being inversely proportional therewith Signal S, after the collected processing of the frequency of the signal through conversion can according to HS1101 humidity sensors equivalent capacity with it is relatively wet Relation between degree draws test environment relative humidity.Above-mentioned detection process can simplified summary be:Envionmental humidity-HS1101 The oscillating circuit output signal frequency of humidity sensor equivalent capacity-555-calculate envionmental humidity.
Focus particularly on when being measured to above-mentioned square-wave signal S frequency, often there are two schemes in the prior art: (1) frequency measurement is carried out using single-chip microcomputer, measuring frequency of single-chip often relies on the timer conter reality for being integrated in chip internal Existing, the timer conter for carrying out control single chip computer chip internal by the mode of software design patterns realizes count measurement, this mode by In needing often to exist by software, precision is not high, and stability is not strong, the shortcomings of increase Software for Design difficulty.(2) monolithic is utilized Then machine collection signal frequency is uploaded to computer, is realized by computer to specific areal survey, it is clear that because measurement must Host computer must be relied on, this necessarily causes equipment to be difficult to portable design.
If carried out in addition, being realized using pure hardware circuit (such as CPLD or FPGA) to above-mentioned square-wave signal S frequency Measurement, the frequency measurement mode of use is usually Measuring Frequency Method or measuring period method.Measuring Frequency Method be exactly it is determined that gate time Tg in, record Period of change number (or pulse number) Nx of measured signal, then the frequency of measured signal be:Fx=Nx/Tg.Measuring period method needs There is the frequency fs of standard signal, in a cycle Tx of measured signal, the periodicity Ns of record standard frequency, then measured signal Frequency be:Fx=fs/Ns.The count value of both approaches can be produced in ± 1 word error, and measuring accuracy and counter The numerical value of N x or Ns of record are relevant.In order to ensure measuring accuracy, measuring period method is used generally for low frequency signal, is believed for high frequency Number use Measuring Frequency Method, but use any measuring principle to complete system design and all have improving moisture measurement precision aspect Have compared with big limitation, reasonable design frequency measurement module is significant to improving humidity measuring circuit performance.
Utility model content
For deficiencies of the prior art, the purpose of this utility model is:How to provide a kind of measurement independent of Software, measurement accuracy is high, and system architecture is simple, debugs easy humidity measuring circuit.
To achieve these goals, the utility model employs following technical scheme.
A kind of humidity measuring circuit based on equal precision measuring frequency way, it is characterised in that:Including humidity sensor, humidity collection Module and CPLD controllers;
The humidity sensor is HS1101 sensors, and the humidity collection module is timer chip, the timer Chip has threshold value input, triggering input, discharge end, reset terminal and output end;The threshold value input of the timer chip The triggering input of end and timer chip, which links together, constitutes the input IN of humidity collection module, the timer chip Output end be humidity collection module output end OUT;The input IN of humidity collection module and one end of HS1101 sensors It is connected, the other end ground connection of HS1101 sensors;The input IN of humidity collection module also with the second charging resistor R2 one End is connected, and the second charging resistor R2 other end is connected with the discharge end of timer chip, the discharge end of timer chip It is connected by the first charging resistor R1 with power supply VCC;
The CPLD controllers include the first controllable counter unit, the second controllable counting unit, frequency unit and D triggerings Device;
The counting clock end of the first controllable counter unit is connected with the output end of frequency unit, and the frequency dividing is single The input of member is connected with CPLD controller internal work clock signal terminals, during the counting of the second controllable counter unit The output end of timer chip described in Zhong Duanyu is connected;
The data input pin of the d type flip flop is connected with measurement starting switch, the input end of clock of d type flip flop and second The counting clock end of controllable counter unit is connected, the meter of the data output end of d type flip flop and the first controllable counter unit Number Enable Pins are connected, and the counting Enable Pin of the data output end of d type flip flop also with the second controllable counter unit is connected.
Further, the CPLD controllers are electrically connected by SPI serial communication interfaces with chip microcontroller.
Compared with prior art, the utility model has the following advantages that:
In the utility model, realized by the digital frequency meter module of the CPLD controller indoor designs of pure hardware to timing The frequency measurement of device chip signal output, the measurement of frequency is no longer rely on software mode realization, and due to CPLD controller sheets Powerful Digital Logic resource and its flexible design method are included inside body so that the numeral of CPLD controller indoor designs Frequency meter module can be with very high measurement flexibility and measurement precision, therefore the utility model with passing through in the prior art The mode of chip microcontroller measurement is strong independent of software, measurement accuracy height and stability compared to having the advantages that.
Further, since the setting of d type flip flop causes two controllable counting units inside CPLD controllers in same gate Counted in time, that is to say and use equal precision measurement principle, measured signal frequency (namely timer chip NE555 circuits The frequency of output signal) precision only it is relevant with standard signal frequency (frequency unit output signal frequency), due to standard signal frequency Rate is that precision is higher by CPLD internal clock signals are divided through internal frequency unit, therefore the measured signal frequency measured Precision is also just higher, to sum up, and the utility model has measurement accuracy high, and system architecture is simple, debugs easy advantage.
Brief description of the drawings
Fig. 1 is circuit structure diagram of the present utility model;
Embodiment
The utility model is described in further detail with reference to the accompanying drawings and detailed description.
As shown in figure 1, a kind of humidity measuring circuit based on equal precision measuring frequency way of the utility model, including humidity sensor Device, humidity collection module and CPLD controllers.Humidity sensor is HS1101 sensors, and HS1101 humidity sensors are in circuit A capacitor C is equivalent to, its electric capacity increases and increased with the humidity of surveyed air, and it is the encapsulation of 2 pin, is connect by device side Touch air.
Humidity collection module is timer chip (can use most commonly seen NE555 types circuit), and timer chip leads to Often there is threshold value input, triggering input, discharge end, reset terminal and output end, also there is power end, ground terminal and voltage certainly Control end;
CPLD controllers include the first controllable counter unit, the second controllable counting unit, frequency unit and d type flip flop; First controllable counter unit, the second controllable counting unit, frequency unit and d type flip flop substantially reach into a digital frequency meter Module.
The specific annexation of circuit is:
(1) moisture signal collecting part
The threshold value input of timer chip and the triggering input of timer chip link together composition humidity collection The input IN of module, the output end of timer chip is the output end OUT of humidity collection module;The input of humidity collection module End IN is connected with one end of HS1101 sensors, the other end ground connection of HS1101 sensors;The input of humidity collection module The one end of IN also with the second charging resistor R2 is connected, the second charging resistor R2 other end and the discharge end phase of timer chip Connection, the discharge end of timer chip is connected by the first charging resistor R1 with power supply VCC;
(2) moisture signal measurement part
Digital frequency meter module inside CPLD is completed:Specifically, the counting clock end of the first controllable counter unit It is connected with the output end of frequency unit, the input of frequency unit is connected with CPLD controller internal work clock signal terminals Connect, the counting clock end of the second controllable counter unit is connected with the output end of the timer chip;The data of d type flip flop Input is connected with measurement starting switch, the counting clock of the input end of clock of d type flip flop and the second controllable counter unit End is connected, and the data output end of d type flip flop is connected with the counting Enable Pin of the first controllable counter unit, d type flip flop Counting Enable Pin of the data output end also with the second controllable counter unit is connected.Specifically, frequency unit and two it is controllable Counting unit can call counter module and allocator module to realize using principle diagram design mode.D type flip flop then can be straight Connect and call d type flip flop Schematic blocks to realize.
In order to realize the flexible control to CPLD it is also possible that CPLD controllers pass through SPI serial communication interfaces and monolithic Machine realizes electrical connection.So some of CPLD measurement process parameter just can be controlled (such as standard signal by single-chip microcomputer The control of the size of frequency can be realized by single-chip microcomputer sends divide ratio to the frequency unit in CPLD), this external pelivimetry knot Fruit can also be sent to single-chip microcomputer, and single-chip microcomputer is further uploaded to host computer and is analyzed and shown.
Utility model works principle is:
(1) moisture signal collecting part operation principle
The main work for illustrating humidity collection module (timer chip NE555 circuits) and humidity sensor HS1101 is former Reason:
As shown in figure 1, NE555 circuits external first charging resistor R1 and the second charging resistor R2, are constituted to humidity sensor Device HS1101 charge circuit;NE555 circuit dischargings end passes through the crystalline substance inside the second charging resistor R2 and NE555 circuit chip Body pipe shorted to earth realizes the discharge loop to humidity sensor HS1101, in addition, threshold value input is connected with triggering input The input IN of the humidity collection module of composition signal can be incorporated into comparator in NE555 circuit wafers, and this is actually multi resonant The circuit connection of oscillator.
According to multivibrator operation principle, humidity sensor HS1101 is electrically charged as capacitor after switching on power, when When the input IN (one end that is to say humidity sensor HS1101) of humidity collection module current potential rises to 2/3VCC, Trigger reset inside NE555 circuits, while the transistor turns in NE555 circuits, NE555 circuit output ends (adopt by humidity Integrate the output end OUT of module) as low level, now humidity sensor HS1101 passes through the second charging resistor R2 and NE555 circuit Interior crystal tube discharge, declines the input IN voltages of humidity collection module, when the input IN voltages of humidity collection module When dropping to 1/3VCC, the trigger inside NE555 circuits is set again, NE555 circuit output ends (humidity collection module it is defeated Going out to hold OUT) upset is high level, sensor does not stop discharge and recharge, produces square-wave signal.
And the time required for humidity sensor HS1101 electric discharges is T1=R2C ln2 ≈ 0.7CR2, humidity sensor Time required for HS1101 chargings is (R1+R2) C of T2=(R1+R2) C ln2 ≈ 0.7, from multivibrator operation principle: NE555 circuit output ends export frequency f=1/T1+T2 ≈ 1.43 (R1+2R2) C of square-wave signal.
Humidity sensor HS1101 etc. can be calculated as long as therefore calculating the frequency of NE555 circuit output end output signals Capacitance is imitated, and there is corresponding numerical relation between humidity sensor HS1101 equivalent capacitance values and envionmental humidity (wet Can be inquired about in degree sensor HS1101 product descriptions), environment just can be calculated according to above-mentioned numerical value corresponding relation relatively wet Degree.
(2) moisture signal measurement portion point operation principle
Frequency unit obtains suitable frequency by frequency dividing object of CPLD controller internal work clock signals inside CPLD Standard signal, the standard signal is used as the counting clock signal of the first controllable counter unit, and measured signal (timer chip NE555 circuit output signals) then as the counting clock signal of the second controllable counter unit.First controllable counter unit and The counting Enable Pin of second controllable counter unit with the data output end of d type flip flop mutually repeatedly, the clock input of d type flip flop End is connected with the counting clock end of the second controllable counter unit, that is to say d type flip flop using measured signal as counting clock, D The data input pin of trigger is connected with measurement starting switch, and measurement starting switch is sent to the data input pin of d type flip flop Preset gate signal realizes that the counting of two controllable counting unit enables control, and basic control process is that measurement starting switch sends one Individual lasting high level pulse (i.e. preset gate signal, also cry gate time), then the high level is gathered by d type flip flop touches from D The Enable Pin of two controllable counting unit is delivered in the data output end output of hair device, and counter is started counting up, but is due to D triggerings The high level of device gathered data input must could be carried out when input end of clock rising edge is reached, therefore, be actually When the rising edge of measured signal is reached, two controllable counting units are just started counting up, and the first controllable counting unit is to dividing To standard signal counted, the second controllable counting unit is counted to measured signal;And when measurement starting switch is sent A lasting high level pulse (i.e. preset gate signal, also cry gate time) at the end of, preset gate signal is jumped from high level 1 It is changed into the rising edge due in that low level 0 also must take place at measured signal.To sum up, it is clear that the utility model CPLD inside The actual gate time (i.e. the high level lasting time of d type flip flop data output end output) of frequency measuring block is not fixed Value, but the integral multiple in measured signal cycle, i.e., synchronous with measured signal, actual gate time holds with preset gate signal high level No more than one measured signal Cycle Length of difference between the continuous time;And standard signal is also to enter within actual gate time Row is counted, and actual gate time is also the integral multiple in standard signal cycle, and error is not more than a cycle, that is, is tested Signal and standard signal are all that we retouch more than respectively by two controllable counting unit counts within same actual gate time The measuring principle stated is referred to as " equal precision measurement ", if it is Ns that standard signal, which is counted obtained count value, measured signal is counted Obtained count value is Nx, the frequency fs of standard signal, then fx=Nx × fs/Ns, measured signal frequency accuracy is only believed with standard Number frequency is relevant, because standard signal frequency is that frequency can by CPLD internal clock signals are divided through internal frequency unit Higher than measured signal, precision is higher, therefore the measured signal frequency accuracy measured is also just higher.
It is a manual toggle switch that starting switch is measured in said process, and this manual toggle switch produces preset gate letter Number, the preset gate signal can also be produced by singlechip chip, to improve system flexibility.
Measured signal frequency obtains envionmental humidity through a series of conversions, and conversion method is in " moisture signal collecting part Illustrated in operation principle ".Above-mentioned conversion work can be completed by single-chip microcomputer, and this is required between single-chip microcomputer and CPLD certainly Row data communication can be entered, as it was previously stated, single-chip microcomputer is real by SPI serial communication interfaces and CPLD controllers in the utility model Existing data communication.
Finally illustrate, above example is only unrestricted to illustrate the technical solution of the utility model, although ginseng The utility model is described in detail according to preferred embodiment, it will be understood by those within the art that, can be to this The technical scheme of utility model is modified or equivalent substitution, without departing from the objective and model of technical solutions of the utility model Enclose, it all should cover among right of the present utility model.

Claims (2)

1. a kind of humidity measuring circuit based on equal precision measuring frequency way, it is characterised in that:Including humidity sensor, humidity collection mould Block and CPLD controllers;
The humidity sensor is HS1101 sensors, and the humidity collection module is timer chip, the timer chip With threshold value input, triggering input, discharge end, reset terminal and output end;The threshold value input of the timer chip and The triggering input of timer chip link together constitute humidity collection module input IN, the timer chip it is defeated Go out output end OUT of the end for humidity collection module;The input IN of humidity collection module is connected with one end of HS1101 sensors Connect, the other end ground connection of HS1101 sensors;One end phases of the input IN of humidity collection module also with the second charging resistor R2 Connection, the second charging resistor R2 other end is connected with the discharge end of timer chip, and the discharge end of timer chip passes through First charging resistor R1 is connected with power supply VCC;
The CPLD controllers include the first controllable counter unit, the second controllable counting unit, frequency unit and d type flip flop;
The counting clock end of the first controllable counter unit is connected with the output end of frequency unit, the frequency unit Input is connected with CPLD controller internal work clock signal terminals, the counting clock end of the second controllable counter unit It is connected with the output end of the timer chip;
The data input pin of the d type flip flop is connected with measurement starting switch, the input end of clock of d type flip flop and second controllable The counting clock end of counter unit is connected, and the counting of the data output end of d type flip flop and the first controllable counter unit makes Can end be connected, the counting Enable Pin of the data output end of d type flip flop also with the second controllable counter unit is connected.
2. a kind of humidity measuring circuit based on equal precision measuring frequency way according to claim 1, it is characterised in that described CPLD controllers are electrically connected by SPI serial communication interfaces with chip microcontroller.
CN201720111297.8U 2017-01-24 2017-01-24 A kind of humidity measuring circuit based on equal precision measuring frequency way Expired - Fee Related CN206440658U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201720111297.8U CN206440658U (en) 2017-01-24 2017-01-24 A kind of humidity measuring circuit based on equal precision measuring frequency way

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201720111297.8U CN206440658U (en) 2017-01-24 2017-01-24 A kind of humidity measuring circuit based on equal precision measuring frequency way

Publications (1)

Publication Number Publication Date
CN206440658U true CN206440658U (en) 2017-08-25

Family

ID=59634235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201720111297.8U Expired - Fee Related CN206440658U (en) 2017-01-24 2017-01-24 A kind of humidity measuring circuit based on equal precision measuring frequency way

Country Status (1)

Country Link
CN (1) CN206440658U (en)

Similar Documents

Publication Publication Date Title
CN106501618B (en) Capacitor's capacity measuring circuit
CN101435838B (en) Apparatus for measuring capacitance capacity
CN104067097B (en) High-resolution temperature survey
CN104154987B (en) A kind of vibrating string type sensor plate reading
CN103513106A (en) Measuring method, measuring circuit and monitoring apparatus
CN107543972A (en) One kind measurement capacitor system and its measuring method
CN206440659U (en) A kind of CPLD humidity measuring circuits
CN206609821U (en) A kind of humidity measuring circuit based on HS1101
CN109470747A (en) Hygrometer circuit and the corresponding method for realizing moisture measurement
CN206863116U (en) Direct current multifunctional electric energy meter
CN205209646U (en) Novel temperature measuring circuit
CN110514912A (en) A kind of secondary voltage kernel phase system
CN206440658U (en) A kind of humidity measuring circuit based on equal precision measuring frequency way
CN104330621A (en) Electric appliance energy consumption tester
CN106707009A (en) Wide-range high-precision current statistics circuit
CN104897964B (en) A kind of circuit and method for measuring variable resistor resistance
CN104007320A (en) Digital RLC tester
CN205384320U (en) Photoelectric detection means
CN204925248U (en) Measure circuit of adjustable resistance resistance
CN102353828A (en) Combination instrument for measuring single-phase voltage and single-phase current as well as measuring method thereof
CN206223321U (en) A kind of temperature and humidity pressure measuring circuit of low-cost and high-precision
CN102457268A (en) Implementation method for 32-bit capture register
CN205860976U (en) A kind of device of single-ended measurement length of mesh wire
CN103412194A (en) Capacitance measuring and calculating circuit
CN209727678U (en) A kind of portable quartz crystal microbalance driving device

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170825

Termination date: 20180124

CF01 Termination of patent right due to non-payment of annual fee