Lecture 9 Uli Raich UCC semester 2017/2018

Slides:



Advertisements
Similar presentations
Induction motor Course no: EE 3107 Md. Nur Kutubul Alam Lecturer
Advertisements

Electromagnetism. Electromagnet Wrapping an iron core with wire and sending a current through the wire creates a temporary magnet called an electromagnet.
WRITTEN POLE TECHNOLOGY
Driver for Improving the Positioning Accuracy of Step Motors Eugen Ioan GERGELY, Alexandru GACSÁDI, Zoltán Tamás NAGY, Laura COROIU, Helga SILAGHI, Viorica.
L.
Aliasgar Kutiyanawala1 Stepper Motors – An Overview Aliasgar Kutiyanawala Utah State University.
Stepper Motors. Motors coils of conductive wire magnetic fields rotational motion –except for linear induction motor everywhere from the very large (LRT)
Stepper Motors A stepper motor is a “pulse-driven” motor that changes the angular position of the rotor in “steps” Define –β = the step angle (per input.
12.5 The Motor Principle When English physicist Michael Faraday saw that an electric current in a wire caused a compass needle to move, he was curious.
Stepper Motors A stepper motor is a “pulse-driven” motor that changes the angular position of the rotor in “steps” Define –β = the step angle (per input.
1 Stepper Motors. 2 Click once to show video 3 HOW CAN WE INCREASE THE RESOLUTION, OR STEPS, OF A MOTOR? 1.Increase the number of stationary electro.
Electric Motors. Current in a wire Creates its own magnetic field Interacts with another field Force on the current carrying wire Rotational motion.
To return to the chapter summary click Escape or close this document. gpscience.com Image Bank Foldables Video Clips and Animations Standardized Test Practice.
ENERGY CONVERSION ONE (Course 25741) CHAPTER SIX …. Synchronous Motor Starting.
Forging new generations of engineers. DC Motors and Generators Instruction Plan.
ELECTRIC MOTORS An Introduction to DC and Stepper Motors.
University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi
Lecture 37Electro Mechanical System1 Chapter 19: Stepper Motors.
Syafruddin Hasan. STEPPER MOTOR Stepper motors are device that rotate by discrete incremental steps The primary advantage:  they can be controlled almost.
STEPPER MOTORS Name: Mr.R.Anandaraj Designation: Associate. Professor Department: Electrical and Electronics Engineering Subject code :EC 6252 Year: II.
Forging new generations of engineers. AC Motors Instructional Plan.
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.
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
DC motor principles Speed control Direction Stepper motor principles
Stepper Motor – Types, Advantages And Applications
A PRESENTATION ON RELAY, OPTOISOLATOR AND STEPPER MOTOR INTERFACING WITH AVR Prepared By:- Katariya Prakash[ ] Kathiriya Shalin[ ]
ARM CORTEX (STM32) BASED MOTOR SPEED CONTROL SUBMITTED BY EDGEFX TEAM.
Guided By :- Kachhadiya Niranj B. Parthiv R. Bhatt S S.T.B.S. COLLEGE OF DIPLOMA ENGINEERING, SURAT.
Engineering Notebook - Part 4 Tumbler Research Section Overview of Build Lesson 1 Basic Vocabulary Motors / Batteries Name: Per #:
Introduction to Motors, servos and steppers
ARDUINO BASED UNDERGROUND CABLE FAULT DETECTION
DC Motors DC Motors are widely used in robotics because of their small size and high energy output. Key characteristics of DC motors include: 1. High Speed.
MICROCONTROLLER AND INTERFACING
Interfacing circuit of Unipolar Stepper with 8051
Outline Introduction to digital-to-analog converter (DAC)
UP AND DOWN CONTROLLED SPEED OF DC MOTOR IN EMBEDDED SYSTEM
Arduino Based Industrial appliances control system by decoding dual tone multi frequency signals on GSM / CDMA network. Submitted by:
ARDUINO BASED AUTOMATIC TEMPERATURE BASED FAN SPEED CONTROLLER
FOUR QUADRANT DC MOTOR SPEED CONTROL WITHOUT MICROCONTROLLER
Stepper Motor A stepper motor or step motor or stepping motor is a brushless DC electric motor that divides a full rotation into a number of equal steps.
DC Motors Types: Continuous Rotation Servo (Remote Control)
Arduino BASED RFID Device Access
PC Mouse operated Electrical Load Control Using VB Application
Stepper Motors – An Overview
ARDUINO FOUR QUADRANT DC MOTOR CONTROL
AC and DC motors.
AC generators.
The 8085 Microprocessor Architecture
Stepper motor.
ARDUINO DC MOTR SPEED CTL
DHT11 Temperature and Humidity Measurement
PWM BASED SPEED CONTROL FOR DC MOTOR
FOUR QUADRANT DC MOTOR CONTROL WITHOUT MICROCONTROLLER
Unit – V Single phase Induction motors and Special machines
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
TRIODE TUBES.
Internet-of-Things (IoT)
Interfacing Memory Interfacing.
Simulation things to note…
Output Relay, Optoisolator, and Stepper motor interfacing with AVR
DC Motors The stator is the stationary outside part of a motor. The rotor is the inner part which rotates. Just as the rotor reaches alignment, the brushes.
Stepper Motors By Brian Tomiuk, Jack Good, Matthew Edwards, Isaac Snellgrove November 14th, 2018.
UNIT-8 INVERTERS 11/27/2018.
Simulation things to note…
Stepper Motors A stepper motor is a “pulse-driven” motor that changes the angular position of the rotor in “steps” Define β = the step angle (per input.
CSCI1600: Embedded and Real Time Software
The 8085 Microprocessor Architecture
Figure PIC18 Connection to Relay
CSCI1600: Embedded and Real Time Software
-Shweta Dubey.
Presentation transcript:

Lecture 9 Uli Raich UCC semester 2017/2018 Stepping Motors Lecture 9 Uli Raich UCC semester 2017/2018

The 27BJY-48 stepper motor an its ULN-2803 driver module

Stepping motors versus DC motors While DC motors simply spin when they are powered, stepping motors can be moved in defined steps and thus positioned very precisely. They contain 2 coils which can be powered in positive or negative direction making the current flow in normal or reverse direction and thus creating magnetic fields of opposite polarity The rotor has a series of magnets (16 in case of the 28BYJ-48 which we are using) with alternating opposite polarization. A north pole followed by a south pole followed by a north pole and so on. The motor base has 2*16 teeth which can be polarized as north or south poles depending on the direction of the coil current Here is the 28BJJ-48 data sheet

The driver The maximum current that a GPIO pin on the Raspberry Pi can deliver is 60 mA which is insufficient to power the motor coils. We therefore need a driver circuit (Darlington stage) to amplify this current. In our case we use the ULN-2803 chip The little PCB has 4 LEDs on it to show which of the 2 coils is powered and in which direction. This is very useful to demonstrate which signals are sent to the motor and it illustrates nicely the functioning of the motor.

Connecting the Driver to the Motor As we can see from the connections that when powering the pink line the coil current is flowing in one direction while when powering the orange line it is flowing in the opposite direction

Movement Single Phase Forward Coil 1 Coil 2 Rotor North Pole

Signal Table for Single Phase Forward We have seen in the last slide how we have to power the coils to make the stepping motor move by 1 cycle, which is 4 steps in case of Single Phase Forward stepping How does this translate into a program? We connect the 4 phases (coil 1 forward, coil 2 backward, coil 1 backward, coil 2 forward) to 4 GPIO pins on the Raspberry Pi cobbler Then we create the following signal table, which is a 2-dimensional array of booleans: Step 1 Step 2 Step 3 Step 4 In 1 coil 1 + 1 In 2 Coil 2 - In 3 Coil 1 - In 4 Coil 2 +

Other modes of operation Single Step forward (and backward) works fine but we can do better. Up to now we have always powered only one coil at a time. It is however possible to power both coils at the same time. This will draw of course more current but the motor will get a higher torque and can therefore handle bigger loads

Movement Double Phase Forward Coil 1 Coil 2 Rotor North Pole

Double Step Forward Table Of course our signal table must change correspondingly, our program to send out the signals for one full cycle stays the same however. Step 1 Step 2 Step 3 Step 4 In 1 coil 1 + 1 In 2 Coil 2 - In 3 Coil 1 - In 4 Coil 2 +

Programming double step forward mode For this, nothing much is to be said: We change the table, but since the program is independent from the contents of the stepping table, the code stays strictly the same

Position of rotor in doubleStepForward mode An important point to note is that the rotor moves half a step further than in single StepForward because its north pole is now attracted by the top and the bottom south poles. By first powering only the upper coil, then powering both coils then powering again only one pole of the lower coil it should be possible to move the motor by half steps only and by doing so increase its resolution. This is what we call half step mode and it is a combination of single and double step forward modes. The torque of the motor is less than in double step forward and the speed is only about half because now we need 8 steps for a full cycle.

Movement Half Step Forward Coil 1 Coil 2 North Pole

Half Step Forward Table In 1 coil 1 + 1 In 2 Coil 2 - In 3 Coil 1 - In 4 Coil 2 +

Programming Half Step Mode Again, apart from the fact that we must now pass through a table of 8 entries instead of 4 the program does not change. If we use the signature of all bits being zero as end of table indicator then no change at all is required.

The pigpio library Up to now we always used wiringPi to access our GPIO pins. I explained in the first lecture on the Raspberry Pi that there are 2 independent libraries available: wiringPi wigpio Why would we be interested to use a different library?

Advantages of pigpio The pigpio library comes in 2 versions: The standard one where calls to the library code results in direct access to the hardware The daemon version where first a daemon (pigpiod) is started and then the hardware access is only made in this daemon

Accessing the daemon The deamon is started once before we make any hardware access: sudo pigpiod After this all hardware access can be make by a normal user The program communicates with the deamon through library calls which connect to the daemon through pipes (when running on the Raspberry Pi) or through sockets when running on a remote system like our Ubuntu PC There is a library version that runs on the PC We can write C programs on the PC with hardware access to our devices on the bread board through pigpio calls to the PC version of the library which communicates with the pigpio daemon on the Raspberry Pi

Documentation of pigpio The WEB page of pigpio can be found here

Types of functions in pigpio Going through all the function in pigpio during the lecture is impossible. I have not used the all neither! There are functions to Initialize the library and close it Control gpio lines and read from or write to them Get a call-back when a gpio state changes Access routines to the I2C bus Access routines to the SPI interface PWM functions Functions for use of a serial device

Features of pigpio

This is how to use the library Please convert this to what will be required in your source code.

Initializing pigpio You must include #include <pigpiod_if2.h> … and the you can happily use pigpio functions

Sending the pulses to the hardware Now all we have to do is to go through this table and, for each step, send a high level to the GPIO pin to which we connected the coils.

Going through one step cycle

Reading command line arguments You say: This we have seen before and you are right. However, some commands use very complex command line arguments and the system provides a parser for it. Have a look at getopt_long, which helps you in figuring out what the used wants. The stepper motor program had these options:

Using getopt_long First we include <getopt.h> Then we create a table of options (last entry must be all zeros:

Call getopt and interpret

Write the stepper program With this information you should be able to write a program where the user can Select the movement mode Select the movement speed Select if you turn clockwise or counter clock wise Select how have to move of to which angle