ME430 Mechatronics. Lab 2: Transistors, H Bridges, and Motors. Name. Name. The lab team has demonstrated:

Similar documents
Part (A) Driving LEDs and DC Motors by Sourcing and Sinking Current from a Logic Gate Sourcing Current Sinking Current

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

Breadboard Primer. Experience. Objective. No previous electronics experience is required.

// Parts of a Multimeter

Basic Electronics Course Part 2

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

EXPERIMENT 5 CURRENT AND VOLTAGE CHARACTERISTICS OF BJT

LAB 1 AN EXAMPLE MECHATRONIC SYSTEM: THE FURBY

Electronics: Design and Build Training Session. Presented By: Dr. Shakti Singh Hazem Elgabra Amna Siddiqui

EE2304 Implementation of a Stepper Motor using CMOS Devices Fall 2004 WEEK -2-

Physics 222. Lab 5: Characterizing a transistor, and using it to control motor speeds. Objectives:

School of Engineering Mechatronics Engineering Department. Experim. ment no. 1

LABORATORY EXPERIMENT. Infrared Transmitter/Receiver

Lab #1 Help Document. This lab will be completed in room 335 CTB. You will need to partner up for this lab in groups of two.

Purpose: 1) to investigate the electrical properties of a diode; and 2) to use a diode to construct an AC to DC converter.

BJT Characteristics & Common Emitter Transistor Amplifier

Autonomous Robot Control Circuit

Teach Yourself Electronics!

Başkent University Department of Electrical and Electronics Engineering EEM 214 Electronics I Experiment 8. Bipolar Junction Transistor

= V IN. and V CE. = the supply voltage 0.7 V, the transistor is on, V BE. = 0.7 V and V CE. until saturation is reached.

Tech Tutorials > H-Bridge

Conventional transistor overview and special transistors

Electronics, Sensors, and Actuators

Lab 12: Timing sequencer (Version 1.3)

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

LAB PROJECT 2. Lab Exercise

Check out from stockroom:! Servo! DMM (Digital Multi-meter)

ECE U401/U211-Introduction to Electrical Engineering Lab. Lab 4

o Semiconductor Diode Symbol: The cathode contains the N-type material and the anode contains the P-type material.

9 Feedback and Control

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

Electronics Merit Badge Kit Theory of Operation

HANDS-ON LAB INSTRUCTION SHEET MODULE 3 CAPACITORS, TIME CONSTANTS AND TRANSISTOR GAIN

Dr. Charles Kim ELECTRONICS I. Lab 6 Bipolar Junction Transistor (BJT) II TRADITIONAL LAB

DC Motor-Driver H-Bridge Circuit

ECE 2010 Laboratory # 5 J.P.O Rourke

ZBasic. Application Note. AN-213 External Device Interfacing. Introduction. I/O Pin Fundamentals. Connecting an LED

Home Map Projects Construction Soldering Study Components 555 Symbols FAQ Links

Measuring Voltage, Current & Resistance Building: Resistive Networks, V and I Dividers Design and Build a Resistance Indicator

University of Utah Electrical & Computer Engineering Department ECE 2100 Experiment No. 7 Transistor Introduction (BJT)

Experiment (1) Principles of Switching

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

EDE1204 Bi-Polar Stepper Motor IC

Electrical Measurements

Embedded Systems. Oscillator and I/O Hardware. Eng. Anis Nazer First Semester

Physics 364, Fall 2014, Lab #12 (transistors I: emitter follower) Monday, October 13 (section 401); Tuesday, October 14 (section 402)

Electronic Instrumentation ENGR-4300 Fall 2004 Section Experiment 7 Introduction to the 555 Timer, LEDs and Photodiodes

BASIC-Tiger Application Note No. 059 Rev Motor control with H bridges. Gunther Zielosko. 1. Introduction


Lecture 3: Transistors

Electronics and Instrumentation Name ENGR-4220 Spring 1999 Section Experiment 4 Introduction to Operational Amplifiers

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

EXPERIMENT 6 REPORT Bipolar Junction Transistor (BJT) Characteristics

E B C. Two-Terminal Behavior (For testing only!) TO-92 Case Circuit Symbol

ELECTRONICS STARTER KIT

Final Exam: Electronics 323 December 14, 2010

Step Motor Controller I. Introduction II. Step Motor Basics

DC CIRCUITS AND OHM'S LAW

Physics 309 Lab 3 Bipolar junction transistor

Op-amp characteristics Operational amplifiers have several very important characteristics that make them so useful:

Lab Project #2: Small-Scale Integration Logic Circuits

Analog Electronic Circuits Lab-manual

tinycylon Assembly Instructions Contents Written by Dale Wheat Version August 2016 Visit dalewheat.com for the latest update!

Lab no. 4 Bipolar Transistor (NPN and PNP)

Using Transistors and Driving Motors

The silicon controlled rectifier (SCR)

Low Voltage, High Current Time Delay Circuit

Sonoma State University Department of Engineering Science Fall 2017

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

Guide to LED and Hobby Lighting Projects Documentation

As you can see, by varying the turn-on point, the amount of power getting to the bulb is adjustable, and hence the light output can be controlled.

Stepper Motors and Control Part I - Unipolar Stepper Motor and Control (c) 1999 by Rustle Laidman, All Rights Reserved

Electronics EECE2412 Spring 2017 Exam #2

HANDS-ON LAB INSTRUCTION SHEETS MODULE

EIE209 Basic Electronics. Transistor Devices. Contents BJT and FET Characteristics Operations. Prof. C.K. Tse: T ransistor devices

LS7362 BRUSHLESS DC MOTOR COMMUTATOR / CONTROLLER

BIDIRECTIONAL ROTATION OF AN INDUCTION MOTOR WITH A REMOTE CONTROL DEVICE

Pre-Lab for Batteries and Bulbs

Laboratory 6 Diodes and Transistors

555 Morse Code Practice Oscillator Kit (draft 1.1)

Practical 2P12 Semiconductor Devices

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

recognise that electronic systems are assembled from sensing, processing and out put sub-systems, including:

STATION NUMBER: LAB SECTION: RC Oscillators. LAB 5: RC Oscillators ELECTRICAL ENGINEERING 43/100. University Of California, Berkeley

Figure 1. Block diagram of system incorporating power amplification.

ECE 5670/6670 Project. Brushless DC Motor Control with 6-Step Commutation. Objectives

Transistor Characteristics

EE320L Electronics I. Laboratory. Laboratory Exercise #4. Diode Rectifiers and Power Supply Circuits. Angsuman Roy

Formal Report of. Project 2: Advanced Multimeter using VHDL

Part 1. Using LabVIEW to Measure Current

DARK ACTIVATED COLOUR CHANGING NIGHT LIGHT KIT

Experiment #12 BJT Differential Pairs

EET 1150 Lab 6 Ohm s Law

Process Components. Process component

Chapter 3-2 Semiconductor devices Transistors and Amplifiers-BJT Department of Mechanical Engineering

4 Transistors. 4.1 IV Relations

UNIT E1 (Paper version of on-screen assessment) A.M. WEDNESDAY, 8 June hour

Physics 364, Fall 2012, reading due your answers to by 11pm on Thursday

Laboratory 7 (drawn from lab text by Alciatore) Transistor and Photoelectric Circuits

A 3-STAGE 5W AUDIO AMPLIFIER

Transcription:

Name Name ME430 Mechatronics Lab 2: Transistors, H Bridges, and Motors The lab team has demonstrated: Part (A) Driving DC Motors using a PIC and Transistors NPN BJT transistor N channel MOSFET transistor Darlington Chip (ULN2003) Part (B) Using 12 Volt Power Supplies to Drive Lamps and Fans MOSFETs BJTs Darlingtons Part (C) Using a Darlington to drive multiple LEDs Dancing lights Part (D) Bi directional Control of Motors with H Bridge chips DC Motor with bi directional 5V drive circuit Stepper Motor at 5V with 2 sets of bi directional phases Return the preprogrammed PIC to your instructor ME430 Mechatronics: Lab 2 1

Part (A) Driving DC Motors using a PIC and Transistors These are ordi Get a brushed DC motor from the grey cabinet at the back of the room. nary looking silver grey motors. We are not likely to get enough power from the PIC chip to drive this motor. So, we will use the PIC merely as input to a transistor. The transistor will act as an electronic switch to turn the power to the motor on and off. In this part, our goal is to use three kinds of transistors as electronic switches: an NPN BJT (Bipolar junction transistor) transistor, an N channel MOSFET (metal oxide semiconductor field effect transistor) transistor, and a Darlington chip (which contains many BJT transistor pairs). Note: saying MOSFET transistor is redundant since the T stands for transistor, but, much like saying PIN number, it is common practice. (1) NPN BJT transistor Sketch a circuit that has a basic switch, appropriate power connections, LED/resistor combination, and a PIC (just as you had at the end of Lab 1.) Have the basic switch connected to RA0 on the PIC, and the LED/resistor connected to RB0. Next connect RA0 and RA1. Now use RB1 to drive an NPN BJT transistor. You may want to refer to your notes on the Intro to Transistors video to complete the circuit diagram. Use your DMM to measure the resistance of your motor to properly size the resistors in the circuit (ballpark is fine). ALSO, don t forget that you have a regulated and an unregulated power supply, and that the motor should have its positive power supplied from the unregulated rail! ME430 Mechatronics: Lab 2 2

Now go ahead and build the circuit. There are extra resistors of various sizes in the grey cabinet. Demonstrate that the LED and motor work when you press the button and get it checked off on the front page. Make sure you add snubber diodes and decoupling capacitors to all circuits. (2) N channel MOSFET transistor MOSFETs are even easier to use than BJTs, because you don t need to figure any currents or size any resistors the MOSFETs act as voltage controlled switches. Replace the BJT transistor/motor section of your circuit from the last part with an appropriate circuit that uses an N channel MOSFET. You may wish to refer to your video lecture notes again. Sketch the circuit below, then build it. Demonstrate that the LED and motor work when you press the button and get it checked off on the front page. ME430 Mechatronics: Lab 2 3

(3) Darlington Chip (ULN2003) Darlington chips are prepackaged, paired BJTs, which are intended to be used as switches. Replace the MOSFET/motor section of your circuit from the last part with an appropriate circuit that uses a Darlington. You may wish to refer to your video lecture notes again. Sketch the circuit below and then build it. Demonstrate that the LED and motor work when you press the button and get it checked off on the front page. ME430 Mechatronics: Lab 2 4

Part (B) Using 12 Volt Power Supplies to Drive Lamps and Fans In prior part, we used transistors to drive the motor because we needed more current than the PIC could provide. Now we are going to use transistors to drive devices that need a higher voltage. It is very common for motors and other actuators to require higher drive voltages. We will modify the circuits from before to control a 12 Volt power supply for the load in this case lamps (not LEDs) and fans. (1) MOSFETs First, diagram a circuit that will let you run a lamp with a MOSFET, still using a 5 Volt power supply for everything. This is almost identical to the MOSFET circuit you used in Part (A), but you will use a lamp instead of the motor. (The lamps look a lot like clear LEDs, except that you can see a filament inside of them. The lamps are in the grey cabinet! IR emitters look like lamps, and are in your lab kit. Don t use an IR emitter here!) Now build this circuit and make sure that the lamp turns on. The light will be rather dim, because you are running it from a 5V supply instead of the 12V it wants. You can check yourself off on this part! Lamp is lit from 5V, although dim. ME430 Mechatronics: Lab 2 5

Next, modify the circuit you drew to light the lamp from a 12V supply. Notice how easy the modification is! This is why MOSFETs are wonderful. Note that the power to the PIC chip is still running at 5V, from the regulated power rail! The 12V supplies are in the grey cabinet at the back of the room. (On the front they may say one voltage, but on the back they say 12V.) Keep the white power supply connected to the breadboard and running through the regulator chip. Remember the power to the PIC chip is still 5V try not to burn up too many chips Make sure that the ground for the 12V supply is the same as the ground for the 5V supply connect the two grounds together. If you don t do this, the two ground voltages could actually be different and your circuit might not work. Use the positive lead from the 12V supply to run the lamp it shouldn t be doing anything else in the circuit. Build this circuit and make sure that the light is brighter than it was before. yourself off on this part, too. You can check Lamp is lit from 12V, and is pretty bright now. For the last piece of this section, we are going to replace the lamp in the circuit with a fan. The fans are black, have a frame that is about 3 x3, and are in the grey cabinet at the back of the room. The circuit a direct swap of the lamp and the fan, except that running fans backwards can break them! Make sure that the red lead on the fan goes to the +12V line! Once you have this working, demonstrate it to your instructor and get this section checked off on the front page. (2) BJTs The MOSFETs were really easy to use, but they are much more expensive than the BJTs. So, we will need to be able to use BJTs to do the same tasks we accomplished with the MOSFET. Remember that, for the BJTs, we need an input resistor to control the current. The lamps we purchased were called 12 volt, 35 ma, incandescent, lamps. They draw 35 ma when they are running. This means that we need to choose a resistor to make the current into the base one tenth of the load current, or 3.5 ma. What resistor size should you choose if you could choose an arbitrary value? Now go to the cabinet and pick a real resistor (note, that ballpark resistor sizes work fine). What size did you pick? Build the BJT circuit to drive the lamp at 12V. You can check this part off yourself: ME430 Mechatronics: Lab 2 6

Got the lamp running at 12V with a BJT Next, we would like to replace the lamp with a fan. for the base. We will need to recalculate the resistor We knew the current the lamp would draw when it was running, but we will need to measure the current drawn by the fan when it is running. It won t work to measure the fan resistance, because the fan has a diode that confuses the measurement. Get the fan running directly from the power supply, then put the digital multimeter (DMM) in series with the fan and measure the current it draws. We measured a fan current of. If we could choose any size resistor for the base of the BJT, we would choose. However, when we went to the cabinet, we picked this resistor:. Get the fan running with this resistor and the BJT. the front page. Then have your instructor check you off on (3) Darlingtons Darlingtons (ULN2003 chips) are very simple to use for our switching purposes even at 12V. Build a circuit that uses a Darlington to drive the lamp, then replace the lamp with a fan. Make sure that the power for the load (the lamp or the fan) is connected to 12V, but the power for the PIC chip is connected to 5V, regulated. So you will need BOTH power supplies with the grounds connected together. Make sure that the COM line on the Darlington is connected to 12V (not 5V). Don t use the optional resistor on the input to the Darlington. The COM line is connected to the internal snubber diodes on the Darlington, so that is why we need to connect it to the 12V supply. The optional resistor on the input can actually interfere with some circuits. You can check off the lamp yourself. Lamp running from a Darlington with 12V power to the lamp. Demonstrate the fan running from a Darlington with 12V to the fan to your instructor, and get this section checked off on the front. ME430 Mechatronics: Lab 2 7

Part (C) Using a Darlington to drive multiple LEDs If we try to drive multiple LEDs in a source configuration with a single PIC chip, we will draw too much current from the chip and the lights will be weak. However, it is quite straightforward to use the PIC to drive a Darlington, and then let the Darlington control the LEDs. The Darlington has 7 switches in each chip, and they have all of the snubber diodes and resistors included in the package. Isn t it nice when they include things inside the chip for you? You can return your 12 volt power supply and go back to only your white 5 volt supply. First, replace the lamp/fan from (B3) with a resistor/led. This will give you one resistor/led directly connected to the PIC on RB0; and a second resistor/led connected to the Darlington, which is connected to RB1. Make sure that both LEDs are on when the button is pressed. Sketch the circuit you used on the diagram below: We have our 2 LEDs running correctly (Self Check Off) (one directly off the PIC s RB0 line, the other using RB1 + a Darlington) ME430 Mechatronics: Lab 2 8

Next we would like to drive 7 LEDs with this Darlington (instead of just 1). We will make our LEDs in this part dance when the button is not pressed, 4 of the LEDs will be on, and 3 will be off. When the button is pressed, the on/off LEDs will switch. You will want to connect resistor/leds to all 7 Darlington outputs. Note that each LED needs its own resistor. Then, you will want to connect inputs 1, 3, 5, and 7 of the Darlington to RB1. Connect inputs 2, 4, and 6 from the Darlington to RA1. RA1 and RB1 will always be opposite. Add this circuit to the diagram, and build it. When you press the button, the lights should dance. on the front. Get this checked off by your instructor ME430 Mechatronics: Lab 2 9

Part (D) Bi directional Control of Motors with H bridge chips If we only need unidirectional control of our motors, then the transistor circuits we used in Part (A) or Part (B) are the easiest solution. If we need to run the motor forwards and backwards, then we will need bidirectional control. For this, an H bridge chip is definitely the way to go. We will have you create a bi directional control for different motors using an H bridge chip. Table 2: H Bridge motor circuits Motor DC motor (silver grey) Stepper Motor (larger, silver and black) Type of drive 5 Volts, bi directional 5 Volts, 2 sets of bi directional phases Note, both motors are 5 volts. So you should use the unregulated 5 volt line (which is closer to 6 volts, but that s ok). ME430 Mechatronics: Lab 2 10

(1) DC Motor with bi directional 5V drive circuit We want to use the H bridge chip to run a motor with 2 button switches one switch will turn the motor on or off and the other one will choose whether the motor turns clockwise or counter clockwise. Notice that an H bridge is NOT the 74LS47 chip. The H Bridge will be labeled either L293 or SN754410. The SN754410 and L293 are the same chip with the same layout. Referring to the H bridge datasheet on the ME430 courseware page, we see that the suggested bi directional motor circuit looks like this. There are actually three motors here one running bi directionally on the left and two running uni directionally on the right. We will only use the connections on the left hand side. We ve pasted a version of this circuit by itself on the next page, because we are going to want to add some switches and other connections to it. In order to make sure that the right hand side of the H bridge does not interfere with the left hand side, we also connected pin 9 to ground. If you read through the datasheet a bit more, you find that pin 1 is the enable line for the left side the signal that tells the H bridge to turn on, pin 9 is the enable on the right side (which we want off). On the circuit drawing on the next page, add a basic switch circuit to serve as the input to pin 1. This button switch will control whether the motor is on or off the motor will normally be on, but if we press the button it will shut the H bridge (and the motor) off. ME430 Mechatronics: Lab 2 11

ME430 Mechatronics: Lab 2 12

Next, we notice that pins 2 and 7 are always supposed to be opposites when 2 is high, 7 should be low, and vice versa. This instructs the motor to spin clockwise or counter clockwise. We want to use just one more switch to accomplish this, so use RA1 as the input to pin 2 and RB1 as the input to pin 7. Note again that RA1 and RB1 are always opposites. Add this circuit to the diagram on the previous page. Finally, we will need to connect the power to the H bridge. V cc1 should be at 5 volts (regulated!) and V cc2 should both be at 5 volts unregulated. V cc1 is always a regulated 5 volts regardless of the motor voltage as it runs the chip logic. V cc2 is the motor voltage (usually 5 24 volts). In this case the motor will use the unregulated 5 volts (which is more like 6.3 volts, but that s ok). Add this to your circuit diagram. Now that you have everything planned out, go ahead and build the circuit. demonstrate it to your instructor and get it signed off on the front page. When it works, (2) Stepper Motor at 5V with 2 sets of bi directional phases Stepper motors are more complicated to drive than ordinary brushed DC motors. Nevertheless, the H bridge makes the task much simpler. From the H bridge datasheet, we have a suggested circuit for a Two Phase Motor Driver: ME430 Mechatronics: Lab 2 13

In this circuit V cc1 should again be connected to 5 volts (regulated) and V cc2 should again be connected to the 5 volt unregulated supply, even though this shows V cc2 connected to 24V. Since this is a low power stepper motor, we could probably skip the diodes. Notice that the layout shown above is not a literal picture of the chip pin 14 is shown right next to pin 11! Read the pin number and figure out where they are on the real device (all this information is in the H bridge datasheet). We will want to set up two basic switches to control the H bridge. One of the switches will control one side of the H bridge, and the other switch will control the other side of the ME430 Mechatronics: Lab 2 14

H bridge. One side is already finished using RA1 and RB1 on pins 2 and 7. The second switch is similar, except that it will control pins 10 and 15 of the H bridge from RA2 and RB2. Next, we need to hook four of the six stepper motor wires up to pins 3, 6, 11, and 14. Use your notes from the video lecture on stepper motors to understand what you need to measure in order to figure out which wires to use. Once everything is wired correctly, we should be able to make the stepper motor go through a small step by pushing the buttons in the correct 4 part sequence. The sequence is the full step sequence from the video lecture. Finally, count how many times you need to go through the 4 part sequence in order to get the motor to make one revolution. It takes times through the 4 part sequence to go one revolution. Demonstrate your working stepper motor for your instructor and get it checked off on the front page. ME430 Mechatronics: Lab 2 15