0 Introduction
With the development of the national economy and the acceleration of economic globalization, although the Chinese security industry started relatively late, it has developed rapidly and its application scope has expanded year by year; the pan-tilt head is one of the most typical products in the security industry. It is a device for installing and fixing cameras. It is divided into fixed pan-tilt heads and electric pan-tilt heads. A fixed pan-tilt head refers to a device that locks the adjustment mechanism after the camera is installed and the horizontal and pitch angles are adjusted to achieve the ideal working state. It is suitable for situations where the monitoring area is not large.
The electric pan-tilt head refers to a mounting platform that can perform horizontal and vertical movements and is composed of three parts: a board integrated control circuit, an external mechanical structure, and two AC motors or stepper motors in the horizontal and vertical directions. It can expand the monitoring range of the camera and is suitable for large-scale scanning monitoring systems. The working principle of the installation platform is an integrated circuit composed of a microcontroller. It uses the application program solidified in the internal memory flash of the integrated circuit or receives input instructions from an external keyboard through the RS485 port to control the opening and closing of the relay on the integrated circuit, thereby commanding the two motors responsible for the up and down and left and right rotation of the pan-tilt head. That is, when the control circuit sends out the up and down action voltage, the vertical motor rotates, and the vertical transmission wheel is driven to rotate through the reduction box, or when the control circuit sends out the left and right action voltage, the horizontal motor rotates and drives the horizontal gear plate at the bottom of the pan-tilt head through the reduction box. Even when the control circuit sends out a three-dimensional space precise positioning signal to the horizontal and vertical motors, the horizontal and vertical motors rotate at the same time, driving the transmission gear, and the transmission gear drives the camera installed in the pan-tilt head shield to make corresponding rotational movements, so as to achieve the purpose of the camera on the pan-tilt head automatically scanning the monitoring area. The integrated control circuit can also accept the interrupt control command from the keyboard of the on-duty personnel of the remote monitoring center to command the pan-tilt head to track the monitored object and drive the camera's zoom, focus, and aperture. According to the different working voltages of the electric pan-tilt head, it is generally divided into three types: AC 24V, AC 220V and DC 24V. This article focuses on the design of an automatic test platform for electric pan-tilt platforms with an ATmega64 microcontroller as the controller and an operating voltage of 24V AC.
1. Principle of the PTZ Board
1.1 Functional Characteristics of ATmega64 High-performance, low-power 8-bit AVR microprocessor [5], it has the following characteristics:
1) Advanced RISC structure, 130 instructions, most of which are executed in a single clock cycle; 32 8-bit general-purpose working registers, fully static operation, performance up to 16MIPS at 16 MHz, hardware multiplier with only two clock cycles
2) Non-volatile program and data memory, 64K bytes of in-system programmable Flash, with an erase and write life of 10,000 times; optional Boot code area with independent lock bit, in-system programming through on-chip Boot program, true simultaneous read and write operation; 2K bytes of EEPROM, with an erase and write life of 100,000 times; 4K bytes of on-chip SRAM; 64K bytes of optional external storage space; the lock bit can be programmed to realize user program encryption; in-system programming through the SPI interface
3) JTAG interface (compatible with IEEE 1149.1 standard), boundary scan function compliant with the JTAG standard; support for extended on-chip debugging function; programming of Flash, EEPROM, fuse bits and lock bits through the JTAG interface
4) Peripheral features. Two 8-bit timer/counters with independent prescaler and comparator functions; Two extended 16-bit timer/counters with prescaler, compare function and capture function; Real-time counter RTC with independent oscillator; Two 8-bit PWM channels; 6 PWM channels with variable programmable resolution from 1 to 16 bits; 8 10-bit ADCs; 8 single-ended channels; 7 differential channels; 2 differential channels with programmable gain (1x, 10x, or 200x); byte-oriented two-wire interface; programmable serial USART; SPI serial interface that can operate in master/slave mode; programmable watchdog timer with independent on-chip oscillator; on-chip analog comparator
5) Special processor features. Power-on reset and programmable power-down detection; on-chip calibrated RC oscillator; on-chip/off-chip interrupt sources; 6 sleep modes: idle mode, ADC noise suppression mode, power saving mode, power-down mode, standby mode and extended standby mode; software selectable clock frequency; ATmega103 compatible mode selected by fuse bit; global pull-up disabled
6) I/O and package. 53 programmable I/O ports; 64-pin TQFP package, and 64-pin MLF package
7) Operating voltage and speed grade. Operating voltage: 4.5 - 5.5V Speed grade: 0 - 16 MHz
1.2 Working principle of the pan-tilt board
The core component of the pan-tilt is the microcontroller integrated circuit of the pan-tilt. According to the different characteristics of the pan-tilt, the controller of the integrated circuit can choose different types of single-chip microcomputers, DSP, ARM and other control chips [4]. This article discusses the pan-tilt control integrated circuit composed of ATmega64 single-chip microcomputer as the microcontroller. The four basic functions of this control circuit are:
1) RS485 communication function: receive control commands from the external keyboard through RS485, and use RS485 to send control commands to control the camera action
2) Camera function: according to the control command format of different cameras, send control commands to the camera through RS485 to drive the camera to perform actions such as zoom, focus distance, aperture size, etc.
I) Motor control function: control the opening and closing of four relays through the integrated circuit to complete the left and right rotation control of the horizontal and vertical motors
I) Advanced functions: four basic advanced functions of preset position, cruise, line scan and watch
The working process of the pan-tilt control circuit is to refer to the pan-tilt control protocol (PECOL D, PECOL P, industry V0.0, industry V1.0), set the address dial and protocol dial, correctly connect the control device (keyboard) of the external input control command, and under the correct pan-tilt control protocol, the microprocessor receives the input command of the control device through RS485 communication, analyzes and judges, and responds; its responses mainly include: 1) Use RS485 communication to drive the camera action. 2) The circuit relay ULN2803 controls the corresponding actions of the horizontal motor and the vertical motor. 3) The above two actions at the same time. The schematic diagram of the pan-tilt board control integrated circuit is shown in Figure 1.
[page]
2 Design of the automated test platform
2.1 Hardware principle of the pan-tilt automated test platform
The functions of the pan-tilt board are numerous and complex, and the product has many functional test items. The usual test method is to assemble the pan-tilt board into a complete machine, use an external keyboard to input the pan-tilt control command, and let the operator subjectively judge the good condition of its function. In view of the time-consuming and inefficient characteristics of the usual test mode, the goal of the pan-tilt board automated test platform is to perform a one-key "start" operation. The platform can automatically test the four major module functions of the pan-tilt board control circuit and use LED lights to dynamically display the test results [1]. The basic idea of the automatic test platform is: use the ATmega64 microprocessor as the control center to form the automatic test platform hardware circuit, select the corresponding pan-tilt communication protocol, use RS485 to send pan-tilt action control information to the tested object (pan-tilt board), set the action running time, and collect the feedback information of the pan-tilt action through the optical coupler or 75LBC184 after the time is reached. It is judged whether the control command fed back by the pan-tilt board is normal, so as to achieve the purpose of pan-tilt function test. The four major function tests are all dynamically tracked and displayed by LED lights: red represents poor function and green represents good function. The schematic diagram of the automated test platform is shown in Figure 2.
2.2 Software Design of PTZ Automated Test Platform
The function of the automated test platform is to perform black box testing on the PTZ board and detect the four major module functions of the integrated control circuit of the PTZ board: RS485 function, camera function, motor control function, and advanced function. The idea of the test platform software design is: send the PTZ action command to the board under test through RS485 communication, the test platform collects the response information of the board under test within the set time, the test platform microprocessor compares the collected information with the normal response information, gives the corresponding judgment result, and uses LED to dynamically display the test result. When the RS485 function of the board under test is poor, the test of the board cannot be carried out, and the test platform will determine that the board is poor. However, the functions of the other three modules of the four functional modules are relatively independent and do not affect each other. Therefore, under the premise that the RS485 function is good, the automatic test platform completes the test of the remaining three functions at one time [3].
The automatic test platform software design uses high-level C language to implement all test function processes in the ICCAVR6.20 development environment. The flow chart is shown in Figure 3.
3. Conclusion
Aiming at the shortcomings of slow speed, low efficiency and too many human factors affecting the accuracy of test results when the pan-tilt board integrated control circuit is assembled into a pan-tilt machine and its function is tested manually using an external keyboard, an automatic pan-tilt board test platform with ATmega64 as the microprocessor is designed to complete the automatic test of the pan-tilt with ATmega64 as the control microprocessor, solving the problem of incorrect and low efficiency of pan-tilt board test in the production process of the enterprise; after actual production verification, the automatic test platform has a good application effect and greatly improves the production efficiency of the enterprise.
Innovation: An automatic test platform is designed using an 8-bit ATmega64 microcontroller to detect the pan-tilt board. The test platform has the characteristics of simple operation and high degree of automation.
Previous article:Analysis of factors affecting the accuracy of optical scanning measurement and their countermeasures
Next article:Research on the test method of average flight velocity of artillery shell explosion fragments
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Automatic License Plate Recognition System Based on ARM Cortex
- come on
- MM32F103 Development Board Evaluation: User Experience Suggestions
- Why is Ie in this common emitter circuit negative?
- From distributor to service provider, how Avnet deploys the Internet of Things
- [Fudan Micro FM33LC046N] Similar timer module
- [RVB2601 development board trial experience] GPIO external interrupt test
- Shanghai high salary recruitment: IC design/verification, BSP, Linux driver, ISP driver engineer
- Is the power of the resistor enough? Please help me analyze it.
- PCB Anti-ESD Design Principles