Shooting counter based on acceleration detection
By using acceleration sensors and microprocessors in the shooting counter, shooting counting in dark light environments and light guns is achieved, and the problems of inconvenient use and installation restrictions in the prior art are solved, and miniaturization and widespread application are achieved.
Patent Information
- Application Number
- CN202411814706.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-28
AI Technical Summary
The existing shooting counters are inconvenient to use in dark light environments and are not suitable for installation on light guns. The physical size is large and the installation location is strictly required.
A shooting counter based on acceleration detection is designed, using an acceleration sensor and a microprocessor to collect the acceleration signal of the gun through the acceleration sensor, and the microprocessor performs shooting counting. It can also be equipped with a display screen and button circuit to adapt to different environments and gun types.
It realizes accurate counting in dark environments, is suitable for light guns, and is miniaturized, expanding the scope of application of shooting counters.
Smart Images

Figure BDA0005181450360000031 
Figure BDA0005181450360000101 
Figure FDA0005181450350000021
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of shot counting, and in particular to a shot counter based on acceleration detection. Background Art
[0002] In fierce combat, how many bullets are left in the magazine has always been a problem that troubles shooters, especially in close-range indoor combat environments.
[0003] Some manufacturers, such as Magpul, have designed transparent magazines that allow the shooter to see the number of rounds remaining in the magazine, but such transparent magazines are not suitable for use in dark environments. Glock has designed magazines with small holes that allow the shooter to see the number of rounds remaining in the magazine after pulling out the magazine, but pulling out the magazine to check the ammunition will affect the shooter's shooting timing.
[0004] In 2006, Tang Gongmin studied an intelligent shooting recorder for anti-aircraft machine guns, and in 2008, Ma Chunxin studied an intelligent shooting recorder for naval guns. The input signal acquisition of this type of intelligent shooting recorder is achieved through two electromagnetic induction proximity switch sensors. Sensor 1 detects the change in the relative position between the automatic machine and the gun frame during shooting, and converts its displacement change characteristics into the switch electrical signal required by the recorder, which is used as the counting signal required by the shooting recorder. Sensor 2 detects whether the position of the pedal firing mechanism of the anti-aircraft machine gun is in the firing state, and converts the dynamic position signal of the pedal mechanism into an electrical signal as the counting end interrupt control signal of the shooting recorder.
[0005] This type of shooting recorder uses the AT89C51 microcontroller and various DIP packaged chips. It has a large physical size and has requirements for the installation positions of the two sensors. It is not suitable for shooting counting of guns without automatic machines and foot-operated mechanisms, and is even less suitable for installation on light firearms for shooting counting. Summary of the invention
[0006] The purpose of this application is to provide a shooting counter based on acceleration detection to expand the application scope of the shooting counter.
[0007] To achieve the above objectives, this application provides the following solutions.
[0008] In a first aspect, the present application provides a shooting counter based on acceleration detection, comprising: an acceleration sensor and a microprocessor;
[0009] The acceleration sensor is connected to the microprocessor;
[0010] The acceleration sensor is arranged on the gun, and the acceleration sensor is connected to the microprocessor, and the microprocessor is used for counting shots according to the acceleration collected by the acceleration sensor.
[0011] Optionally, the shooting counter based on acceleration detection further includes: a display screen and a key circuit;
[0012] The display screen and the key circuit are both connected to the microprocessor.
[0013] Optionally, the shooting counter based on acceleration detection further includes: a button battery, a power interface circuit, a linear voltage regulator circuit and a voltage detection circuit;
[0014] The button battery is arranged on the power interface circuit and connected to the input end of the linear voltage regulator circuit through the power interface circuit, and the output end of the linear voltage regulator circuit is connected to the power end of the microprocessor, the power end of the display screen and the power end of the key circuit;
[0015] The button battery is also connected to the voltage detection circuit through the power interface circuit, and the voltage detection circuit is connected to the microprocessor.
[0016] Optionally, the shooting counter based on acceleration detection further includes: a crystal oscillator circuit and a debugging interface circuit; the crystal oscillator circuit and the debugging interface circuit are both connected to the microprocessor.
[0017] Optionally, the shooting counter based on acceleration detection further includes: a PCB circuit board;
[0018] The acceleration sensor, the button battery, the power interface circuit, the linear voltage regulator circuit and the display screen are all arranged on the top layer of the PCB circuit board;
[0019] The microprocessor, the key circuit, the interface debugging circuit and the voltage detection circuit are all arranged on the bottom layer of the PCB circuit board.
[0020] Optionally, the linear voltage stabilization circuit adopts an SP6641A boost DC-DC power supply chip.
[0021] Optionally, the voltage detection circuit comprises: a first resistor and a second resistor;
[0022] One end of the first resistor is connected to the positive electrode of the button battery, the other end of the first resistor is respectively connected to one end of the second resistor and the microprocessor, and the other end of the second resistor is connected to the negative electrode of the button battery.
[0023] Optionally, the button circuit includes three buttons, and the three buttons are a left button, a middle button and a right button respectively;
[0024] The middle button is used to switch between counting mode and configuration mode;
[0025] In the counting mode, the middle button is also used to set the count value of the magazine ammunition to the ammunition preset value;
[0026] In the counting mode, the left button is used to reduce the count value of the magazine ammunition, and the right button is used to increase the count value of the magazine ammunition;
[0027] In configuration mode, the left button is used to decrease the preset value of ammunition, and the right button is used to increase the preset value of ammunition.
[0028] Optionally, in the aspect of counting shots according to the acceleration collected by the acceleration sensor, the microprocessor is specifically used to calculate the jump according to the acceleration at two adjacent sampling moments collected by the acceleration sensor, and count the shots according to the comparison result of the jump with the positive jump threshold and the negative jump threshold;
[0029] The calculation formula of jump degree is:
[0030]
[0031] in, is the jump at sampling time t, a t and a t-1 are the accelerations at sampling times t and t-1 respectively, and Δt is the time interval between two adjacent sampling times.
[0032] Optionally, in the aspect of performing shot counting according to the comparison result of the jump with the positive jump threshold and the negative jump threshold, the microprocessor is specifically used for:
[0033] Determine whether the jump at sampling time t is less than the negative jump threshold, and obtain a first determination result;
[0034] If the first judgment result is yes, then the value of t is increased by 1, and the process returns to the step of "judging whether the jump at sampling time t is less than the negative jump threshold value to obtain the first judgment result":
[0035] If the first judgment result is no, the value of the sampling times is set to 0, and the value of t is increased by 1;
[0036] Determine whether the jump at the sampling time t is greater than the positive jump threshold to obtain a second judgment result, and determine whether the value of the sampling number is greater than the counting threshold to obtain a third judgment result;
[0037] If both the second judgment result and the third judgment result are negative, the value of the sampling number and the value of t are both increased by 1, and the process returns to the step of "judging whether the jump at the sampling time t is greater than the positive jump threshold, obtaining the second judgment result, and judging whether the value of the sampling number is greater than the counting threshold, obtaining the third judgment result";
[0038] If the second judgment result is yes and the third judgment result is no, it means that one shooting is completed, and it is determined whether the count value of the magazine ammunition is zero to obtain a fourth judgment result;
[0039] If the fourth judgment result is yes, the total number of shots is updated, the number of shots is set to 0, the count value of the ammunition in the magazine is set to the preset value of the ammunition, and an empty magazine prompt message is output;
[0040] If the fourth judgment result is negative, the value of the number of shots is increased by 1, the count value of the magazine ammunition is decreased by 1, the value of t is increased by 1, and the process returns to the step of "determining whether the jump degree at the sampling time t is less than the negative jump degree threshold value to obtain the first judgment result";
[0041] If the second judgment result is no and the third judgment result is yes, it means that no shooting is performed, the value of t is increased by 1, and the process returns to the step of "judging whether the jump at sampling time t is less than the negative jump threshold value to obtain the first judgment result".
[0042] According to the specific embodiments provided in this application, this application has the following technical effects.
[0043] The present application provides a shooting counter based on acceleration detection, comprising: an acceleration sensor and a microprocessor; the acceleration sensor is connected to the microprocessor; the acceleration sensor is arranged on a gun, the acceleration sensor is connected to the microprocessor, and the microprocessor is used to count shots according to the acceleration collected by the acceleration sensor. The present application counts shots by using the sensor signal collected by the acceleration sensor, and this can be achieved by simply setting the acceleration sensor on the gun. In addition, since the acceleration sensor and the microprocessor are small in size, the shooting counter is miniaturized, and the present application expands the scope of application of the shooting counter. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 A structural diagram of a shooting counter based on acceleration detection provided in one embodiment of the present application.
[0046] Figure 2 A schematic diagram of a linear voltage stabilization circuit provided in accordance with an embodiment of the present application.
[0047] Figure 3 A schematic diagram of a display screen provided in accordance with an embodiment of the present application.
[0048] Figure 4 This is a schematic diagram of an acceleration sensor provided in one embodiment of the present application.
[0049] Figure 5 A schematic diagram of a voltage detection circuit provided in accordance with an embodiment of the present application.
[0050] Figure 6 A schematic diagram of a processor provided in accordance with an embodiment of the present application.
[0051] Figure 7 A curve chart showing the change in jump rate during shooting provided in one embodiment of the present application.
[0052] Figure 8 A curve diagram of the jump change caused by interfering vibration in a non-shooting situation provided by an embodiment of the present application. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0055] In an exemplary embodiment, Figure 1 As shown, a shooting counter based on acceleration detection is provided, comprising: an acceleration sensor and a microprocessor; the acceleration sensor is connected to the microprocessor; the acceleration sensor is arranged on a gun, the acceleration sensor is connected to the microprocessor, and the microprocessor is used to count shots according to the acceleration collected by the acceleration sensor.
[0056] The above-mentioned shooting counter meets the requirements of miniaturization, reduces the requirements of the installation position, and expands the application scope of the shooting counter.
[0057] In another exemplary embodiment, Figure 2As shown, the shooting counter based on acceleration detection also includes: a display screen, a key circuit, a button battery, a power interface circuit, a linear voltage regulator circuit, a voltage detection circuit, a crystal oscillator circuit and a debugging interface circuit; the display screen and the key circuit are both connected to the microprocessor. The button battery is arranged on the power interface circuit and is connected to the input end of the linear voltage regulator circuit through the power interface circuit, and the output end of the linear voltage regulator circuit is connected to the power end of the microprocessor, the power end of the display screen and the power end of the key circuit; the button battery is also connected to the voltage detection circuit through the power interface circuit, and the voltage detection circuit is connected to the microprocessor. The crystal oscillator circuit and the debugging interface circuit are both connected to the microprocessor.
[0058] Among them, the communication method between the acceleration sensor and the display screen and the microprocessor is I 2 C. Voltage detection uses a pin of the microprocessor. The microprocessor, display screen, voltage detection module and power module are connected. The power module here consists of the above-mentioned button battery, power interface circuit and linear voltage regulator circuit.
[0059] In another exemplary embodiment, Figure 2 As shown, the linear voltage regulator circuit adopts SP6641A boost DC-DC power supply chip, which can increase the button battery voltage below 3.3V to the 3.3V voltage required by various modules when the button battery voltage is lower than 3.3V, and maintain the button battery voltage not lower than 3.3V at the 3.3V voltage required by various modules when the button battery voltage is not lower than 3.3V.
[0060] In another exemplary embodiment, the driving circuit of the display screen is designed as follows: Figure 3 As shown, the display screen of the embodiment of the present application adopts a 0.96-inch OLED support I 2 In order to save space and facilitate wiring on the PCB, the communication protocol used in the embodiment of the present application is I 2 C, Figure 3 PB8_I2C2_SCL and PB9_I2C2_SDA are used to connect the microprocessor for I 2 C communication.
[0061] In another exemplary embodiment, the model of the acceleration sensor selected in the embodiment of the present application is MPU6050, and its circuit structure is as follows: Figure 4 As shown, the MPU6050 uses the internal clock and also uses I 2 C communication protocol, that is Figure 4PB10_I2C2_SCL and PB10_I2C2_SDA are used to connect the microprocessor for I 2 C communication.
[0062] In another exemplary embodiment, the circuit structure of the voltage detection circuit is as follows: Figure 5 As shown, in the embodiment of the present application, the PA0 pin of the microprocessor is selected as the voltage measurement pin, and a voltage divider is used to ensure that the input voltage is within 3.3V. For example, Figure 5 As shown, the voltage detection circuit includes: a first resistor R1 and a second resistor R2; one end of the first resistor R1 is connected to the positive electrode of the button battery ( Figure 5 The other end of the first resistor R1 is connected to one end of the second resistor R2 and the microprocessor respectively, and the other end of the second resistor R2 is connected to the negative electrode ( Figure 5 GND) connection in the .
[0063] In another exemplary embodiment, according to functional requirements, it is necessary to use the I 2 Function C communicates with the display and acceleration sensor. It requires the debugging function of the microprocessor to burn the program and read the relative jump value. It needs to connect an external crystal oscillator and read the membrane button potential. Therefore, the pin usage Figure 6 As shown, Figure 6 PB10_I2C2_SCL and PB10_I2C2_SDA are used to communicate with the acceleration sensor. 2 C communication, Figure 6 PB8_I2C2_SCL and PB9_I2C2_SDA are used to communicate with the display screen. 2 C communication, Figure 6 SWCLK and SWDIO in are used for debugging, Figure 6 PD0_OSCIN and PD0_OSCOUT are used to connect the crystal oscillator, and PA0_ADC_IN0 is used to read the membrane button potential.
[0064] In another exemplary embodiment, the microprocessor in the embodiment of the present application uses the stm32f103c8t6 chip, which has its own 2KB flash memory, so no external flash memory is used, and there is no flash memory driving circuit.
[0065] The shooting counter based on acceleration detection of the present application can calculate the jump and display it on the display screen, and calculate the maximum jump in the positive direction and the maximum jump in the negative direction from the time the shooting counter is started to the time of shooting. After testing, the three buttons can modify the number of ammunition and save it when the power is off, and the voltage detection circuit can also measure the voltage and display it.
[0066] In another exemplary embodiment, the above-mentioned circuits are integrated on a 26mm×22mm double-layer PCB circuit board. Among them, the acceleration sensor, button battery, power interface circuit, linear voltage regulator circuit and display screen are all arranged on the top layer of the PCB circuit board, and the microprocessor, key circuit, interface debugging circuit and voltage detection circuit are all arranged on the bottom layer of the PCB circuit board. The entire counter has low power consumption and is powered by a CR2032 button battery during normal use. The 0.96-inch OLED screen will be folded to the back during installation.
[0067] After planning the space of the top copper foil layer and the bottom copper foil layer, the shooting counter of the present application is small in size, which is slightly larger than a 10-cent coin, thereby realizing the miniaturization of the shooting counter.
[0068] The parts that need to be initialized in the main program include the MCU configuration file, timer TIM3, I2C1 and I2C2, GPIOA1, 2, 3 corresponding to the buttons, GPIOA0 for ADC voltage measurement, and the flash memory of the MCU.
[0069] The TIM2 and TIM3 timers are set to a 0.1 ms counting interval and an up-counting mode to determine the time the button is pressed. PA1, PA2, and PA3 are set to a pull-up input mode.
[0070] By configuring the registers, the MPU6050 is set to XYZ axis angular velocity meter standby, using the X axis accelerometer clock, the sampling rate division is set to 10, and the acceleration range is configured to the maximum value.
[0071] The font library required for the 0.96-inch OLED is produced according to the operation mode of the display function and the model taking software.
[0072] In another exemplary embodiment, according to the accelerometer range ±16g selected by MPU6050 and the configuration of TIM2 counter, the unit of the jump calculation result of STM32 microcontroller is approximately equal to 47.9m·s-2 / LSB. Jump detection is performed according to the set negative maximum jump value and positive maximum jump value. If the detection cycle can detect the maximum positive jump value within the set range within 6 cycles after detecting the maximum negative jump value within the set range, it will be counted once.
[0073] In another exemplary embodiment, the present application sets two working modes, namely, a counting mode and a configuration mode.
[0074] Switch between counting mode and configuration mode by long pressing the middle button. In counting mode, the count value of the magazine ammunition can be reduced by pressing the left button, and the count value of the magazine ammunition can be increased by pressing the right button. The count value of the magazine ammunition can be reset to the ammunition preset value by pressing the middle button. The ammunition preset value is preferably the number of ammunition when the gun has a full magazine.
[0075] In configuration mode, you can adjust the ammunition preset by pressing the left or right button, and you can also see the total number of shots recorded by the shot counter.
[0076] After exiting configuration mode the shot counter will enter counting mode and save the ammunition preset to flash memory.
[0077] In another exemplary embodiment, the present application also provides a specific method for a microprocessor to implement a counting function, which specifically includes the following steps.
[0078] Step 1: Initialize the memory and flash memory. If the program does not detect the flash memory initialization flag, it will initialize the flash memory. If the flash memory initialization flag is detected, the microprocessor will exchange data with the flash memory when the counter is started to obtain the current magazine ammunition capacity, write the current magazine ammunition capacity as the current ammunition number (i.e. the count value of the magazine ammunition) into the memory, and display the current ammunition number on the display.
[0079] Step 2: The microprocessor continuously accesses the acceleration sensor to obtain acceleration.
[0080] Step 3: The microprocessor subtracts the acceleration at the current sampling moment from the acceleration value at the previous sampling moment, and finally divides it by the time interval to obtain the jump value. The calculation method is as follows:
[0081]
[0082] in, is the jump at sampling time t, a t and a t-1 are the accelerations at sampling times t and t-1 respectively, and Δt is the time interval between two adjacent sampling times.
[0083] Step 4: Determine whether the firearm has been fired by comparing the current jump change with the set jump change curve.
[0084] When a gun is fired normally, it will complete a cyclic reciprocating motion. The calculated jump will successively experience the maximum negative jump value and the maximum positive jump value, such as Figure 7 As shown, the horizontal axis is the number of acceleration sampling times, and the vertical axis is the jump. Figure 7 The two broken line positions in represent the normal firing of two test guns.
[0085] The jump changes of non-shooting vibrations such as random shaking and hitting the gun with the hand are as follows Figure 8 As shown, there are more points between the two jump peaks for each vibration, so the time interval between the two jump peaks is longer than the time interval between the two jump peaks during normal shooting.
[0086] The embodiment of the present application performs jump detection according to the set negative jump maximum value interval (i.e., the interval for judging the validity of negative jumps) and the positive jump maximum value interval (i.e., the threshold for judging the positive jump threshold). If the detection cycle can detect the maximum positive jump within the set range within 6 cycles after detecting the maximum negative jump within the set range, it will be counted once.
[0087] Step 5: When the counter is started, the microprocessor exchanges data with the flash memory to obtain the current magazine ammunition capacity. After detecting the firing, the program will reduce the current ammunition amount in the current memory (i.e. the count value of the magazine ammunition) by 1 and display the current ammunition number on the display.
[0088] Step 6: Every time a magazine is emptied, the microprocessor updates the total number of shots in the flash memory.
[0089] In another exemplary embodiment, in order to illustrate the performance of the shooting counter of the present application, the embodiment of the present application also conducted the following experiment.
[0090] The gun used in the experiment is a Kublai N1 refrigerant-powered soft bullet gun, which uses a TTI G34 metal slide and metal outer tube. The magazine uses the Kublai N1 original magazine plus STA expansion, and the refrigerant used is Saint Fluorine R22.
[0091] The shot counter was tied to the N1 model gun with insulating tape to conduct a shot counting accuracy test and an anti-interference test.
[0092] 1) Counting accuracy test
[0093] After adjusting the counting-related parameters, a total of 5 groups of shooting counting experiments were carried out, with each group conducting 10-round shooting tests. After each 10-round shooting, the refrigerant in the magazine would be emptied and refilled.
[0094] Table 1 Shot counting test results based on jump detection
[0095] Group 1 Group 2 Group 3 Group 4 Group 5 First Round √ √ √ √ √ No. 2 √ √ √ √ √ No. 3 √ √ √ √ √ No. 4 √ ■ √ √ √ No. 5 √ √ √ √ √ No. 6 √ √ √ √ √ No. 7 √ √ √ √ √ No. 8 √ √ √ √ √ No. 9 √ √ √ √ √ No. 10 √ √ √ √ √
[0096] As shown in Table 1, the counter did not count only during the 4th shot of the 2nd group, and the other counts were accurate. During the 3rd group shooting test, the display was partially distorted, but the current remaining ammunition count could still be seen.
[0097] The reason why the fourth shot of the second group was not counted was due to poor contact of the power line. After the improvement, the situation of not counting did not occur again. In addition, after replacing the better quality 0.96-inch OLED screen, there was no more screen distortion. It is speculated that the original 0.96-inch OLED screen may have a problem with poor soldering.
[0098] 2) Anti-non-shooting vibration interference test
[0099] Place the gun equipped with the counter in the IPSC GR quick-draw holster. Running, jumping, squatting, pulling out the gun to aim, and putting the gun back into the holster will not trigger false counting, which verifies that the shooting counter has a strong ability to resist non-shooting vibration interference.
[0100] According to the specific embodiments provided in this application, this application has the following technical effects.
[0101] The shooting counter based on acceleration detection of the present application has high counting accuracy, strong anti-non-shooting vibration interference ability, small size, light weight, and low power consumption. It also has a friendly human-computer interaction interface, performs total shooting counting, and facilitates the full life cycle management of firearms. The counter of the present application can save data when the power is off, and uses I 2 C communication protocol is helpful for the information management of firearms. It has wide applicability. Due to its small size and few restrictions on the installation position of firearms, it can be installed on various light firearms, artillery and missile launchers through simple adaptability improvements to software and connectors.
[0102] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0103] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A shooting counter based on acceleration detection, characterized in that: include: Accelerometer and microprocessor; The acceleration sensor is connected to the microprocessor; The acceleration sensor is arranged on the slide of the gun, and the acceleration sensor is connected to the microprocessor. The microprocessor is used to count the shots according to the acceleration collected by the acceleration sensor.
2. The shooting counter based on acceleration detection according to claim 1, characterized in that: The shooting counter based on acceleration detection also includes: a display screen and a key circuit; The display screen and the key circuit are both connected to the microprocessor.
3. The shooting counter based on acceleration detection according to claim 2, characterized in that: The shooting counter based on acceleration detection also includes: a button battery, a power interface circuit, a linear voltage regulator circuit and a voltage detection circuit; The button battery is arranged on the power interface circuit and connected to the input end of the linear voltage regulator circuit through the power interface circuit, and the output end of the linear voltage regulator circuit is connected to the power end of the microprocessor, the power end of the display screen and the power end of the key circuit; The button battery is also connected to the voltage detection circuit through the power interface circuit, and the voltage detection circuit is connected to the microprocessor.
4. The shooting counter based on acceleration detection according to claim 3, characterized in that: The shooting counter based on acceleration detection also includes: a crystal oscillator circuit and a debugging interface circuit; the crystal oscillator circuit and the debugging interface circuit are both connected to the microprocessor.
5. The shooting counter based on acceleration detection according to claim 4, characterized in that: The shooting counter based on acceleration detection also includes: a PCB circuit board; The acceleration sensor, the button battery, the power interface circuit, the linear voltage regulator circuit and the display screen are all arranged on the top layer of the PCB circuit board; The microprocessor, the key circuit, the interface debugging circuit and the voltage detection circuit are all arranged on the bottom layer of the PCB circuit board.
6. The shooting counter based on acceleration detection according to claim 3, characterized in that: The linear voltage stabilization circuit adopts SP6641A boost type DC-DC power supply chip.
7. The shooting counter based on acceleration detection according to claim 3, characterized in that: The voltage detection circuit comprises: a first resistor and a second resistor; One end of the first resistor is connected to the positive electrode of the button battery, the other end of the first resistor is respectively connected to one end of the second resistor and the microprocessor, and the other end of the second resistor is connected to the negative electrode of the button battery.
8. The shooting counter based on acceleration detection according to claim 2, characterized in that: The key circuit includes three keys, which are a left key, a middle key and a right key respectively; The middle button is used to switch between counting mode and configuration mode; In the counting mode, the middle button is also used to set the count value of the magazine ammunition to the ammunition preset value; In the counting mode, the left button is used to reduce the count value of the magazine ammunition, and the right button is used to increase the count value of the magazine ammunition; In configuration mode, the left button is used to decrease the ammunition preset value, and the right button is used to increase the ammunition preset value.
9. The shooting counter based on acceleration detection according to claim 1, characterized in that: In the aspect of counting shots according to the acceleration collected by the acceleration sensor, the microprocessor is specifically used to calculate the jump according to the acceleration at two adjacent sampling moments collected by the acceleration sensor, and count the shots according to the comparison result between the jump and the positive jump threshold and the negative jump threshold; The calculation formula of jump degree is: in, is the jump at sampling time t, a t and a t-1 are the accelerations at sampling times t and t-1 respectively, and Δt is the time interval between two adjacent sampling times.
10. The shooting counter based on acceleration detection according to claim 9, characterized in that: In terms of performing shot counting according to the comparison results of the jump with the positive jump threshold and the negative jump threshold, the microprocessor is specifically used for: Determine whether the jump at sampling time t is less than the negative jump threshold, and obtain a first determination result; If the first judgment result is yes, the value of t is increased by 1, and the process returns to the step of "judging whether the jump at sampling time t is less than the negative jump threshold value to obtain the first judgment result": If the first judgment result is no, the value of the sampling times is set to 0, and the value of t is increased by 1; Determine whether the jump at the sampling time t is greater than the positive jump threshold to obtain a second judgment result, and determine whether the value of the sampling number is greater than the counting threshold to obtain a third judgment result; If both the second judgment result and the third judgment result are negative, the value of the sampling number and the value of t are both increased by 1, and the process returns to the step of "judging whether the jump at the sampling time t is greater than the positive jump threshold, obtaining the second judgment result, and judging whether the value of the sampling number is greater than the counting threshold, obtaining the third judgment result"; If the second judgment result is yes and the third judgment result is no, it means that one shooting is completed, and it is determined whether the count value of the magazine ammunition is zero to obtain a fourth judgment result; If the fourth judgment result is yes, the total number of shots is updated, the number of shots is set to 0, the count value of the ammunition in the magazine is set to the preset value of the ammunition, and an empty magazine prompt message is output; If the fourth judgment result is negative, the value of the number of shots is increased by 1, the count value of the magazine ammunition is decreased by 1, the value of t is increased by 1, and the process returns to the step of "determining whether the jump degree at the sampling time t is less than the negative jump degree threshold value to obtain the first judgment result"; If the second judgment result is no and the third judgment result is yes, it means that no shooting is performed, the value of t is increased by 1, and the process returns to the step of "judging whether the jump at sampling time t is less than the negative jump threshold value to obtain the first judgment result".