Application of Magnetoresistive Sensors in Robot Toys

Application of Magnetoresistive Sensors in Robot Toys

Background The control of the direction of the robot's toy control system is particularly important, which directly reflects the control precision and overall effect of the robot toy. The problem to be solved in this paper is to control the robot's movement direction and the angle between the goal, so that it can self-adjust in real-time during the operation and accurately send the ball into the goal.

The background of this article is the design of a robot toy control system. The main chip is Motorola's MC86EZ328 chip, which only completes the main operations related to communications, operations, etc., and runs on it when there is no operation. Operating system uClinux to maintain. The maintenance and control of all peripheral devices that have nothing to do with the EZ328's core operations, controls, communications, and operations are accomplished through an AT89C52. The underlying communications protocol of the EZ328 is the Synchronous Serial Protocol (SPI), which is implemented in software in the AT89C52. . The components included in the C52 are mainly A/D converters, keyboard interfaces, and motor drive modules. Hardware structure circuit diagram as shown in Figure 1:
figure 1

1. Magnetoresistive sensor and its detailed collection process 1.1 Magnetic Reluctance Sensor HMC1022 Introduction The core part of the robot toy's directional control is the HMC1022 two-dimension magnetoresistive microcircuit chip. Its mechanism is a four-arm Wheatstone bridge that converts the magnetic field into a magnetic field. The differential output voltage can detect magnetic signals as low as 85 microgauss. This low-cost sensor has a smaller size and lower power consumption than conventional models. The power supply is 3V-10V DC voltage. The HMC0122 used in this design is a 16-pin SOIC package that integrates two Wheatstone bridges to measure the magnetic field signals of the X-axis and Y-axis of the plane so that a complete signal in the direction of the horizontal plane can be obtained.

Of particular interest is Honeywell's magnetoresistive sensor with a patented set/reset circuit.

Figure 2 and Figure 3 are the HMC1022 internal bridge and set / reset circuit circuit design.
figure 2

image 3

1.2 Magnetoresistive Sensor Operation The output voltage of the HMC is the output of the sensor when the magnetic field strength is zero. So when U0 is 0, Uout is proportional to the magnetic field strength B. Assume that the robot is on the horizontal plane as shown in Fig. 4. X is the direction of the robot's movement, Y is the direction of the vertical X on the horizontal plane to the right (that is, X turns 90 clockwise), and the North Pole direction and the geomagnetic North direction are as shown in the figure. H is the geomagnetic field, and Hx and Hy are the horizontal components of H in the X and Y directions, β is the angle between the robot's direction of travel and the geomagnetic north pole, γ is the angle between the geomagnetic North and the geographical North, and K is the robot's direction of travel. The angle with the geographical North Pole is also the angle we ultimately request. (Bhere, β, γ, and K are the angles from the former to the latter clockwise to reach the latter.) It can be clearly seen from the figure that K=β-γ. The γ in different directions on the earth can be found in the table, so the key is to obtain it. The magnetoresistive sensor can be used to derive Hx, Hy (where the robot's tilt in the Z-axis direction is ignored, so a two-dimensional sensor is sufficient).
Figure 4

1.3 Magnetoresistive sensor signal acquisition module circuit design The voltage signal output from the HMC1022 is very weak, my test is 0 to 3mv (specifically, the output of each chip is not exactly the same), need to be amplified by the amplifier, the amplifier is selected AN622, amplification The multiple is selected to be 600 times. This amplifier can add a bias voltage of 2.5v, so the voltage output to A/D is 2.5v+(0~3mv)*600. The voltage signals collected by the two channels are amplified. Connect to ADC0832. The ADC0832 is a two-channel 8-bit precision successive approximation analog-to-digital conversion chip that inputs a MUXADDRESS sequence through a serial I/O port DI to configure the A/D into differential mode and select which channel signal. The 2051 serially reads in the converted value through all the way to the I/O.

Using max662a as the constant voltage source of RST/SET part, the working principle and flow of the circuit are as follows:

1. From the 2051's 14 terminal (P1.7) output high, SR circuit set function strobe 2. Through each 2051P1 corresponding terminal control ADC0832, complete an A / D conversion, write down the voltage value read this time Vset .

3.2051 P1.7 output low, SR circuit reset function strobe 4. Through the corresponding terminals 2051P1 control AD0832, complete an A / D conversion, write down the voltage value read this time Vrst

5. Determine the 1022 output bias voltage V0 = (Vset + Vrst)/2.

6. Through the 2051 control AD0832 to complete the A / D conversion, the value of each read Vrst minus V0 to calculate the voltage required to use Vread = Vrst-V0; (including the two axis voltage Vready, Vreadx)

7. Obtain 8.K = β-γ, goto6

After the value obtained by the 2051 processing, an I/O port is used to simulate the PWM output in cooperation with the clock and transmitted to the C52 microcontroller.

2. Concluding remarks The entire circuit design, as a loadable module of a robot toy, has a good effect in practical use. The resolution of the direction is completely satisfied within 5 degrees. From the viewpoint of cost performance, this circuit design is a relatively successful design.

Steering Wheel Cover

Steering Wheel Cover,Heated Steering Wheel Cover,Leather Steering Wheel Cover,Car Steering Wheel Cover

Ningbo Yonghai Auto Products Co., Ltd. , https://www.nbyonghai-manufacturer.com