MSP430 Applicationin based on reversing radar design
source: "information technology" Author: Wen Jixia Zhang Yanbing time: 2012-04-17
-
ultrasonic transmitter and receiver
Monostable flip-flop receives the output from the S430F1101 P1.3 port of the 40ms pulse wave, the trigger voltage and pulse width control output frequency constant, high level width is 160us square wave, square wave cycle for 40ms. this pulse signal as the 555 oscillator set pulse. In the period of oscillation signal timing, 555 40kHz, ultrasonic emission head T40K signals into ultrasonic launch out. Ultrasonic transmitter will emit a pulse on the pulse number is 7 (1 / 40kHz=O.25ms), ultrasonic transmitter of the acoustic wave propagation to the reflector, the reflection of reflection to the receiver.
Echo signal of ultrasonic receiving UCM-R40 received is converted to a voltage signal, after two stage amplifier and voltage shaping circuit, DC voltage after shaping is not smooth, and a capacitor C5 filter, voltage range filter is basically stable, driving LED optoelectronic coupled devices SFH65A-1 with the voltage, then the photosensitive triode, through an inverter output level signals, and then after a inverter to signal level basically stable. Level signals directly enter the MCU external interrupt entrance, the high level as the MSP430 external interrupt interrupt signal to the microcontroller interrupts, stop timer counter in the interrupt service program, and calculate the relevant data.
display circuit design of
Real-time video image has the characteristics of vivid, fast and convenient, rich content, convenient for the driver to timely and detailed grasp the surrounding environment, make accurate judgment. Using the USB camera as the image acquisition device of the system. Selection of main control chip type Vimicro company ZC301 camera through communication with the AT91RM9200 USB interface, ARM after the corresponding data processing, through the LCD screen display.
The system software design general idea of
Software design adopts module design, including the main program, T1 interrupt service subroutine, INT0 external interrupt service subroutine, distance calculation subroutine, display subroutine, time delay subroutine and alarm subroutine design etc..
After system initialization is starting a timer starts counting from the 0 T1, the main program into the waiting, at 65 ms T1 spillover into the T1 interrupt service subroutine; in the T1 interrupt service subroutine will start a new ultrasonic transmitter, the P1.0 pin will be in began to produce 40 kHz square wave, open at the same time the timer T0 timing, in order to avoid the direct wave diffraction, need to delay after 1 ms open INT0 interrupt enable; INT0 interrupt enable open, if P3.2 (INT0) pin low level represents the received echo signal, will present the interrupt request to enter the INT0 interrupt service subroutine, INT0 interrupt service subroutine will stop the timer T0 timer, read the timer T0 time value to store the corresponding, and set the received symbol of success; the main program upon detection of the received symbol of success, will call the temperature subroutine, acquisition of ultrasonic distance measurement when the ambient temperature, and calculating accurate velocity, stored in the RAM storage unit; single chip microcomputer and then call the distance calculation subroutine to calculate, calculate the distance between the sensor to the target object; then the main program calls the display subroutine, display ; if more than the set minimum alarm distance will also activate loudspeaker alarm; when a launch, complete the display process, after receiving, the system will delay of 100 ms to let T1 initialization, start T1 again to overflow, proceed to the next location. If the obstacle is too far away, beyond the range, so that the overflow in the T0 has not yet received echo, is displayed "ERROR" back to the main process into a new round of testing.