The chip only completes the main operations related to communication, computing, etc. When there is no operation, it is maintained by the operating system uClinux running on it. The maintenance and control of all peripheral devices unrelated to the core calculation, control, communication and operation of the EZ328 are completed through an AT89C52. The underlying communication protocol with the EZ328 is the synchronous serial port protocol (SPI), which is implemented by software in the AT89C52 . The components included in C52 are mainly A/D converters, keyboard interfaces, and motor drive modules. The hardware structure circuit diagram is as shown in Figure 1:
figure 1
1 Magnetoresistive sensor and its detailed acquisition process
1.1 Introduction to magnetoresistive sensor HMC1022
A sensor that uses changes in magnetoresistance in the magnetic circuit to convert measured changes into changes in AC voltage. Its mechanism is a four-arm Wheatstone bridge, which converts the magnetic field into a differential output voltage and can detect magnetic field signals as low as 85 microgauss. This low-cost sensor has a smaller footprint than similar traditional models. size and lower power consumption. The power supply is 3V-10V DC voltage. The HMC0122 used in this design adopts a 16-pin SOIC package and integrates two Wheatstone bridges to measure the magnetic field signals of the X-axis and Y-axis of the plane, so that the complete signal in the direction of the horizontal plane can be obtained.
What is special is that Honeywell's magnetoresistive sensor has a patented set/reset circuit.
Figure 2 and Figure 3 are the circuit design of the internal bridge and set/reset circuit of HMC1022 respectively.
figure 2
image 3
1.2 Working principle of magnetoresistive sensor
The phenomenon that the resistance of a substance changes in a magnetic field is called the magnetoresistive effect. For ferromagnetic metals such as iron, cobalt, nickel and their alloys, when the external magnetic field is parallel to the internal magnetization direction of the magnet, the resistance almost does not change with the external magnetic field; when the external magnetic field deviates from the internal magnetization direction of the metal, the resistance value of such metals will Reduced, this is the anisotropic magnetoresistive effect of ferromagnetic metals when a thin film is attached to a silicon wafer using standard semiconductor processes. When a current is applied along the length of the ferromagnetic alloy strip and a magnetic field is applied in the direction perpendicular to the current, the resistance of the alloy strip itself will change the most. At the same time, two aluminum current strips were designed on the silicon chip during production, one is the set/reset strip. When the sensor encounters strong magnetic field induction, magnetic domain saturation will occur. This bias magnetic field strip is used to arrange the magnetic domains. The reset (i.e. restore sensitivity) can also be used to set or reset the polarity of the output; the other is the bias magnetic field strip, which is used to generate a bias magnetic field to compensate for the environmental magnetic field. The output voltage of the HMC is the sensor when the magnetic field intensity is 0 Output. So when U0 is 0, Uout is proportional to the magnetic field strength B.
As shown in Figure 4, assume that the robot is on a horizontal plane, X is the direction of travel of the robot, Y is the direction vertical to X on the horizontal plane to the right, the direction of the ground north pole and the geomagnetic north pole are as shown in the figure. H is the geomagnetic field, Hx and Hy are the horizontal components of H in the X and Y directions respectively, β is the angle between the robot's traveling direction and the geomagnetic north direction, γ is the angle between the geomagnetic north pole and the geographical north direction, and K is the robot's traveling direction. The angle between it and the geographical north direction is the angle we ultimately require.
1.3 Circuit design of magnetoresistive sensor signal acquisition module
The voltage signal output from HMC1022 is very weak. My test was 0 to 3mv. It needs to be amplified by an amplifier. The amplifier is AN622, and the amplification factor is selected to be 600 times. This amplifier can be added with a 2.5v bias voltage. , so the voltage output to the A/D is 2.5v+(0~3mv)*600. The voltage signals collected by the two channels are amplified and connected to ADC0832. ADC0832 is a two-channel 8-bit precision successive approximation analog-to-digital conversion chip. Input a MUX ADDRESS sequence through a serial I/O port DI to configure the A/D into differential mode and select which channel signal.
Using max662a as the constant voltage source of the RST/SET part, the working principle and process of the circuit are as follows:
1. Terminal 14 (P1.7) of 2051 outputs high level, and the SR circuit set function is strobe
2. Control ADC0832 through the corresponding terminals of 2051 P1 to complete an A/D conversion and record the voltage value Vset read this time.
3. P1.7 of 2051 outputs low level, and the SR circuit reset function is strobe
4. Control AD0832 through the corresponding terminals of 2051 P1 to complete an A/D conversion and record the voltage value Vrst read this time.
5. Find the output bias voltage V0 of 1022=(Vset+Vrst)/2.
6. Use 2051 to control AD0832 to complete the A/D conversion. Subtract V0 from the value Vrst read each time to get the voltage required for calculation Vread=Vrst-V0.
7. seek
8. K=β-γ, goto 6
The value obtained after 2051 processing is used with an I/O port to simulate PWM output with the cooperation of the clock, and is passed to the C52 microcontroller.
2 Conclusion
The entire circuit design is used as a loadable module for robot toys, and the effect is very good in actual use. The resolution of the direction is fully satisfied within 5 degrees, and the processing results are passed to the main control chip. It has been used in practice and achieved satisfactory results. From a cost-effective perspective, this circuit design is a relatively successful one.
Previous article:Application solution for realizing high-precision inertial measurement component system based on acceleration measurement sensor
Next article:Self-made password lock design based on microcontroller
Recommended ReadingLatest update time:2024-11-16 11:50
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- 【Bluesun AB32VG1 RISC-V Evaluation Board】Development of example programs
- 2nd day to go!! Pre-registration for the prize live broadcast | ON Semiconductor image sensors help the automotive, machine vision and artificial intelligence fields....
- 【AT-START-F425 Review】USB to CAN Preview Post
- Abnormal sound from the front transformer of the power factor circuit
- 【AT32WB415 Review】03 SPI Drive TFT LCD Screen
- MSP430 G2553 Timer/Counter Timer_A
- msp430 program library serial series 12864 LCD
- CC2640R2 internal Bootloader burning program
- 【ST NUCLEO-H743ZI Review】_by dsjsjf
- 【TouchGFX Design】(3) Simple waveform display--based on C++