PreLab 6 PWM Design for H-bridge Driver (due Oct 23)

Similar documents
PreLab 7: LED Blinker (Due Oct 30)

ECE 363 EXAM #2 (F18) 4 problems for 100 pts Problem #1: Amplifier Output Error (25 pts)

Lab Experiments. Boost converter (Experiment 2) Control circuit (Experiment 1) Power diode. + V g. C Power MOSFET. Load.

DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE MASSACHUSETTS INSTITUTE OF TECHNOLOGY CAMBRIDGE, MASSACHUSETTS 02139

State Machine Oscillators

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

Experiment #8: Designing and Measuring a Common-Collector Amplifier

Facility of Engineering. Biomedical Engineering Department. Medical Electronic Lab BME (317) Pre-Report Forms

DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE MASSACHUSETTS INSTITUTE OF TECHNOLOGY CAMBRIDGE, MASSACHUSETTS 02139

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter

ECE 363 FINAL (F16) 6 problems for 100 pts Problem #1: Fuel Pump Controller (18 pts)

R & D Electronics DIGITAL IC TRAINER. Model : DE-150. Feature: Object: Specification:

Advanced Regulating Pulse Width Modulators

Function Generator Op-amp Summing Circuits Pulse Width Modulation LM311 Comparator

PESIT BANGALORE SOUTH CAMPUS BASIC ELECTRONICS

Module 9C: The Voltage Comparator (Application: PWM Control via a Reference Voltage)

Facility of Engineering. Biomedical Engineering Department. Medical Electronic Lab BME (317) Post-lab Forms

LABORATORY EXPERIMENT. Infrared Transmitter/Receiver

Current Mode PWM Controller

Laboratory Final Design Project. PWM DC Motor Speed Control

Exercise 2: Source and Sink Current

ML4818 Phase Modulation/Soft Switching Controller

University of North Carolina, Charlotte Department of Electrical and Computer Engineering ECGR 3157 EE Design II Fall 2009

Design Document. Analog PWM Amplifier. Reference: DD00004

University of Utah Electrical Engineering Department ECE 2100 Experiment No. 2 Linear Operational Amplifier Circuits II

Experiment EB2: IC Multivibrator Circuits

75 VOLT 10 AMP MOSFET H-BRIDGE PWM MOTOR DRIVER/AMPLIFIER

o What happens if S1 and S2 or S3 and S4 are closed simultaneously? o Perform Motor Control, H-Bridges LAB 2 H-Bridges with SPST Switches

Exercise 1: Tri-State Buffer Output Control

Physics 120 Lab 6 (2018) - Field Effect Transistors: Ohmic Region

Current Mode PWM Controller

ENGINEERING TRIPOS PART II A ELECTRICAL AND INFORMATION ENGINEERING TEACHING LABORATORY EXPERIMENT 3B2-B DIGITAL INTEGRATED CIRCUITS

TL494 Pulse - Width- Modulation Control Circuits

ECE 454 Homework #1 Due 11/28/2018 This Wednesday In Lab

CHAPTER 6. Motor Driver

Industrial Fully Control Dc Motor Drive without Microcontroller. Four Quadrant Speed Control of DC Motor Using MOSFET and Push Button Switch

Introduction to IC-555. Compiled By: Chanakya Bhatt EE, IT-NU

ECE 2010 Laboratory # 5 J.P.O Rourke

EE431 Lab 1 Operational Amplifiers

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

Digital Applications of the Operational Amplifier

LS7362 BRUSHLESS DC MOTOR COMMUTATOR / CONTROLLER

Electronic PRINCIPLES

LAB 1 AN EXAMPLE MECHATRONIC SYSTEM: THE FURBY

Fig 1: The symbol for a comparator

ENGR 210 Lab 12: Analog to Digital Conversion

In-Class Exercises for Lab 2: Input and Output Impedance

CURRENT MODE PWM CONTROLLER LM3842A/3A/4A/5A

Function Generator Using Op Amp Ic 741 Theory

Analog Electronic Circuits Lab-manual

High Speed PWM Controller

LAB #10: Analog Interfacing

HIGH LOW Astable multivibrators HIGH LOW 1:1

VCC. UVLO internal bias & Vref. Vref OK. PWM Comparator. + + Ramp from Oscillator GND

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Hands-On Introduction to EE Lab Skills Laboratory No. 2 BJT, Op Amps IAP 2008

KUBE Electronics AG. KUBE TR156 Universal PIR Circuit IC. For PIR Motion and Presence Detectors. Applications. Features

TL494M PULSE-WIDTH-MODULATION CONTROL CIRCUIT

University of Utah Electrical & Computer Engineering Department ECE 1250 Lab 4 Pulse Width Modulation Circuit

Experiment 7: PID Motor Speed Control

Phys Lecture 3. Power circuits how to control your motors Noise and Shielding

Advanced Regulating Pulse Width Modulators

Application Note. I C s f o r M o t o r C o n t r o l. Evaluation board for the TDA5143/TDA5144. Report No: EIE/AN R. Galema

Hello, and welcome to the TI Precision Labs video series discussing comparator applications. The comparator s job is to compare two analog input

For the op amp circuit above, how is the output voltage related to the input voltage? = 20 k R 2

75 VOLT 8 AMP MOSFET H-BRIDGE PWM MOTOR DRIVER/AMPLIFIER

6. HARDWARE PROTOTYPE AND EXPERIMENTAL RESULTS

Figure 1: Basic Relationships for a Comparator. For example: Figure 2: Example of Basic Relationships for a Comparator

TL494 PULSE-WIDTH-MODULATION CONTROL CIRCUITS

Ocean Controls KT-5198 Dual Bidirectional DC Motor Speed Controller

Multiple Instrument Station Module

DUAL STEPPER MOTOR DRIVER

DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE MASSACHUSETTS INSTITUTE OF TECHNOLOGY CAMBRIDGE, MASSACHUSETTS 02139

N386X APPLICATION INFORMATION

HIGH FREQUENCY WAVEFORM GENERATOR. Author: Carlos Rodríguez Hernández

1 Second Time Base From Crystal Oscillator

LABORATORY 6 v3 TIME DOMAIN

POLOLU MAX14870 SINGLE BRUSHED DC MOTOR DRIVER CARRIER USER S GUIDE

NJM3777 DUAL STEPPER MOTOR DRIVER NJM3777E3(SOP24)

High Speed PWM Controller

Current-mode PWM controller

UNIVERSITY OF UTAH ELECTRICAL ENGINEERING DEPARTMENT

). The THRESHOLD works in exactly the opposite way; whenever the THRESHOLD input is above 2/3V CC

DC Motor Speed Control using PID Controllers

Lab 8. Stepper Motor Controller

SG2525A SG3525A REGULATING PULSE WIDTH MODULATORS

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

Designated client product

Field Effect Transistors

LINEAR IC APPLICATIONS

Data Conversion and Lab Lab 4 Fall Digital to Analog Conversions

Examination paper for TFY4185 Measurement Technique/ Måleteknikk

Experiment #6: Biasing an NPN BJT Introduction to CE, CC, and CB Amplifiers

Lecture 7 ECEN 4517/5517

DeviceCraft Revision #1 11/29/2010

ELEC3106 Electronics. Lab 3: PCB EMI measurements. Objective. Components. Set-up

High Capacity H-Bridge

GATE: Electronics MCQs (Practice Test 1 of 13)

University of Pittsburgh

University of California at Berkeley Donald A. Glaser Physics 111A Instrumentation Laboratory

TA8435H/HQ TA8435H/HQ PWM CHOPPER-TYPE BIPOLAR STEPPING MOTOR DRIVER. FEATURES TOSHIBA BIPOLAR LINEAR INTEGRATED CIRCUIT SILICON MONOLITHIC

Transcription:

GOAL PreLab 6 PWM Design for H-bridge Driver (due Oct 23) The overall goal of Lab6 is to demonstrate a DC motor controller that can adjust speed and direction. You will design the PWM waveform and digital logic to provide the input signals to the H-bridge IC chip that drives the DC motor. INTRODUCTION Pulse width modulation (PWM). PWM has many, many applications. Why is it so useful? Two major reasons are simple implementation and power efficiency. PWM is a digital technique to mimic analog control of a load (e.g. variable speed), so it can be easily implemented with microcontrollers. PWM is power efficient because the load is operated by transistor switches that are either fully ON or completely OFF. Why does this matter? Fig. 1: DC motor with gear head for lower RPM but higher torque. o For a BJT, power dissipation depends a lot on V CE. Recall that V CE is typically less than 1V in saturation mode (e.g. BJT switch) but can be several volts for a BJT in active mode (e.g. emitter follower). Therefore, power dissipation is much lower when a BJT is used as a switch rather than a follower. o For a MOSFET, power dissipation depends a lot on R DS,ON. Recall that R DS,ON is typically less than 1 ohm for a power MOSFET in the ohmic (linear) region. It turns out that R DS,ON is much higher for a MOSFET in the active region. Therefore, power dissipation is much lower when a MOSFET is used as a switch rather than a follower. H-bridges. A very common way to drive a DC motor with PWM is to use an H-bridge. As shown in Fig. 2, the motor is connected to four switches, where the arrangement resembles the letter H. Although Fig. 2 shows mechanical switches, H-bridges actually use high-side and low-side transistors (BJT or MOSFET). The switches are grouped into pairs that control the direction of current flowing through the motor. Each pair is called a half-bridge and resembles a totem-pole (or push-pull) configuration. A digital input determines which switch is closed and which one is open within a half-bridge. Motor speed control can be achieved by applying PWM to one half-bridge while the other half-bridge is held low. We will use the L293D quadruple half-h driver chip, which contains four half-bridges (more than we need for this lab). Fig. 2: (a) Motor moves clockwise when IN1 = LOW and IN2 = HIGH. (b) Motor moves counter-clockwise when IN1 = HIGH and IN2 = LOW. (c) Motor stops when IN1 = IN2 = LOW. 1

DESIGN REQUIREMENTS It s good to start with the constraints. o Motor: 12V DC, 120 RPM o PWM waveform: Free-running current = 80 ma, Stall current = 800 ma NOTE: This H-bridge cannot handle the motor s stall current. Fortunately, this lab will mostly deal with the motor in free-running mode. So we should be OK! Output is 0 or 5V for compatibility with digital logic. Use an LM311 voltage comparator with a single +5V supply. Use LM358 op amps with a single +5V supply for the triangle wave generator. Triangle wave has a peak-to-peak value of 2.5V PP (+/- 0.1V is OK) at 5 khz (+/- 250 Hz is OK). NOTE: A higher frequency would be better, but the LM358 has speed limitations. Use standard 5% resistors. Capacitors can either be 100 pf, 1 nf, 10 nf, or 100 nf. TRIANGLE WAVE GENERATOR DESIGN Vcc Vcc R6 Vref 5 6 Vcc 4 8 U1B 7 LM358N V R3 PR_SQ Vref 3 2 4 8 C U1A 1 LM358N V PR_TRIANGLE 5V Vref R2 R4 R5 R1 Fig. 3: Schematic of the triangle wave oscillator. Note that Pins 4 and 8 on op amp U1A do not require Vcc and Gnd (internally connected). 2

TASK 1: Compute the R 1 and R 2 necessary to achieve the desired peak-to-peak amplitude. o Remember that we are using op amps powered by a SINGLE supply. o The following formulas for the triangle wave generator might be useful: f = R 2 / (4R 1 R 3 C) V SAT(+) = V CC - 1 V SAT(-) = 0 V TH = (R 1 /R 2 ) (V SAT(+) V SAT(-) ) / 2 V REF = (V SAT(+) + V SAT(-) ) /2 o R1 is typically in the 10 kohm range. This ensures the output currents of op amp U1A and U1B are less than 1 ma. TASK 2: Compute the R 3 necessary to achieve the desired frequency. o Remember that you are limited to C = 100 pf, 1 nf, 10 nf, or 100 nf. o Typical R 3 values are between 1 kohm and 1 Mohm. A capacitor has infinite impedance at DC, since Z = 1/jωC. This has the unfortunate consequence that the op-amp integrator has infinite gain at DC. This leads to an unsteady DC output due to accumulated error from input bias and offset current! To avoid this defect, most integrators have a large resistor in parallel with the capacitor (see above figure). This resistor R 4 is typically chosen to be at least 10 times higher than R 3. TASK 3: Choose R 4 that is appropriate for your circuit. o You must choose from 51 kohm, 100 kohm, 510 kohm, 1.0 Mohm, and 1.5 Mohm. TASK 4: Choose 5% resistors for the R 5 -R 6 voltage divider that produces V REF. o Typical values are 10 kohm to ensure low power dissipation (e.g. a few mw or less). TASK 5: Simulate your circuit. o Use LM358N op amps. o Place voltage probes on the Schmitt trigger output and the integrator output. o Use a Transient Simulation Choose an end time that is long enough to show between 3 to 5 cycles. Use a Max time step of 1e-8 to ensure sufficient time resolution. o Measure the peak-to-peak voltage and frequency of the triangle waveform. 3 Fig. 4: Buma had to change his R1 and R3 to get satisfactory values for frequency and amplitude.

o Did you satisfy both design specs? If not If the peak-to-peak voltage needs improvement, change R1 a little bit. This will also affect the frequency (see below). If the frequency needs improvement, change R3. You must determine appropriate values for R1 and R3 in order to satisfy the design specs! NOTE: Buma had to tweak R1 and R3 to get satisfactory values for amplitude and frequency. PWM DESIGN A PWM waveform is obtained by comparing the triangle (also called a ramp) wave with some kind of input signal V SIG. Suppose we want the PWM duty cycle to INCREASE for HIGHER V SIG. TASK 6: Sketch how the voltage comparator should be connected to the triangle wave and V SIG. o As shown in Fig. 5, should V SIG be connected to the (+) or (-) input of the comparator? What about the triangle wave? o Explain your reasoning! Fig. 5: Which comparator input is connected to Vsig? TASK 7: Sketch how you would use a 10 kohm potentiometer to produce V SIG. o Also include how the 10K pot is connected to the comparator. TASK 8: Simulate your entire PWM circuit (triangle wave, potentiometer, and comparator). o Use the LM311N comparator. Pins 1 and 4 are both connected to GND. Pin 5 is connected to V CC = +5V. Use a 1 kohm pull-up resistor to +5V. o If you want the potentiometer wiper to be on the right side, use flip horizontal rather than rotate! Fig. 6(top) shows the correct orientation using flip horizontal. Fig. 6 (bottom) shows the incorrect orientation using rotate. o Place voltage probes on both comparator inputs and the comparator output. o Produce three waveforms of the PWM output: Pot = 20%, 40%, and 60%. Fig. 6: (Top) Correct potentiometer orientation (Bottom) Incorrect potentiometer orientation. 4

Fig. 7: Simulated PWM waveform when the potentiometer is at 20% (left) and 60% (right). CONTROL LOGIC OK, now we need to think about how to hook up the H-bridge. The L293D H-bridge has four half-bridges, but we will only use two of them. Fig. 8 shows a typical connection diagram and truth table for using the L293D as a full-bridge for one DC motor. The chip has two power connections: V CC1 = +5V for the TTL logic and V CC2 = +12V for logic level shifting and motor power. We will keep the enable (EN) input HIGH (+5V) for this lab. The IN1 and IN2 inputs are the digital inputs that determine if a half-bridge output connects the motor terminal to POWER or GND. This may look intimidating, but it is actually not that bad. There are only TWO scenarios. 1. Motor direction = counter-clockwise: IN1 = PWM signal, IN2 = LOW (0V). 2. Motor direction = clockwise: IN1 = LOW (0V), IN2 = PWM signal. This means we need a way to properly route the PWM signal and LOW to the IN1 and IN2 inputs! Fig. 8: Connection diagram and truth table for using the L293D chip as a full-bridge for one DC motor. Clockwise (turn right) speed control requires IN1 = LOW while IN2 = PWM. Conversely, counter-clockwise (turn left) speed control requires IN1 = PWM while IN2 = LOW. We will always keep the EN (enable) input HIGH for this lab. In other applications, you can enable (EN = HIGH) or disable (EN = LOW) the motor. 5

How to do this? The user wants to control direction and speed. Direction is either clockwise or counter-clockwise, so that is a binary quantity. We can use a toggle switch to produce a digital signal DIR that is either 0V (counter-clockwise) or 5V (clockwise). Speed is the PWM signal with a duty cycle determined by V SIG from the 10K potentiometer. What to do with the DIR and PWM signals? There many ways, but Fig. 9 shows a reasonable approach. It may look intimidating, but it really isn t as long as you clearly understand the necessary inputs to the H-bridge. As mentioned before, the H-bridge s IN1 is either PWM or LOW, depending on the desired direction. This sounds like a scenario to use a 2-to-1 multiplexer! Likewise, the H-bridge s IN2 is either LOW or PWM, depending on the desired direction. Another 2:1 mux can be used here! Mux s are awesome TASK 9: Complete the wiring for the inputs and outputs of the two 2:1 mux s in Fig. 9. o Recall from ECE 118 that a 2:1 mux has a single select bit S to decide whether input0 or input1 is sent through to the output. o Provide a sketch of the final result. +5V 2:1 MUX Toggle Switch DIR A0 OUT A1 S IN1 H-BRIDGE M 10K Pot +5V V SIG PWM B0 OUT B1 S IN2 Fig. 9: Simplified schematic of the digital logic for the DC motor controller. Direction (DIR) is produced from a toggle switch. The PWM duty cycle is determined by the 10K potentiometer. The two 2:1 mux's determine the values of the H-bridge's IN1 and IN2. Please submit the following: Answers to all TASKS. Multisim schematic showing triangle wave generator, potentiometer, and comparator (e.g. for TASK 8). Four waveforms (from TASK 5 and TASK 8) (End of PreLab6) 6