CN110519356A - A kind of calibration gas meter, flow meter reports the method and device of success rate - Google Patents

A kind of calibration gas meter, flow meter reports the method and device of success rate Download PDF

Info

Publication number
CN110519356A
CN110519356A CN201910766711.2A CN201910766711A CN110519356A CN 110519356 A CN110519356 A CN 110519356A CN 201910766711 A CN201910766711 A CN 201910766711A CN 110519356 A CN110519356 A CN 110519356A
Authority
CN
China
Prior art keywords
value
temperature
module
formula
crystal oscillator
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.)
Granted
Application number
CN201910766711.2A
Other languages
Chinese (zh)
Other versions
CN110519356B (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.)
HANGZHOU PIONEER ELECTRONIC TECHNOLOGY Co Ltd
Original Assignee
HANGZHOU PIONEER ELECTRONIC TECHNOLOGY 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 HANGZHOU PIONEER ELECTRONIC TECHNOLOGY Co Ltd filed Critical HANGZHOU PIONEER ELECTRONIC TECHNOLOGY Co Ltd
Priority to CN201910766711.2A priority Critical patent/CN110519356B/en
Publication of CN110519356A publication Critical patent/CN110519356A/en
Application granted granted Critical
Publication of CN110519356B publication Critical patent/CN110519356B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01FMEASURING VOLUME, VOLUME FLOW, MASS FLOW OR LIQUID LEVEL; METERING BY VOLUME
    • G01F25/00Testing or calibration of apparatus for measuring volume, volume flow or liquid level or for metering by volume
    • G01F25/10Testing or calibration of apparatus for measuring volume, volume flow or liquid level or for metering by volume of flowmeters
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03BGENERATION OF OSCILLATIONS, DIRECTLY OR BY FREQUENCY-CHANGING, BY CIRCUITS EMPLOYING ACTIVE ELEMENTS WHICH OPERATE IN A NON-SWITCHING MANNER; GENERATION OF NOISE BY SUCH CIRCUITS
    • H03B5/00Generation of oscillations using amplifier with regenerative feedback from output to input
    • H03B5/02Details
    • H03B5/04Modifications of generator to compensate for variations in physical values, e.g. power supply, load, temperature
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Fluid Mechanics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Oscillators With Electromechanical Resonators (AREA)

Abstract

The present invention relates to the method and devices that a kind of calibration gas meter, flow meter reports success rate.It is characterized in that the MCU module uses the low-power chip of STM32L series, MCU module is integrated with UART module and temperature sensor module, the register of configurable clock generator crystal oscillator inside MCU module, it can store and be arranged the value of crystal oscillator, temperature sensor module can read temperature value by AD, and UART module is communicated for MCU module with NB-IoT module.The clock that the present invention uses is 32.768KHz crystal oscillator, and warm orientation is more stable entirely by 32.768kHz, and temperature drift is small;The present invention is not calibrated using the fsys of system itself, according to current f 'sysValue, directly carry out calculating matching baud rate setting value, be further ensured that the stability of communication;This case simultaneously does not increase hardware cost, and guarantee system low cost while improves the performance of system.

Description

A kind of calibration gas meter, flow meter reports the method and device of success rate
Technical field
The present invention relates to the method and devices that a kind of calibration gas meter, flow meter reports success rate.
Background technique
Current NB-IoT gas meter, flow meter is gradually promoted the use of in the market, and NB-IoT gas meter, flow meter is to utilize internal NB mould Data are reported to by LPWAN network and are used on Cloud Server for background server processing by block, and NB- in NB-IoT gas meter, flow meter IoT communication module group and the mode of system communication be by gas meter, flow meter inside main control chip MCU and NB-IoT communication module group between lead to It crosses AT order and carries out UART communication, the signal source of clock accuracy of UART communication determines that it leads between NB-IoT mould group again The accuracy of news.While the UART module in order to meet the gas meter, flow meter trend for the low power consumption and low cost pursued in the market, inside MCU The signal source of clock of use is its internal RC clock.As that can not determine (such as the room of environment used in NB-IoT gas meter, flow meter Interior outdoor, southern and northern geographical location etc.), there are certain environment temperature differences for different use environments, and RC oscillation in inside is easy It being influenced by factors such as temperature changes, internal oscillator, which is affected by temperature the clock frequency that will lead to output, deviation, into And baud rate is abnormal when UART module being caused to carry out serial communication, so as to cause its communication between NB-IoT communication module group at Power decline, can not accurately transmit data, then data are reported to the also right and wrong of the influence on background server by the later period Often big, seriously affect system reports success rate.
Summary of the invention
During reporting, cause since internal clocking is influenced by ambient temperature to overcome in gas meter, flow meter There is baud rate exception, and then leads to the problem of reporting success rate to be affected in UART frequency deviation of clock, and the present invention provides one Kind calibration gas meter, flow meter reports the technical solution of the method and device of success rate, guarantees that UART communication baud rate is normal, to guarantee Report success rate.
A kind of calibration gas meter, flow meter reports the device of success rate, including MCU module and NB-IoT module, feature to exist The low-power chip of STM32L series is used in the MCU module, MCU module is integrated with UART module and temperature sensor mould Block, MCU module inside are furnished with the register of clock crystal oscillator, can store and be arranged the value of crystal oscillator frequency, temperature sensor module Temperature value can be read by the channel AD, UART module is communicated for MCU module with NB-IoT module.
The method that a kind of calibration gas meter, flow meter reports success rate, it is characterised in that including following process:
Step 01: under the normal operating condition of NB-IoT intelligent gas meter, voltage used in system is 6V, works as system When time point either external progress key etc. for reaching the long-range reported data of needs reports operation, internal MCU processor can be right Operation calls after being handled and reports program, and system starts reported data;Can be opened after the processing of internal MCU processor with The pin switch that TEMPER_CTL pin is connected, exports 3V voltage according to series resistance voltage divider principle, makes the temperature-sensitive electricity of periphery It is in running order to hinder R3;
Step 02: while the temperature sensor inside MCU can be enabled, pass through TEMPER_CHK port processing thermistor R3 Voltage AD value Va;
Step 03: by the voltage AD value Va of acquisition, MCU processor utilizes voltage division formulas
Va/3=R3/ (R2+R3) formula 4
Calculate the resistance value of current thermistor R3;
Step 04: according to thermistor characteristic, the corresponding relationship formula of reference temperature(TR) and resistance value
Temp=(298.15/ ((1- (log (50/R) * 298.15/3950)))) -273.15 formula 6
The R value of thermistor R3 obtained in above-mentioned steps 03 being brought into above-mentioned formula, so that it may be worked as with calculating Preceding ambient temperature value Temp;
Step 05: if temperature value Temp, within the scope of 25 ± 5 degree of section, system works the model stable in a warm area It encloses, clock crystal oscillator 32.678KHz, circuit stability is high, and accuracy is high, and the clock of UART is affected by temperature smaller, communication Baud rate it is more stable, then can with the clock crystal oscillator of 32.678KHz carry out system work, then terminate this process;Otherwise It to make corrections to temperature, to ensure the accuracy of baud rate, 06 can be gone to step;
Step 06: according to temperature value Temp, temperature correction being carried out to the clock crystal oscillator of 32.768kHz;
Frequency offset Δ f is calculated first, according to
Δ f=K (T-Ti)2Formula 7
Wherein K is frequency-temperature coefficient constant, and it is (- 4 × 10 that K value can be obtained according to chip data handbook-8), according to temperature-sensitive The characteristic of resistance is it is found that its work is a best effort environment at 25 degree, so T value is 25 degree, Ti is the temperature currently acquired Degree, brings these values into value that Δ f=K (T-Ti) 2 can calculate the offset Δ f of frequency;
Step 07: the value of the offset Δ f in step 06 is brought into correction formula
F=32.768 × (1+ Δ f) formula 8
The clock crystal oscillator of MCU configuration can be written in the value of revised clock crystal oscillator f by clock crystal oscillator f after being corrected In register,
Step 08: in all operations before step 07, processor is being worked with oneself internal clocking, and step 07 is complete Cheng Hou, system timer Timer carry out frequency acquisition to 32.768kHz clock crystal oscillator, and the clock source of the timer is still internal Clock fsys when rising edge interrupts for the first time, acquires timer capture value A0;
Step 09: when second of rising edge down trigger, acquiring timer capture value A1, simultaneously close off timer timer;
Step 10: the capture value obtained according to step 08, step 09 calculates the difference DELTA N=A1-A0 of capture value twice; Step 11: according to ratio formula
Δ N/fsys=1/32768 formula 9
The value for capturing difference in step 10 is brought into formula 9 and can get current true internal clocking f 'sys
Step 12: reference chip databook is available, and UART baud rate is with baud rate setting value and system clock frequency Rate is related, relational expression are as follows:
Bound=256*f 'sys/V
V=256*f 'sys/ Bound formula 10
According to transmission rate most effective in real system, the value of Bound is brought into formula 10, can obtain and work as The setting value V of preceding baud rate;
Step 13: according to newest baud rate Configuration Values V, writing values in the register of clock crystal oscillator, restart this Secondary UART communication, then this clock frequency used is the optimum value after compensating with ambient temperature, it can be ensured that transmission Go on smoothly after also ensure system UART communication high efficiency.
The method that a kind of calibration gas meter, flow meter reports success rate, it is characterised in that the step 02 is high-precision using having The thermistor of the temperature detection characteristic of degree detects environment temperature.
Advantages of the present invention are as follows:
1, the real-time clock used in NB-IoT gas meter, flow meter of the invention is 32.768KHz crystal oscillator, the full Wen Fang of 32.768kHz Bit comparison is stablized, and temperature drift is small;
2, due to the fsys of Real Time Correction System itself, then the stability of whole system is influenced, so of the invention It is not calibrated using the fsys of system itself, according to current f 'sysValue, directly carry out calculating matching Baud rate setting value is further ensured that the stability of communication;
3, this case simultaneously does not increase hardware cost, and guarantee system low cost while improves the performance of system.
Detailed description of the invention
Fig. 1 is the protection circuit diagram of A/D;
Fig. 2 is the two-way sampling channel circuit diagram of A/D;
Fig. 3 is peripheral circuit;
Fig. 4 is resistance temperature curve figure.
Specific embodiment
The invention is further explained in the following combination with the attached drawings of the specification:
Gas meter, flow meter of the invention includes MCU module, NB-IoT module and other function module, in order to ensure low-power consumption is low The requirement of cost, for MCU module using the low-power chip of STM32L series, which is integrated with UART module and internal Temperature sensor module, while the register of clock crystal oscillator is configured with inside MCU, it can store and be arranged crystal oscillator correlation, temperature Sensor module can read temperature value by the channel AD, and UART communication module is led to for MCU module with NB-IoT module News.
Process flow of present invention during system reports are as follows:
Step 01: under the normal operating condition of NB-IoT intelligent gas meter, voltage used in system is 6V, works as system When time point either external progress key etc. for reaching the long-range reported data of needs reports operation, internal MCU processor can be right Operation calls after being handled and reports program, and system starts reported data, can be opened after internal MCU processor processing with The pin switch that TEMPER_CTL pin is connected, exports 3V voltage according to series resistance voltage divider principle, makes the temperature-sensitive electricity of periphery It is in running order to hinder R3.
Step 02: using the low-power chip of STM32L series in this system, which contains one 12 ADC, possess 16 input channels, including an internal temperature sensor, the use based on this system, the temperature sensing needed The relationship of device output voltage characteristic, voltage and temperature are as follows:
T (DEG C)=(Vsense/AvgSlope)-273.15 --- formula 1
Wherein AvgSlope is an estimated value of the G-bar of reference temperature(TR) and voltage curve.It is desirable according to handbook AvgSlope=1.62mV/ DEG C.
By the databook of chip it is found that further including an internal reference voltage inside it, this internal reference voltage Alignment settings when voltage value is the factory of chip business men, so being that accurately, this internal reference voltage is 1.225V.ADC choosing Internal reference voltage is selected as Measurement channel, the conversion values Nadc of builtin voltage can be measured.At this point, the conversion of known VDD Value is 4096, and internal reference voltage VREFINT voltage value is 1.225V, and defining test voltage is Vtemp.These values meet Proportionate relationship:
VDD/4096=VREFINT/Vtemp
VDD/4096=1.225/Vtemp
VDD=1.225*4096/Vtemp;--- formula 2
Temperature sensor is after determining internal reference voltage, after carrying out temperature acquisition using internal temperature sensor, knot Formula 3 can be obtained by closing formula 1 and formula 2:
Vtemp=((T (DEG C)+273.5) * 1.62)/1000 --- formula 3
Since the precision of internal temperature sensor is not very high, it is therefore desirable to AD sampling channel be utilized to carry out temperature-compensating And calibration, but the analog voltage input range of STM32L low-power chip is 0-3V, but the end A/D used in practice When mouth sampled signal, do not ensure that the collected signal of institute within input range.Since ADC module is more fragile, work as electricity It may be damaged the port ADC when pressure is not within normal range of operation, prevent corresponding A/D sample port from normal work Make.
The circuit theory of Fig. 1 are as follows: DQ1 and DQ2 are two diodes, herein can be under the higher environment of industrial requirements The duodiode restored fastly with one replaces.When the end ADC1, voltage is slightly above 3.3V, DQ2 diode is switched on, and is input to A/D Port voltage is directly 3.3V.Similarly, when the voltage of the port ADC1 is negative voltage, DQ1 diode is switched on, and is input to A/D Port voltage is directly 0V.Thus can use the two second levels change commanders the port ADC input voltage be maintained at its permission model In enclosing, it can work normally.
Other than the sample port of A/D to be ensured is not destroyed, also to guarantee that the precision of sampling wants sufficiently high, inner core The sampling precision of the A/D of piece does not reach so-called 12 precision in actual use.It converts the poor master of precision It wants the reason is that Yao Tigao ADC conversion accuracy must just compensate both errors there are gain error and offset error.Cause The hardware corrected circuit of A/D is increased in this this system.
Due to the error of A/D sampling channel itself, the two-way sampling channel that can use A/D herein is deposited to acquire this ADC Gain error and offset error, and remaining A/D sampling channel is corrected with this.In view of the input of two-way correction channel Voltage accuracy requirement is relatively high, CJ431 voltage reference chip can be selected to generate two-way reference voltage again, and select ADC0 It is correction channel with two channel ADC8, such as Fig. 2
Under the action of the correcting circuit and protection circuit of corrected A/D, temperature sensor and A/D inside MCU The effect of module can pass through the voltage AD value Va of the sample port TEMPER_CHK port processing thermistor R3 of thermistor.
Step 03: peripheral circuit as shown in figure 3, by acquisition voltage AD value Va, utilize voltage division formulas 4:Va/3=R3/ (R2+R3), the resistance value of current thermistor R3 is calculated.
Step 04: this system needs to get correct actual ambient temperature value, this programme in real time in order to ensure stability series Environment temperature is detected using the thermistor with high-precision temperature detection characteristic.Since gas meter, flow meter is in environment temperature [15.25] it is that an opposite warm area is more stable under DEG C range, in the range of precision compares, therefore utilizes modified epoxy material The more stable temperature measuring type thermistor of a thermometric is made.
Test temperature and electrical characteristic at different temperature are as follows:
Resistance temperature curve figure, such as Fig. 4 can be obtained according to above data.
The G-bar of resistance temperature curve figure can be calculated according to Fig.4:;
From above table: two groups of data are taken out, are respectively corresponded as T1 and T2, R1 and R2, in order to reduce error, the value of R Select the central value of resistance.Such as T1=5 DEG C, R1=124.03K Ω;T2=10 DEG C, R2=98.06K Ω, then bring public affairs into again Formula 5 is calculated.Reading average value can obtain B=3950 after calculating multi-group data.It can be by B value as temperature-sensitive electricity according to empirical curve One characteristic of resistance, therefore formula 5 can be converted as formula 5-1:
Since the suitable environment temperature of system is 25 DEG C, so visible T2=25 DEG C and R2=50K Ω, is updated to formula In 5-1, formula 6 can be obtained by formula scales:
Temp=(298.15/ ((1- (log (50/R) * 298.15/3950))))-273.15 --- formula 6
The value of thermistor R3 obtained in above-mentioned steps 3 is brought into the R in formula 6, so that it may current to calculate Ambient temperature value Temp.
Step 05: if temperature value Temp, within the scope of 25 ± 5 degree of section, system works the model stable in a warm area It encloses, clock crystal oscillator 32.678KHz.Circuit stability is high, and accuracy is high, and the clock of UART is affected by temperature smaller, communication Baud rate it is more stable, then can with the clock crystal oscillator of 32.678KHz carry out system work, then terminate this process;Otherwise It to make corrections to temperature, to ensure the accuracy of baud rate, 06 can be gone to step.
Step 06: according to temperature value Temp, temperature correction being carried out to the clock crystal oscillator of 32.768kHz.Firstly the need of calculating Frequency offset Δ f is calculated, according to:
Δ f=K (T-Ti)2--- formula 7
Wherein K is frequency-temperature coefficient constant, and it is (- 4 × 10 that K value can be obtained according to chip data handbook-8), according to temperature-sensitive The characteristic of resistance is it is found that its work is a best effort environment at 25 degree, so T value is 25 degree, Ti is the temperature currently acquired Degree.Bring these values into value that formula 7 can calculate the offset Δ f of frequency.
Step 07: the value of the offset Δ f in step 6 is brought into correction formula 8:
F=32.768 × (1+ Δ f) --- formula 8
Clock crystal oscillator f after being corrected.The value of revised clock crystal oscillator f can be written to the clock crystal oscillator of MCU configuration In register.
Step 08: in all operations before step 07, processor is being worked with oneself internal clocking.Step 07 is complete Cheng Hou, system timer Timer (clock source of this timer is still internal clocking fsys), to 32.768kHz clock crystal oscillator into Line frequency capture.When rising edge interrupts for the first time, timer capture value A0 is acquired.
Step 09: when second of rising edge down trigger, acquiring timer capture value A1, simultaneously close off timer timer.
Step 10: the capture value obtained according to step 8,9 calculates the difference DELTA N=A1-A0 of capture value twice.
Step 11: according to ratio formula
Δ N/fsys=1/32768 --- formula 9
Value in step 10 is brought into formula 9 and can get current true internal clocking f 'sys
Step 12: reference chip databook is available, and UART baud rate is with baud rate setting value and system clock frequency Rate is related, relational expression are as follows:
Bound=256*f 'sys/V
V=256*f 'sys/Bound;--- formula 10
The value of Bound can be brought into formula 10, can be obtained according to transmission rate most effective in real system The setting value V of current baud rate out.
Step 13: according to newest baud rate Configuration Values V, writing values in the register of clock crystal oscillator, restart this Secondary UART communication, then this clock frequency used is the optimum value after compensating with ambient temperature, it can be ensured that transmission Go on smoothly after also ensure system UART communication high efficiency.
By surveying discovery, the NB-IoT to make corrections in common NB-IoT gas meter, flow meter and this case through excess temperature in high-low temperature chamber Gas meter, flow meter is in -25 degree, -15 degree, 0 degree, 15 DEG C, 25 DEG C and 40 DEG C etc. it is several under the conditions of success rate have and significantly promoted, It is detailed in following table.
State of temperature Before not adjusting device After adjusting device
-25℃ 86% 97%
-15℃ 89% 97%
0℃ 91% 98%
15℃ 95% 99%
25℃ 97% 99%
40℃ 96% 98%

Claims (3)

1. a kind of calibration gas meter, flow meter reports the device of success rate, including MCU module and NB-IoT module, it is characterised in that described MCU module uses the low-power chip of STM32L series, and MCU module is integrated with UART module and temperature sensor module, MCU mould It is furnished with the register of clock crystal oscillator inside block, can stores and be arranged the value of crystal oscillator frequency, temperature sensor module can pass through The channel AD reads temperature value, and UART module is communicated for MCU module with NB-IoT module.
2. a kind of method that calibration gas meter, flow meter reports success rate, it is characterised in that including following process:
Step 01: under the normal operating condition of NB-IoT intelligent gas meter, voltage used in system is 6V, when system reaches When the time point of long-range reported data either external progress key etc. being needed to report operation, internal MCU processor can be to operation It is called after being handled and reports program, system starts reported data;Internal MCU processor can open after handling and TEMPER_CTL The pin switch that pin is connected, exports 3V voltage according to series resistance voltage divider principle, the thermistor R3 of periphery is made to be in work Make state;
Step 02: while the temperature sensor inside MCU can be enabled, pass through the electricity of TEMPER_CHK port processing thermistor R3 Press AD value Va;
Step 03: by the voltage AD value Va of acquisition, MCU processor utilizes voltage division formulas
Va/3=R3/ (R2+R3) formula 4
Calculate the resistance value of current thermistor R3;
Step 04: according to thermistor characteristic, the corresponding relationship formula of reference temperature(TR) and resistance value
Temp=(298.15/ ((1- (log (50/R) * 298.15/3950)))) -273.15 formula 6
The R value of thermistor R3 obtained in above-mentioned steps 03 being brought into above-mentioned formula, so that it may current to calculate Ambient temperature value Temp;
Step 05: if temperature value Temp, within the scope of 25 ± 5 degree of section, system works the range stable in a warm area, Its clock crystal oscillator is 32.678KHz, and circuit stability is high, and accuracy is high, and the clock of UART is affected by temperature smaller, the wave of communication Special rate is more stable, then can carry out system work with the clock crystal oscillator of 32.678KHz, then terminate this process;It otherwise will be right Temperature makes corrections, and to ensure the accuracy of baud rate, can go to step 06;
Step 06: according to temperature value Temp, temperature correction being carried out to the clock crystal oscillator of 32.768kHz;
Frequency offset Δ f is calculated first, according to
Δ f=K (T-Ti)2Formula 7
Wherein K is frequency-temperature coefficient constant, and it is (- 4 × 10 that K value can be obtained according to chip data handbook-8), according to thermistor Characteristic it is found that its work is a best effort environment at 25 degree, so T value is 25 degree, Ti is the temperature currently acquired, general These values bring the value that Δ f=K (T-Ti) 2 can calculate the offset Δ f of frequency into;
Step 07: the value of the offset Δ f in step 06 is brought into correction formula
F=32.768 × (1+ Δ f) formula 8
Clock crystal oscillator f after being corrected, the clock crystal oscillator that the value of revised clock crystal oscillator f can be written to MCU configuration are deposited In device,
Step 08: in all operations before step 07, processor is being worked with oneself internal clocking, and step 07 is completed Afterwards, system timer Timer carries out frequency acquisition to 32.768kHz clock crystal oscillator, when the clock source of the timer is still inside Clock fsys when rising edge interrupts for the first time, acquires timer capture value A0;
Step 09: when second of rising edge down trigger, acquiring timer capture value A1, simultaneously close off timer timer;
Step 10: the capture value obtained according to step 08, step 09 calculates the difference DELTA N=A1-A0 of capture value twice;
Step 11: according to ratio formula
Δ N/fsys=1/32768 formula 9
The value for capturing difference in step 10 is brought into formula 9 and can get current true internal clocking f 'sys
Step 12: reference chip databook is available, and UART baud rate has with baud rate setting value and system clock frequency It closes, relational expression are as follows:
Bound=256*f 'sys/V
V=256*f 'sys/ Bound formula 10
According to transmission rate most effective in real system, the value of Bound is brought into formula 10, can obtain and work as prewave The setting value V of special rate;
Step 13: according to newest baud rate Configuration Values V, writing values in the register of clock crystal oscillator, restart this UART communication, then this clock frequency used is the optimum value after compensating with ambient temperature, it can be ensured that transmission The high efficiency of the UART communication of system is also ensured after going on smoothly.
3. a kind of method that calibration gas meter, flow meter reports success rate according to claim 2, it is characterised in that the step 02 Environment temperature is detected using the thermistor with high-precision temperature detection characteristic.
CN201910766711.2A 2019-08-20 2019-08-20 Method and device for calibrating reporting success rate of gas meter Active CN110519356B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910766711.2A CN110519356B (en) 2019-08-20 2019-08-20 Method and device for calibrating reporting success rate of gas meter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910766711.2A CN110519356B (en) 2019-08-20 2019-08-20 Method and device for calibrating reporting success rate of gas meter

Publications (2)

Publication Number Publication Date
CN110519356A true CN110519356A (en) 2019-11-29
CN110519356B CN110519356B (en) 2022-02-01

Family

ID=68626692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910766711.2A Active CN110519356B (en) 2019-08-20 2019-08-20 Method and device for calibrating reporting success rate of gas meter

Country Status (1)

Country Link
CN (1) CN110519356B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198594A (en) * 2019-12-29 2020-05-26 西安中星测控有限公司 STM32 internal HSI clock self-adaptive serial port communication system
CN111970722A (en) * 2020-08-21 2020-11-20 宁夏隆基宁光仪表股份有限公司 Intelligent instrument communication mode optimization method based on NB communication
CN114088153A (en) * 2020-08-24 2022-02-25 成都秦川物联网科技股份有限公司 Temperature compensation method for intelligent gas meter of Internet of things

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040222856A1 (en) * 2003-05-02 2004-11-11 Silicon Laboratories, Inc. Calibration of oscillator devices
US20090278735A1 (en) * 2008-05-09 2009-11-12 Research In Motion Limited Frequency aiding method and system for navigation satellite receiver with crystal oscillator frequency hysteresis
CN102176112A (en) * 2010-11-29 2011-09-07 江苏林洋电子股份有限公司 Method for achieving accurate clock timing by arranging RTC (real time clock) in MCU (micro control unit)
CN103684256A (en) * 2012-09-12 2014-03-26 无锡华润矽科微电子有限公司 High-accuracy digital temperature-compensated crystal oscillator circuit structure with built-in crystal oscillator
CN107884020A (en) * 2017-10-23 2018-04-06 苏州燃气集团有限责任公司 A kind of low-power consumption gauge table and its system using NB IoT frameworks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040222856A1 (en) * 2003-05-02 2004-11-11 Silicon Laboratories, Inc. Calibration of oscillator devices
US20090278735A1 (en) * 2008-05-09 2009-11-12 Research In Motion Limited Frequency aiding method and system for navigation satellite receiver with crystal oscillator frequency hysteresis
CN102176112A (en) * 2010-11-29 2011-09-07 江苏林洋电子股份有限公司 Method for achieving accurate clock timing by arranging RTC (real time clock) in MCU (micro control unit)
CN103684256A (en) * 2012-09-12 2014-03-26 无锡华润矽科微电子有限公司 High-accuracy digital temperature-compensated crystal oscillator circuit structure with built-in crystal oscillator
CN107884020A (en) * 2017-10-23 2018-04-06 苏州燃气集团有限责任公司 A kind of low-power consumption gauge table and its system using NB IoT frameworks

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198594A (en) * 2019-12-29 2020-05-26 西安中星测控有限公司 STM32 internal HSI clock self-adaptive serial port communication system
CN111198594B (en) * 2019-12-29 2023-05-23 西安中星测控有限公司 STM32 internal HSI clock self-adaptive serial port communication system
CN111970722A (en) * 2020-08-21 2020-11-20 宁夏隆基宁光仪表股份有限公司 Intelligent instrument communication mode optimization method based on NB communication
CN111970722B (en) * 2020-08-21 2024-03-19 宁夏隆基宁光仪表股份有限公司 Intelligent instrument communication mode optimization method based on NB communication
CN114088153A (en) * 2020-08-24 2022-02-25 成都秦川物联网科技股份有限公司 Temperature compensation method for intelligent gas meter of Internet of things

Also Published As

Publication number Publication date
CN110519356B (en) 2022-02-01

Similar Documents

Publication Publication Date Title
CN110519356A (en) A kind of calibration gas meter, flow meter reports the method and device of success rate
CN110380724B (en) RTC clock frequency temperature compensation chip
CN102435975B (en) Clock calibration method of intelligent cost control electric energy meter
TWI648606B (en) System and method for frequency compensation of an instant clock system
CN101562451B (en) Precise domestication conserving method of second-level frequency scale
CN110927657B (en) Electric energy meter error correction method, device and equipment
CN104297716B (en) Intelligent electric meter RTC calibrating method
JP2005528604A (en) System for digital capacitance diaphragm gauge and method of operating the embedded system
CN107271081B (en) Silicon piezoresistive pressure transmitter temperature compensation method and device based on two-stage least square fitting
CN105388445A (en) Automatic meter calibration method for single-phase electric energy meter
CN116106605A (en) Electric energy meter parameter compensation method, medium and system considering temperature change
CN104154987A (en) Vibration wire type sensor reader measuring meter
CN109586673A (en) A kind of oscillating circuit of dynamic temperature correction
CN104937504A (en) Quartz electronic watch high-precision timekeeping method
CN202614950U (en) Time system for earthquake data acquisition
CN104062025A (en) Energy-saving automatic AD temperature collecting monitoring system
CN113922813A (en) Frequency calibration method of numerical control oscillator
CN112737507A (en) Method for realizing RTC high precision based on temperature sensor
CN204274423U (en) Clinical thermometer auto-calibration circuits
CN111045317A (en) Calibration method, device and system of equipment clock, self-calibration method and equipment
CN201113921Y (en) High precision soft synchronous microcomputer compensation crystal oscillator
CN116243048A (en) Voltage detection method, circuit, equipment and storage medium
CN201571042U (en) Self-refit digital temperature compensated crystal oscillator and system thereof
CN114740260A (en) Special synchronous acquisition method for detecting and adjusting crystal oscillator output frequency in real time
CN201869160U (en) High-precision soft-synchronous digital compensation crystal oscillator

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant