2. 1? Hardware circuit design of motor speed measurement system
2. 1. 1? Overall hardware design
The basic structure of measuring motor speed by single chip microcomputer is shown in Figure 2- 1. The system includes Hall sensor, isolation shaping circuit, main CPU, display circuit, alarm circuit and power supply.
Figure 2- 1? Overall structure diagram of the system
The measuring process is that the Hall sensor for measuring the rotating speed is coaxially connected with the motor shaft, and a certain number of pulses are generated every rotation of the motor shaft, which are output by the Hall element circuit. After passing through the electric coupler, that is, after passing through the isolation shaping circuit, it becomes the counting pulse of the revolution counter. At the same time, the pulse with the output amplitude of 12V from the Hall sensor circuit is reduced to 5V after photoelectric coupling, which is consistent with the logic level of AT89C5 1 single chip microcomputer. By controlling the counting time, it can be realized that the counting value of the counter corresponds to the rotating speed of the machine shaft. The numerical data is processed by the main CPU and displayed on the LCD. When speeding, CPU sends out audible and visual alarm signals through speakers and lights.
1. Sensor section
Mainly divided into two parts. In the first part, Hall element is used to convert the rotating speed of motor into pulse signal. Hall speed measuring module consists of iron speed measuring gear and bracket with Hall element. As shown in Figure 2-2, the speed measuring gear is about 2mm thick and fixed on the rotating shaft of the motor to be measured. The Hall element is fixed on the probe with a distance of 1mm from the gear excircle, and a small magnetic steel is attached to the reverse side of the Hall element. When each tooth of the speed measuring gear passes in front of the probe, the magnetic flux density changes, and the Hall element outputs a pulse signal. In the second part, six inverters and optical couplers are used to shape and isolate the signal output by the sensor to reduce the interference of counting.
Hall element of speed measuring gear
Figure 2-2? Speed conversion device
2. Processor
The processor of the system adopts AT89C5 1 single chip microcomputer.
3. Display part
This part has two functions. Under normal circumstances, the current frequency value is displayed by LCD. When the motor speed exceeds a certain range, the buzzer will give an alarm. Buzzer is an electronic buzzer with integrated structure, which is powered by DC voltage. Widely used in computers, printers, copiers, alarms, electronic toys, automotive electronic equipment, telephones, timers and other electronic products as sound devices.
2. 1.2? System circuit design
In actual measurement, the Hall sensor should be fixed on the bottom plate of the DC tachometer motor, and a magnetic steel block should be fixed on the motor shaft opposite to the Hall probe. Every time the motor rotates, the Hall sensor will send out a pulse signal, which is connected to P3.2[? ], set T0 timer, and the number of pulses entering P3.2 per minute is the speed of DC motor.
Because there is no motor and sensor in the virtual simulation circuit diagram, it is directly replaced by a pulse signal, as shown in Figure 2-3.
Figure 2-3? Overall hardware circuit diagram
2.2? Design of measuring circuit for Hall sensor
2.2. 1? Hall element
According to the Hall effect, elements made of semiconductor materials are called Hall elements. It is sensitive to magnetic field, simple in structure, small in volume, wide in frequency response, large in output voltage change and long in service life, so it is widely used in measurement, automation, computer and information technology.
Is Hall Sensor A3 144 Allegro? The wide temperature switch Hall effect sensor produced by Microsystems can work at -40℃ ~ 150℃. It consists of a voltage regulation circuit, an inverter power supply protection circuit, a Hall element, a temperature compensation circuit, a micro-signal amplifier, a Schmidt trigger and an OC gate output electrode, and its output can be connected to a CMOS logic circuit through a pull-up resistor. The chip has the characteristics of small size, good stability and high sensitivity. There are two packaging forms, one is a 3-pin patch micro-package with suffix "LH"; The other is a 3-pin in-line package with suffix "UA" [5].
A3 144E series unipolar high-temperature Hall effect integrated sensor is a magnetic sensing circuit consisting of a regulated power supply, a Hall voltage generator, a differential amplifier, a Schmidt trigger and an output amplifier. Its input is magnetic induction intensity, and its output is digital voltage signal. It is a single-pole magnetic sensitive circuit, which is suitable for working under rectangular or cylindrical magnets. It can be used in automobile industry and military engineering.
The outline of Hall sensor and its interaction with magnetic field are shown in Figure 2-4. The magnetic field is provided by magnetic steel, so the Hall sensor and magnetic steel need to be used in pairs.
Hall element and magnetic steel pin diagram
Figure 2-4? Hall sensor outline drawing
The wiring diagram of Hall sensor is shown in Figure 2-5.
Figure 2-5? Hall sensor wiring diagram
2.2.2? Measuring principle of Hall sensor
The first step to measure the motor speed is to express the motor speed as a pulse signal that can be recognized by the single chip microcomputer, so as to count the pulses. As the sensor of the rotational speed measurement system, Hall element has the advantages of firm structure, small volume, light weight, long service life and convenient installation. Therefore, Hall sensor is selected to detect the pulse signal, and its basic measurement principle is shown in Figure 2-6. When the motor rotates, it drives the sensor to move, generating pulse signals with corresponding frequencies, which are output to a counter or other pulse counting devices after signal processing, and the rotating speed is measured [6].