Speech
Currently, spatial measurement and positioning of ultrasonic technology are quite common. Some use ultrasonic reflection characteristics, some integrated use of infrared and ultrasonic sensors to take three-sided ranging position method, because the former cannot improve the measurement because the influence of ultrasonic transmission media, the ultrasonic attenuation characteristics make it limited, and then reflected The characteristics have shortened the distance of the propagation. Although the latter has improved, the measured distance increases, but the problem of measuring the blind zone has occurred, and the system is not able to position when some locations cannot be detected at the same time. Based on the second method, the principle of photoelectric encoder ranging positioning is added to the system, eliminating its positioning blind zone.
1 Position principle
1.1 Infrared ultrasound three-side ranging positioning principle
First, the corner coordinate system is established in the room, which specifies the origin, the X-axis, the Y-axis, and the Z axis. Three reference points A, B, C, and coordinates were set (X1, Y1, Z2), (X2, Y2, Z2), (X2, Y2, Z3), respectively (X1, Y2, Z3), respectively. Use an infrared ultrasound system to measure the distance L, M, and N of the target point to 3 reference points.
Be
The coordinate value (X, Y, Z) of the target point is solved by the formula (1) to formula (3). This is the principle of positioning, simple and easy to program. The measurement principle of the target point and the reference point distance will be described below. The maximum difference between the radius and ultrasonic speeds in order is the basis for achieving ranging functions. See Figure 1 for the principle of ranging.
Be
The propagation speed of ultrasonic and infrared light is constant. The propagation distance and time of the time are straight, the line slope is wave velocity, and the curve 1 is an infrared light curve, and the curve 2 is an ultrasonic curve. Specifies the distance d, which is set to the ultrasonic wave at 0 times at the same time, and the infrared light is completed by the specified distance through the T1 time. The ultrasonic wave is running out of the specified distance, then D = VT2, the V is ultrasonic speed. . Let T = T2-T1, D = V (T + T1) can be obtained. It is known that the infrared speed of 3 × 108 m / s, the ultrasonic wave is 3.4 × 102 m / s in the air, and the distance range in the room is similar to T1 = 0, and D = Vt is obtained.
The system mounts the microcontroller controlled infrared and ultrasonic transmit tubes at each reference point, and the infrared and ultrasonic receiving tube are installed in the target point, and the microcontroller is also connected. A certain time reference point transmits infrared and ultrasonic signals, and the target point starts the internal counter of the single chip microcomputer when the infrared signal is received, and the counter is stopped when the ultrasound signal is received so that the time difference T of the two is recorded, and T and the ultrasonic speed phase Take the distance D to be tested. In fact, signal processing is always delayed, and the measurement error must be compensated, and the calculation is ended to: D = VT + N. Where: D is the distance measurement; V is the ultrasonic speed; T is the time difference value of the infrared light and ultrasound to the target point recorded; n is the system device delay error compensation item.
1.2 Photoelectric encoder ranging positioning principle
The photoelectric encoder is a sensor that converts the mechanical geometric displacement amount on the output shaft by photoelectric conversion to a pulsed or digital sensor, which is currently used by a plurality of sensors.
The raster disc is the aliquot of a plurality of rectangular holes on a certain diameter round plate. Since the photococos disc (referred to as the decoder, see Figure 2) is coaxial with the motor, when the motor is rotated, the raster disk is rotated at a speed of the motor, and the detection device composed of the electronic component such as the light emitting diode is detected and outputs a number of pulse signals. LED and photosensor constitute an optoelectronic coupler. Two photosensitive transistors A and B are arranged inside the photosensor in the vertical direction. Since the decoding wheel has a gap, when the coded wheel is rotated, the infrared light emitted by the infrared light-emitting diode is blocked by the photosensor, thereby blocking the photosensitive sensor outputs a pulse signal. The positions of photosensitizers A and B are placed such that their light and blocking time have a difference, resulting in pulse A and pulse B have a certain phase difference. With this method, the pattern can be measured to measure the rolling direction. Each of the roller rotates a small angle, the wheel position counter adds 1, every other time, the microcontroller reads the value of the wheel position counter, by calculating the displacement of the wheel movement (when the cart turns is arc length and arc cutting line. Direction), then send the displacement information to the host computer.
Be
Based on the above principle, a certain height of 2 drive wheels of 2 drive wheels of the coaxial two-wheel drive train (the operation trajectory of the coaxial two-wheeled drive trolley is always parallel) A, B 2 point installation infrared ultrasound Positioning unit, positioning the coordinates of each point. The photoelectric encoder ranging unit is mounted on the respective shafts of the two wheels to measure the distance and the forward retroff of the wheel movement between the two positioning time points.
The positioning of the mobile trolley is divided into three cases:
a) 2 points of a certain position A, B can simultaneously detect signals of 3 reference points (the ground is flat, only 2 signals in the plane two-dimensional positioning), calculate the mobile using the infrared ultrasonic positioning method The location of the trolley, the position of the midpoint (ie the position of the mobile trolley) is calculated, and according to the coordinates of 2 points of the previous moments, the fixed distance between the two wheels is determined that the wheel relative to the coordinate system. Run the direction.
B) A, B only 1 point can detect the signal of 3 reference points, according to the coordinates of 2 points of A, B, and the optical encoder measured the length of the movement distance of 2 wheels, 2 The same distance between the wheels calculates the position and operation direction of the mobile truck.
c) A, B 2 points cannot detect the signal of 3 reference points at the same time, according to the coordinates of 2 points of the previous moments, 2 wheels, 2 wheels, photoelectric encoders, 2 wheels The move distance calculates the coordinates and running directions of the trolley.
Next, a method of solving the second case is given, see Figure 3. By comparing the moving distance of the two wheels measured by the photoelectric encoder, a small vehicle is movable to move the short wheel, and the coordinates of the A ', B', the B point, which are known in the middle, 2 wheels, 2 wheels. The spacing D, the line segments AA 'and BB' parallel, the movement of the AB and the train are vertical, and the direction of movement of the coordinates and the movement of the cars according to the geometric knowledge can be obtained, and other situations are also available.
Be
2 system hardware structure
The system is mainly composed of an ultrasonic enclosure node (reference point), an infrared transmit tube, an ultrasonic emission head, and a respective driving circuit and microcontroller SST89E564RD (hereinafter referred to as 564RD) 8-bit single chip. Ordinary node (target point) consists of 8 infrared receiving tubes, 8 ultrasonic receiving heads, and respective drive circuits and 8 564RDs, each infrared reception and ultrasonic reception are paired, with a 564RD control, divided into Group 2, 4 pairs of each group, 90 ° at a height space at each wheel at a height 90 °, 45 ° angle upward distribution. Because the target point of the measurement is the moving object, the method used by multiple channels simultaneously reduces the time used for each measurement and increases positioning. The photoelectric encoder ranging unit consists of a decoder wheel, a photocounsier, and a piece of 564RD. The main controller is used as the main control chip, and the two photoelectric encoder ranging units are used to communicate with the serial port, and the main controller disables the measurement data of each unit, complete the positioning operation, and simultaneously simultaneously The role of work. 564RD's crystal is 40 MHz. Figure 4 shows a single infrared pipe and ultrasonic transmission circuit, and Figure 5 gives a single infrared tube ultrasonic receiving circuit. The transmit tube of ultrause is T40-16 (corresponding to the receiving tube is R40-16), the center frequency is 40 kHz. The infrared transmit tube is SE303A (corresponding receiving tube is pH302), 564RD outputs a wave frequency of 40 kHz with two I / O ports, and the frequency modulation of 5 kHz is used to drive infrared transmit tubes, and the carrier frequency is 40 kHz. 2 kHz square wave signal drives ultrasonic transmit tube.
Be
3 system software design
The system is initialized after the system is powered on, and each part works as follows:
A) The ultrasonic enclosure node continues to transmit infrared and ultrasonic signals outwardly, and the infrared in each node corresponds to ultrasonic signal coding and is different from the signal coding of other nodes.
b) The normal node can run the track every 1 s (can be changed, but not too long, otherwise the trajectory may not be parallel when the car appears. The main controller issues a positioning signal to each unit through the serial port and launches the internal timer, delayed After 100 ms, the two points measured by the 8 ultrasound ranging units to the reference point, and the displacement information recorded by the 2 photoelectric encoder ranging units, calculate the position and operation of the mobile truck. direction. The timer is repeated after 1 S. The software flow of the main controller is shown in Figure 6.
c) Two photoelectric encoder ranging units initialize immediately start the displacement of the recording wheel, after receiving the positioning signal, save the recorded displacement information to the specified position, waiting for the primary controller to read, and continue recording displacement from 0 condition.
D) After the normal node detects the positioning signal, receive infrared and ultrasonic signals, record the ultrasonic transmission time of a set of corresponding infrared ultrasonic signals, exist to the specified location, and wait for the primary controller to read. There is a signal in the start 100 ms of the serial port to receive the positioning signal, and the position specified by the corresponding time speaker is no longer detected, if the corresponding signal is detected if the corresponding signal is detected during the 100 ms time. To send data 0 to the specified location.
Be
4 system error analysis and experimental ranging results
The positioning error mainly has the following five aspects: the shape and mounting position of the ultrasonic device causes the coordinate system reference point and the positional deviation of the target point to be tested; the error is generated by the system circuit delay; the trail is constantly moving, due to the slow transmission speed, The request positioning time to the positioning completed, the car has moved a certain distance; when the sufficient reference point signal cannot be continuously detected, the determination of the position relies on the previous time measurement, which can cause a cumulative error; temperature condition impact on ultrasonic waves.
Figure 7 shows a trajectory at room temperature 20 ° C, ultrasonic velocity of 340 m / s, and 2 wheels of the vehicle is 0.2 m, the moving speed is 0.2 m / s, the plane two-dimensional positioning experiment, the experiment is passed to the top 3 Aspects of error compensation calculation, and the positioning reaches 3 cm.
Be
5 Conclusion
Because the photoelectric encoder is positioned by the previous measurement point, it will inevitably lead to the accumulation of the positioning error; the infrared ultrasound tri-side ranging method is a positional positioning method that relies only by the current measurement point information. This system combines these two methods to eliminate the accumulation error and solve the problem of positioning blind spots, and there is a more accurate positioning of the mobile trolley.
Be
Source: Wiku Electronic Market Network
Our other product: