Design of Automatic Film Positioning System Based on AVR

Publisher:玉立风华Latest update time:2011-02-18 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

a.JPG


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.

c.JPG


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.

c.JPG

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.

d.JPG

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.

Reference address:Design of Automatic Film Positioning System Based on AVR

Previous article:CAN bus application based on AVR processor at90can128
Next article:SOPC Design and Implementation of Automatic Voice Recording System (AVRS)

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号