CN108181376B - Magnetic memory fixed point acousto-optic alarm system - Google Patents

Magnetic memory fixed point acousto-optic alarm system Download PDF

Info

Publication number
CN108181376B
CN108181376B CN201810014000.5A CN201810014000A CN108181376B CN 108181376 B CN108181376 B CN 108181376B CN 201810014000 A CN201810014000 A CN 201810014000A CN 108181376 B CN108181376 B CN 108181376B
Authority
CN
China
Prior art keywords
value
data
register
address
adturn
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810014000.5A
Other languages
Chinese (zh)
Other versions
CN108181376A (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.)
Shenyang University of Technology
Original Assignee
Shenyang University of Technology
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 Shenyang University of Technology filed Critical Shenyang University of Technology
Priority to CN201810014000.5A priority Critical patent/CN108181376B/en
Publication of CN108181376A publication Critical patent/CN108181376A/en
Application granted granted Critical
Publication of CN108181376B publication Critical patent/CN108181376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N27/00Investigating or analysing materials by the use of electric, electrochemical, or magnetic means
    • G01N27/72Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating magnetic variables
    • G01N27/82Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating magnetic variables for investigating the presence of flaws
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0428Safety, monitoring

Abstract

A novel magnetic memory fixed point acousto-optic alarm system belongs to the technical field of fixed point flaw detection monitoring and detection of metal materials, and particularly relates to a novel magnetic memory fixed point acousto-optic alarm system. The invention provides a novel magnetic memory fixed-point acousto-optic alarm system which is convenient for carrying out long-time real-time monitoring on a metal material. The invention includes single chip, sensor, A/D converter, external parameter memory, alarm part, reset part and external interrupt part, the structure is characterized in that the detection signal output port of the sensor is connected with the detection signal input port of the A/D converter, the detection signal output port of the A/D converter is connected with the detection signal input port of the single chip, the reset signal input port of the single chip is connected with the reset signal output port of the reset part, the interrupt signal input port of the single chip is connected with the interrupt signal output port of the external interrupt part.

Description

Magnetic memory fixed point acousto-optic alarm system
Technical Field
The invention belongs to the technical field of fixed-point flaw detection monitoring and detection of metal materials, and particularly relates to a magnetic memory fixed-point acousto-optic alarm system.
Background
With the development of modern productivity, metals have been applied to various fields of our lives, and economic losses, which may be caused by damage to metals, have increased year by year. However, the general non-destructive inspection technique can detect only cracks or defects that have already been formed, and cannot detect fatigue failure due to stress concentration at an early stage. The principle of metal magnetic memory is that under the action of stress, ferromagnetic material forms magnetic and elastic interaction energy to reorient magnetization intensity, so that the magnetic field intensity is changed to achieve the purpose of measurement, and therefore, the metal material can be detected early. However, the conventional metal magnetic memory detector is a mobile scanning type device, and cannot monitor fixed-point metal for a long time in real time. In addition, the traditional filtering system of the metal magnetic memory detector has the characteristic that the size of equipment is relatively large in both hardware realization and software realization due to the complex algorithm or data analysis can only be carried out through a desktop computer due to large program quantity, and is not beneficial to field fixed-point long-time monitoring.
Disclosure of Invention
The invention aims at the problems and provides a magnetic memory fixed-point acousto-optic alarm system which is convenient for carrying out long-time real-time monitoring on a metal material.
In order to achieve the purpose, the invention adopts the following technical scheme that the invention comprises a singlechip, a sensor, an A/D converter, an external parameter memory, an alarm part, a reset part and an external interrupt part, the structure is characterized in that a detection signal output port of the sensor is connected with a detection signal input port of an A/D converter, a detection signal output port of the A/D converter is connected with a detection signal input port of a single chip microcomputer, a reset signal input port of the single chip microcomputer is connected with a reset signal output port of a reset part, an interrupt signal input port of the single chip microcomputer is connected with an interrupt signal output port of an external interrupt part, an alarm signal output port of the single chip microcomputer is connected with an alarm signal input port of an alarm part, and a storage signal output port of the single chip microcomputer is connected with a storage signal input port of an external parameter storage;
the program of the singlechip comprises a main program for system calling and data processing, a data acquisition subprogram, a numerical value filtering processing subprogram and a critical value acquisition subprogram as an interrupt service program,
the system calling and data processing main program sets LINEADR1 as a critical value storage address by using an assembly pseudo instruction; ADTURN is the first address of the collected data storage area; LINEADR0 is a filtering data storage address;
the system calling and data processing main program firstly calls a data acquisition subprogram to acquire a data value by using a sensor, converts the acquired data value into a digital signal and stores the digital signal into a storage area with an ADTURN (advanced address), and then calls a numerical filtering subprogram to convert a plurality of measured values in the storage area with the ADTURN as the initial address into a long-term stable value and store the long-term stable value into a LINEADTR 0 storage unit; then the system calls and the data processing main program compares the long-term stability value with a predetermined critical value, when the long-term stability value is smaller than the critical value, the metal does not reach the stress limit, and the main program reuses the sensor to acquire the data value for measurement; when the long-term stability value is larger than the critical value, the metal reaches the stress limit, and the main program starts an audible and visual alarm system to give an alarm;
the data acquisition subprogram stores a R1 register into a value 100D to be used as a cycle count, the R0 register is used as a data pointer to point to the first address ADTURN of a data acquisition storage area, an IN0 channel is started to acquire data and perform digital-to-analog conversion at the same time, a period of time is delayed to ensure that the data are completely acquired and converted, the converted value is stored IN an RO pointing area, the R0 pointer is modified to point to the next storage unit, the value of the R1 register is subtracted by one count, whether the value IN the R1 counter is '0' or not is judged, the data acquisition and conversion are continued and the pointer is modified if the value is '0', the cycle is skipped if the value is '0', and thus the metal magnetic memory signal is acquired for multiple times through multiple cycles and converted into a digital signal to be stored IN the storage area with the ADTURN as the first address;
the numerical value filtering processing subroutine uses the R0 register as a data pointer to point to the first address ADTURN of the acquired data storage area, after the R0 point value is stored in the register 3CH, the R0 point to the next storage unit, the median value of the register 3CH is compared with the value pointed by the R0, if the value pointed by the R0 is large, the median value of the register 3CH and the value pointed by the R0 are exchanged, then the R0 points to the next storage unit for continuous circulation, if the median value of the register 3CH is large, the R0 points to the next storage unit for continuous circulation, and thus the values in the acquired data storage area with the ADTURN as the first address are arranged from small to large in sequence for many times in a circulating manner; pointing an R0 pointer to a value of a collected data storage area with ADTURN as a first address, storing a R0 pointing value into a register 3CH, pointing an R0 pointer to a next storage unit, adding a median value of the register 3CH and a R0 pointing value, then, pointing the R0 pointer to the next storage unit, thus, accumulating for multiple times, jumping out of a cycle, arranging collected numbers from small to large, taking out a plurality of intermediate values and accumulating the intermediate values together; dividing the obtained accumulated value by the accumulated times, putting the accumulated value into a register 3CH as a long-term stable value to wait for calling;
the critical value acquisition subprogram stores a register into a value 100D for cycle counting; the method comprises the steps of enabling an R0 register to serve as a data pointer to point to a first address ADTURN of a data acquisition storage area, starting an IN0 channel to acquire data and perform digital-to-analog conversion at the same time, delaying to wait for a period of time to ensure that the data are completely acquired and converted, storing a converted numerical value into an RO pointing area, modifying the pointer of an R0 to point to a next storage unit, subtracting a count from the value of an R1 register, judging whether the value IN an R1 counter is '0', continuing to acquire and convert the data and modify the pointer if the value is '0', and jumping out of circulation if the value is '0'; thus, the critical value signals are collected for a plurality of times through a plurality of times of circulation and are converted into digital signals to be stored in a storage area with the ADTURN as the first address; then calling a numerical filtering processing subprogram, and putting the obtained filtering value in the register 3CH into a LINEADR1 storage unit as a critical value to wait for the use of the main program;
the critical value is collected by an external interrupt section.
As a preferred scheme, the system calling and data processing main program firstly calls a data acquisition subprogram to acquire 100 times of data values by using a sensor.
As another preferred scheme, the main program starts an audible and visual alarm system to alarm by utilizing a mode of conveying '0' '1' codes.
As another preferred scheme, the metal magnetic memory signal is acquired 100 times and converted into a digital signal and stored in a storage area with the ADTURN as the first address after 100 cycles.
As another preferred scheme, the invention can cycle 100 times to arrange the values in the collected data storage area with ADTURN as the first address in the order from small to large; pointing an R0 pointer to the 40 th value of a collected data storage area with ADTURN as a first address, storing a R0 pointing value into a register 3CH, pointing an R0 pointer to the next storage unit, adding a median value of the register 3CH and a R0 pointing value, then, pointing the R0 pointer to the next storage unit again, and jumping out of a cycle after accumulating for 20 times, so that collected numbers are arranged from small to large, and then, the middle 20 values are taken out and accumulated together; the resulting accumulated value is divided by 20 and placed in register 3CH as a long-term stable value awaiting invocation.
As another preferred scheme, the singlechip adopts an 80C51 chip.
As another preferable scheme, the external interrupt portion of the present invention includes a switch K2, one end of the switch K2 is respectively connected to one end of a capacitor C2 and a power supply VGG, the other end of the switch K2 is respectively connected to the other end of a capacitor C2, one end of a resistor R2, and a first not gate input end, the other end of the resistor R2 is grounded, and a first not gate output end is connected to pin 11 of an 80C51 chip.
As another preferred scheme, according to the present invention, when the pin 11 of the 80C51 chip is '0', the interrupt service routine is executed, the interrupt service routine first protects the 'program site' and the 'breakpoint' and then interrupts, executes the critical value collection subroutine, executes the subroutine and then interrupts, and then restores the 'program site' and the 'breakpoint' and continues to execute the main program.
As another preferred scheme, the threshold signal is collected 100 times and converted into a digital signal and stored in the storage area with the ADTURN as the first address after 100 cycles according to the present invention.
As another preferred scheme, the sensor of the invention adopts a 49E type Hall sensor.
As another preferred scheme, the external parameter memory of the invention comprises a 74LS373 chip and an HM628128RAM chip, pins 32 to 39 of an 80C51 chip are respectively and correspondingly connected with pins 18, 17, 14, 13, 8, 7, 4 and 3 of the 74LS373 chip, pins 32 to 39 of an 80C51 chip are respectively and correspondingly connected with pins 21 to 13 of the HM628128RAM chip, pins 19, 16, 15, 12, 9, 6, 5 and 2 of the 74LS373 chip are respectively and correspondingly connected with pins 5 to 12 of the HM628128RAM chip, and pins 17 and 18 of an 80C51 chip are respectively and correspondingly connected with pins 24 and 29 of the HM628128RAM chip;
pins 1 and 2 of an 80C51 chip are correspondingly connected with pins 2 and 31 of an HM628128RAM chip respectively, and pins 27-21 of the 80C51 chip are correspondingly connected with pins 3, 28, 4, 25, 23, 26 and 27 of an HM628128RAM chip respectively; the pin 22 of the HM628128RAM chip is connected with a decoding circuit; the 30 pin of the 80C51 chip was connected to the 11 pin of the 74LS373 chip.
As another preferred scheme, the A/D converter of the invention adopts an AD0809 chip, 80C51P of chip0The port is connected with the D port of the data access port of the AD0809 chip, and the A port of the 74LS373 chip0、A1、A2The ports are correspondingly connected with A, B, C ports of the AD0809 chip respectively;
pin 13 of the 80C51 chip is connected with the output end of a second NOT gate, the input end of the second NOT gate is connected with an EOC port of an AD0809 chip, pin 16 of the 80C51 chip is connected with the first input end of a first AND gate, pin 21 of the 0C51 chip is respectively connected with the second input end of the first AND gate and the first input end of a second AND gate, and pin 17 of the 80C51 chip is connected with the second input end of the second AND gate;
the output end of the first AND gate is connected with the input end of a third NOT gate, and the output end of the third NOT gate is respectively connected with an ST port and an ALE port of the AD0809 chip; the output end of the second AND gate is connected with the input end of a fourth NOT gate, and the output end of the fourth NOT gate is connected with an OE port of the AD0809 chip; the 30 pins of the 80C51 chip are connected with the CLK port of the AD0809 chip through a half-value circuit;
an IN0 port of the AD0809 chip is used as a signal access port and connected with a port C of the Hall sensor, a port A of the Hall sensor is connected with a power supply, and a port B of the Hall sensor is grounded.
Secondly, the alarm part comprises a buzzer, the positive terminal of the buzzer is respectively connected with one end of a resistor R1, one end of a resistor R2 and a power supply VCC, the other end of the resistor R1 is connected with 3 pins of an 80C51 chip through a green LED, and the other end of the resistor R2 is connected with 4 pins of the 80C51 chip through a red LED;
the negative electrode end of the buzzer is connected with the collector of an NPN triode Q1, the emitter of the NPN triode Q1 is grounded, and the base of the NPN triode Q1 is connected with the 5 th pin of the 80C51 chip through a resistor R3.
In addition, the reset part comprises a switch K1, one end of a switch K1 is respectively connected with a power supply VCC and one end of a capacitor C1, the other end of the switch K1 is respectively connected with the other end of a capacitor C1, one end of a resistor R1 and a pin 9 of an 80C51 chip, and the other end of a resistor R1 is grounded.
The invention has the beneficial effects.
The invention is based on the metal magnetic memory principle, is controlled by a single chip microcomputer, and adopts the mutual combination of a sensor, an A/D converter, an external parameter memory, an alarm part, a reset part and an external interrupt part, thereby being beneficial to the miniaturization of the device, being suitable for field operation and ensuring the long-time real-time monitoring of field fixed points.
For a program control part, the inventor researches the characteristics of long-time fixed-point monitoring and designs the program by using assembly language, and the program is short and easy to operate in a signal processing mode, small in program quantity and suitable for being used by a single chip microcomputer, so that the feasibility of field real-time monitoring is ensured.
Drawings
The invention is further described with reference to the following figures and detailed description. The scope of the invention is not limited to the following expressions.
FIG. 1 is a flow diagram of a system call and data processing main program;
FIG. 2 is a data acquisition subroutine flowchart;
FIG. 3 is a flow diagram of a numerical filtering process subroutine;
FIG. 4 is a flowchart of a threshold acquisition subroutine;
FIG. 5 is a block diagram of the present invention;
FIG. 6 is a diagram of a Hall sensor structure;
FIG. 7 is a circuit diagram of a data acquisition system;
FIG. 8 is a memory expansion circuit diagram;
FIG. 9 is a circuit diagram of an audible and visual alarm;
FIG. 10 is a diagram of a reset system and interrupt control circuit.
Detailed Description
As shown in the figure, the invention comprises a single chip microcomputer, a sensor, an A/D converter, an external parameter memory, an alarm part, a reset part and an external interrupt part, wherein a detection signal output port of the sensor is connected with a detection signal input port of the A/D converter;
the program of the singlechip comprises a main program for system calling and data processing, a data acquisition subprogram, a numerical value filtering processing subprogram and a critical value acquisition subprogram as an interrupt service program,
the system calling and data processing main program sets LINEADR1 as a critical value storage address by using an assembly pseudo instruction; ADTURN is the first address of the collected data storage area; LINEADR0 is a filtering data storage address;
as shown in fig. 1, the system calling and data processing main program first calls the data collecting subroutine to collect data values by using the sensor, and converts the collected data values into digital signals to be stored in the ADTURN-first address memory area, and then calls the numerical filtering subroutine to convert the multiple measurement values in the ADTURN-first address memory area into long-term stable values to be stored in the linedr 0 memory unit; then the system calls and the data processing main program to compare the long-term stability value with a predetermined critical value, namely the value of the LINEADR0 storage unit is counted with the value of the LINEADR1 storage unit, when the long-term stability value is smaller than the critical value, the metal does not reach the stress limit, 100 groups of data can be collected again after a period of time delay for filtering comparison processing, and the main program reuses the sensor to collect the data value for measurement; when the long-term stability value is larger than the critical value, the metal reaches the stress limit, and the main program starts an audible and visual alarm system to give an alarm;
the sensor needs to be in contact with the measured metal for a long time, and can acquire 100 groups of values each time and put the values into a storage area with an ADTURN address as a first address to wait for filtering processing; if the filtering detection does not exceed the critical value, 100 groups of new values are acquired again through time delay, the new values are put into a storage area with the ADTURN as the first address to wait for filtering processing, and if the filtering detection exceeds the critical value, the acquisition is suspended to wait for the next processing. The specific method is as shown IN fig. 2, the data acquisition subroutine stores the R1 register into the value 100D as a cycle count, the R0 register is used as a data pointer to point to the ADTURN of the first address of the data acquisition storage area, the IN0 channel is started to acquire data and perform digital-to-analog conversion at the same time, the time delay is waited for a period of time to ensure that the data are completely acquired and converted, the converted value is stored IN the RO pointing area, the R0 pointer is modified to point to the next storage unit, the value of the R1 register is subtracted by one count, whether the value IN the R1 counter is '0' is judged, if not, '0', the data acquisition and conversion are continued and the pointer is modified, if '0', the cycle is skipped, so that the metal magnetic memory signal is acquired for multiple times through multiple cycles and converted into a digital signal to be stored IN the ADTURN storage area with the first address;
because the magnetic memory signal is a weak magnetic signal, the magnetic memory signal is very easy to be interfered by the outside, and the filtering treatment is needed; the invention filters the data which can be collected 100 times each time, arranges the data from small to large, and takes the average value of the summation of the middle 20 data as the 'long-term stable value', thus eliminating most external interference; the specific method is as shown in fig. 3, the numerical filtering processing subroutine directs the R0 register as a data pointer to the first address ADTURN of the collected data storage area, stores the value pointed by R0 into the register 3CH, directs R0 to the next storage unit, compares the median value of the register 3CH with the value pointed by R0, if the value pointed by R0 is large, then the median value pointed by R0 and exchanges positions with the value pointed by R0, and then directs R0 to the next storage unit to continue circulation, if the median value of the register 3CH is large, then the values in the collected data storage area with ADTURN as the first address are arranged from small to large in sequence by circulating for many times; pointing an R0 pointer to a value of a collected data storage area with ADTURN as a first address, storing a R0 pointing value into a register 3CH, pointing an R0 pointer to a next storage unit, adding a median value of the register 3CH and a R0 pointing value, then, pointing the R0 pointer to the next storage unit again, thus, accumulating for multiple times, jumping out of a loop, arranging collected numbers from small to large, taking out a plurality of intermediate values and accumulating the intermediate values together (the interference of 'maximum value' and 'minimum value' can be avoided); dividing the obtained accumulated value by the accumulated times, putting the accumulated value into a register 3CH as a long-term stable value to wait for calling;
as shown in fig. 4, an interrupt service subroutine, a threshold value collection routine, is executed, and the threshold value collection subroutine stores a register into the value 100D for use as a cycle count; the method comprises the steps of enabling an R0 register to serve as a data pointer to point to a first address ADTURN of a data acquisition storage area, starting an IN0 channel to acquire data and perform digital-to-analog conversion at the same time, delaying to wait for a period of time to ensure that the data are completely acquired and converted, storing a converted numerical value into an RO pointing area, modifying the pointer of an R0 to point to a next storage unit, subtracting a count from the value of an R1 register, judging whether the value IN an R1 counter is '0', continuing to acquire and convert the data and modify the pointer if the value is '0', and jumping out of circulation if the value is '0'; thus, the critical value signals are collected for a plurality of times through a plurality of times of circulation and are converted into digital signals to be stored in a storage area with the ADTURN as the first address; then calling a numerical filtering processing subprogram, and putting the obtained filtering value in the register 3CH into a LINEADR1 storage unit as a critical value to wait for the use of the main program;
the critical value is collected by an external interrupt section.
The system calling and data processing main program firstly calls a data acquisition subprogram to acquire a data value for 100 times by using a sensor.
The main program starts an audible and visual alarm system to give an alarm by utilizing a mode of conveying '0' '1' codes.
The metal magnetic memory signal is collected 100 times and converted into a digital signal and stored in a storage area with the ADTURN as the first address through 100 cycles.
The values in the collected data storage area with the ADTURN as the first address can be arranged from small to large by circulating for 100 times; pointing an R0 pointer to the 40 th value of a collected data storage area with ADTURN as a first address, storing a R0 pointing value into a register 3CH, pointing an R0 pointer to the next storage unit, adding a median value of the register 3CH and a R0 pointing value, then, pointing the R0 pointer to the next storage unit again, and jumping out of a cycle after accumulating for 20 times, so that collected numbers are arranged from small to large, and then, the middle 20 values are taken out and accumulated together; the resulting accumulated value is divided by 20 and placed in register 3CH as a long-term stable value awaiting invocation.
The single chip microcomputer adopts an 80C51 chip.
As shown in fig. 10, the external interrupt portion includes a switch K2, one end of the switch K2 is connected to one end of a capacitor C2 and a power supply VGG, the other end of the switch K2 is connected to the other end of a capacitor C2, one end of a resistor R2 and a first not gate input end, the other end of the resistor R2 is grounded, and the first not gate output end is connected to pin 11 of an 80C51 chip. When the switch is pressed down, the interrupt service program is started, and then the critical value acquisition subprogram is started.
The capacitor C2 is shown as a 10uF capacitor, and the resistor R2 is shown as a 10K ohm resistor.
Since the threshold value of the magnetic memory signal varies with the environment, it must be acquired in situ. The sensors were placed in contact with the prepared threshold material and the threshold was collected using the K2 switch open interrupt subroutine. And (2) realizing interruption by using an interruption service program, and further executing an interruption service subprogram-critical value acquisition program, wherein when a K2 switch is pressed, a pin 11 of an 80C51 chip is '0', and executing the interruption service program, as shown in FIG. 4, the interruption service program firstly protects a 'program site' and a 'breakpoint' and then switches on and off, executes the critical value acquisition subprogram, switches off and interrupts after the subprogram is executed, and then recovers the 'program site' and the 'breakpoint', and continues to execute the main program.
The cycle of 100 times collects the critical value signal 100 times and converts it into digital signal and stores it into the storage area with ADTURN as the first address.
As shown in fig. 6, the sensor is a 49E hall sensor.
The invention needs a single-channel magnetic signal acquisition and conversion system because the fixed point needs to be acquired for a long time in a magnetic memory type. As shown in fig. 7 and 8, the external parameter memory includes a 74LS373 chip and an HM628128RAM chip, pins 32 to 39 of an 80C51 chip are respectively connected to pins 18, 17, 14, 13, 8, 7, 4 and 3 of the 74LS373 chip, pins 32 to 39 of an 80C51 chip are respectively connected to pins 21 to 13 of the HM628128RAM chip, pins 19, 16, 15, 12, 9, 6, 5 and 2 of the 74LS373 chip are respectively connected to pins 5 to 12 of the HM628128RAM chip, pins 17 and 18 of an 80C51 chip are respectively connected to pins 24 and 29 of the HM628128RAM chip;
pins 1 and 2 of an 80C51 chip are correspondingly connected with pins 2 and 31 of an HM628128RAM chip respectively, and pins 27-21 of the 80C51 chip are correspondingly connected with pins 3, 28, 4, 25, 23, 26 and 27 of an HM628128RAM chip respectively; the pin 22 of the HM628128RAM chip is connected with a decoding circuit; the 30 pin of the 80C51 chip was connected to the 11 pin of the 74LS373 chip.
The external parameter memory can meet the requirement of collecting a large amount of data for analysis and comparison.
The A/D converter adopts an AD0809 chip and a P of an 80C51 chip0The port is connected with the D port of the data access port of the AD0809 chip, and the A port of the 74LS373 chip0、A1、A2The ports are correspondingly connected with A, B, C ports of the AD0809 chip respectively;
pin 13 of the 80C51 chip is connected with the output end of a second NOT gate, the input end of the second NOT gate is connected with an EOC port of an AD0809 chip, pin 16 of the 80C51 chip is connected with the first input end of a first AND gate, pin 21 of the 0C51 chip is respectively connected with the second input end of the first AND gate and the first input end of a second AND gate, and pin 17 of the 80C51 chip is connected with the second input end of the second AND gate;
the output end of the first AND gate is connected with the input end of a third NOT gate, and the output end of the third NOT gate is respectively connected with an ST port and an ALE port of the AD0809 chip; the output end of the second AND gate is connected with the input end of a fourth NOT gate, and the output end of the fourth NOT gate is connected with an OE port of the AD0809 chip; the 30 pins of the 80C51 chip are connected with the CLK port of the AD0809 chip through a half-value circuit;
an IN0 port of the AD0809 chip is used as a signal access port and connected with a port C of the Hall sensor, a port A of the Hall sensor is connected with a power supply, and a port B of the Hall sensor is grounded.
As shown in fig. 9, the alarm portion includes a buzzer, a positive terminal of the buzzer is connected to one end of a resistor R1, one end of a resistor R2, and a power supply VCC, respectively, the other end of the resistor R1 is connected to pin 3 of an 80C51 chip through a green LED, and the other end of the resistor R2 is connected to pin 4 of an 80C51 chip through a red LED;
the negative electrode end of the buzzer is connected with the collector of an NPN triode Q1, the emitter of the NPN triode Q1 is grounded, and the base of the NPN triode Q1 is connected with the 5 th pin of the 80C51 chip through a resistor R3.
The alarm part of the invention can be controlled by transmitting '0' and '1' codes and can simultaneously carry out sound and light alarm modes, thus being suitable for field operation and being connected with a singlechip.
As shown in fig. 10, the reset portion includes a switch K1, one end of the switch K1 is connected to the power source VCC and one end of the capacitor C1, the other end of the switch K1 is connected to the other end of the capacitor C1, one end of the resistor R1, and the pin 9 of the 80C51 chip, and the other end of the resistor R1 is grounded.
The capacitor C1 is shown as a 10uF capacitor, and the resistor R1 is shown as a 10K ohm resistor.
When the system alarms or meets other conditions, the pin 'RST' of the singlechip can be reset by setting the pin '1' through the button switch, and when the critical value needs to be acquired, the pin 'INT 0' of the singlechip can be set to '0' through the button switch, and an interrupt service subprogram, namely a 'critical value acquisition program', is started to acquire the critical value; the invention can be restarted and interrupted by external control, which is convenient for field operation.
When the switch button K1 is not pressed down, the ground pin of the single chip microcomputer 'RST' is set to be 0 'and the system executes the main program to normally work, when an alarm or other conditions exist, the switch button K1 is pressed down, and the power supply connected with the pin of the single chip microcomputer' RST 'is set to be 1' and the system is started from the beginning. Similarly, the switch button K2 is not pressed by the pin INT0 'of the singlechip, and is set as the main program of' 1 'system execution through the non-gate grounding, when the critical value needs to be acquired, the switch button K2 is pressed by the pin INT 0' of the singlechip, and is set as '0' through the non-gate grounding, the system jumps out of the main program and executes the 'critical value acquisition sub program', and the system automatically returns to the main program after the execution is finished.
It should be understood that the detailed description of the present invention is only for illustrating the present invention and is not limited by the technical solutions described in the embodiments of the present invention, and those skilled in the art should understand that the present invention can be modified or substituted equally to achieve the same technical effects; as long as the use requirements are met, the method is within the protection scope of the invention.

Claims (10)

1. A kind of magnetic memory fixed point acousto-optic alarm system, including the one-chip computer, the sensor, A/D converter, external parameter storage, alarm part, reset part and external interrupt part, characterized by that the detection signal output port of the sensor couples to detection signal input port of A/D converter, the detection signal output port of A/D converter couples to detection signal input port of the one-chip computer, the reset signal input port of the one-chip computer couples to reset signal output port of the reset part, the interrupt signal input port of the one-chip computer couples to interrupt signal output port of the external interrupt part, the alarm signal output port of the one-chip computer couples to alarm signal input port of the alarm part, the storage signal output port of the one-chip computer couples to storage signal input port of the external parameter storage;
the program of the singlechip comprises a main program for system calling and data processing, a data acquisition subprogram, a numerical value filtering processing subprogram and a critical value acquisition subprogram as an interrupt service program,
the system calling and data processing main program sets LINEADR1 as a critical value storage address by using an assembly pseudo instruction; ADTURN is the first address of the collected data storage area; LINEADR0 is a filtering data storage address;
the system calling and data processing main program firstly calls a data acquisition subprogram to acquire a data value by using a sensor, converts the acquired data value into a digital signal and stores the digital signal into a storage area with an ADTURN (advanced address), and then calls a numerical filtering processing subprogram to convert a plurality of measured values in the storage area with the ADTURN as the initial address into a long-term stable value and store the long-term stable value into a LINEADTURN 0 storage unit; then the system calls and the data processing main program compares the long-term stability value with a predetermined critical value, when the long-term stability value is smaller than the critical value, the metal does not reach the stress limit, and the main program reuses the sensor to acquire the data value for measurement; when the long-term stability value is larger than the critical value, the metal reaches the stress limit, and the main program starts an audible and visual alarm system to give an alarm;
the data acquisition subprogram stores a R1 register into a value 100D to be used as a cycle count, the R0 register is used as a data pointer to point to the first address ADTURN of a data acquisition storage area, an IN0 channel is started to acquire data and perform digital-to-analog conversion at the same time, a period of time is delayed to ensure that the data are completely acquired and converted, the converted value is stored IN an RO pointing area, the R0 pointer is modified to point to the next storage unit, the value of the R1 register is subtracted by one count, whether the value IN the R1 counter is '0' or not is judged, the data acquisition and conversion are continued and the pointer is modified if the value is '0', the cycle is skipped if the value is '0', and thus the metal magnetic memory signal is acquired for multiple times through multiple cycles and converted into a digital signal to be stored IN the storage area with the ADTURN as the first address;
the numerical value filtering processing subroutine uses the R0 register as a data pointer to point to the first address ADTURN of the acquired data storage area, after the R0 point value is stored in the register 3CH, the R0 point to the next storage unit, the median value of the register 3CH is compared with the value pointed by the R0, if the value pointed by the R0 is large, the median value of the register 3CH and the value pointed by the R0 are exchanged, then the R0 points to the next storage unit for continuous circulation, if the median value of the register 3CH is large, the R0 points to the next storage unit for continuous circulation, and thus the values in the acquired data storage area with the ADTURN as the first address are arranged from small to large in sequence for many times in a circulating manner; pointing an R0 pointer to a value of a collected data storage area with ADTURN as a first address, storing a R0 pointing value into a register 3CH, pointing an R0 pointer to a next storage unit, adding a median value of the register 3CH and a R0 pointing value, then, pointing the R0 pointer to the next storage unit, thus, accumulating for multiple times, jumping out of a cycle, arranging collected numbers from small to large, taking out a plurality of intermediate values and accumulating the intermediate values together; dividing the obtained accumulated value by the accumulated times, putting the accumulated value into a register 3CH as a long-term stable value to wait for calling;
the critical value acquisition subprogram stores a register into a value 100D for cycle counting; the method comprises the steps of enabling an R0 register to serve as a data pointer to point to a first address ADTURN of a data acquisition storage area, starting an IN0 channel to acquire data and perform digital-to-analog conversion at the same time, delaying to wait for a period of time to ensure that the data are completely acquired and converted, storing a converted numerical value into an RO pointing area, modifying the pointer of an R0 to point to a next storage unit, subtracting a count from the value of an R1 register, judging whether the value IN an R1 counter is '0', continuing to acquire and convert the data and modify the pointer if the value is '0', and jumping out of circulation if the value is '0'; thus, the critical value signals are collected for a plurality of times through a plurality of times of circulation and are converted into digital signals to be stored in a storage area with the ADTURN as the first address; then calling a numerical filtering processing subprogram, and putting the obtained filtering value in the register 3CH into a LINEADR1 storage unit as a critical value to wait for the use of the main program;
the critical value is collected by an external interrupt section.
2. The system of claim 1, wherein the system call and data processing main program first calls the data collection subroutine to collect 100 times data values with the sensor.
3. The system of claim 1, wherein the system call and data processing main program initiates an audible and visual alarm system to alarm by sending ' 0 ' 1 ' code.
4. The acousto-optic warning system of magnetic memory fixed-point according to claim 1, characterized in that the metal magnetic memory signal is collected 100 times and converted into digital signal and stored in the storage area with ADTURN as the first address through 100 cycles.
5. The acousto-optic alarm system according to claim 1, characterized in that the values in the collected data storage area with ADTURN as the first address can be arranged from small to large in sequence by cycling 100 times; pointing an R0 pointer to the 40 th value of a collected data storage area with ADTURN as a first address, storing a R0 pointing value into a register 3CH, pointing an R0 pointer to the next storage unit, adding a median value of the register 3CH and a R0 pointing value, then, pointing the R0 pointer to the next storage unit again, and jumping out of a cycle after accumulating for 20 times, so that collected numbers are arranged from small to large, and then, the middle 20 values are taken out and accumulated together; the resulting accumulated value is divided by 20 and placed in register 3CH as a long-term stable value awaiting invocation.
6. The acousto-optic alarm system of claim 1, characterized in that the single chip microcomputer uses an 80C51 chip.
7. The acousto-optic alarm system according to claim 6, characterized in that the external interrupt part includes a switch K2, one end of the switch K2 is connected to one end of a capacitor C2 and a power supply VGG, the other end of the switch K2 is connected to the other end of a capacitor C2, one end of a resistor R2 and the input end of a first NOT gate, the other end of the resistor R2 is grounded, and the output end of the first NOT gate is connected to the 11 pin of an 80C51 chip.
8. The magnetic memory fixed-point acousto-optic alarm system according to claim 6, characterized in that when pin 11 of the 80C51 chip is '0', the interrupt service routine is executed, the interrupt service routine first protects 'program site' and 'breakpoint' and then turns on the interrupt, executes the critical value collection subroutine, turns off the interrupt after executing the critical value collection subroutine, and then restores 'program site' and 'breakpoint' and continues to execute the main program of system call and data processing.
9. A magnetic memory pointing acousto-optic alarm system according to claim 1 characterised in that the threshold signal is acquired 100 times and converted into a digital signal stored in the storage area addressed to ADTURN over 100 cycles.
10. The acousto-optic warning system of claim 1, characterized in that the sensor is a 49E hall sensor.
CN201810014000.5A 2018-01-08 2018-01-08 Magnetic memory fixed point acousto-optic alarm system Active CN108181376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810014000.5A CN108181376B (en) 2018-01-08 2018-01-08 Magnetic memory fixed point acousto-optic alarm system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810014000.5A CN108181376B (en) 2018-01-08 2018-01-08 Magnetic memory fixed point acousto-optic alarm system

Publications (2)

Publication Number Publication Date
CN108181376A CN108181376A (en) 2018-06-19
CN108181376B true CN108181376B (en) 2021-12-21

Family

ID=62550073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810014000.5A Active CN108181376B (en) 2018-01-08 2018-01-08 Magnetic memory fixed point acousto-optic alarm system

Country Status (1)

Country Link
CN (1) CN108181376B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110017430A (en) * 2019-04-12 2019-07-16 中国石油化工股份有限公司 A kind of submarine pipeline binary channels fixed point damage monitoring system based on weak magnetic

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1031992B1 (en) * 1989-04-13 2006-06-21 SanDisk Corporation Flash EEPROM system
GB0304192D0 (en) * 2003-02-25 2003-03-26 Accentus Plc Measurement of thermally induced stress
CN100385235C (en) * 2005-12-06 2008-04-30 天津大学 Method of determining pipeline welding crack stress concentration using metal magnetic memory detection technology
CN102954997A (en) * 2011-08-26 2013-03-06 中国石油天然气股份有限公司 Non-contact magnetic stress detection method for pipe defects
CN203758958U (en) * 2013-09-28 2014-08-06 西安科技大学 Weak magnetic online monitoring system for defects of mining steel rope
CN104407045B (en) * 2014-12-15 2017-08-25 重庆交通大学 The device and method of seizure bridge cable fracture of wire based on metal magnetic memory technique
CN106018543B (en) * 2016-05-16 2019-11-05 北京理工大学 A kind of bolt connection part damage in-situ monitor device based on Metal magnetic memory

Also Published As

Publication number Publication date
CN108181376A (en) 2018-06-19

Similar Documents

Publication Publication Date Title
CN108427623A (en) A kind of computer fault alarm system and method
CN108181376B (en) Magnetic memory fixed point acousto-optic alarm system
CN102110555B (en) Load variation tracking automatic rated value breaker
CN108287270A (en) A kind of electromagnet radiation detection system
CN108195930B (en) Magnetic memory mobile scanning type acousto-optic alarm system
CN105243285A (en) Big data health forecast system
CN104188652A (en) Real-time control method and system for electrocardiogram data quality
CN105737590A (en) Monitoring system of grain dryer
CN107890340A (en) A kind of sleep monitor method and system
CN201166711Y (en) System for monitoring field unattended seismographic station circumstance
CN203365417U (en) Food safety detector
CN104423661B (en) A kind of mobile terminal and the method for preventing touch screen mistaken touch
CN112731083A (en) High-throughput satellite K-waveband space traveling wave tube multistage depressed collector micro-discharge detection method
CN204291227U (en) Video information process device
CN108152364A (en) A kind of novel Magnetic Memory fixed point sound-light alarm control method
CN208781004U (en) It is a kind of can real-time measurement body temperature intelligent health wrist-watch
CN108362322B (en) Sensor testing method and device and readable storage medium
CN115839696A (en) Tire pattern depth measuring method, device, storage medium and system
CN103201687A (en) Low energy sensor interface
CN113054984A (en) Pressure-sensitive detection circuit, chip, system and pressure-sensitive detection method
CN202350927U (en) Intelligently universal digital display device
CN108956753A (en) A kind of Magnetic Memory fixed point sound-light alarm control method can customize error
CN211978749U (en) Multiple gas detection device
CN108195929A (en) A kind of novel Magnetic Memory motion scan formula sound-light alarm control method
NL2032794B1 (en) On-line magnetic memory stress detection system

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