Abstract: In order to realize the functions of film number positioning, automatic counting, automatic film end detection, and film number storage, a film automatic positioning system based on AVR single-chip microcomputer control is designed, and the hardware and software implementation is analyzed. The system consists of a keyboard/display module, a photoelectric sensor, a motor drive, and a power supply module. The test results show that the system has the characteristics of simple structure, easy operation, high cost performance, small size, and high degree of automation.
Keywords: AVR; single-chip microcomputer; DC motor; automatic positioning
O Introduction
In the process of film interpretation, it is often required to count the number of negatives and automatically locate the negatives at different positions to facilitate searching and magnification. This film automatic search system is a fully automatic interval retrieval device designed to achieve these functions; this design is mainly to solve the problem of low efficiency caused by manual methods when searching for negatives, and a practical system is designed to effectively improve production efficiency. Its functions are as follows: if the automatic key is pressed, the photo counting action just after power on will be performed, and the total number of negatives will be automatically counted; in this process, the motor will stop when the stop key is pressed, and the normal photo counting action will be restored when the automatic key is pressed again; if the storage key is pressed, the current number of photos will be stored; when the negative reaches the end of the film, the motor will automatically stop, and the total number of photos will be displayed at the same time. At this time, press the mode key to enter the setting of the desired number of photos and the required speed; there are three levels of speed, which can be adjusted by the increase and decrease keys; after adjusting to the number of photos you want to see by the increase and decrease keys, press the confirmation key to automatically adjust to the set number of photos. When stopped, pressing the storage key will enter the stored number state, and the storage increase key and storage decrease key can be used to adjust the number of sheets corresponding to the stored address unit; there are 30 storage address units for storing different numbers of sheets; pressing the storage review key will automatically adjust to the stored number of sheets. The system can easily find the
desired film, so as to enlarge the film and other processing.
1 Composition and working principle of the control system
This control system uses Atmega 16L control. Atmega 16L produced by Atmel is an ideal chip. It integrates a large capacity memory and rich and powerful hardware interface circuits. It has all the performance and characteristics of the MEGE series of AVR high-end microcontrollers: it has rich on-chip resources, making the system simple and reliable; it has a fast computing speed and can reach a processing speed of 1MIPS, which is conducive to the realization of intelligent control algorithms; the mega series in the AVR microcontroller has super strong anti-interference ability, which enhances the safety and reliability of the product; it has an efficient and inexpensive high-level language development environment, which is convenient for function expansion and change, greatly shortening the development cycle. There are 16 KB of FLASH memory and 1 KB of SRAM inside, which can be easily erased and modified repeatedly. Since there is no need to expand the program memory externally, the circuit design can be simplified, and it contains PWM signal output, which is very suitable for the development of this system. Since the in-system programming (ISP) function of the chip is utilized, there is no need to move the chip. The software is designed so that once the code file is re-edited, it will be automatically downloaded to the chip and automatically reset to run, which is the real "what you edit is what you get".
The whole system includes: single-chip power supply module, digital tube display module, forward and reverse control module, button module, control signal conversion module, and detection board module. Its working principle is shown in Figure 1.
The system uses photoelectric sensors to collect signals from the film interval. Photoelectric sensors are sensors that convert light signals into electrical signals based on the photoelectric effect. When the sensor detects a signal that satisfies the conditions of the measured film interval, it immediately stops generating PWM waves and allows the film to stop at a position that satisfies the conditions. Then the film that satisfies the conditions can be processed. The AVR microcontroller can generate PWM waves, and the power component LMD18200 can realize full digital drive of the motor, with an energy utilization rate of nearly 100%. In order to achieve precise control of the DC motor, the position of the film and the speed of the motor must be collected in real time. The control of the DC motor is achieved by counting the output pulses of the photoelectric device by the microcontroller to accurately obtain the position information.
2 Design of each module of the system
2.1 Motor drive circuit
In this system, the motor adopts PWM speed regulation, and the driver adopts the professional H-bridge component LMD18200. LMD18200 is a power integrated chip for motor drive produced by National Semiconductor (NS). It integrates 4 DMOS tubes to form an H-bridge, has a complete logic control circuit and chip protection circuit; the working voltage is up to 55 V; the peak output current is up to 6 A, the continuous output current is up to 3 A; the input is TTL/CMOS level compatible. The principle of the motor drive circuit is shown in Figure 1.
Small mechatronic products require that the DC motor driver has a small size and can provide large current and voltage output. The Darlington triode is used to build an H-bridge to realize PWM pulse width modulation control. Due to the different characteristics of each component of the discrete device, the speed regulation performance is not very good, and the circuit cannot achieve high stability. In comparison, the use of the bridge component LMD18200T dedicated to motion control launched by National Semiconductor has great advantages.
The principle block diagram of LMD18200 is shown in Figure 2.
In Figure 2, the H-bridge composed of four DMOS tubes and its control logic circuit are all included in an 11-pin T-220 package. The working principle of LMD18200 is as follows: 4 DMOS tubes are integrated internally to form a standard H-type drive bridge. The gate control voltage is provided to the two switch tubes of the upper bridge arm through the charge pump circuit. The charge pump circuit has an operating frequency of about 300 kHz. A second charge pump circuit can be formed by connecting an external capacitor to pins 1 and 11. The larger the external capacitor, the faster the capacitor input to the gate of the switch tube is charged, the shorter the voltage rise time, and the higher the operating frequency can be. Pins 2 and 10 are connected to the armature of the DC motor. When rotating forward, the direction of the current should be from pin 2 to pin 10; when rotating reversely, the direction of the current should be from pin 10 to pin 2. The current detection output pin 8 can be connected to a resistor to ground, and the overcurrent condition is output through the resistor. The overcurrent threshold set by the internal protection circuit is 10 A. When this value is exceeded, the output will be automatically blocked and the output will be automatically restored periodically. If the overcurrent lasts for a long time, the overheat protection will shut down the entire output. The overheat signal can also be output through pin 9. When the junction temperature reaches 145℃, pin 9 will have an output signal.
2.2 Photoelectric detection circuit
Infrared photoelectric switch (photoelectric sensor) is the abbreviation of photoelectric proximity switch. It uses the shielding or reflection of the infrared beam by the detected object, and is selected by the synchronous circuit to detect the presence or absence of the object. The object is not limited to metal, and all objects that can reflect light can be detected. The product is widely used in various industrial and civil occasions such as power meters, electronic instruments, counters, speed measurement, position measurement, fax machines, shredders, etc.
This test system uses EVERCOLORS's ITR-8307 reflective photoelectric switch. The ITR-8307 photoelectric switch is a sensor that integrates a transmitter and a receiver. When the detected object passes by, a sufficient amount of light emitted by the photoelectric switch transmitter is reflected to the receiver, so the photoelectric switch generates a switch signal. When the surface of the detected object is bright or its reflectivity is extremely high, the reflective photoelectric switch is the preferred detection switch.
In this design, a DC voltage with a rated voltage of 24 V is used as the working voltage of the photoelectric switch. According to the principle of the selected photoelectric switch, the low level of the pulse signal output by the photoelectric switch is 0 V, and the high level is 24 V. The high level is divided by two resistors. Then two transistors are input to the microcontroller pins. The transistor design circuit is shown in Figure 1 to complete the conversion of low level 0 V and high level 5 V.
2.3 Human-machine interface circuit
The human-machine interface circuit includes a keyboard and a 4-digit LED digital tube display. The keyboard module uses a 3×4 row and column matrix non-encoded keyboard. The keyboard is used to set parameters and select functions, including deletion, data transmission, query and other functions; the display module is mainly composed of a 4-digit LED digital tube and a 74LS595 chip; its circuit diagram is shown in Figure 3. The 74LS595 has three-state and latch functions. Pin 14 SER is a serial input terminal, pin 11 SRCLK is a shift register clock input, and pin 12 is a latch register clock input. It connects the microprocessor with a 4-digit 7-segment digital LED display. The digital tube is used to display the number of negatives, speed, stored address and number of sheets in real time.
3 Overall design of control system software
The overall flow chart of the system software is shown in Figure 4. During the software design, the main functions include counting the number of sheets, stopping the end sensor signal processing, setting, positioning the required number of sheets, and storing the number of negative sheets.
4 Conclusion
Using Atmega 16L from Atmel's AVR series microcontroller as the core and combining it with infrared photoelectric switches, the system can count the number of negatives and automatically locate the negatives at different positions. The system can easily find the desired negatives, so as to enlarge the negatives and perform other processing. The automatic negative search system is a fully automatic interval retrieval device designed to achieve these functions. This design is mainly a practical system designed to solve the problem of low efficiency caused by manual methods when searching for negatives, thereby greatly improving production efficiency.
The innovation of this article is to use infrared reflective sensors to realize the function of automatic film positioning; the system can realize the functions of automatic counting of the number of negatives, target negative storage and automatic search; it has the characteristics of stable performance, high cost performance, simple circuit and high degree of automation.
Previous article:CAN bus application based on AVR processor at90can128
Next article:SOPC Design and Implementation of Automatic Voice Recording System (AVRS)
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- [Silicon Labs BG22-EK4108A Bluetooth Development Evaluation] Evaluation 2 SOC_Blinky Service Configuration
- Programming classes are coming to primary and secondary schools. What do you think?
- Say goodbye to film! Design a smarter car sunroof
- 【Iprober 520 current probe】 Unpacking and precautions before use
- [GD32E503 Review] Part 3: Screen Code Analysis
- How capacitive isolation solves key challenges in AC motor drives
- NTC/PTC temperature acquisition application
- How to minimize input power protection for smart speakers and smart displays
- SPI Master Mode of TI BLE CC2541
- 【Silicon Labs Development Kit Review】+ Understanding the Temperature and Humidity Sensor Hardware