Designing with a Microcontroller (v6)

Size: px
Start display at page:

Download "Designing with a Microcontroller (v6)"

Transcription

1 Designing with a Microcontroller (v6) Safety: In this lab, voltages are less than 15 volts and this is not normally dangerous to humans. However, you should assemble or modify a circuit when power is disconnected and don t touch a live circuit if you have a cut or break in the skin. Objective: This lab provides an opportunity to learn more about the use of a microcontroller (MCU) and its interfacing to other external devices. The lab has two parts. Part I of lab uses the PIC16F886 microcontroller to read an analog voltage across a potentiometer and display the measured voltage on two 7- segment displays. Assembly language will be used to program the 16F886 MCU. Part II builds on the first part and the student is to design a microcontroller solution to solve one of several tasks. Preparation: You should already be familiar with the architecture and instruction set of the 16F886. Study the 16F886 data sheet and refer to EE331 course notes for more information. To facilitate the lab experiment, sample codes to initialize the analog to digital converter (ADC), 7-segment display, and PWM module have been posted on the course website. Study the connection diagram given in Fig 2. You should determine the missing wiring box in advance by reviewing the segment drive code in the sample program and the 16F886 pin functions. Procedure (Part 1) - Analog to Digital Conversion Obtain from the technicians one 16F886 MCU and a four-digit 7-segment display module. Note carefully the connector pin-out of the display module and also the segment drive code in the sample program. Obtain the other components shown in Fig. 2 and connect the circuit. Follow the pin diagram shown in the PIC16F886 data sheet (pp. 3). For now, you may omit the dotted portion of the circuit marked Part 2. Fig. 1 Pin Functions of the PIC16F886 microcontroller Revised Feb. 01, 2012

2 This experiment uses assembly language which must be converted to machine code using an assembler. Using the ECE laboratory computers, launch MPLAB IDE under: All Programs/Electrical Engineering/Small Device/MPLAB IDE. When the development environment opens, select Project Wizard from the Project pull-down menu and create a new project by selecting the PIC16F886 device. Select the Microchip MPASM toolsuite. Using the sample code (provided on the course website), write an assembly program to repeatedly sample the voltage across the pot connected to port RA0. Note that display latches are connected to port B. Using the Latch Enable ( LE ) pin, your program can update the display digits one at a time. Fig. 2 Connection to 7-Segment Display (shows two latch enables). The PIC16F886 has a powerful 8-channel 10-bit ADC (Fig. 3) that is controlled by two special function registers (SFR): ADCON0 and ADCON1. The result of the conversion is placed into ADRESH and ADRESL. Other special function registers that have an important impact are a TRISA and TRISC (used to configure the data flow) and PIR1 and PIE1 which contain the ADC INT (interrupt) flag and INT enable bits. A procedure must be followed to properly complete one conversion. After the A/D module (see Fig. 3) has been configured, from the user s perspective digitizing a selected analog channel is relatively straightforward. Refer to the 16F886 data sheet (pp. 103) for the complete conversion procedure. Note that, we will be using 8-bit resolution. As a result, we need to read only the higher 8-bits from the ADRESH and ADRESL registers. [Setting the format as left justified would certainly help since we are required to read from ADRESH only (pp. 102).]. Vary the pot and observe the displayed output. Verify correct operation by creating a map of display output versus input voltage. Answer the following questions in your notebook: 1. What is the maximum error in this process? 2. What is the shortest possible complete measurement time using this setup? 3. What is the maximum sampling rate using one ADC channel? 2

3 Debugging Suggestions To check your circuit of Figure 2, borrow a pre-programmed 16F886 chip from the technical staff and vary the potentiometer voltage. Use the divide and conquer approach to software development. For example, initially just write the ADC voltage to Port B and check pin voltages as you vary the input. Figure 3: The PIC16F87X 10-bit 8-channel A/D module [2] Procedure (Part 2) Student s Own Design The second part of this experiment allows for more advanced design using a microcontroller and the results of Part I. Students should select one of the following tasks develop their own procedure for completion and verification. 1. Dimmer - Use the internal pulse width modulator (PWM) to control the light intensity of a LED (i.e. simulating a dimmer action). The dimmer control voltage should come from the potentiometer used in Part 1. The 7-segment display should be used in the same manner to display the control voltage. The output pulse waveform and duty cycle are to be displayed on an oscilloscope. Hints: Connect the remaining components of Fig. 2 (marked as Part 2). Extend the assembly program (written in part 1) to use the internal PWM. See PWM information given in the Appendix. 3

4 Once the program is compiled and downloaded into the MPU, vary the pot and observe the dimming action. Take measurements to verify correct system operation and the accuracy of your design. 2. Warning Lamp This task is to produce a visible warning system for tank pressure. You are given a voltage developed by a pressure transducer (for this lab, use the potentiometer of Part I) and you are to flash a lamp at 0.5 Hz for normal operation, 1 Hz for mild overpressure, 2 Hz for danger and 4 Hz for extreme danger. The duty cycle of the lamp should be 25% in each case. The nominal pressure transducer voltages for each of these cases are 0.5 V, 1.5 V, 2.5 V and 3.5 V. You should select appropriate voltage thresholds for your four cases. Develop a procedure to verify the accuracy. 3. Remote Control The task is to remotely control the intensity of a lamp in four steps. Hint: You might use PWM or you might control current using two or more output pins. The remote control might be one of the following: USB keyboard, TV remote control, flashlight (laser pointer not recommended), sound control, or any other suitable device. Develop a procedure to assess the range and reliability of your design. 4. Frequency Counter The task is to measure the frequency of a 0-5 V square wave input signal in the frequency range 100 Hz to 2000 Hz and use the two digit 7-segment display to indicate the frequency. The only requirement on the frequency display is that it be monotonic with input voltage. Develop a procedure to verify system operation and that the measurement is monotonic. 5. UPC Bar Code Reader This task is to read the first digit of the manufacturer code and display on one 7-segment readout used in Part I. Due to the precision of available photosensitive devices, test bar codes will be enlarged greatly. Some UPC bar code information can be found here and here 6. Stepper Motor Control This task is to operate a stepper motor using a microcontroller. Three (salvaged) 6-wire motors are available for use. 7. Student s Own Task Students are encouraged to propose their own experiment. Experiments with ARM or Nios-II processors may be considered. References 1. Course website: EE331: ( 2. The Quintessential PIC Microcontroller, Sid Katzen, 2nd edition, 2005, ISBN: (available for download from UofS library), Chapter 13 & PIC16F886 Data: 4. Helpful resources: 4

5 Appendix Within the PIC16F886, there are two CCP (Capture/Compare/PWM) modules. Each CCP module contains: A 16-bit Capture register A 16-bit Compare register A PWM Master/Slave Duty Cycle register The ECCP (CCP1) module has an associated control register (CCP1CON) to set the mode. When configured as PWM (see Fig. 4), (TMR2 + Prescale) is used to implement period (10-bits), while (CCPR1L + CCP1CON[5:4]) is used to set duty cycle (10-bits). The CCP1 pin (#13) is the PWM output. The equations are: Period = 4! t! PS ratio! ( PR2 + 1) OSC Duty = t! PS!{ extended CCPR1 H} OSC For an 8-bit resolution, load PR2 with h FF (the maximum value). CCPR1L is loaded with the converted digital voltage (read from ADRESH/L). Refer to the data sheet (pp. 128, [3]) for a detailed description of the operation. Figure 4: Timer 2 and the PWM CCP mode [2] 5

PIC Analog Voltage to PWM Duty Cycle

PIC Analog Voltage to PWM Duty Cycle Name Lab Section PIC Analog Voltage to PWM Duty Cycle Lab 5 Introduction: In this lab you will convert an analog voltage into a pulse width modulation (PWM) duty cycle. The source of the analog voltage

More information

PIC ADC to PWM and Mosfet Low-Side Driver

PIC ADC to PWM and Mosfet Low-Side Driver Name Lab Section PIC ADC to PWM and Mosfet Low-Side Driver Lab 6 Introduction: In this lab you will convert an analog voltage into a pulse width modulation (PWM) duty cycle. The source of the analog voltage

More information

Building an Analog Communications System

Building an Analog Communications System Building an Analog Communications System Communicate between two PICs with analog signals. Analog signals have continous range. Analog signals must be discretized. Digital signal converted to analog Digital

More information

Introduction to Using the PIC16F877 Justin Rice IMDL Spring 2002

Introduction to Using the PIC16F877 Justin Rice IMDL Spring 2002 Introduction to Using the PIC16F877 Justin Rice IMDL Spring 2002 Basic Specs: - 30 pins capable of digital I/O - 8 that can be analog inputs - 2 capable of PWM - 8K of nonvolatile FLASH memory - 386 bytes

More information

Generating DTMF Tones Using Z8 Encore! MCU

Generating DTMF Tones Using Z8 Encore! MCU Application Note Generating DTMF Tones Using Z8 Encore! MCU AN024802-0608 Abstract This Application Note describes how Zilog s Z8 Encore! MCU is used as a Dual-Tone Multi- (DTMF) signal encoder to generate

More information

Design of Low Cost Embedded Power Plant Relay Testing Unit

Design of Low Cost Embedded Power Plant Relay Testing Unit Design of Low Cost Embedded Power Plant Relay Testing Unit S.Uthayashanger, S.Sivasatheeshan, P.R Talbad uthayashanger@yahoo.com Supervised by: Dr. Thrishantha Nanayakkara thrish@elect.mrt.ac.lk Department

More information

Microprocessors A Lab 4 Fall Analog to Digital Conversion Using the PIC16F684 Microcontroller

Microprocessors A Lab 4 Fall Analog to Digital Conversion Using the PIC16F684 Microcontroller Objectives Materials 17.383 Microprocessors A Analog to Digital Conversion Using the PIC16F684 Microcontroller 1) To use MPLAB IDE software, PICC Compiler, and external hardware to demonstrate the following:

More information

νµθωερτψυιοπασδφγηϕκλζξχϖβνµθωερτ ψυιοπασδφγηϕκλζξχϖβνµθωερτψυιοπα σδφγηϕκλζξχϖβνµθωερτψυιοπασδφγηϕκ χϖβνµθωερτψυιοπασδφγηϕκλζξχϖβνµθ

νµθωερτψυιοπασδφγηϕκλζξχϖβνµθωερτ ψυιοπασδφγηϕκλζξχϖβνµθωερτψυιοπα σδφγηϕκλζξχϖβνµθωερτψυιοπασδφγηϕκ χϖβνµθωερτψυιοπασδφγηϕκλζξχϖβνµθ θωερτψυιοπασδφγηϕκλζξχϖβνµθωερτψ υιοπασδφγηϕκλζξχϖβνµθωερτψυιοπασδ φγηϕκλζξχϖβνµθωερτψυιοπασδφγηϕκλζ ξχϖβνµθωερτψυιοπασδφγηϕκλζξχϖβνµ EE 331 Design Project Final Report θωερτψυιοπασδφγηϕκλζξχϖβνµθωερτψ

More information

Controlling DC Brush Motor using MD10B or MD30B. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

Controlling DC Brush Motor using MD10B or MD30B. Version 1.2. Aug Cytron Technologies Sdn. Bhd. PR10 Controlling DC Brush Motor using MD10B or MD30B Version 1.2 Aug 2008 Cytron Technologies Sdn. Bhd. Information contained in this publication regarding device applications and the like is intended

More information

MICROPROCESSORS A (17.383) Fall Lecture Outline

MICROPROCESSORS A (17.383) Fall Lecture Outline MICROPROCESSORS A (17.383) Fall 2010 Lecture Outline Class # 07 October 26, 2010 Dohn Bowden 1 Today s Lecture Syllabus review Microcontroller Hardware and/or Interface Finish Analog to Digital Conversion

More information

Pulse Width Modulation

Pulse Width Modulation ECEn 621" Computer Arithmetic" Project Notes Week 1 Pulse Width Modulation 1 Pulse Width Modulation A method of regulating the amount of voltage delivered to a load. The average value of the voltage fed

More information

Part (A) Using the Potentiometer and the ADC* Part (B) LEDs and Stepper Motors with Interrupts* Part (D) Breadboard PIC Running a Stepper Motor

Part (A) Using the Potentiometer and the ADC* Part (B) LEDs and Stepper Motors with Interrupts* Part (D) Breadboard PIC Running a Stepper Motor Name Name (Most parts are team so maintain only 1 sheet per team) ME430 Mechatronic Systems: Lab 5: ADC, Interrupts, Steppers, and Servos The lab team has demonstrated the following tasks: Part (A) Using

More information

Physics 335 Lab 7 - Microcontroller PWM Waveform Generation

Physics 335 Lab 7 - Microcontroller PWM Waveform Generation Physics 335 Lab 7 - Microcontroller PWM Waveform Generation In the previous lab you learned how to setup the PWM module and create a pulse-width modulated digital signal with a specific period and duty

More information

Final Project Report E3390 Electronic Circuits Design Lab. The Seeing Natcar

Final Project Report E3390 Electronic Circuits Design Lab. The Seeing Natcar Final Project Report E3390 Electronic Circuits Design Lab The Seeing Natcar Peter Fredrickson Federico Garcia Antonio Gellineau Steven Mon Submitted in partial fulfillment of the requirements for the Bachelor

More information

Lesson 19 In-Circuit Programming

Lesson 19 In-Circuit Programming Elmer 160 Lesson 19 Overview Lesson 19 Introduction When the designer makes a new circuit, there is often some time spent in developing the software for that circuit. Removing the PIC from the circuit

More information

PIC Functionality. General I/O Dedicated Interrupt Change State Interrupt Input Capture Output Compare PWM ADC RS232

PIC Functionality. General I/O Dedicated Interrupt Change State Interrupt Input Capture Output Compare PWM ADC RS232 PIC Functionality General I/O Dedicated Interrupt Change State Interrupt Input Capture Output Compare PWM ADC RS232 General I/O Logic Output light LEDs Trigger solenoids Transfer data Logic Input Monitor

More information

Laboratory: Introduction to Mechatronics. Lab 5. DC Motor Speed Control Using PWM

Laboratory: Introduction to Mechatronics. Lab 5. DC Motor Speed Control Using PWM Laboratory: Introduction to Mechatronics Instructor TA: Edgar Martinez Soberanes (eem370@mail.usask.ca) 2017-03-15 Lab 5. DC Motor Speed Control Using PWM Lab Sessions Lab 1. Introduction to the equipment

More information

Microcontroller: Timers, ADC

Microcontroller: Timers, ADC Microcontroller: Timers, ADC Amarjeet Singh February 1, 2013 Logistics Please share the JTAG and USB cables for your assignment Lecture tomorrow by Nipun 2 Revision from last class When servicing an interrupt,

More information

ELCT 912: Advanced Embedded Systems

ELCT 912: Advanced Embedded Systems ELCT 912: Advanced Embedded Systems Lecture 5: PIC Peripherals on Chip Dr. Mohamed Abd El Ghany, Department of Electronics and Electrical Engineering The PIC Family: Peripherals Different PICs have different

More information

Interfacing to Analog World Sensor Interfacing

Interfacing to Analog World Sensor Interfacing Interfacing to Analog World Sensor Interfacing Introduction to Analog to digital Conversion Why Analog to Digital? Basics of A/D Conversion. A/D converter inside PIC16F887 Related Problems Prepared By-

More information

DTMF Signal Detection Using Z8 Encore! XP F64xx Series MCUs

DTMF Signal Detection Using Z8 Encore! XP F64xx Series MCUs DTMF Signal Detection Using Z8 Encore! XP F64xx Series MCUs AN033501-1011 Abstract This application note demonstrates Dual-Tone Multi-Frequency (DTMF) signal detection using Zilog s Z8F64xx Series microcontrollers.

More information

3 Design Lab III: An Electronic Governor for Electric Motor Speed Control

3 Design Lab III: An Electronic Governor for Electric Motor Speed Control 3 Design Lab III: An Electronic Governor for Electric Motor Speed Control (Denard Lynch, September 2008, revised Sept. 2009) 3.1 Safety Advisory: The activity prescribed in this laboratory will be conducted

More information

LM4: The timer unit of the MC9S12DP256B/C

LM4: The timer unit of the MC9S12DP256B/C Objectives - To explore the Enhanced Capture Timer unit (ECT) of the MC9S12DP256B/C - To program a real-time clock signal with a fixed period and display it using the onboard LEDs (flashing light) - To

More information

Laboratory Assignment Number 3 for Mech 143. Pre-Lab: Part 1 Interfacing to a DC Motor and Potentiometer

Laboratory Assignment Number 3 for Mech 143. Pre-Lab: Part 1 Interfacing to a DC Motor and Potentiometer Purpose: Minimum Parts Required: Laboratory Assignment Number 3 for Mech 143 Due by 5:00 pm on Thursday, February 11, 1999 Pre-Lab Due by 5:00pm on Tuesday, February 9, 1999 This lab is intended to acquaint

More information

ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab

ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab The purpose of this lab is to learn about sensors and use the ADC module to digitize the sensor signals. You will use the digitized signals

More information

Using Z8 Encore! XP MCU for RMS Calculation

Using Z8 Encore! XP MCU for RMS Calculation Application te Using Z8 Encore! XP MCU for RMS Calculation Abstract This application note discusses an algorithm for computing the Root Mean Square (RMS) value of a sinusoidal AC input signal using the

More information

Pulse-Width-Modulation Motor Speed Control with a PIC (modified from lab text by Alciatore)

Pulse-Width-Modulation Motor Speed Control with a PIC (modified from lab text by Alciatore) Laboratory 14 Pulse-Width-Modulation Motor Speed Control with a PIC (modified from lab text by Alciatore) Required Components: 1x PIC 16F88 18P-DIP microcontroller 3x 0.1 F capacitors 1x 12-button numeric

More information

Embedded Systems. Interfacing PIC with external devices Analog to digital Converter. Eng. Anis Nazer Second Semester

Embedded Systems. Interfacing PIC with external devices Analog to digital Converter. Eng. Anis Nazer Second Semester Embedded Systems Interfacing PIC with external devices Analog to digital Converter Eng. Anis Nazer Second Semester 2016-2017 What is the time? What is the time? Definition Analog: can take any value Digital:

More information

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

ME 461 Laboratory #5 Characterization and Control of PMDC Motors ME 461 Laboratory #5 Characterization and Control of PMDC Motors Goals: 1. Build an op-amp circuit and use it to scale and shift an analog voltage. 2. Calibrate a tachometer and use it to determine motor

More information

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators Ahmed Okasha, Assistant Lecturer okasha1st@gmail.com Objective Have a

More information

TKT-3500 Microcontroller systems

TKT-3500 Microcontroller systems TKT-3500 Microcontroller systems Lec 4 Timers and other peripherals, pulse-width modulation Ville Kaseva Department of Computer Systems Tampere University of Technology Fall 2010 Sources Original slides

More information

Iowa State University Electrical and Computer Engineering. E E 452. Electric Machines and Power Electronic Drives

Iowa State University Electrical and Computer Engineering. E E 452. Electric Machines and Power Electronic Drives Electrical and Computer Engineering E E 452. Electric Machines and Power Electronic Drives Laboratory #5 Buck Converter Embedded Code Generation Summary In this lab, you will design the control application

More information

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools MAE106 Laboratory Exercises Lab # 1 - Laboratory tools University of California, Irvine Department of Mechanical and Aerospace Engineering Goals To learn how to use the oscilloscope, function generator,

More information

DC Motor and Servo motor Control with ARM and Arduino. Created by:

DC Motor and Servo motor Control with ARM and Arduino. Created by: DC Motor and Servo motor Control with ARM and Arduino Created by: Andrew Kaler (39345) Tucker Boyd (46434) Mohammed Chowdhury (860822) Tazwar Muttaqi (901700) Mark Murdock (98071) May 4th, 2017 Objective

More information

MICROCONTROLLER TUTORIAL II TIMERS

MICROCONTROLLER TUTORIAL II TIMERS MICROCONTROLLER TUTORIAL II TIMERS WHAT IS A TIMER? We use timers every day - the simplest one can be found on your wrist A simple clock will time the seconds, minutes and hours elapsed in a given day

More information

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs 10-11 Introduction to Arduino In this lab we will introduce the idea of using a microcontroller as a tool for controlling

More information

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin 2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control October 5, 2009 Dr. Harrison H. Chin Formal Labs 1. Microcontrollers Introduction to microcontrollers Arduino microcontroller

More information

Electric Bike BLDC Hub Motor Control Using the Z8FMC1600 MCU

Electric Bike BLDC Hub Motor Control Using the Z8FMC1600 MCU Application Note Electric Bike BLDC Hub Motor Control Using the Z8FMC1600 MCU AN026002-0608 Abstract This application note describes a controller for a 200 W, 24 V Brushless DC (BLDC) motor used to power

More information

Analog-to-Digital Converter. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

Analog-to-Digital Converter. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name MPSD A/D Lab Exercise Analog-to-Digital Converter Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on this assignment with your partner. Hand in a

More information

DESIGNING A POSITION REGULATOR FOR AN ACTUATOR POWERED BY A CONTINUOUS CURRENT MOTOR USING THE PIC16F73 MICROCONTROLLER

DESIGNING A POSITION REGULATOR FOR AN ACTUATOR POWERED BY A CONTINUOUS CURRENT MOTOR USING THE PIC16F73 MICROCONTROLLER U.P.B. Sci. Bull., Series C, Vol. 80, Iss. 2, 2018 ISSN 2286-3540 DESIGNING A POSITION REGULATOR FOR AN ACTUATOR POWERED BY A CONTINUOUS CURRENT MOTOR USING THE PIC16F73 MICROCONTROLLER Monica-Anca CHITA

More information

PID MOTOR CONTROLLER. Version 1.0. October Cytron Technologies Sdn. Bhd.

PID MOTOR CONTROLLER. Version 1.0. October Cytron Technologies Sdn. Bhd. PID MOTOR CONTROLLER PR24 Version 1.0 October 2009 Cytron Technologies Sdn. Bhd. Information contained in this publication regarding device applications and the like is intended through suggestion only

More information

Laboration: Frequency measurements and PWM DC motor. Embedded Electronics IE1206

Laboration: Frequency measurements and PWM DC motor. Embedded Electronics IE1206 Laboration: Frequency measurements and PWM DC motor. Embedded Electronics IE1206 Attention! To access the laboratory experiment you must have: booked a lab time in the reservation system (Daisy). completed

More information

Microprocessors B Lab 4 Spring Motor Control Using Pulse Width Modulation (PWM)

Microprocessors B Lab 4 Spring Motor Control Using Pulse Width Modulation (PWM) Motor Control Using Pulse Width Modulation (PWM) Lab Report Objectives Materials See separate report form located on the course webpage. This form should be completed during the performance of this lab.

More information

Community College of Allegheny County Unit 4 Page #1. Timers and PWM Motor Control

Community College of Allegheny County Unit 4 Page #1. Timers and PWM Motor Control Community College of Allegheny County Unit 4 Page #1 Timers and PWM Motor Control Revised: Dan Wolf, 3/1/2018 Community College of Allegheny County Unit 4 Page #2 OBJECTIVES: Timers: Astable and Mono-Stable

More information

EE 210 Lab Exercise #3 Introduction to PSPICE

EE 210 Lab Exercise #3 Introduction to PSPICE EE 210 Lab Exercise #3 Introduction to PSPICE Appending 4 in your Textbook contains a short tutorial on PSPICE. Additional information, tutorials and a demo version of PSPICE can be found at the manufacturer

More information

Three-Stage Coil Gun

Three-Stage Coil Gun Three-Stage Coil Gun Final Project Report December 8, 2006 E155 Dan Pivonka and Michael Pugh Abstract: A coil gun is an electronic gun that fires a projectile by means of the magnetic field generated when

More information

' The PicBasic Pro Compiler Manual is on line at: '

' The PicBasic Pro Compiler Manual is on line at: ' ---------------Title-------------- File...4331_encoder4.pbp Started...1/10/10 Microcontroller Used: Microchip Technology 18F4331 Available at: http://www.microchipdirect.com/productdetails.aspx?category=pic18f4331

More information

DESCRIPTION DOCUMENT FOR WIFI SINGLE DIMMER ONE AMPERE BOARD HARDWARE REVISION 0.3

DESCRIPTION DOCUMENT FOR WIFI SINGLE DIMMER ONE AMPERE BOARD HARDWARE REVISION 0.3 DOCUMENT NAME: DESIGN DESCRIPTION, WIFI SINGLE DIMMER BOARD DESCRIPTION DOCUMENT FOR WIFI SINGLE DIMMER ONE AMPERE BOARD HARDWARE REVISION 0.3 Department Name Signature Date Author Reviewer Approver Revision

More information

ENGR 1110: Introduction to Engineering Lab 7 Pulse Width Modulation (PWM)

ENGR 1110: Introduction to Engineering Lab 7 Pulse Width Modulation (PWM) ENGR 1110: Introduction to Engineering Lab 7 Pulse Width Modulation (PWM) Supplies Needed Motor control board, Transmitter (with good batteries), Receiver Equipment Used Oscilloscope, Function Generator,

More information

CSCI1600 Lab 4: Sound

CSCI1600 Lab 4: Sound CSCI1600 Lab 4: Sound November 1, 2017 1 Objectives By the end of this lab, you will: Connect a speaker and play a tone Use the speaker to play a simple melody Materials: We will be providing the parts

More information

MicroToys Guide: Motors A. Danowitz, A. Adibi December A rotary shaft encoder is an electromechanical device that can be used to

MicroToys Guide: Motors A. Danowitz, A. Adibi December A rotary shaft encoder is an electromechanical device that can be used to Introduction A rotary shaft encoder is an electromechanical device that can be used to determine angular position of a shaft. Encoders have numerous applications, since angular position can be used to

More information

IE1206 Embedded Electronics

IE1206 Embedded Electronics IE1206 Embedded Electronics Le1 Le3 Le4 Le2 Ex1 Ex2 PIC-block Documentation, Seriecom Pulse sensors I, U, R, P, serial and parallel KC1 LAB1 Pulse sensors, Menu program Start of programing task Kirchhoffs

More information

Project 3 Build a 555-Timer

Project 3 Build a 555-Timer Project 3 Build a 555-Timer For this project, each group will simulate and build an astable multivibrator. However, instead of using the 555 timer chip, you will have to use the devices you learned about

More information

uc Crash Course Whats is covered in this lecture Joshua Childs Joshua Hartman A. A. Arroyo 9/7/10

uc Crash Course Whats is covered in this lecture Joshua Childs Joshua Hartman A. A. Arroyo 9/7/10 uc Crash Course Joshua Childs Joshua Hartman A. A. Arroyo Whats is covered in this lecture ESD Choosing A Processor GPIO USARTS o RS232 o SPI Timers o Prescalers o OCR o ICR o PWM ADC Interupts 1 ESD KILLS!

More information

CSE 3215 Embedded Systems Laboratory Lab 5 Digital Control System

CSE 3215 Embedded Systems Laboratory Lab 5 Digital Control System Introduction CSE 3215 Embedded Systems Laboratory Lab 5 Digital Control System The purpose of this lab is to introduce you to digital control systems. The most basic function of a control system is to

More information

Precalculations Individual Portion Introductory Lab: Basic Operation of Common Laboratory Instruments

Precalculations Individual Portion Introductory Lab: Basic Operation of Common Laboratory Instruments Name: Date of lab: Section number: M E 345. Lab 1 Precalculations Individual Portion Introductory Lab: Basic Operation of Common Laboratory Instruments Precalculations Score (for instructor or TA use only):

More information

EXPERIMENT 6: Advanced I/O Programming

EXPERIMENT 6: Advanced I/O Programming EXPERIMENT 6: Advanced I/O Programming Objectives: To familiarize students with DC Motor control and Stepper Motor Interfacing. To utilize MikroC and MPLAB for Input Output Interfacing and motor control.

More information

AN ADVANCED THREE PHASE VSI WITH CONDUCTION MODE USING PIC16F72

AN ADVANCED THREE PHASE VSI WITH CONDUCTION MODE USING PIC16F72 AN ADVANCED THREE PHASE VSI WITH 150 0 CONDUCTION MODE USING PIC16F72 Mr. Divyeshkumar G. Mangroliya 1*, Mr. Vinod J. Rupapara 2, Mr. Rakeshkumar P. Akabari 3#, Mr. Nirav M. Vaghela 4 1 Assi. Professor

More information

COSC 3215 Embedded Systems Laboratory

COSC 3215 Embedded Systems Laboratory Introduction COSC 3215 Embedded Systems Laboratory Lab 5 Temperature Controller Your task will be to design a temperature controller using the Dragon12 board that will maintain the temperature of an object

More information

EE 3101 ELECTRONICS I LABORATORY EXPERIMENT 9 LAB MANUAL APPLICATIONS OF IC BUILDING BLOCKS

EE 3101 ELECTRONICS I LABORATORY EXPERIMENT 9 LAB MANUAL APPLICATIONS OF IC BUILDING BLOCKS EE 3101 ELECTRONICS I LABORATORY EXPERIMENT 9 LAB MANUAL APPLICATIONS OF IC BUILDING BLOCKS OBJECTIVES In this experiment you will Explore the use of a popular IC chip and its applications. Become more

More information

Lab 5 Timer Module PWM ReadMeFirst

Lab 5 Timer Module PWM ReadMeFirst Lab 5 Timer Module PWM ReadMeFirst Lab Folder Content 1) ReadMeFirst 2) Interrupt Vector Table 3) Pin out Summary 4) DriverLib API 5) SineTable Overview In this lab, we are going to use the output hardware

More information

Introduction to Oscilloscopes Instructor s Guide

Introduction to Oscilloscopes Instructor s Guide Introduction to Oscilloscopes A collection of lab exercises to introduce you to the basic controls of a digital oscilloscope in order to make common electronic measurements. Revision 1.0 Page 1 of 25 Copyright

More information

Using the Z8 Encore! XP Timer

Using the Z8 Encore! XP Timer Application Note Using the Z8 Encore! XP Timer AN013104-1207 Abstract Zilog s Z8 Encore! XP microcontroller consists of four 16-bit reloadable timers that can be used for timing, event counting or for

More information

M.Sinduja,S.Ranjitha. Department of Electrical & Electronics Engineering, Bharathiyar Institute of Engineering For Women, Deviyakurichi.

M.Sinduja,S.Ranjitha. Department of Electrical & Electronics Engineering, Bharathiyar Institute of Engineering For Women, Deviyakurichi. POWER LINE CARRIER COMMUNICATION FOR DISTRIBUTION AUTOMATION SYSTEM M.Sinduja,S.Ranjitha Department of Electrical & Electronics Engineering, Bharathiyar Institute of Engineering For Women, Deviyakurichi.

More information

Module: Arduino as Signal Generator

Module: Arduino as Signal Generator Name/NetID: Teammate/NetID: Module: Laboratory Outline In our continuing quest to access the development and debugging capabilities of the equipment on your bench at home Arduino/RedBoard as signal generator.

More information

Intro to Engineering II for ECE: Lab 3 Controlling Servo Motors Erin Webster and Dr. Jay Weitzen, c 2012 All rights reserved

Intro to Engineering II for ECE: Lab 3 Controlling Servo Motors Erin Webster and Dr. Jay Weitzen, c 2012 All rights reserved Lab 3: Controlling Servo Motors Laboratory Objectives: 1) To program the basic stamp to control the motion of a servo 2) To observe the control waveforms as the motion of the servo changes 3) To learn

More information

Digital-to-Analog Converter. Lab 3 Final Report

Digital-to-Analog Converter. Lab 3 Final Report Digital-to-Analog Converter Lab 3 Final Report The Ion Cannons: Shrinand Aggarwal Cameron Francis Nicholas Polito Section 2 May 1, 2017 1 Table of Contents Introduction..3 Rationale..3 Theory of Operation.3

More information

RS-232 Based Low Cost Data IO Card

RS-232 Based Low Cost Data IO Card International Journal of Electrical Engineering. ISSN 0974-2158 Volume 6, Number 1 (2013), pp. 47-54 International Research Publication House http://www.irphouse.com RS-232 Based Low Cost Data IO Card

More information

Laboratory Design Project: PWM DC Motor Speed Control

Laboratory Design Project: PWM DC Motor Speed Control EE-331 Devices and Circuits I Summer 2013 Due dates: Laboratory Design Project: PWM DC Motor Speed Control Instructor: Tai-Chang Chen 1. Operation of the circuit should be verified by your lab TA by Friday,

More information

Laboratory Seven Stepper Motor and Feedback Control

Laboratory Seven Stepper Motor and Feedback Control EE3940 Microprocessor Systems Laboratory Prof. Andrew Campbell Spring 2003 Groups Names Laboratory Seven Stepper Motor and Feedback Control In this experiment you will experiment with a stepper motor and

More information

CHAPTER 3 PIC Microcontroller CCP and ECCP Tips n Tricks

CHAPTER 3 PIC Microcontroller CCP and ECCP Tips n Tricks CHAPTER 3 PIC Microcontroller CCP and ECCP Tips n Tricks Table Of Contents CAPTURE TIPS N TRICKS TIP #1 Measuring the Period of a Square Wave... 3-3 TIP #2 Measuring the Period of a Square Wave with Averaging...

More information

The University of Texas at Arlington Lecture 10 ADC and DAC

The University of Texas at Arlington Lecture 10 ADC and DAC The University of Texas at Arlington Lecture 10 ADC and DAC CSE 3442/5442 Measuring Physical Quantities (Digital) computers use discrete values, and use these to emulate continuous values if needed. In

More information

Follow this and additional works at: Part of the Engineering Commons

Follow this and additional works at:   Part of the Engineering Commons Trinity University Digital Commons @ Trinity Mechatronics Final Projects Engineering Science Department 5-2018 Pyramid of Disco Daniel Henkes Trinity University, dhenkes@trinity.edu Molly McCullough Trinity

More information

Houngninou 2. Abstract

Houngninou 2. Abstract Houngninou 2 Abstract The project consists of designing and building a system that monitors the phase of two pulses A and B. Three colored LEDs are used to identify the phase comparison. When the rising

More information

Pic-Convert Board Instructions

Pic-Convert Board Instructions Pic-Convert Board Instructions This is the fifth version of the Pic-Convert board and now has fully isolated inputs and provides a power supply to make the solution completely industrial. This DAC+PWM

More information

Laboratory 11. Pulse-Width-Modulation Motor Speed Control with a PIC

Laboratory 11. Pulse-Width-Modulation Motor Speed Control with a PIC Laboratory 11 Pulse-Width-Modulation Motor Speed Control with a PIC Required Components: 1 PIC16F88 18P-DIP microcontroller 3 0.1 F capacitors 1 12-button numeric keypad 1 NO pushbutton switch 1 Radio

More information

ENGR-4300 Fall 2006 Project 3 Project 3 Build a 555-Timer

ENGR-4300 Fall 2006 Project 3 Project 3 Build a 555-Timer ENGR-43 Fall 26 Project 3 Project 3 Build a 555-Timer For this project, each team, (do this as team of 4,) will simulate and build an astable multivibrator. However, instead of using the 555 timer chip,

More information

Programming and Interfacing

Programming and Interfacing AtmelAVR Microcontroller Primer: Programming and Interfacing Second Edition f^r**t>*-**n*c contents Preface xv AtmelAVRArchitecture Overview 1 1.1 ATmegal64 Architecture Overview 1 1.1.1 Reduced Instruction

More information

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013 Exercise 1: PWM Modulator University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013 Lab 3: Power-System Components and

More information

Total Hours Registration through Website or for further details please visit (Refer Upcoming Events Section)

Total Hours Registration through Website or for further details please visit   (Refer Upcoming Events Section) Total Hours 110-150 Registration Q R Code Registration through Website or for further details please visit http://www.rknec.edu/ (Refer Upcoming Events Section) Module 1: Basics of Microprocessor & Microcontroller

More information

Introduction to the Analog Discovery

Introduction to the Analog Discovery Introduction to the Analog Discovery The Analog Discovery from Digilent (http://store.digilentinc.com/all-products/scopes-instruments) is a versatile and powerful USB-connected instrument that lets you

More information

Lab #10: Finite State Machine Design

Lab #10: Finite State Machine Design Lab #10: Finite State Machine Design Zack Mattis Lab: 3/2/17 Report: 3/14/17 Partner: Brendan Schuster Purpose In this lab, a finite state machine was designed and fully implemented onto a protoboard utilizing

More information

University of Texas at El Paso Electrical and Computer Engineering Department

University of Texas at El Paso Electrical and Computer Engineering Department University of Texas at El Paso Electrical and Computer Engineering Department EE 3176 Laboratory for Microprocessors I Fall 2016 LAB 05 Pulse Width Modulation Goals: Bonus: Pre Lab Questions: Use Port

More information

GF of 9 THE GADGET FREAK FILES CASE #165. Analog Clock Measures Time in Meters

GF of 9 THE GADGET FREAK FILES CASE #165. Analog Clock Measures Time in Meters GF 165 04-05-2010 1 of 9 THE GADGET FREAK FILES CASE #165 Analog Clock Measures Time in Meters Alan Parekh took a different approach to time keeping with his electronic clock that registers hours, minutes,

More information

6. HARDWARE PROTOTYPE AND EXPERIMENTAL RESULTS

6. HARDWARE PROTOTYPE AND EXPERIMENTAL RESULTS 6. HARDWARE PROTOTYPE AND EXPERIMENTAL RESULTS Laboratory based hardware prototype is developed for the z-source inverter based conversion set up in line with control system designed, simulated and discussed

More information

Part I - Amplitude Modulation

Part I - Amplitude Modulation EE/CME 392 Laboratory 1-1 Part I - Amplitude Modulation Safety: In this lab, voltages are less than 15 volts and this is not normally dangerous to humans. However, you should assemble or modify a circuit

More information

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Lab Timer: Blinking LED Lights and Pulse Generator

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Lab Timer: Blinking LED Lights and Pulse Generator EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Lab 9 555 Timer: Blinking LED Lights and Pulse Generator In many digital and analog circuits it is necessary to create a clock

More information

Mechatronics Laboratory Assignment 3 Introduction to I/O with the F28335 Motor Control Processor

Mechatronics Laboratory Assignment 3 Introduction to I/O with the F28335 Motor Control Processor Mechatronics Laboratory Assignment 3 Introduction to I/O with the F28335 Motor Control Processor Recommended Due Date: By your lab time the week of February 12 th Possible Points: If checked off before

More information

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K. Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K. Roberts Page 1 See Appendix A, for Licensing Attribution information

More information

Hello, and welcome to this presentation of the FlexTimer or FTM module for Kinetis K series MCUs. In this session, you ll learn about the FTM, its

Hello, and welcome to this presentation of the FlexTimer or FTM module for Kinetis K series MCUs. In this session, you ll learn about the FTM, its Hello, and welcome to this presentation of the FlexTimer or FTM module for Kinetis K series MCUs. In this session, you ll learn about the FTM, its main features and the application benefits of leveraging

More information

Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan

Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan Timers and CCP Modules Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan chanhl@mail.cgu.edu.twcgu PIC18 Timers Timer2, Timer4 8-bit timers use instruction cycle clock as the

More information

Exercise 2. The Buck Chopper EXERCISE OBJECTIVE DISCUSSION OUTLINE. The buck chopper DISCUSSION

Exercise 2. The Buck Chopper EXERCISE OBJECTIVE DISCUSSION OUTLINE. The buck chopper DISCUSSION Exercise 2 The Buck Chopper EXERCISE OBJECTIVE When you have completed this exercise, you will be familiar with the operation of the buck chopper. DISCUSSION OUTLINE The Discussion of this exercise covers

More information

ME 333 Assignment 7 and 8 PI Control of LED/Phototransistor Pair. Overview

ME 333 Assignment 7 and 8 PI Control of LED/Phototransistor Pair. Overview ME 333 Assignment 7 and 8 PI Control of LED/Phototransistor Pair Overview For this assignment, you will be controlling the light emitted from and received by an LED/phototransistor pair. There are many

More information

Lab 3 Final report: Embedded Systems Digital Potentiometer Subsystem TEAM: RAR

Lab 3 Final report: Embedded Systems Digital Potentiometer Subsystem TEAM: RAR Lab 3 Final report: Embedded Systems Digital Potentiometer Subsystem TEAM: RAR EE 300W, Section 6 Professor Tim Wheeler Rui Xia, Yuanpeng Liao and Ashwin Ramnarayanan Table of Contents Introduction...2

More information

LYRA 501 USER S MANUAL

LYRA 501 USER S MANUAL LYRA 501 USER S MANUAL D O R A D O e n e r g y Belgrade, February 2005 1 GENERAL DESCRIPTION 1.1. IMPORTANT NOTICE 2 TECHNICAL SPECIFICATIONS CONTENTS 2.1. INPUT (MAINS) 2.2. OUTPUT 2.3. ENVIROMENTAL CONDITIONS

More information

Lab Exercise 9: Stepper and Servo Motors

Lab Exercise 9: Stepper and Servo Motors ME 3200 Mechatronics Laboratory Lab Exercise 9: Stepper and Servo Motors Introduction In this laboratory exercise, you will explore some of the properties of stepper and servomotors. These actuators are

More information

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter EE283 Electrical Measurement Laboratory Laboratory Exercise #7: al Counter Objectives: 1. To familiarize students with sequential digital circuits. 2. To show how digital devices can be used for measurement

More information

ATmega16A Microcontroller

ATmega16A Microcontroller ATmega16A Microcontroller Timers 1 Timers Timer 0,1,2 8 bits or 16 bits Clock sources: Internal clock, Internal clock with prescaler, External clock (timer 2), Special input pin 2 Features The choice of

More information

of PWM is explained here. Consider a simple circuit as shown in figure below. DC Motor Speed Control using 555 Timer IC. The DC MOTOR SPEED.

of PWM is explained here. Consider a simple circuit as shown in figure below. DC Motor Speed Control using 555 Timer IC. The DC MOTOR SPEED. How To Make A Dc Motor Speed Controller Circuit Using Two 555 Ics DC Motor PWM Speed Control Using 555 IC. The 555 is ubiquitous and can be used as simple PWM speed control. Circuit diagram: DC Motor PWM

More information

Training Schedule. Robotic System Design using Arduino Platform

Training Schedule. Robotic System Design using Arduino Platform Training Schedule Robotic System Design using Arduino Platform Session - 1 Embedded System Design Basics : Scope : To introduce Embedded Systems hardware design fundamentals to students. Processor Selection

More information