ENGR 6806 – Motor Control Prepared By: Rob Collett September 15, 2004 Office: EN2074.

Slides:



Advertisements
Similar presentations
MOTION CONTROL ECE 105 Industrial Electronics Engr. Jeffrey T. Dellosa College of Engineering and Information Technology Caraga State University Ampayon,
Advertisements

Encoders, Motors, Power, Mini Project #1 10/24/2014.
Engineers in Training Day 2 Developed by Shodor and Michael Woody.
Microprocessor Motor Control Spring Introduction  Stamp projects Robots  Sensors  Motor control  Logic Rocketry  Reading acceleration (“g”
Fair Use Building and Research Labs Presents
Electricity and Circuits
EML 2023 – Motor Control Lecture 4 – DAQ and Motor Controller.
ELECTRICAL. Circuits Outline Power Hub Microcontroller Sensor Inputs Motor Driver.
L.
Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics.
September 2005Allegro Confidential FIRST PresentationJanuary 2007 Allegro’s ATS642 Hall Effect Sensor “A great way to measure the speed and position of.
Arduino. Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It's an open-source.
Secret Door Knock Detector
SENIOR DESIGN 10/16.
1 Announcements l Bring motors to lab this week. l Bring eight 1N4001 diodes to lab per team. Get them at the Scientific Supply Store (2 nd Floor Sciences.
DC Motor Drives Dr. Ahmad Harb.
Embedded Programming and Robotics Lesson 1 Basic Electricity and Electronics Transistor Basics Lesson 1 -- Basic Electricity1.
Micromouse Meeting #3 Lecture #2 Power Motors Encoders.
Pulse Width Modulation (PWM) LED Dimmer Circuit
Pulse Width Modulation (PWM) LED Dimmer Circuit
Institute Of Applied Technology ATE 1012 Grade 10 Eng. Rose Hasan.
Project: sun tracker Idea: –Use two photodiodes to detect where the sun is –Control a motor to turn toward the sun –When sun is “half-way” between PD,
Electricity, Electronics And Ham Radio “Kopertroniks” By Nick Guydosh 4/12/07.
Switching rules Either A+ or A– is always closed, but never at the same time * Either B+ or B– is always closed, but never at the same time * *same time.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 2P. 1Winter Quarter Digital Electronics Lab 2.
Microcontroller Hands-on Workshop #3 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 7, 2009.
September, 2007ENGR Low-Level Robot Control Mechatronics: Motors, sensors & embedded controls.
Gadget Lab Lecture 4: Powering your circuit… Components… Then it’s Project Time Dr. Cindy Harnett ECE Dept., U of Louisville Spring 2008.
Electronics Section 2 Robotics, Electronics, and Fluid Power.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
TS 1.1 Basic Digital Troubleshooting 1 ©Paul Godin Updated August 2013 gmail.com.
Frequently Unasked Questions Loyola Blakefield Introduction to Engineering March 8, 2012 Bob Rassa, Raytheon Space & Airborne Systems
By: Khalid Hawari Muath Nijim Thaer shaikh Ibrahim Supervisor: Dr. Jamal Kharousheh Dr. Nasser Hamad 27 December 2010.
PWM Circuit Based on the 555 Timer. Introduction In applications LED Brightness Control we may want to vary voltage given to it. Most often we use a variable.
Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Electrical Actuation System Lecture 9 (Chapter 9).
DC Motor Control The material presented is taken from a variety of sources including: ponents/inductor001.html#howworks,
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
1 Electrical Fundamentals We need some understanding of electrical fundamentals to do the lab exercises. Electric Circuit Consists of: –Power Source: Battery,
Data Acquisition Device (DAQ) A DAQ is a cool little device that allows you to interface hardware to a computer. Here is what we will do:  Create a square.
SMV Electric Tutorials
BLDC Motor Speed Control with RPM Display. Introduction BLDC Motor Speed Control with RPM Display  The main objective of this.
Solar Powered LED Blinds Group 28: Austin Estes and Kerr Oliva TA: Katherine O’Kane.
DC motor principles Speed control Direction Stepper motor principles
How to Build a Digital Physical System - Lab Lecture 2.
Class Parts List Breadboard 1 Wire kit 1 Red LEDs 3 Green LEDs 3 Yellow LEDs 1 Photoresistor 1 xPiezo sensor 1 Button 3 Slide button, switch 1 Reed switch.
Power Distribution Copyright F. Canavero, R. Fantino Licensed to HDT - High Design Technology.
Introduction to Motors, servos and steppers
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Logic Gates Binary Day 3 PEOPLE 2016.
INDUSTRIAL ELECTRONICS/ELECTRICITY
Fair Use Building and Research Labs Presents
Administrative stuff Turn in your HW #3!
Pulse Width Modulation (PWM) Motor Feedback - Shaft Encoder
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
How to avoid catching things on fire.
Unit IV 555 Timer.
Introduction to H-Bridge
Basic Electronics Part Two: Electronic Components.
Fair Use Building and Research Labs Presents
Secret Door Knock Detector
Digital Fundamentals Floyd Chapter 1 Tenth Edition
Electricity and Circuits
UNIT 11: RC-SERVOMOTOR CONTROL
Robotics System Lecture 11_12: DC Motor
Integrated Circuits Computer Signals
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Constant Current Power Supplies for LEDs
2019 Investing Now Summer Program
Presentation transcript:

ENGR 6806 – Motor Control Prepared By: Rob Collett September 15, Office: EN2074

Presentation Outline Introduction Motor Basics H-Bridges Using The PIC for Motor Control Motor Encoders Grounding Conclusions and Recommendations

1.0 Introduction What Not to Think… “Our team already has a motor guy… this should be good time to take a nap.” “Some of this stuff is theory… why is this guy wasting my time with that?” “I don’t have a clue what he’s talking about.”

2.0Motor Basics Pop Quiz: A motor is like a(n)… A) Resistor B) Capacitor C) Inductor D) Crazy space-aged device we aren’t really meant to understand

The Answer Is…(Not D) C) An Inductor!!… sort of…

The Problem: What’s wrong with the circuit below?

Well, think about it… An inductor is a short circuit at DC! This means we’ll have an infinite current! Infinite current = Infinite Speed!!

Get to the Point… A motor is like a REAL inductor… not an IDEAL inductor. It has resistance!

Remember this Waveform! Note how the current levels off. This will provide a steady speed.

3.0H-Bridge Basics H-Bridges are used to control the speed and direction of a motor. They control the motor using Power Electronics… transistors to be precise. Remember transistors for Term 4?

For $1,000,000: What’s a Transistor? Transistors are electronic devices that can act as either: Amplifiers Switches We’ll be using them as switches that control the flow of power to the motor.

A Closer Look at Transistors Note how Digital Logic at the Base controls Power Flow in the other two ports

Controlling Motor Speed By turning our transistors (switches) ON and OFF really fast, we change the average voltage seen by the motor. This technique is called Pulse-Width Modulation (PWM).

PWM Basics The higher the voltage seen by the motor, the higher the speed. We’ll manipulate the PWM Duty Cycle.

The Problem with PWM… Remember our little talk about motors? Remember that motors are like inductors? Remember this waveform?

What’s the Problem? If we switch our transistors too quickly, the current won’t have enough time to increase.

The Solution: The period (not to be confused with duty cycle) of our PWM needs to be long enough for the current to reach an acceptable level:

Direction Control using the H-Bridge The H-Bridge Chip has a “Direction Pin” that can be set using digital logic High/Low This pin enables/disables flow through the transistors

The H-Bridge Chip The H-Bridge we’re using (the LMD18200) has 11 pins Some pins involve logic signals, others involve power signals, others won’t be connected Power signals = No breadboard No breadboard = Soldering

H-Bridge Pins Pin 1: Bootstrap 1 (10nF cap to Pin 2) Pin 11: Bootstrap 2 (10nF cap to Pin 10) Pin 2: Output to Motor (M+) Pin 3: Direction Input (From PIC) Pin 5: PWM Input (From PIC) Pin 6: Power Supply (Vs) Pin 7: Ground Pin 10: Output to Motor (M-) Pin 4: Brake (Not Used – Connect to GND) Pin 8: Current Sense (Not connected) Pin 9: Thermal Flag (Not connected)

H-Bridge Wiring (From the Lab Handout) But wait… There’s something missing!

Another Problem: We’re dealing with a high voltages and currents that are being switched at high frequencies. This is going to cause spiking in our power supply… not to mention a whack of noise. Surely there must be some kind of component that prevents instantaneous changes in voltage.

Of Course! Capacitors! Capacitors across the H-Bridge power supply will prevent spiking. Two parallel capacitors are recommended: 200uF 1uf (Be sure to check voltage ratings) Why two capacitors?

4.0Using The PIC for Motor Control We’ll use the PIC to generate digital logic signals to control our H-Bridge transistors So we’ll need A digital high/low for direction output_high(PIN_A0); A PWM for speed control

Setting the PWM Signal This can be tough because we need to use a timer to set the PWM frequency. We also need to figure out how to control the PWM duty cycle. This is going to take some programming!

Setting up a PWM Signal Step 1: Tell the PIC we want a PWM signal: setup_ccp1(CCP_PWM); Step 2: The PIC uses a timer called “Timer2” to control the PWM frequency. We need to set this frequency: setup_timer_2(T2_DIV_BY_X, Y, Z); But what are X, Y, and Z? - See handout for example.

Setting up a PWM Signal Step 3: We said before that setting the PWM Duty Cycle will set the speed of the motor. So, to start the motor, we could say: set_pwm1_duty(#); (0 < # < 100) To stop the motor, we could say: set_pwm1_duty(0);

5.0Motor Encoders Motor Encoders allow for us to track how far our robot has travelled. The encoders count wheel revolutions using optical sensors. These sensors count notches on the Drive Shaft of the motor.

Some Encoder Details… There are 512 notches on the drive shaft. There is a 5.9:1 gear ratio. (This means the drive shaft spins 5.9x faster than the wheel.) The top wheel speed is around 800rpm (using a 30V supply).

Some Electrical Details… The encoders we’ll be using have 4 wires: 5V Power Supply (Red) GND (Black) Channel A a.k.a. CHA (Blue) Channel B a.k.a. CHB (Yellow) Channels A&B will give us the signals to count wheel revolutions.

How Encoders Work CHA and CHB are actually square waves separated by 90 0.

Counting Encoder Cycles So, if we know the current encoder state and the last encoder state, we can tell which direction we’re going. By counting the number of times we’ve changed states, we can tell how far we’ve gone. Just remember that there are 4 encoder states per notch!

6.0 Grounding Advice What is “Ground”? What is “Ground” on a Robot? Power Supply Grounds Batteries and Grounding Use a Grounding Panel! Attach your Panel to your Robot!!

Conclusions and Recommendations Help is here if you need it. EN 2074 “My robot isn’t working perfectly.” Don’t let your robot take years off your life! Good Luck!