INTERFACING HARDWARE WITH MICROCONTROLLER GUIDED BY: Prof. ASIF SIR 1. AKSHAY KIRAN 2. DEEP PARIKH 3. JIGAR PATEL 4. TILAK PATEL 130010111002,05,D2D06,09.

Slides:



Advertisements
Similar presentations
MICROPROCESSORS AND MICROCONTROLLERS
Advertisements

Robotics Club, Snt Council2 The 3 Schools of Robotics: Mechanical Design – Types of motors – Material selection –
Indian Institute of Technology Hyderabad ROBOTICS LINE FOLLOWER HARI KISHAN TANDEY – ES12B1008 DILIP KONDAPARTHI – ES12B1010 SAI KARTIK – CE12B1015.
SUN TRACKING SOLAR PANEL. Introduction The main objective of this project is to track the sun and rotate the solar panel accordingly, to receive sunlight.
MICRO-CONTROLLER: A microcontroller is the brain of the robot: These are: 1. Integrated Circuits (ICs) 2. Programmable.
MAKING OF MICROMOUSE P.Raghavendra Prasad Final Yr EEE.
L.
Programming the ATmega16
Stepper Motors. Motors coils of conductive wire magnetic fields rotational motion –except for linear induction motor everywhere from the very large (LRT)
Sensors And Micro-Controllers
Stepper Motors Jason Wells. Background Brushless, synchronous electric motor Brushless, synchronous electric motor No feedback necessary (open loop) No.
Essentials of motors and motor driver
ECGR-6185 Advanced Embedded Systems University Of North Carolina at Charlotte A. Srinivas Reddy Stepper/Servo/DC Motors.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
SENIOR DESIGN 10/3.
Microprocessor Block Diagram
AVR Microcontrollers.
Objectives How Microcontroller works
Making of Micromouse Amit Raj 2nd Yr ECE
I/O Ports CS-280 Dr. Mark L. Hornick 1. CS-280 Dr. Mark L. Hornick 2 Ports are channels from the CPU to external hardware and software Atmega32 has: 4.
ROBONICS’ 15 Powered By:. An embedded system is some combination of computer hardware and software, either fixed in capability or programmable, that is.
بسمه تعالي AVR Microcontrollers. The ATmega8 Basic Features -1.
University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi
Motors & Motor Drivers ECE 450.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
MOTORS. Definition Of Motor That powered by electricity or internal combustion, that supplies motive power for a vehicle or for some other device. A device.
Presented by Sadhish Prabhu
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an introduction to the peripheral functions.
Chapter Microcontroller
Submitted by:.  Project overview  Block diagram  Power supply  Microcontroller  MAX232 & DB9 Connector  Relay  Relay driver  Software requirements.
Components of a typical full-featured microcontroller.
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
AVR Architecture Prepared By: Avdhesh Soni ( ) Sarthak Patel ( ) Akshay Parekh ( ) Fenil Sachla ( ) Guided.
Introduction to AVR Name : 1) Abhishek Yadav ) Prakash Giri ) Kheni Niral ) Bhadresh Langadiya Branch.
GROUP MEMBERS: SUMEET HOODA. RAJDEEP PATRE. DHIRAJ GAONKAR. LIVE HUMAN DETECTION USING WIRELESS REMOTE CONTROLLED ROBOT.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
DC motor principles Speed control Direction Stepper motor principles
1 Lab 4: D/A Converter Lab 4: D/A Converter This is a simple resistive network for a D/A converter Port 1, Port 0 are digital inputs ==> 00 (minimum),
WATER LEVEL INDICATOR AND AUTOMATIC MOTOR SWITCHING SYSTEM
SUBMITTED BY EDGEFX TEAM
One area where in which microprocessor and microcomputers have a major impact is industrial processor control systems. Process control involves first.
Components of Mechatronic Systems AUE 425 Week 2 Kerem ALTUN October 3, 2016.
USING TV REMOTE AS A CORDLESS MOUSE FOR THE COMPUTER
CORDLESS MOUSE FEATURES BY TV REMOTE USING PIC MICROCONTROLLER
ENERGY METER TO INDICATE BILLING IN RUPEES FOR LOAD WISE OR DAY WISE
Motors & Motor Controllers
Application Case Study Christmas Lights Controller
Arduino.
Introduction to Motors, servos and steppers
ARDUINO BASED UNDERGROUND CABLE FAULT DETECTION
RF Controlled Robotic Vehicle with Laser Beam Arrangement
Popular Microcontrollers and their Selection by Lachit Dutta
UP AND DOWN CONTROLLED SPEED OF DC MOTOR IN EMBEDDED SYSTEM
AVR ATMEGA 8 MICRO-CONTROLLER
PC Mouse operated Electrical Load Control Using VB Application
ABSTRACT The microcontroller receives the Infrared Signal from the TV remote, the code of which is identified by the IR receiver depending on which it.
THYRISTOR POWER CONTROL BY IR REMOTE
ARDUINO LINE FOLLOWER ROBOT
COMP2121: Microprocessors and Interfacing
SUBMITTED BY EDGEFX TEAM
PWM BASED SPEED CONTROL FOR DC MOTOR
The Arduino Microcontroller: Atmel AVR Atmega 328
MC3479P Stepper Motor and Stepper Motor IC
ARDUINO     What is an Arduino? Features 14 Digital I/O pins 6 Analogue inputs 6 PWM pins USB serial 16MHz Clock speed 32KB Flash memory 2KB SRAM.
Introduction to Microprocessors and Microcontrollers
Output Relay, Optoisolator, and Stepper motor interfacing with AVR
Lecturer: Reza Arjmandi Autumn 2015
8051 Micro Controller.
Presentation transcript:

INTERFACING HARDWARE WITH MICROCONTROLLER GUIDED BY: Prof. ASIF SIR 1. AKSHAY KIRAN 2. DEEP PARIKH 3. JIGAR PATEL 4. TILAK PATEL ,05,D2D06,09 EC 3 rd YEAR

. What is a Microcontroller ? A microcontroller (or MCU) is a computer-on-a-chip. It is a type of microprocessor emphasizing self- sufficiency and cost-effectiveness, in contrast to a general-purpose microprocessor (the kind used in a PC). The only difference between a microcontroller and a microprocessor is that a microprocessor has three parts - ALU, Control Unit and registers (like memory), while the microcontroller has additional elements like ROM, RAM etc.

. ATMEGA32/ATMEGA32L  High-performance, Low-power AVR 8-bit Microcontroller  Up to 16 MIPS Throughput at 16 MHz  32K Bytes of In-System Self-Programmable Flash  1024 Bytes EEPROM  2K Byte Internal SRAM  Two 8-bit Timer/Counters, One 16-bit Timer/Counter  In-System Programming by On-chip Boot Program  Four PWM Channels  8-channel, 10-bit ADC  Programmable Serial USART  Internal Calibrated RC Oscillator  External and Internal Interrupt Sources  Power-on Reset  32 Programmable I/O Lines

. ATMEGA32 Operating Voltage V Speed Grades 0 – 16 MHz

. Pin Diagram

c. C - CODECOMPILERHEX - CODE COMPUTER MICRO CONTROLLER

. Configuring PORT PINS Each PORT consists of three registers  DDRX (Data Direction Register)  PORTX  PINX Where X = A, B, C, D

. DDRX  The DDXn bit in the DDRx Register selects the direction of pin n.  If DDXn is written logic one, PXn is configured as an output pin.  If DDXn is written logic zero, PXn is configured as an input pin. Where n = 0,1, ,7 For Example If DDRA = 0x0F ( )  The Lower bytes of PORTA are configured as output pins  The Higher bytes of PORTA are configured as input pins

. PORTX When PORTXn is configured as Input Pin  Writing logic ONE to this pin, activates pull-up resistor.  Writing logic ZERO to this pin, deactivates pull-up resistor When PORTXn is configured as Output Pin  Writing logic ONE to this pin, drives the port pin HIGH  Writing logic ZERO to this pin, drives the port pin LOW

. PINX  PINXn is used to read the value of particular port pin  Independent of the setting of Data Direction bit DDRXn, the port pin can be read through the PINXn Register bit

. Interfacing with Microcontroller  LED  Switches  DC Motor  Sensors  Stepper Motor

INTERFACING LED.

. LED – Light Emitting Diode  Maximum potential drop across LED will be approximately 2V.  Maximum current tat can be allowed through am LED is approximately 30ma.  Resistor should be added in series with LED to limit the current through it.

. Calculating LED resistor value R = (Vs – V L )/I Vs = supply voltage V L = Voltage drop across LED ( around 2V) I = 15 to 30 ma

LED’s connected to 1. PORTA0 2.PORTB0

LED BLINK PROGRAM.

#ifndef F_CPU #define F_CPU UL // 16 MHz clock speed #endif #include #include int main(void) { DDRC = 0xFF; //Makes PORTC as Output while(1) //infinite loop { PORTC = 0xFF; //Turns ON All LEDs _delay_ms(1000); //1 second delay PORTC= 0x00; //Turns OFF All LEDs _delay_ms(1000); //1 second delay } }

INTERFACING DC MOTOR.

. DC Motor  DC Motors are small, inexpensive and powerful motors used widely.  These are widely used in robotics for their small size and high energy out.  A typical DC motor operates at speeds that are far too high speed to be useful, and torque that are far too low.  Gear reduction is the standard method by which a motor is made useful.  Gear’s reduce the speed of motor and increases the torque

. Choosing a DC Motor  DC Motor with Gear head  Operating voltage 12V  Speed Depends on our application Some available speeds in market  30 RPM  60 RPM  100 RPM  150 RPM  350 RPM  1000 RPM

. Drive basics of DC Motor Red wireBlack wireDirection of rotation Positive Negative Clock wise Negative PositiveAnti clock wise Logic Direction 1 0Clock 0 1Anti clock

. Direction Pulse to Clock wise A and C Anti Clock wise B and D Bi-Direction control of DC Motor H-Bridge Ckt using transistors for bidirectional driving of DC motor

. H-Bridges in IC’s to reduce the drive circuit complexity  The most commonly used H-Bridges are L293D and L298  L293D has maximum current rating of 600ma  L298 has maximum current rating of 2A  Both has 2 H-Bridges in them  These are designed to drive inductive loads such as relays, solenoids  Can be used to drive 2 DC motors or 1 stepper motor

DC MOTOR CODE. #ifndef F_CPU #define F_CPU UL // 16MHz clock speed #endif #include int main(void) { DDRC = 0xFF; //PORTB as Output while(1) { //Rotates Motor in Anticlockwise PORTC = 0x01; // _delay_ms(4000); //Stops Motor PORTC = 0x00; // _delay_ms(4000); //Rotates Motor in Clockwise PORTC = 0x02; // _delay_ms(4000); //Stops Motor PORTC = 0x03; // _delay_ms(4000); }

INTERFACING SWITCHES.

. Switches Active Low  When pressed shorts the corresponding pin to ground Active high  When pressed shorts the corresponding pin to Vcc

Active low Active high

. Sensors Commonly used sensors in the field of robotics are  IR Digital sensors  IR analog sensors

. IR Digital sensors Transmitter  IR led connected to 38KHz oscillator Receiver  TSOP1738 IR Analog sensors Transmitter  IR LED Receiver  IR Photodiode

. IR Analog sensor

. STEPPER MOTOR  STEPPER MOTOR is a brushless DC motor whose rotor rotates in discrete angular increments when its stator windings are energized in a programmed manner.  Rotation occurs because of magnetic interaction between rotor poles and poles of sequentially energized stator windings.  The rotor has no electrical windings, but has salient and/or magnetized poles.

. 4 – Lead stepper 5 – Lead stepper 6 – Lead stepper8 – Lead stepper

Full Step driving of Stepper Motor Full step wave drive

Full Step driving of Stepper Motor Full step 2 phases active

. Half Step driving of stepper motor

. Choosing a Stepper motor  12 V operating voltage  1.8 degree step  6 Lead  250 t0 500 ma of current or Coil resistance of 20 ohms to 40 ohms  Size and shape depends on application  In most of the robotics cube shaped motors are preferred with frame size of 3.9 to 4 cm

. Commonly used IC’s for driving Stepper motor  ULN2803 It has 8 channels It channel has maximum current rating of 500ma can be used to drive 2 unipolar stepper motors  L293d  L297 & L298

. ULN2803

. A B C D Bi – Polar driving of Stepper Motor