introduction
This article describes the principles of measuring the momentum and oscillation of an object using an accelerometer, microcontroller hardware/software, and an LCD display. Since the accelerometer has a wide frequency response of dc~400Hz, this device can measure the static acceleration and impulse vibration or vibration of the earth's gravity. This design uses a 40G accelerometer (Motorola P/N: MMA2200W) to generate a minimum acceleration of -40G ~ +40G.
Oscillation measurement principle
To measure the swing or orientation of an object, the accelerometer must respond to DC forces. This is not possible with technology like piezoelectric because it does not have any dc response. As shown in Figure 1, the accelerometer should be mounted on the sensitive axis parallel to the ground plane. When the angle θ is tilted from -90° to +90°, the accelerometer output will change from -1.0g to +1.0g. The following equation gives its relationship:
V OUT =V off +(△V / △G)×1.0G×Sinθ
In the swing measurement, this small change is measured (i.e. less than 1g change in the 40g full scale), and many sampled data are averaged to eliminate the high frequency components, because the swing information is basically composed of low frequency components (on the order of a few hertz) or lower). In addition, an external low-pass filter is required to filter out the ac component in order to extract the dc component. The resolution of this design is 0.5g, which is limited by the 19.6mV/step generated by the 8-bit A/D converter. The 40mV/g sensitivity of the MMA2200W is approximately equal to 0.5g. However, the signal processing method for impulse measurement is different from that of pendulum measurement because the peak impulse information is a high-frequency component.
To measure the swing angle using an equation, you first have to solve for the sine function. In C language programming, the asin() function can be used in the library, and then, in assembly language, the lookup table or trigonometric series given in the following agenda can be used to solve:
θ=Sin -1X=X+(X3 / 6)+( 1×3X5 / 2×45)+(1×3×5X7 / 2×4×6)+…
For swing angles less than 10°, the following approximate formula can be used:
sinθ=θ
The unit of θ in the formula is radians
Principle of impulse measurement
During the impulse, the accelerometer will measure the deceleration experienced by the object from dc to 400Hz. Typically, peak impulse pulses are on the order of a few milliseconds.
To detect signal peaks, the sampling rate is at least 2 times the signal frequency according to the Nyquist sampling criterion. If the signal frequency is 300Hz, the sampling rate is at least 600Hz. In this design, 32 samples are averaged to eliminate random noise from the accelerometer. The time required to obtain 32 samples and average them is approximately 650μs, which corresponds to a 1.5kHz sampling frequency. Typical accelerometer sampling times are on the order of 500μs.
In this design, vehicle acceleration is measured and compared to a 7g preset threshold to determine whether the desired LED is on or off. At the same time, the peak acceleration is displayed on the LED for 3 seconds.
Once the threshold is exceeded, most air bag systems immediately perform emergency identification. The software program then monitors the accelerometer to determine the severity of the collision and the need to employ air bags and/or seat belts. The algorithm varies by design, and is usually set above a reliable energy threshold before calling the package to open the umbrella. For example, one design uses the following equation to integrate acceleration over a time period into a velocity signal or driver impact:
Hardware description
Since the MMA2200W is completely regulated by its internal operational amplifier and humidity compensation, the accelerometer output can be directly interfaced with the A/D converter. If the connection between the accelerometer output and the A/D converter is a long wire or cable, you should add A filter consisting of an RC network. Stray capacitance can change internal positions and can cause the accelerometer output amplifier to oscillate or become unstable. This design chooses the cut-off frequency to be 15.9kHz, which is also the cut-off frequency of the anti-aliasing filter of the A/D converter. The 3dB frequency can be approximately given by:
f-3dB=1/2πRC
As can be seen from the circuit diagram 2, the MMA2200W accelerometer is connected to the microcontroller machine PORT D bit 5, while the amplifier output is connected to PORT D bit 6. This port is on-chip 8 An input to the bit A/D converter. Typically, the accelerometer provides a signal output to the microprocessor of approximately 0.3Vdc (at -5.5g acceleration) to 4.7Vdc (d +5.5g acceleration). The A/D converter and accelerometer use the same reference voltage, minimizing additional components but sacrificing resolution. The resolution is determined by:
count=Vout / 5 ×255
At 0g count=[2.5/5]×255∝ 128
When +25g, count=[3.5/5]×255∝ 197
-25g count=[1.5/5]×255 77
So the resolution is 0.5g/count.
The accelerometer output is proportional to the applied voltage. The accelerometer and reference voltage are connected to the common power supply, making the system a ratiometric system. Due to the nature of ratiometric systems, changes in supply voltage applied to the system will not affect system accuracy.
The liquid crystal display (LCD) is driven directly from the microcontroller's I/O ports A, B, and C. The LCD data and backplane (BP) pins must be driven with alternating signals. This functionality is provided by a software program with a data and backplane exchange rate of 30Hz. In addition to the LCD, an LED is connected to the pulse length converter (PLM) of the microcontroller. When the detected impulse is greater than or equal to 7g, the LED will light up for three seconds.
The microcontroller part of the system requires certain supporting hardware. The MC34064P-65 in the figure provides overvoltage sensing function, which is used to reset the microprocessor when the system is powered on. The 4MHz crystal oscillator provides a clock for the microcontroller and a stable time base for time base functions (such as pulse rate calculation).
Software description
After the system is powered on, the LCD displays CAL for approximately 4 seconds, during which time the accelerometer output is sampled and averaged to obtain zero compensation voltage or acceleration. This value will be stored in RAM and the impulse is calculated using the following formula:
Impulse=[count-countoffset]×resolution
Note that the accelerometer should remain stable during zero calibration.
In the software program, the accelerometer output is calculated every 650 μs. During the rush to Nanchang, the peak acceleration is measured and displayed on the LCD for 3 seconds before resetting to zero. During this period, if a higher impulse is measured, the LCD display value will be updated accordingly.
When a low g value (i.e. 1.0g) is detected, this value will not be displayed. More samples are then taken for further averaging to eliminate random noise and high frequency components. Since the swing is a low-g and low-frequency signal, a large number of samples is used to prevent unstable display. Also, the displayed value does not last for 3 seconds like the impulse does. The detailed software will not be described in detail here.
Previous article:Ensure accuracy of device characterization within vector network analyzer fixtures
Next article:Low-cost electric energy meter designed with AD7755
- Popular Resources
- Popular amplifiers
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- CB140 Hardware Introduction
- ADI's LT8645SIV#PBF chip uses the EN pin to control power on and off, causing it to burn out. Help~
- Problems with STM32F103C8T6 shutdown mode
- New typec interface M2 solid state drive box board 3 yuan a piece 10 pieces free shipping
- Real-time video processing set-top box.rar
- Three simple steps to operate the msp430 serial port interrupt
- 【Ufan Learning】How small is the Ufan learning board? ?
- [MicroPython] STM32 branch fixes a CDC problem when USB is reconnected
- Is Raspberry Pi considered open source hardware?
- How to debug with ST-Link in Embedded Studio for ARM?