* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download 1 Analog Electronics
Negative resistance wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Radio transmitter design wikipedia , lookup
Josephson voltage standard wikipedia , lookup
Oscilloscope history wikipedia , lookup
Electronic engineering wikipedia , lookup
Regenerative circuit wikipedia , lookup
Integrating ADC wikipedia , lookup
Transistor–transistor logic wikipedia , lookup
Analog-to-digital converter wikipedia , lookup
Index of electronics articles wikipedia , lookup
RLC circuit wikipedia , lookup
Wilson current mirror wikipedia , lookup
Surge protector wikipedia , lookup
Voltage regulator wikipedia , lookup
Valve audio amplifier technical specification wikipedia , lookup
Power electronics wikipedia , lookup
Operational amplifier wikipedia , lookup
Power MOSFET wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Current source wikipedia , lookup
Schmitt trigger wikipedia , lookup
Two-port network wikipedia , lookup
Valve RF amplifier wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Current mirror wikipedia , lookup
Network analysis (electrical circuits) wikipedia , lookup
San José State University Department of Mechanical and Aerospace Engineering ME 106 Fudamentals of Mechatronics Course Reader Spring, 2011 BJ Furman iii TABLE OF CONTENTS Page no. ACKNOWLEDGMENTS .............................................................................................iv Introduction to ME 106 .................................................................................................v 1 Analog Electronics .....................................................................................................1.0 Ohm’s Law, current, resistance, voltage .....................................................................___ Signal sources ..............................................................................................................___ Signal conditioning .....................................................................................................___ Operational amplifiers .................................................................................................___ Transistors ...................................................................................................................___ MOSFET’s ..................................................................................................................___ Controlling power .......................................................................................................___ 2 Sensors and Transducers ..........................................................................................2.0 Sensor and transducer fundamentals ...........................................................................___ Position ........................................................................................................................___ Pressure .......................................................................................................................___ Acceleration ................................................................................................................___ Force and torque ..........................................................................................................___ 3 Actuators ....................................................................................................................3.0 Motors .........................................................................................................................___ Piezoelectric actuators .................................................................................................___ Shape memory actuators .............................................................................................___ Drive systems ..............................................................................................................___ 4 Digital Electronics......................................................................................................4.0 Basic logic functions ...................................................................................................___ Important digital logic IC’s .........................................................................................___ BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 iv 5 Microprocessor System Fundamentals ....................................................................5.0 Coding schemes...........................................................................................................___ System layout ..............................................................................................................___ 6 Programming in C for Microprocessor Control .....................................................6.0 Program structure ........................................................................................................___ Variables, arithmetic, and logic operations .................................................................___ Communicating to ports ..............................................................................................___ Functions .....................................................................................................................___ M68HC11 basics .........................................................................................................___ Appendix A: Laboratory Experiments ........................................................................A.0 Introduction to the Mechatronic Engineering Lab ......................................................___ RC filters .....................................................................................................................___ Electronic scale ...........................................................................................................___ Light controlled relay ..................................................................................................___ Electronic level ............................................................................................................___ Printer carriage motion control....................................................................................___ DC motor speed control ..............................................................................................___ Digital counter .............................................................................................................___ Introduction to C programming on the M68HC11 ......................................................___ Reading and writing to ports (AD and DA conversion) ..............................................___ Analog interfacing and stepper motor control .............................................................___ Stepper motor speed control ........................................................................................___ Appendix B: Pin-outs of Common Components .........................................................B.0 Appendix C: Additional Information on Actuators ..................................................C.0 Appendix D: Drive Components...................................................................................D.0 BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 v Acknowledgments The authors would like to thank the other members of the Mechatronic Curriculum Development Team: Tai-Ran Hsu, Ji Wang, Peter Reischl, Addisu Tesfaye, and Fred Barez, for their contribution in large and small parts in initiating, implementing, and developing the Mechatronics curriculum stem in the Department of Mechanical and Aerospace Engineering at San José State University. We also acknowledge significant contributions by the Advisory Committee in their ongoing support of the development of mechatronics at San José State University. Of special note is Mr. Ed Muns of the Hewlett-Packard Corporation who facilitated a generous donation of HP Test and Measurement equipment for the Mechatronic Engineering Laboratory, and Mr. David Brown whose financial support enabled us to establish the David Brown Graduate Fellowship in Mechatronics. We also recognize the help of our student assistants: Joe Christman, Doug Sprock, Marvin Lam, Mike Kearny, and Jeff Fontana in the development of the Mechatronic Engineering Laboratory and the laboratory experiments; our administrative assistant, Dorothy Lush, and our technicians, Lou Schallberger and Tom Ng. Financial support from the National Science Foundation is specially acknowledged. BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 6 Introduction If you look around, you’ll notice that many of the devices you use in the course of a day are mechatronic, that is, they integrate mechanical and electronic functions in a synergistic way. In fact, it is difficult to avoid mechatronic devices! Microwave ovens, automatic teller machines, washing and drying machines, dishwashers, cameras, camcorders, VCR’s, CD players, automobiles… These are all mechatronic devices. And not only consumer products, but industrial processes, such as a semiconductor fab, also are highly mechatronic in nature. The overarching philosophy in mechatronics is that enhanced performance, flexibility, and reliability can be obtained in a product or process through the integration of mechanics and electronics under the control of software. Because of the ubiquitous nature of mechatronics, the mechanical engineer must understand the fundamentals of mechanics, electronics, and software in order to be successful in today’s world. By and large, most undergraduate mechanical engineering programs do a good job teaching the fundamentals of mechanics, but fall short in giving students the necessary understanding of electronics, computer interfacing, and how these are integrated in mechatronic systems. This text attempts to give the student enough of a foundation in analog and digital electronics, sensors and transducers, actuators, and microprocessor interfacing, so he or she can begin to function effectively as an engineer in an increasingly mechatronic world. BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 7 1 Analog Electronics What is voltage? What is current? What is resistance? Technically speaking, voltage is the electric potential difference between two points in a circuit, current is the flow of charge in a conductor, and resistance is determined by dividing the voltage between two points on a conductor by the current flowing through the conductor. Operationally speaking, we can liken voltage to pressure in hydraulic systems, current to fluid flow rate, and resistance to a flow restriction, such as an orifice. Ohm’s law states a relationship between voltage, V, current, I, and resistance, R, in electrical systems: V=I•R (1.1) If any two of the three quantities are known, the third may be determined. This simple relationship is fundamental and broadly applicable in analyzing any electronic circuit. For example, if V = 10 V and R = 100 Ω, what is I through the resistor? Figure 1.1 Ohm’s law example Resistors in Parallel When resistors in a circuit are arranged in parallel, the total resistance of the circuit is always less than any of the individual resistors, because there are additional paths for current to flow through. Figure 1.2 shows a circuit with resistors arranged in parallel. The equivalent resistance of this arrangement is, BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 8 Req = 1/(1/R1 + … (1.2) Resistors in parallel Figure 1.2 Resistors in parallel. The total resistance of the circuit is always less than any of the individual resistors, because there are additional paths for current to flow through. Resistors in Series When resistors in a circuit are arranged in series, the total resistance of the circuit is always greater than any of the individual resistors. Figure 1.3 shows a circuit with resistors arranged in series. Figure 1.3 shows a circuit with resistors arranged in parallel. The equivalent resistance of this arrangement is, Req = R1 + R2 + … + Rn (1.3) Resistors in Series Figure 1.3 Resistors in series. The total resistance of the circuit is always greater than any of the individual resistors. The Voltage Divider Suppose a voltage source and two resistors are arranged as shown in Figure 1.4. What is the output voltage, Vout? If you apply Ohm’s law, you will find out that Vout = Vin[R2 /(R1 +R2)] BJ Furman (1.4) ME 106 Reader rev. 1.0 January 6, 2011 9 Voltage divider circuit Figure 1.4 The voltage divider circuit. This circuit is called a voltage divider, because a fraction of the source voltage appears across R2. In fact, the larger the resistance of R2, the larger is the share of the input voltage across it. Suppose R1 = R2 , what is Vout? What if R1 = 10R2, what is Vout? What if R1 = 0.1R2, what is Vout? The Current Divider Suppose a current source and two resistors are arranged as shown in Figure 1.5. The input current is divided between the two resistors, and the path of least resistance gets the largest current. Again, using Ohm’s law, and noting that the voltage across both resistors is the same, Iout = Iin[R1 /(R1 +R2)] (1.5) current divider circuit Figure 1.5 The current divider circuit. What about Thevenins’ Theorem, Kirchhoff’s voltage and current laws??? Believe it or not, armed with Ohm’s law and the concepts of voltage and current division, you are ready to tackle most of the electrical analysis you’ll need to do in any mechatronics project. Of course there is much more to learn about in terms of specific components and their behavior, but if you can rigorously apply these fundamental concepts, you will do well. BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 10 Practice Problem - The Wheatstone Bridge The arrangement of resistors in the circuit shown in Figure 1.6 is called a Wheatstone Bridge. It’s a very useful circuit as you will find out later. Find Vout in terms of Vin and the resistors. (Hint: do you see any voltage dividers in this circuit?) Wheatstone bridge circuit Figure 1.6 The Wheatstone Bridge circuit. Signal Sources Mechatronic systems use sensors to determine the state of the system so appropriate action can be taken at the right time to accomplish the desired function. For example, the airbag deployment system in an automobile uses an accelerometer to measure the rate of change of the velocity of the vehicle. If the decceleration is above a prescribed level, say from a collision, the system inflates the airbags, and hopefully prevents serious injury of the passengers inside. The voltage output from the accelerometer represents the acceleration of the vehicle to the controller, which decides if it is large enough to inflate the airbags. We say the acclerometer functions as a signal source. A signal source is differentiated from other electrical sources, such as the car’s battery for example, in that for signal sources, we are primarily interested in the information carried by the signal or voltage they output. Most signal sources output relatively low-level voltages, which in turn need to be conditioned to be of use to the system they are connected to. It is important therefore to understand the limitation of signal sources, so that we can handle them properly. Ideally, a sensor, such as the accelerometer, can be modeled as a dependent voltage source, that is, a voltage source whose output depends on an input. As shown in Figure 1.7, the value of the voltage output from the acclerometer depends on the acceleration, for example 10 mV/g (where g is the accleration of gravity, about 9.81 m/s2). The value 10 mV/g is called the sensitivity of the accelerometer. BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 11 In practice, however, a signal source will have limitations including low level signals, a finite value of output impedance (opposition to current flow), noise, non-linear behavior, and offset such as shown in Figure 1.8. Ideal signal source model Also include mV - g plot showing input/output sensitivity Figure 1.7 Model of an accelerometer as an ideal signal source. The source is a dependent voltage source with a sensitivity of 10 mV/g Practical signal source model. Show offset, noise, and saturation. Figure 1.8 A practical signal source model for the accelerometer. The practical model includes a noise source, finite output impedance, non-linearity, and offset. Considering the acclelerometer, even at a 10 g input, the output will only be 0.1 V. In order to fire the air bag, the detonation circuit may need a 5 V pulse, so the output would have to be amplified 50 times. A finite impedance means that there will be a limit to the amount of current that the source can supply. For sensors such as the acclerometer, this current could be on the order of picoamps (10-12 amps)! Consider the Thevenin equivalent circuit for an accelerometer, such as shown in Figure 1.9. The output impedance of the accelerometer is 10 MΩ. Suppose a voltage measurement device with an input impedance, Rin, is connected at the output BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 12 terminals of the accelerometer. If Rin is, say 10 kΩ, what will be the voltage measured? We essentially have a voltage divider, with Vout=Vin[104/107 + 104] = 0.001Vin (1.6) We will only measure a very small fraction of Vin if we record anything at all! The voltage device has loaded the accelerometer. We will discuss how to handle impedance mismatches such as this shortly. Equivalent circuit for accelerometer. Figure 1.9 Equivalent circuit model for an accelerometer and voltage measurement device. It is important to the effects of output and input impedance on the level of the signal. A sensitivity such as 10 mV/g begs to imply a linear relation between accleration and voltage output, but there will always be some variation from exactly linear behavior in any sensor with a nominally linear output relationship. We’ll take a closer look at linearity in the chapter on sensors. Power supply fluctuations, radiated electromagnetic waves from surrounding devices, etc., contribute to noise in the practical source. It’s obviously important to minimize noise, so that the signal of interest can be discriminated above the noise. Filtering the signal is often what can be done to attenuate noise. Finally, the accelerometer should nominally provide 0 V output at 0 g input, but there may be some constant or time varying shift or offset of the input-output curve from passing through a zero intercept. Thus, a signal source can be modeled as a dependent voltage source with practical limitations. Understanding the concepts of output and input impedance are important if a signal source to avoid loading. Practice Problem - Thermistor circuit A thermistor is a device whose resistance changes with temperature. Figure 1.10 shows a typical temperature vs. resistance graph for a thermistor. Consider the circuit using a BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 13 thermistor shown in Figure 1.11. Sketch the output voltage, Vo of the circuit. At 0 ˚C, what is the output impedance, looking into the terminals of Vo? Resistance vs. temperature for a thermistor Figure 1.10 Resistance vs. temperature for a typical thermistor Thermistor circuit Figure 1.11 Thermistor circuit. Dealing With Limitations of Practical Signal Sources The limitation of low voltage level can be addressed through amplification. Summary Concepts Practice Problems BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 14 2 Sensors and Transducers BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 15 3 Actuators BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 16 4 Digital Electronics BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 17 5 Microcontroller Fundamentals BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 18 6 Programming in C for Microcontrollers BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 A-1 Appendix A: Laboratory Experiments This appendix compiles the guidelines for the laboratory experiments in ME 106. BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 A-2 BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 B-1 Appendix B: Excerpts From Selected Data Sheets This appendix compiles excerpts from selected data sheets used in ME 106. BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 B-2 BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 C-1 Appendix C: Motion Control Mechanics This appendix compiles information relating to motor sizing and motion control mechanics used in ME 106 BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 C-2 BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 D-1 Appendix D: Arduino-Related Information This appendix compiles Arduino-related information used in ME 106 BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 D-2 BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 E-1 Appendix E: Lecture Notes This appendix compiles the lecture notes used in ME 106 BJ Furman ME 106 Reader rev. 1.0 January 6, 2011 E-2 BJ Furman ME 106 Reader rev. 1.0 January 6, 2011