Académique Documents
Professionnel Documents
Culture Documents
Microcontroller Rectifier diodes Resistors Tip31c Transistor Configuration of Stepper Motor Motor Driver Structure Hardware Circuit Hardware protection
40
5.1 Microcontroller:
A suitable microcontroller (ATMEGA32) is used as the heart of the device which performs all the processing function of the device. The ATmega32 is a high performance, low power 8 bit microcontroller based on the AVR enhanced RISC structure. The on-chip Flash allows the program memory to be reprogrammed insystem or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel ATmega32 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.
5.1.1 Features:
High-performance, Low-power AVR 8-bit Microcontroller Advanced RISC Architecture 131 Powerful Instructions Most Single-clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static Operation Up to 16 MIPS Throughput at 16 MHz On-chip 2-cycle Multiplier Nonvolatile Program and Data Memories 32K Bytes of In-System Self-Programmable Flash Endurance: 10,000 Write/Erase Cycles Optional Boot Code Section with Independent Lock Bits In-System Programming by On-chip Boot Program True Read-While-Write Operation 1024 Bytes EEPROM Endurance: 100,000 Write/Erase Cycles 2K Byte Internal SRAM Programming Lock for Software Security JTAG (IEEE std. 1149.1 Compliant) Interface Boundary-scan Capabilities According to the JTAG Standard Extensive On-chip Debug Support Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface Peripheral Features Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes 41
One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode Real Time Counter with Separate Oscillator Four PWM Channels 8-channel, 10-bit ADC 8 Single-ended Channels 7 Differential Channels in TQFP Package Only 2 Differential Channels with Programmable Gain at 1x, 10x, or 200x Byte-oriented Two-wire Serial Interface Programmable Serial USART Master/Slave SPI Serial Interface Programmable Watchdog Timer with Separate On-chip Oscillator On-chip Analog Comparator Special Microcontroller Features Power-on Reset and Programmable Brown-out Detection Internal Calibrated RC Oscillator External and Internal Interrupt Sources Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby and Extended Standby I/O and Packages 32 Programmable I/O Lines 40-pin PDIP, 44-lead TQFP, and 44-pad MLF Operating Voltages 2.7 - 5.5V for ATmega32L 4.5 - 5.5V for ATmega32 Speed Grades 0 - 8 MHz for ATmega32L 0 - 16 MHz for ATmega32 Power Consumption at 1 MHz, 3V, 25C for ATmega32L Active: 1.1 mA Idle Mode: 0.35 mA Power-down Mode: < 1 A
42
Figure 5.2:Diode
43
of diode
Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol shows the direction in which the current can flow. Diodes are the electrical version of a valve and early diodes where actually called valves.
5.3 Resistors:
44
A resistor is a two-terminal electrical or electronic component that resists an electric current by producing a voltage drop between its terminals in accordance with Ohms law R=V/I The electrical resistance is equal to the voltage drop across the resistor divided the current through the resistor. Resistor are used as part of electrical networks and electronic circuits. Resistors basically restrict the flow of electric current. Electrical energy is converted to heat when current flows through a resistor. Usually the effect is negligible, but if he resistance is low (or the voltage across the resistor high) a large current may pass making the resistor become noticeably warm. The resistor must be able to withstand the heating effect and resistor have power ratings to show this. Power ratings of resistors are rarely quoted in parts lists because for most circuits the standard power ratings of 0.25w or 0.5w are suitable.
45
5.4TIP31cTransistorsSpcefication
46
47
Stator teeth = 5 8 = 40
Rotor teeth = 50 Stepping angle =
50 40 360 0 50 40
= 1 .8 0 Resolution =
360 0 = 200 Step / revolution 1.8
10 3 200 = 2 sec
[ 10 10 3 = Energize time for one coil] Maximum speed for the motor =
1 RPS 2
Ohms law says that a 5 resistor will pull the necessary current. However, most resistors are not capable of pulling current past a few mill amperes. In addition, resistors cannot handle the fast current switching required by the stepping sequence. The inductive loads of the coils tend to make the current reverse direction because of the rapid on and off switching. Using a Power transistor array such as the TIP31C can easily solve these problems. These arrays are composed of cascaded NPN transistors with suppression diodes attached to prevent current reversal. Another advantage of the Power transistor is its ability to amplify the computers output current from a few mill amperes into a 1.5A input to the stepper motor. A transistor element of each pin is needed in parallel to supply the necessary 1.3A (minimum) to the stepper motor.
49
50
51