Eastern Mediterranean University PIR SENSOR for controlling stepper motor. by Falah Al Hassan Ammar T.Najeeb Supervisor: Reza Abrishambaf.

Slides:



Advertisements
Similar presentations
MICROPROCESSORS AND MICROCONTROLLERS
Advertisements

Applications of PICs Advantages/disadvantages Digital and analogue control Loops, sub-routines, scanning, counting and feedback Interrupts Problems with.
INPUT-OUTPUT ORGANIZATION
MC68HC11 System Overview. System block diagram (A8 version)
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.
Submitted by Adnan Hassoneh Asad Alsebaee Ayoub Qadoos Mutasem Essa Abed Alqader Salameh Supervised by Dr. Salameh Abd Alfattah.
ELECTRICAL. Circuits Outline Power Hub Microcontroller Sensor Inputs Motor Driver.
EUT 1040 Lecture 10: Programmable Logic Controllers.
1 EECS 373 Design of Microprocessor-Based Systems Student Presentations Tianhua Zheng and Jason Shintani Motor control November 27 th, 2012.
L.
Stepper Motors. Motors coils of conductive wire magnetic fields rotational motion –except for linear induction motor everywhere from the very large (LRT)
1 Color Discriminating Tracking System Lloyd Rochester Sam Duncan Ben Schulz Fernando Valentiner.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Coordinate Based Tracking System
Presented by:IQBAL HUSSAIN ELECTRONICS&COMMUNICATI0N Final year.
kashanu.ac.ir Microprocessors 10-1 IO Devices Stepper Motors DAC, ADC, PPI Lec note 10.
Damian Marks Rekha Vemuri Instructor: Dr. Wu Simple control system for a Stepper and DC motor using a tachometer and the HC11.
ASPPRATECH.
INPUT-OUTPUT ORGANIZATION
1 Motors & Motor Controllers ECE AC or DC Motors AC –Few robots use AC except in factories –Most of those that use AC first convert to DC DC –Dominates.
To control the movement of a manual wheelchair by means of human voice for paralyzed patients. AIM:
Introduction to Robotics Principles of Robotics. What is a robot? The word robot comes from the Czech word for forced labor, or serf. It was introduced.
Applied Control Systems Robotics & Robotic Control
M-QUBE surveillance system
PLC: Programmable Logical Controller
1  Actuators are used in order to produce mechanical movement in robots.
Programmable Robotic Painting Arm Presented by: Chincholkar Apoorv R. Joshi Sanket S. Gore Rigved B. Project Guide: Mr.M.D.Patil.
The 8253 Programmable Interval Timer
MOBILE OPERATING ROBOT ON EMBEDDED SYSTEM
ELECTRIC MOTORS An Introduction to DC and Stepper Motors.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
Instrumentation & Control Engg. Section Electrical Engineering Department Ahmedabad , Gujarat.
University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi
HL Sample Question Applied Control Systems Underlying Principles.
Applications of PPI Stepper Motors- D/A - A/D - Temperature Sensor.
SECURITY ALARM Done by RINKESH KURKURE.  This project serves as a detecting mechanism to indicate the presence of an object or person in undetected cases.
Servos The material presented is taken from a variety of sources including:
Stepper Motor Info and Sourcing Guichet, Chang Feb 20, 2013.
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
Presented by Sadhish Prabhu
Chapter Microcontroller
Submitted by:.  Project overview  Block diagram  Power supply  Microcontroller  MAX232 & DB9 Connector  Relay  Relay driver  Software requirements.
CONTENTS Objective Software &Hardware requirements Block diagram Mems technology Implementation Applications &Advantages Future scope Conclusion References.
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
INTRODUCTION TO ROBOTICS Part 3: Propulsion System Robotics and Automation Copyright © Texas Education Agency, All rights reserved. 1.
GROUP MEMBERS: SUMEET HOODA. RAJDEEP PATRE. DHIRAJ GAONKAR. LIVE HUMAN DETECTION USING WIRELESS REMOTE CONTROLLED ROBOT.
Project Description The Square D occupancy sensors use both ultrasonic and passive infrared technology (PIR) to detect occupancy in a room. This project.
Automatic Railway Gate Control System
DC motor principles Speed control Direction Stepper motor principles
Stepper Motor – Types, Advantages And Applications
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
BATCH MEMBERS R.ABHISHEK-08N41A0401 K.DHEERAJ REDDY-08N41A0412 S.RAJENDRA REDDY-08N41A0458 JYOTHISHMATHI COLLEGE OF ENGINEERING AND TECHNOLOGY,TURKAPALLY.
Mobile phone keypad sensed password entry for door opening.
Motors & Motor Controllers
Introduction to Motors, servos and steppers
Voice Controlled Robot by Cell Phone with Android App
A PRESENTATION ON EMBEDDED SYSTEM
Lecture 10: Programmable Logic Controllers
The 8051 Microcontroller architecture
Application Case Study Security Camera Controller
REGISTER TRANSFER LANGUAGE (RTL)
Atmega32 Architectural Overview
PC Mouse operated Electrical Load Control Using VB Application
UNIT – Microcontroller.
Stepper motor.
Automatic Railway Gate Control System
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Pulse Width Modulation (PWM) Motor Feedback - Shaft Encoder
AIM: To control the movement of a manual wheelchair by means of human voice for paralyzed patients.
PLC’s Are ... Similar to a Microcontroller: Microprocessor Based
Presentation transcript:

Eastern Mediterranean University PIR SENSOR for controlling stepper motor. by Falah Al Hassan Ammar T.Najeeb Supervisor: Reza Abrishambaf

Presentation Outline Introduction : PIR sensor and application and Specifications Microcontroller 8051 and code. Power supply circuit Stepper motor. Driver and indexer Project circuit. Conclusion. Presentation Outline

Introduction Block diagram 8051 MICROCONTROLLER MOTOR 1 MOTOR 2 REGULATED POWER SUPPLY PIR SENSOR UNIT

Introduction PIR sensor and application. Passive Infrared Sensors Burglar alarm / Security Motions activated lighting Lighting control systems Environmental control systems Specifications Power input: 3.6 ± 0.5 VDC Current drain: 10 uA Infrared sensor: Dual element, low noise, high sensitivity Detection range Ceiling: 5 m dia. at 2.4 m high, 25°C Wall: 10 m, 90° wide at 25°C

Microcontroller 8051 and code Optimized 8 bit CPU for control applications and processing capabilities. 64K Program Memory address space. 64K Data Memory address space. 128 bytes of on chip Data Memory. 32 Bi-directional and individually addressable I/O lines. Two 16 bit timer/counters. 6-source / 5-vector interrupt. On chip clock oscillator.

Code language and example Assembly or C language MOV A, R3 ; Move the value of R3 to accumulator ADD A, R4 ; add the value of R4 MOV R5, A ; Store the result in R5 MOV A, R1 ; Move the value of R1 to Acc ADD A, R2 ; add the value of R2 with A

Power supply circuit 5 v

Stepper motor A stepper motor is a brushless, synchronous electric motor that converts digital pulses into mechanical shaft rotation (movements) which are called steps Stepper Motor Advantages 1- The rotation angle of the motor is proportional to the input pulse. 2- The motor has full torque at standstill (if the windings are energized). 3- Precise positioning and repeatability of movement since good stepper motors have an accuracy of 3 to 5% of a step and this error is non-cumulative from one step to the next. 4- Excellent response to starting/stopping/reversing. 5- Very reliable since there are no contact brushes in the motor. Therefore the life of the step motor is simply dependant on the life of the bearing. There are three main types of stepper motors: 1.Permanent Magnet Stepper 2.Variable Reluctance Stepper 3.Hybrid Synchronous Stepper

How they work Hybrid Synchronous Stepper Examples :

Driver Technology Overview

Indexer Overview (8051) The indexer, or controller, provides step and direction outputs to the driver. Most applications require that the indexer manage other control functions as well, including acceleration, deceleration, steps per second and distance. The indexer can also interface to and control many other external signals. Communication to the indexer is through an RS- 232 serial port and in some cases an RS485 port. In either case, the indexer is capable of receiving high-level commands from a host computer and generating the necessary step and direction pulses to the driver. The indexer includes auxiliary I/O for monitoring inputs from external sources such as a Go, Jog, Home or Limit switch. It can also initiate other machine functions through the I/O output pins. Programmable Step Motor Indexer/Drive

Multi-Axis Controlis Control M any motion applications have more than one stepper motor to control. In such cases a multi-axis control system is available. A HUB 444 networking hub, for example, may have up to four stepper drives connected to it, with each drive connected to a separate stepper motor. The networking hub provides coordinated movement for applications requiring a high degree of synchronization, such as circular or linear interpolation. Multi-Axis Control ( multi step-motor control )

Stand alone operation In a stand-alone mode the indexer can operate independent of the host computer. Once downloaded to the non- volatile memory, motion programs can be initiated from various types of operator interfaces, such as a keypad or touch screen, or from a switch through the auxiliary I/O inputs. A stand-alone stepper motor control system is often packaged with a driver and power supply and optional encoder feedback for "closed loop" applications that require stall detection and exact motor position compensation.

The following C source shows how I drive the motor. This is a very simple loop that uses the delay library to pause for 20 ms between each pulse. The order to pulse the coils is stored in the step array. To cause the shaft to rotate, the coils must be pulsed as follows: Step 1 Step 2 Step 3 Step 4 Coil AONONOFFOFF Coil BOFFOFFONON Coil CONOFFOFFON Coil DOFFONONOFF In this code, I assume that the motor coils are connected to PORT B. /* * stepper.c * * Drive a stepper motor connected to port B * RB1: Coil 1 * RB2: Coil 2 * RB3: Coil 3 * RB4: Coil 4 * * Continually rotates motor */ char step[ ] = {5, 9, 10, 6}; void main(void) { char I ; set_bit(STATUS, RP0); /* select the register bank 1 */ set_tris_b(0); /* PORT B is all output */ clear_bit(STATUS, RP0); i = 0; while(1) { output_port_b(step[i]); delay_ms(20);

i++; if( i == 4) i = 0; } Example 2 - sweep back and forth Following on from the previous example, this code will rotate the motor back and forth 180 degrees each turn. /* * stepper2.c * * Drive a stepper motor connected to port B * * RB1: Coil 1 * RB2: Coil 2 * RB3: Coil 3 * RB4: Coil 4 * * Continually sweeps back and forth, rotating 180 deg each pass * */ #define DELAY 50 #define SWEEP 12 #define NUMSTEPS 4 char step[ ] = {5, 9, 10, 6}; char stepPos = 0; /* pulse the motor with the current coil setting * and then wait for delay mS */ void pulseMotor(char delay) { output_port_b(step[stepPos]); delay_ms(delay); } /* Advance the coil settings forward by one step * stepPos is left pointing to the *next* code to output to move forward */ void stepMotorForw(void) { stepPos++; if(stepPos == NUMSTEPS) stepPos = 0; }

/* Advance the motor backward by one step * stepPos is left pointing to the *next* code to output to move backward */ void stepMotorBack(void) { /* advance stepPos to before where we were */ /* do wrap around */ if(stepPos == 0) { stepPos = NUMSTEPS-1; } else { stepPos--; } void main(void) { char i; set_bit(STATUS, RP0); /* select the register bank 1 */ set_tris_b(0); /* PORT B is all output */ clear_bit(STATUS, RP0); while(1) { for(i=0; i < SWEEP; i++) { pulseMotor(DELAY); stepMotorForw(); } delay_s(3); for(i=0; i < SWEEP; i++) { stepMotorBack(); pulseMotor(DELAY); } delay_s(3); }

Below is an example of a program that performs half-stepping and can be used to drive a stepper motor. The code turns the motor a number of steps (100 half-steps) in one direction, and then turns the motor back the same number of steps in the opposite direction. One of the advantages of the code below is that it can be easily modified to keep track of a motor’s position. It also has the advantage of having the port states stored in sequential order in an array. Simply cycling through the states sequentially and placing the state values on port pins will cause a stepper motor to move. This is written in C. #define NUM_OF_STATES 8 // There are 8 different states in this particular example. #define DELAY_MAX 2000 //The maximum # of counts used to create a time delay. void main(void) { /*******************CREATE VARIABLES*******************/ int i; //Used in a for loop char state_array[NUM_OF_STATES] = {0x06, 0x02, 0x0A, 0x08, 0x09, 0x01, 0x05, 0x04}; int steps_to_move; char next_state; /********************SET UP PORT U********************/

DDRU = 0xFF; PTU = 0;//Init Port U by writing a value of zero to Port U. /******************************************************/ steps_to_move = 100;//Set the # of steps to move. An arbitrary positive # can be used. next_state = 0; PTU = state_array[next_state]; for(i = 0; i < DELAY_MAX; i++) { //Wait here for a while. } while (steps_to_move > 0) { if (next_state> (NUM_OF_STATES - 1))//If next_state is greater than the highest //available state, 7, then cycle back to 0 { next_state = 0; } PTU = state_array[next_state]; //Place new value in Port U. Rotation may be observed for(i = 0; i < DELAY_MAX; i++) { //Wait here for a while. } next_state++;//Increment next_state. Cycling though the states causes rotation //in one direction. Decrementing states causes opposite rotation.

steps_to_move--;//Subtract 1 from the total # of steps remaining to be moved. } //The following code rotates the motor back in the opposite direction. steps_to_move = 100; while (steps_to_move> 0) { if (next_state< 0) { next_state = (NUM_OF_STATES - 1); } PTU = state_array[next_state]; for(i = 0; i < DELAY_MAX; i++) { //Wait here for a while. next_state--; } steps_to_move--; } } //End of Main

Project Circuit Project Circuit

CONCLUSION PIR sensor is used internally to excellent performance infrared sensor for use in robot. And it is also used for alarm burglar systems, visitor presence monitoring, light switches. These compact, easy to use sensors can be easily implemented in the design.

REFERENCES ookbook/nightlight/index.htm pt.com/circuitos/en/pics/87-motion- detector.html sensor.html