Design of automatic film positioning system using Atmega 16L as the core

Publisher:RadiantJourneyLatest update time:2020-01-23 Source: elecfansKeywords:Atmega  16L  film Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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 automatic film 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 the manual method 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 the camera is 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 negative film, so as to enlarge the negative film and other processing.


1 Composition and working principle of 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 single-chip microcomputers: 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 single-chip microcomputer 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 the expansion and change of functions, 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 used, there is no need to move the chip. When designing the software, it is designed that once the code file is re-edited, it will be automatically downloaded to the chip and automatically reset to run, which is a real "what you write is what you get".


The whole system includes: single chip power supply module, digital tube display module, forward and reverse control module, key module, control signal conversion module, detection board module. Its working principle is shown in Figure 1.

Design of automatic film positioning system using Atmega 16L as the core

Figure 1 Main components of the system circuit diagram


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 from the film interval that meets the conditions, it immediately stops generating PWM waves and allows the film to stop at a position that meets the conditions. The film that meets the conditions can then be processed. The AVR microcontroller can generate PWM waves, and the power component LMD18200 can achieve 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 system modules

2.1 Motor drive circuit

In this system, the motor speed is controlled by PWM, and the driver uses a 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, with 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, and 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 use of Darlington triodes to build an H-bridge to achieve PWM pulse width modulation control has poor speed regulation performance and cannot achieve high stability due to the different characteristics of each component of the discrete device. In comparison, the use of the LMD18200T bridge component dedicated to motion control launched by National Semiconductor has great advantages.

The LMD18200 functional block diagram is shown in Figure 2.

Design of automatic film positioning system using Atmega 16L as the core

Figure 2 LMD18200 block diagram


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: Four 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 infrared beam by the detected object, and detects the presence of the object through the synchronous circuit. 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 an object to be detected passes by, a sufficient amount of light emitted by the photoelectric switch transmitter is reflected to the receiver, and the photoelectric switch generates a switch signal. When the surface of the object to be detected 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, completing 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 adopts a 3×4 row-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 the serial input terminal, pin 11 SRCLK is the shift register clock input, and pin 12 is the 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 films being tested, speed, stored address and number of films and other data in real time.

Design of automatic film positioning system using Atmega 16L as the core

Figure 3 Human-machine interface circuit


3 Overall design of control system software

[1] [2]
Keywords:Atmega  16L  film Reference address:Design of automatic film positioning system using Atmega 16L as the core

Previous article:How to make a simple AVR emulator
Next article:Design of solar photovoltaic DC controller using AVR microcontroller control

Recommended ReadingLatest update time:2024-11-16 11:33

ATmega8 Watchdog Reset
When the watchdog timer overflows, a reset pulse with a duration of 1 CK cycle will be generated. At the falling edge of the pulse, the delay timer starts counting tTOUT. Please refer to the specific operation process of the watchdog timer.
[Microcontroller]
ATmega8 Watchdog Reset
AVR microcontroller (learning) - (II), ATMEGA16 interrupt system - 02
2. ATMEGA16 interrupt system 2. (02) Sleep mode interrupt wakeup of 4*4 row buttons Without further ado, the previous article has the registers used in this piece, so if you want to read this article, it is recommended to read the previous article . Of course, if you know how to do it~~~ Directly on the picture~~~
[Microcontroller]
AVR microcontroller (learning) - (II), ATMEGA16 interrupt system - 02
ATmega48 MCU Control Register MCUCR
The MCU control register contains the control bits for power management. · Bits 7..4 Res Reserved bits: These bits are not used in ATmega48/88/168 and the read return value is always "0". · Bits 3, 2, 1-SM2..0: Sleep mode selection bits 2, 1 and 0. As shown in Table 18, these bits are used to select a specific sle
[Microcontroller]
ATmega48 MCU Control Register MCUCR
Design of remote control password lock system based on ATmega16
Introduction: This paper introduces the specific design of the hardware and program implementation process of the remote control password lock based on atmega16 single-chip microcomputer. It uses AVR single-chip microcomputer ATMEGA16 as the controller. On the basis of realizing the password keyboard input opening con
[Microcontroller]
AVR MCU ATMEGA16 1602 LCD driver and experience
I developed my own AVR microcontroller chip development board, and the 1602 LCD screen experiment was successful! I was very pleased. I wrote the program for a whole day, and repeated the experiment, and finally succeeded at 0:00 am.      During this process, the biggest problem was the so-called matching 1602 LCD scr
[Microcontroller]
ATmega88 clock system and its distribution
Clock system and its distribution Figure 12 shows the main clock system and its distribution of ATmega88. These clocks do not need to work at the same time. In order to reduce power consumption, different sleep modes can be used to disable the clocks of modules that do not need to work. For details, see P32 "Power Ma
[Microcontroller]
ATmega88 clock system and its distribution
ATmega88 Flash Program Memory
In-system programmable Flash program memory ATmega88 has 8K bytes of in-system programmable Flash for storing program instruction code. Because all AVR instructions are 16-bit or 32-bit, the Flash is organized into 4K x 16. For ATmega88, the security of user programs should be considered separately based on the two ar
[Microcontroller]
ATmega88 Flash Program Memory
ATmega128 (12864 with font library)
//12864 LCD display driver, simple display of Chinese characters and letters //Compilation environment AVR Studio 4.17/AVR GCC //System clock 7.3728MHZ, set fuse bit to external high frequency quartz crystal oscillator, startup time 4.1ms //***************************************************************************
[Microcontroller]
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号