By Tony Hoff ECE 4220 – Real Time Embedded Computing University of Missouri - Columbia Course Instructor: Dr. Guiherme DeSouza.

Slides:



Advertisements
Similar presentations
Sensing and Control.
Advertisements

MOTION CONTROL ECE 105 Industrial Electronics Engr. Jeffrey T. Dellosa College of Engineering and Information Technology Caraga State University Ampayon,
Basic DC Motor Circuits
Proximity Sensor Theremin Khoa Nguyen Walter Hudson Dennis Gilbert G. Hewage Thushara.
ACCELEROMETER-BASED, GRIP-FREE CONTROLLER Tyler (You-Chi) Le ECE4220 Fall 2011 Dr. DeSouza December 5 th, 2011.
Lecture 9: D/A and A/D Converters
EET 2351 Lecture 2 Professor: Dr. Miguel Alonso Jr.
1. Output signal alternates between on and off within specified period Controls power received by a device The voltage seen by the load is directly proportional.
DC Choppers 1 Prof. T.K. Anantha Kumar, E&E Dept., MSRIT
Motor Control of an Oscillating Pendulum Nick Myers and Chirag Patel March 9, 2004 Advised by: Dr. James Irwin and Mr. Jose Sanchez Bradley University.
IO Controller Module Arbitrates IO from the CCP Physically separable from CCP –Can be used as independent data logger or used in future projects. Implemented.
Department of Electrical Engineering Southern Taiwan University of Science and Technology Robot and Servo Drive Lab. 2015/7/2 Digital Control Strategy.
Presented By: Er. Ram Singh (Asstt. Prof.) Deptt. Of EE
Copyright by UNIT III DC Choppers 4/17/2017 Copyright by
DC Motor Control  mouse EE 496 Advisor: Dr. Tep Dobry.
Spectrum Analyzer Ray Mathes, Nirav Patel,
Digital I/O Connecting to the Outside World
Introduction.
Single Phase Induction Motor Adjustable Speed Control Using DSP and Micro-Controller Jianming Yao ECE734 Project Fall 2000.
Micromouse Meeting #3 Lecture #2 Power Motors Encoders.
Chapter 4 Digital Transmission
Voice Controlled Helicopter Team Members: Jonathan Lam, Mian Zhu.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
In this PPT, all the materials covered up for the PIC microcontroller set-up would be studied. Preliminary skills: Knowing of basic C grammar and basic.
Servo Motors # A servo is a motor that you can position at any angle very accurately. # Servos have a limited servo range; most servos have a range of.
T IMERS - 2. O UTPUT U NIT Each capture/compare block contains an output unit. The output unit is used to generate output signals such as PWM signals.
ET3380 Principles and Methods of Electric Power Conversion David Morrisson MS,MBA Week 1.
Lecture 1 Signals in the Time and Frequency Domains
ENGR 6806 – Motor Control Prepared By: Rob Collett September 15, Office: EN2074.
Ryan Courtney Senior Design II Advisor: Junkun Ma.
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
Data Acquisition Systems
Chapter 5: Local Asynchronous Communication 1. Bit-wise data transmission 2. Asynchronous communication 3. Sending bits with electric current 4. Standard.
1 Lab 5: Controls and feedback. 2 Lab 5: Control and Feedback This embedded system uses the Photo sensor to detect the light intensity of the environment.
By: Khalid Hawari Muath Nijim Thaer shaikh Ibrahim Supervisor: Dr. Jamal Kharousheh Dr. Nasser Hamad 27 December 2010.
STEPPER MOTORS Name: Mr.R.Anandaraj Designation: Associate. Professor Department: Electrical and Electronics Engineering Subject code :EC 6252 Year: II.
By: Eric Backman Advisor: Dr. Malinowski.  Introduction  Goals  Project Overview and Changes  Work Completed  Updated Schedule.
V. Rouillard  Introduction to measurement and statistical analysis DIGITAL SAMPLING - DIGITISATION Digital sampling is mainly used in data acquisition.
Logic Analyzer ECE-4220 Real-Time Embedded Systems Final Project Dallas Fletchall.
1 System Clock and Clock Synchronization.. System Clock Background Although modern computers are quite fast and getting faster all the time, they still.
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
Control systems KON-C2004 Mechatronics Basics Tapio Lantela, Nov 5th, 2015.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class3/Lab 2.
Digital Control CSE 421.
Precision Robotics R. M. Satterthwaite R. Shockency Advised By: Dr. B. D. Huggins Mr. C. Mattus.
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.
1 4-Integrating Peripherals in Embedded Systems (cont.)
ECE 4330 – Final Project By: John Litzenberger.  A IC temperature sensor (DS1620)  Reads through ADC (pin.0 Port A)  Feedback control for extreme conditions.
1 4-Integrating Peripherals in Embedded Systems (cont.)
Closed Loop Temperature Control Circuit with LCD Display Mike Wooldridge ECE 4330 Embedded Systems.
BLDC Motor Speed Control with RPM Display. Introduction BLDC Motor Speed Control with RPM Display  The main objective of this.
Group #42: Weipeng Dang William Tadekawa Rahul Talari.
Servo Motor Control Using Arduino Instructor: Dr Matthew Khin Yi Kyaw.
Automatic Guitar Tuner Group #10 Dariusz Prokopczak & Stephan Erickson ECE 445 Sr. Design December 9, 2014.
Wireless Bluetooth Controller For DC Motor. Introduction Wireless becoming more and more available and widely used Bluetooth is one of the major players.
1 4-Integrating Peripherals in Embedded Systems (cont.)
ARM CORTEX (STM32) BASED MOTOR SPEED CONTROL SUBMITTED BY EDGEFX TEAM.
MECH 373 Instrumentation and Measurements
UNIT III DC Choppers.
Digital Control CSE 421.
Timers and Event Counters
Introduction to Servos
Microcontroller Applications
Pulse Width Modulation (PWM) Motor Feedback - Shaft Encoder
Auto-Control street lights
Completed Design Review
EECS 373: Design of Microprocessor-Based Systems
Data Acquisition (DAQ)
UNIT 11: RC-SERVOMOTOR CONTROL
Presentation transcript:

By Tony Hoff ECE 4220 – Real Time Embedded Computing University of Missouri - Columbia Course Instructor: Dr. Guiherme DeSouza

Introduction My group capstone project involved using an electric motor vehicle (viewed right) Some group members had issues implementing the motor control. This project aims to implement the motor control in RT Project Goals: 1. Implement PWM to control power to both motors in real time 2. Read encoders to estimate the speed of both motors in real time

Hardware and Signal Requirements

Motor Speed Calculation The optical encoder switches on when nothing obstructs its light path When a fin obstructs the light path it switches off There are 8 gaps on the encoder and the axis of the encoder is 5 times smaller than the axis of the wheel So for every complete wheel rotation, the encoder switches from high to low 40 times Encoder

Pulse Width Modulation The average value of voltage fed to the load is controlled by turning the switch between supply and load on and off at a fast pace. The longer the switch is on compared to the off periods, the higher the power supplied to the load

Alternative Implementations Using Hardware for PWM Advantages: Conserves CPU processing time Simplifies software Disadvantages: Requires the use of more DIO pins Requires additional components Difficult to adjust and troubleshoot Reading the ADC using usleep() instead of RT Advantages: Simplifies coding the software Disadvantages: Non-deterministic speed readings could be significantly less accurate

Alternative Implementations (Continued) Using A single thread Advantages Simplifies coding Requires no inter-process communication Disadvantages Code becomes less modular and therefore more difficult to change and trouble shoot Can not read ADC, send power, and except commands in parallel

Proposed Implementation

PWM Thread Each motor has an integer power level that ranges from -100 to 100. The power sent to the motors updates once every 100 ms A positive power sets the FWD pin and a negative power sets the REV pin for each motor The absolute value of the power determines the duty cycle for each pin Two semaphores were used to control the writes and reads between the PWM thread and the main thread Another semaphore was used to signal the thread to exit. This way the motors would always be turned off at the end

ADC Reading Thread Reads two channels of the ADC. The maximum speed of the motors with no load is approximately 475 Hz so a 1.0 kHz sample rate was chosen The count of transitions for the last 200 ms are stored in a buffer. So the accuracy of the encoder can only be +/- 5 Hz The frequency can be determined by the number of counts in the buffer Two semaphores were used to control the writes and reads between the ADC thread and the main thread Another semaphore was used to signal the thread to exit

Main Thread Calculates the power sent to each motor based on the difference between the set speed and the measured speed Reads named pipes for data sent from the user command process and any other processes Uses semaphores to ensure proper use of shared memory

Motor Control Video - 1

Motor Control Video - 2

Right Measured Speed vs. Power Average Speed for t > 4.0 sec = dm/s

Left Measured Speed vs. Power Average Speed for 2.3 < t < 14.7 sec = dm/s

Conclusion I accomplished both my goals of implementing PWM to control power and to read encoders to estimate the speed in real time Possible Future Improvements: A proportional–integral–derivative controller (PID controller) could be used to get a better calculation of the power sent to the motors Measuring the speed using interrputs would be more accurate

Questions ?