Research on Infrared Light Vehicle Speed ​​Management System Based on ARM

introduction

Vehicles should be driven at a speed consistent with the road conditions on the highway. Too fast can cause accidents, and too slow will become a stumbling block for subsequent vehicles. However, there are often individual drivers who do not drive at the prescribed speed and violate the rules, resulting in frequent accidents. In order to obtain evidence and correct violations, the traffic control department currently adopts radar speed measurement system (using the Doppler effect) to conduct speed measurement and evidence collection for illegal vehicles and punish them.

However, an anti-radar speed measuring device called "electronic dog" has recently appeared on the market. When the device approaches the radar speed measuring area, it can capture radar speed information in advance and report an alarm, so that illegal vehicles can escape punishment, and hidden dangers of accidents remain. Therefore, it is especially necessary to study a reliable speed measurement and management system that can accurately measure the speed of the car without being discovered by the "electronic dog".

The new speed measuring system with infrared light sensor and ARM as the core components studied in this paper will not be discovered by the "electronic dog" when measuring speed. It can not only recognize the size of the car speed V, but also measure the speed of which exceeds the upper limit speed (Vmax). The value (+ △ V) or the value (— △ V) below the lower limit speed (Vmin), according to the information, drive the forensic system (printing, photography) as appropriate, which can effectively improve the intensity of traffic control.

1 Working principle of the system

The system consists of a modulated infrared light sensor [1], an LPC2294 ARM embedded processor from Philips, a color LCD with a touch screen, and an alarm camera, as shown in Figure 1. The two points M and N in Fig. 1 are two points on the side rail of the roadside. They are installed with infrared luminous tubes that can emit 38KHz, and emit modulated infrared light all the time. The modulated infrared light is received by the photoelectric receivers placed at the corresponding two points M 'and N' on the other side of the guardrail to form a light-controlled speed measurement area. When a vehicle passes through the light-controlled speed-measuring zone, the light emitted by point M is first blocked. The first photodetector M-M 'converts the light signal into an electrical signal and sends it to the signal conditioning circuit. After amplification and shaping, it is sent to ARM processor. ARM receives this trigger signal, turns on the internal counter to start counting, and the value of time t increases accordingly. When the car reaches the N point, the second photodetector N-N 'converts the optical signal into an electrical signal and sends it to the ARM processor through the signal conditioning circuit to stop the counter. The value of t is determined. The velocity V is obtained by dividing the distance L between the two points M and N by t. If the calculated V value is within the set safe speed range, the display will show the current safe speed value, and the camera and alarm circuit will not work; if the V value exceeds the set range, the speed offset is calculated â–³ V = Vmax-V, at the same time show that the vehicle is speeding, and let the camera and alarm circuit start working. Similarly, if the vehicle uses V

How the system works

2 System hardware design

2.1 Photoelectric transmitter and receiver system

The principle of the photoelectric transmitter and receiver system is shown in Figure 2. The oscillator generates a signal with a frequency of 38KHz and drives the infrared light-emitting tube to emit light. The photoelectric receiver receives the light pulse emitted by the infrared luminous tube, and the received light pulse signal is connected to the input end of the detector through the adjustment potentiometer [2]. The received modulated optical pulse signal is sent to the amplifier for amplification, and after threshold detection, it becomes a logic level pulse output synchronously with the synchronous oscillator, and then through pulse synchronous demodulation to obtain a photoelectric signal related to the vehicle's motion status. And the output is buffered.

Principle of photoelectric transmitter and receiver system

2.2 Signal receiving and timer work

As shown in Figure 3, when no vehicle passes through the light-controlled speed measurement zone, the two points M 'and N' can always receive the 38KHz modulated infrared light, and both output high levels, and the transient steady state circuits are all in steady state. The output of gate G is logic 1, UL is always high. When a vehicle passes through the light-controlled speed-measuring zone, the light emitted by point M is blocked first, UM changes from high to low first, and the transient steady state circuit 1 is triggered to enter the transient steady state, as shown in Figure 4. Shown after time t1. At this time, UM 'is low, the G gate is triggered, and the output UL is low. CAP1.0 of the ARM system captured UL changed from high level to low level, a falling edge capture occurred, the value of T1TC was automatically loaded and transferred to the capture register T1CR, and an interrupt was generated. The interrupt service subroutine was entered to read the value of T1CR and save.

Signal reception and timer operation

shown after time t1

Then, when the car reaches point N, that is, at time t2, the transient steady-state circuit 2 is triggered, UN 'becomes a high level, and becomes a low level UN' 'through the NOT gate. At this time, G gate output changes from low level to high level, ARM CAP1.0 captures UL from low level to high level, rising edge capture occurs, automatically loads the value of T1TC into capture register T1CR, and generates an interrupt To enter the interrupt service subroutine. Calculate the difference N of the capture register T1CR twice and the working frequency f of the counter to obtain the time difference t2-t1 when the vehicle passes through the two test points M and N.

2.3 ARM core board and touch display system

The system core board adopts DEVICEARM2200 industrial control board, which is embedded with Philips' LPC2294ARM7TDMI-S embedded processor, the highest frequency is 60MHz, and has 8M PSRAM memory and 16M NANDFlash, the performance fully meets the requirements of high-speed vehicle speed measurement system. Due to its small package and extremely low power consumption, it can be powered by batteries, so it is very suitable for working in the field without an external power supply.

The circuit connection is shown in Figure 5: The display uses a 320 × 240 color LCD screen, connects AB0 to AB16 of the LCD controller S1D13503 to the address bus A1 to A17 of the LPC2294, and operates in a 16-bit bus; the data bus DB1 to S1D13503 DB7 connects to the external memory data lines D0 to D7 of LPC2294, DB8 to DB15 connects to VDD, and realizes the connection with the 8-bit data bus of LPC2294; its hardware configuration is completed by two high-speed CMOS static memories IS61C1024 to VD0 to VD15 of S1D13503. The four-wire resistive touch screen can detect the touch signal and convert the analog signal into position coordinate data through the touch screen controller FM7843, and pass it to the LPC2294 for processing [3].

Circuit connection

3 System software design

3.1 uclinux system transplant

Although the current uclinux has supported the ARM architecture without MMU, but because the specific ARM processor chip storage system used is different, the on-chip peripherals are different, and the interrupt system is also different, it is necessary to add or modify the specific code related to the LPC2294 chip [6 ]. Including: add the chip model, startup code and data structure describing the model; modify the interrupt system related code and add irq.h, irq.c and irqs.h files in the include / asm-armnommu / arch-lpc / directory to achieve System interruption; add dma.h, memory.h, processor.h and other header files in the include / asm-armnommu / arch-lpc / directory, and define registers including clock, serial port, and interrupt controller in the hardware.h file Address; create files TIme.h, TImex.h and serial.h in the include / asm-armnommu / arch-lpc / directory to implement the clock serial port driver; modify the config.in file settings in the arch / armnommu / config directory Menu configuration and modification of mach-lpc / makefile, linux-2.4.x / makefile, arch / armnommu / makefile and other files.

3.2 Device driver design

Since the uclinux 2.4.x kernel is non-preemptive, the process time slice is 10ms, and its real-time performance is not high. However, because there is only one high real-time task in this system-the capture of the vehicle pass signal, therefore, the timer on the LPC2294 can be operated by the TIMER1 device driver to achieve the double-edge capture of the CAP1.0 pin signal. TIMER1 device driver consists of driver initialization function, clear function, device information structure, open, release, read, ioctl and other methods and interrupt service program. The uclinux system will first execute the initialization function timer1_init () when loading the kernel module, register the character device by calling result = register_chrdev (MAJOR_NR, DEVICE_NAME, & timer1_fops); and judge whether the device registration is successful according to the return value result; when the kernel unloads the module, execute Clear the function timer1_cleanup (), and cancel the character device by calling unregister_chrdev (MAJOR_NR, DEVICE_NAME). The device information structure is used to describe the operation methods of the device such as open, release, and read. Among them, when the system and the application program use this timer for the first time, first execute the timer1_open (struct inode * inode, struct file * filp) method to call request_irq (IRQ_timer1, timer1_irq_handle, SA_INTERRUPT, "my" DEVICE_NAME, NULL) function to register the interrupt response function, configure the timer T1IR, T1PR, T1TC, T1TCR and other registers to complete the timer initialization, use the interrupt switch function local_irq_save () and local_irq_restore () to Control the critical section; finally the uclinux system receives the hardware interrupt and calls the interrupt service program; when the system and the application program no longer use this timer, call timer1_release (struct inode * inode, struct file * filp) to close and release. The interrupt service routine timer1_irq_handle (int irq, void * dev_id, struct pt_regs * regs) completes clearing the interrupt source, resetting the timer counter and reading the counter value in the capture register through the macro inl (T1CR) provided by uclinux and calling the system function copy_to_usr ( ) Copy data from kernel space to user space. Finally, copy the device driver timer1. C to the linux-2.4.x / driver / char directory, and add the function timer1_init () to timer1.c to complete the device registration. Add timer1_init () external function description in mem.c file, add timer1_init () call in chr_dev_init () function, compile to get new kernel [4].

3.3 MiniGUI transplantation

At present, the common GUI systems under the embedded Linux platform are: MicroWindows, QT / Embedded, XWindows, OpenGUI, MiniGUI and many other options. Considering many factors such as ease of use, cross-platformity and development cost, this article uses Feynman's MiniGUI to realize the development of GUI human-computer interactive graphical interface [5]. In order to facilitate debugging, VMware software is used to establish the host of the Linux platform under the windows system, enter the Linux environment, and download the function library source code package libminigui-str-1.6.2.tar.gz and the resource file package minigui-res-str -1.6.tar.gz and expand it.

In order to achieve its cross-platform features, MiniGUI uses GAL (graphic abstraction layer) and IAL (input abstraction layer) to isolate the upper layer of MiniGUI from the operating system. Therefore, first create the lcdgal.c file, refer to the native graphics engine data structure and Framebuffer driver to write interface functions according to the GAL interface; then put the LCD driver lcddriver.clcddriver.h and the LPC2294 header file lpc2294.h under libminigui / Modify the Makefile.am file in the src / gal / native directory. Add ialinput.h and ialinput.c in libminigui's / src / ial directory to write IAL interface functions, and add touch screen controller drivers fm7843.c, fm7843.h to the / src / ial directory, and modify the Makefile.am file. Add support for MINIGUI extension library libmgext, cross-compile in Threads mode and link the obtained MiniGUI static link library with the cross-compiled user application to generate target files that can be run on the target board, and finally on the transplanted uclinux system Install the resource files needed to run MiniGUI.

3.4 User interface design

The user interface mainly includes a main window for displaying speed information and a dialog box set for vehicle speed alarm. Use MniniGUIMain (int argc, const char * argv []) as the entrance, define the display area, use the CreateThreadForMainWindow () function to create two concurrent threads, define the thread entry function address and return the thread identifier; configure in the main thread Complete the initialization operation for timer1, create the main form by hMainWnd = CreateMainWindow (& Createinfo) and configure the various attributes of Createinfo, call the ShowWindows (hMainWnd, SW_SHOWNORMAL) function to display the form as the main user interface, and finally enter the message loop. The monitoring thread and the main thread are started at the same time. After that, the monitoring thread monitors the vehicle speed information data in real time in the background, and sends the corresponding message to the main thread through SendMessage (). The processing of messages and the determination of overspeed alarms can be implemented in the process function SpeedWinProc () of the main window. The SET and About pull-down menus in the main form are implemented by the CreatMenu () and CreatePopupMenu () functions, which are used to pop up the speed setting dialog box and the system description dialog box, respectively. Assign the menu handle to the hMenu property of the main form and add the corresponding menu processing code to the form procedure function. When the menu is clicked by the manager, the form will receive the corresponding MSG_COMMAND message, and the system executes the corresponding menu according to the message. Under the speed setting processing program or system description display program. In the speed setting dialog box, the button uses the ordinary “OK / OK” button CTRL_BUTTON, and the two static boxes CTRL_STATIC respectively identify the functions of the two single-line edit boxes CTRL_SLEDIT: “upper speed setting” and “lower speed setting”. Two edit boxes are used to receive the upper limit speed and lower limit speed input by the administrator. The speed setting value in the edit box is input by the number button realized by the CTRL_COOLBAR control through the MSG_GETTEXT message. The creation of each control is achieved by calling the Createwindow function with the control class name.

4 Conclusion

Modulated infrared light car speed recognition system can not only accurately measure the speed of the car, but also avoid the capture of the "electronic dog" type anti-speed device, which makes it difficult for illegal vehicles to escape the punishment. Eliminating the hidden dangers of accidents and ensuring the safety of people's lives and property have an important role, and can be used in other speed measurement occasions. The application prospect is very broad. Since the sensor head is only sensitive to the modulated infrared light of 38 kHz, other infrared light has almost no effect on it, therefore, the system has strong anti-interference ability. The system adopts ARM embedded processor, uclinux operating system and touch screen, which not only has good human-computer interaction, but also has strong upgrade and expansion capabilities, stable operation, and has great application prospects.

For different consumer, there are 2 kind of 3 axis gimbal stabilizer for them, which are Professional Stabilizer and consumer stabilizer.
gimbal stabilizer for camera
Stabilis X1 is very professional for DSLR photographer, the device has heading cruise, normal holding position, inverted position, and single-handed side position modes.
smooth video gimbal stabilizer
Wewow focusing on handheld stabilizer is a technology company which does R & D independently. With Wenpod series product released, the company achieved the industry's praise and quickly became the leader of the smart stabilizer industry.

Our service

1. Reply to you within 24 hours.

2. Already sample: within 1-2days.

3. Shipping date: within 24 hours once get the payment.

4. 12 months warranty.

5.After-sales service, solve within 3 working dates.

If you have any questions, please contact with us directly.
Wewow appreciates domestic and international business relationship!

Professional Stabilizer

Professional Stabilizer,Professional DSLR Stabilizer,Stabilizer For Large Camera,Portable Handheld Stabilizer

GUANGZHOU WEWOW ELECTRONIC CO., LTD. , https://www.stabilizers.pl