Presentation is loading. Please wait.

Presentation is loading. Please wait.

A PRESENTATION ON RELAY, OPTOISOLATOR AND STEPPER MOTOR INTERFACING WITH AVR Prepared By:- Katariya Prakash[130070110027] Kathiriya Shalin[130070110028]

Similar presentations


Presentation on theme: "A PRESENTATION ON RELAY, OPTOISOLATOR AND STEPPER MOTOR INTERFACING WITH AVR Prepared By:- Katariya Prakash[130070110027] Kathiriya Shalin[130070110028]"— Presentation transcript:

1 A PRESENTATION ON RELAY, OPTOISOLATOR AND STEPPER MOTOR INTERFACING WITH AVR Prepared By:- Katariya Prakash[130070110027] Kathiriya Shalin[130070110028] Maulik Vasaiya[130070110036] Kishan Mer[130070110037] Submitted To:- B. V. M. Engineering College

2 Interfacing Relays with AVR  What is Relay? A relay is an electromagnetic switch operated by a relatively small electric current that can turn on or off a much larger electric current.electromagneticelectric The heart of a relay is an electromagnet (a coil of wire that becomes a temporary magnetwhen electricity flows through it).magnet

3  How does it Work? When current flows through the coil, a magnetic field is created around the coil(the coil is energized), which causes the armature to be attracted to the coil. The armature’s contact acts like a switch and closes or opens the circuit. When the coil is not energized, a spring pulls the armature to its normal state.

4  The contacts can be normally open(NO) or normally closed(NC).  In "normally open" (NO) relay: the contacts in the second circuit are not connected by default, and switch on only when a current flows through the magnet.  In "normally closed" (NC; the contacts are connected so a current flows through them by default) and switch off only when the magnet is activated, pulling or pushing the contacts apart.

5 Driving a Relay  Digital systems and microcontroller pins lack sufficient current to drive the relay. While the relay’s coil needs around 10mA to be energized, the microcontroller’s pin can provide a maximum of 1- 2mA current.  For this reason, we place a driver, such as the ULN2803, or a power transistor between the microcontroller and the relay as shown in figure-1.

6

7 Assembly program for relay Interfacing LDI R16,0X5F OUT SPH,R16 LDI R16,LOW OUT SPL,R16 SBI DDRB,0 BEGIN: SBI PORTB,0 RCALL DELAY_1s CBI PORTB,0 RCALL DELAY_1s RJMP BEGIN DELAY_1s: …………… RET

8 Interfacing Optoisolator with AVR  What is Opto-isolator? An optoisolator (also known as optical coupler, optocoupler and opto-isolator) is a semiconductor device that uses a short optical transmission path to transfer an electrical signal between circuits or elements of a circuit, while keeping them electrically isolated from each other. The solid state relay has an opto-isolator at its input.

9  Controlling a Lamp via an Opto-isolator:-

10 Interfacing Stepper Motor with AVR  A stepper motor is a device that translates the electrical pulses to mechanical movement. It is used in applications like robotics, printers, disk drives for position control.  Stepper motors have a permanent magnet rotor surrounded by a stator.  Generally the stepper motors have four stator windings that are paired with a common center tap as shown in figure:

11  The current flowing in the stator is responsible for direction of rotation. As the direction of current is changed, the polarity is also changed causing the reverse motion of the stepper motor.  The stepper motor has 6 leads, 4 leads representing four stator winding and 2 leads for 2 common for the center tapped leads.  There are many sequences for rotation. Each sequence has a different degree of precision.

12  The below table showing the 2 phase 4 step stepping sequence.  Although we can start with any sequence, we must continue in proper order. E.g. if we start with step 2 then the sequence of steps is 3,4,1 etc. StepWinding A1 Winding A2 Winding A3 Winding A4 11001 21100 30110 40011 Counter Clockwise Clockwise

13  Step Angle:- Step angle is defined as the minimum degree of rotation associated with a single step. Stepper motor step angles: The total number of steps required to rotate one complete rotation of 360 is called as steps per revolution. Step angleSteps per revolution 0.72500 1.8200 2.0180 2.5144 5.072 7.548 1524

14 Types of Stepper motor  Depending on the number of connections to the motor there are three types of stepper motor. They are: 1) Universal stepper motor 2) Unipolar stepper motor 3) Bipolar motor

15  A universal stepper motor has 8 connections, a unipolar stepper motor has 6 connections and bipolar stepper motor has 4 connections.  The bipolar motor can be configured for bipolar mode only.  The unipolar motor can be configured as unipolar or bipolar mode.  And universal stepper motor can be used in any of the three modes.

16 AVR Interfacing to Stepper Motor  The four leads of the stator winding are controlled by port D bits PD0-PD3. The AVR doesn’t have sufficient current to drive the stepper motor windings. Hence, a driver like ULN2003 is required to energize the stator.

17 Assembly program for stepper motor Interfacing LabelInstructionComments LDI R16,$5FInitialize stack OUT SPH,R16Pointer higher byte LDI R16,$08Initialize stack OUT SPL,R16Pointer low byte LDI R16,$FFPort D is OUT DDRD,R16Output port LDI R16,$66Load step sequence L2:OUT PORTD,R16PORTD=R16 LSR R16Shift right BRCC L1If carry≠1 skip next ORI R20,$08 L1:RCALL DELAY RJMP L2 DELAY:……RET


Download ppt "A PRESENTATION ON RELAY, OPTOISOLATOR AND STEPPER MOTOR INTERFACING WITH AVR Prepared By:- Katariya Prakash[130070110027] Kathiriya Shalin[130070110028]"

Similar presentations


Ads by Google