You are on page 1of 12

Chepter 5 Hardware requirement

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

5.1.2 Pin Configaration:

Figure5.1.2 : Atmega32 pin configuration.

5.2 Rectifier Diodes:


Rectifier diodes are used in power supplies to convert alternating current (AC) to direct current (DC), a process called rectification. They are also used elsewhere in circuits where a large current must pass through the diode. All rectifier diodes are made from silicon and germanium,therefore silicon have a forward voltage drop of 0.70v. the table shows maximum current and maximum reverse voltage for some popular rectifier diodes. The 1N4001 is suitable for most low voltage circuits with a current of less than 1A.

Figure 5.2:Diode

symbol,and characteristic of a silicon diode

43

Figure 5.2.1: Sample

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.2.1 Forward Voltage Drop:


Electricity uses up a little energy pushing its way through the diodes, rather like a person pushing through a door with a spring. This means that there is a small voltage across a conducting diode, it is called a forward voltage drop and is about 0.7V for all normal diodes which are made from silicon. The forward voltage drop of a diode is almost constant whatever the current passing through the diode so they have a very steep characteristic (current voltage graph).

5.2.2 Reverse Voltage:


When a reverse voltage is applied a perfect diode does not conduct, but all real diodes leak a very tiny current of a few A or less. This can be ignored in most circuits because it will be very much smaller then the current flowing in the forward direction. However, all diodes have a maximum reverse voltage (usually 50V or more ) and if this is exceeded the diode will fail and pass a large current in the reverse direction, this is called breakdown.

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.

Figure 5.1: Resistor

symbol and sample resistor.

45

5.4TIP31cTransistorsSpcefication

46

47

5.5 Configuration of Stepper Motor:


In our project a hybrid variable reluctance stepper motor is used. The configuration isStator main pole 8 Castellated teeth to each pole 5

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

Maximum time for one revolution =10

10 3 200 = 2 sec

[ 10 10 3 = Energize time for one coil] Maximum speed for the motor =
1 RPS 2

= 0.5 60 RPM = 30 RPM

5.6 Motor Driver Structure:


The circuit board is interfaced on one side to the Microcontroller and on the other side to a stepper motor driver card. All the outputs from this circuit are sent to this driver card. A multi meter is first used to confirm the accuracy of the wiring and to ensure that all the connections are done properly. We have developed program code vision Avr C compiler. The motor used for this project requires at least 1.3 ampere per phase, but the microcontroller can only deliver a few mill amperes of current. Since the computer delivers the motors required 5 volts per phase, a simple application of 48

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.

Figure 5.6: Stepper motor driver circuit with microcontroller.

49

5.7 Hardware Circuit:

Figure 5.7: Hardware Circuit Diagram

50

5.10 Hardware Protection:


Both, Microcontroller and Driver circuit are grounded together. So there is no change to being false triggering. In this way all hardware is protected from being damage.

51