Student name:_______________________ Hands-On Technical Training (HOTT) Workshop: Basic Soldering and PWM Motor Speed Control Table of Contents Hands-On Technical Training (HOTT) Workshop: Basic Soldering and PWM Motor Speed Control...................................................................................................................... 1 Table of Contents ............................................................................................................ 1 Workshop objectives ....................................................................................................... 1 Prerequisites .................................................................................................................... 1 Soldering Theory ................................................................................................................ 2 Soldering Techniques.......................................................................................................... 2 Pulse Width Modulation (PWM) Applications and Theory ............................................... 4 The PWM Motor Speed Control Project ............................................................................ 5 Overview ......................................................................................................................... 5 Detailed Circuit Explanation........................................................................................... 5 Fabrication Instructions .................................................................................................. 6 Test Procedure ................................................................................................................ 9 PWM Motor Speed Control PC Board Layout as Viewed from Component Side ....... 12 Finished PWM Motor Speed Control Board ................................................................ 12 PWM Motor Speed Control Board Project Schematic Diagram .................................. 13 Workshop objectives 1. Learn the theory of Pulse Width Modulation (PWM) and some typical applications. 2. Learn how to safely and effectively make good solder joints on printed circuit boards with through-hole components. 3. Learn how to recognize a bad solder joint. 4. Build and test the finished project: A simple PWM DC motor speed controller. Prerequisites There are no prerequisites for this workshop, although background in electronic circuits will be very helpful. Page 1 of 13 Soldering Theory Electronic soldering uses an alloy with a fairly low melting point (350° F typical). Since this is well below the melting point of copper or steel, the electronic components and circuit boards do not themselves melt; rather the solder fills in the spaces between components and bonds them together. The hand soldering you will be doing today uses wire solder that contains flux in the core. This flux improves the quality of the solder joints by deoxidizing the surface of the materials being soldered, thereby improving solder wetting, flow, and adhesion. The flux is made of a material called Rosin. Note that some solders contain acid flux in the core. This is intended for plumbing and should NEVER be used for soldering electronic components. Soldering Techniques SAFETY WARNINGS: - Avoid injury when cutting off excess lead lengths. Hold the leads so they cannot fly toward you or anyone else. - Wear safety glasses when soldering or desoldering. 1. Wear safety glasses while soldering to prevent injuries due to airborne solder or pieces of component leads which have been trimmed. 2. Keep the soldering iron tip clean. Wipe it often on a wet sponge or cloth, and then apply solder to the tip to give the entire tip a wet look. This process is called tinning, and it will protect the tip and enable you to make good connections. When solder tends to “ball” or does not stick to the tip, the tip needs to be cleaned and retinned. 3. Use only enough solder to make a good connection. Remember that this is a BAD saying when it comes to soldering: “The bigger the blob, the better the job.” 4. Lift the soldering iron straight up from the circuit board when the solder joint is complete. 5. Due to the small foil area around the circuit board holes and the small areas between foils, use the utmost care to prevent solder bridges between adjacent foil areas (see Figure 1). 6. If a solder bridge should develop, turn the circuit board foil-side-down and heat the solder between connections. The excess solder will run onto the tip of the soldering iron, and this will remove the solder bridge. 7. Place the soldering iron tip so that it contacts both the protoboard copper foil and the component lead and apply solder to them rather than directly to the soldering iron. Even so, it may be necessary to touch solder to the iron to initiate the flow of molten solder. 8. Hold the soldering iron steadily in place as much as possible. Do not try to use it as a knife, spreading the solder like peanut butter. 9. Try not to hold the soldering iron in place for more than a 4-second count, but realize that the components in this project are quite forgiving and will most likely 533566089 Page 2 of 13 endure heat application for 10 seconds or longer. This will NOT be true for every project. In general, the 4-second rule is a good guideline. Solder Bridge Figure 1: Circuit Board With and Without Solder Bridges 10. Refer to Figures 2 & 3 for examples of some good and bad soldering techniques. Figure 2: How to Make a Good Solder Connection Figure 3: Bad Solder Connections to Avoid 533566089 Page 3 of 13 Pulse Width Modulation (PWM) Applications and Theory Pulse width modulation is a technique commonly used for various applications, including but not limited to: DC motor speed control Variable frequency AC motor speed control LED brightness control High power audio amplifiers (Class D). Advantages: Very power efficient Easily controlled by digital devices such as microcontrollers. In this workshop, we’ll focus on PWM for motor speed and LED brightness control. The speed of a simple DC motor is roughly proportional to the applied voltage. Instead of sending pure DC to a motor, PWM uses pulses that have precisely controlled ON and OFF times. If the pulses are ON longer, then the average DC voltage sent to the motor will be higher and the motor will run faster. Conversely, narrowing the pulses’ on time will slow the motor down. A typical PWM signal might look something like this: Figure 4: PWM Signal This technical explanation of PWM is provided from www.wikipedia.org: Pulse width modulation uses a square wave whose duty cycle is modulated resulting in the variation of the average value of the waveform. If we consider a square waveform f(t) with a low value ymin, a high value ymax and a duty cycle D (see figure), the average value of the waveform is given by: As f(t) is a square wave, its value is ymax for . The above expression then becomes: 533566089 and ymin for Page 4 of 13 This latter expression can be fairly simplified in many cases where ymin = 0 as . From this, it is obvious that the average value of the signal ( ) is directly dependent on the duty cycle D. Keep in mind that although the ON and OFF times may vary, the frequency of a PWM signal will typically remain constant and will typically be in the tens of kilohertz range. This reduces the likelihood of creating noise within the range of human hearing. The circuit you will be building runs at approximately 25 kHz. The important variable here is not frequency, but duty cycle. By definition, “duty cycle” is the portion of each cycle that the signal is ON compared to how long it is OFF, expressed as a percentage. Again, this duty cycle is what controls motor speed and LED brightness. The PWM Motor Speed Control Project Overview You will learn and practice through-hole soldering techniques by building a PWM motor speed control circuit board. A photograph of an assembled board is shown in Figure 5. Figure 5: Finished PWM Project Board Detailed Circuit Explanation Refer to the schematic diagram near the end of this handout. The heart of this module is an LM555 IC chip configured as a variable duty cycle square wave oscillator. When pushbutton S1 is pressed, 9 Volt power is applied to the other components on the circuit board. IC1 begins oscillating immediately at a frequency and duty cycle determined by capacitor C1 and the setting of speed control potentiometer R2. D1 reduces the changes 533566089 Page 5 of 13 in frequency that would otherwise be caused by changing the R2 setting. Optional capacitor C2 improves circuit reliability and gives you additional soldering practice. D2 removes counter-EMF voltage spikes caused by the rapid switching of voltage to motor MOT1, thereby protecting IC1 from damage. LED1 will appear to dim and brighten as R2 is adjusted, although it is actually turning on and off very rapidly with a varying duty cycle. R1 limits the current through LED1, protecting it and IC1. Fabrication Instructions 1. Your workshop facilitator will provide you with a printed circuit board, 9 Volt battery, and the necessary soldering supplies. 2. Procure the needed parts from the E109 Supply Room, using the following Bill of Material and photographs as your guide. PWM Motor Speed Control Bill of Material Quantity 1 1 1 1 1 1 2 1 1 1 1 1 MOT1: Description Motor, 9 VDC Diode, 1N914B Diode, 1N4007GP Integrated Circuit, LM555CN IC Socket, 8-pin Switches, NO_PB Capacitor, 10nF (0.01 uF) 5kilohm Potentiometer Resistor, 330Ω (orange, orange, brown) LED, red Battery Clip, 9 Volt Battery, 9 Volt RefDes MOT1 D1 D2 IC1 X1 S1 C1, C2 R2 R1 LED1 n/a V1 D1: D2: 533566089 Page 6 of 13 X1 and IC1: Pushbutton S1: C1 and C2: R2: R1: LED1: Battery Clip: 3. Switch on your soldering iron to begin warming it up. 4. If necessary, review the Soldering Techniques section discussed earlier in this handout. 5. Components will be placed on the board in accordance with the PC board layout diagram at the end of this handout. Do not yet begin installing components. 6. Note that some components are polarized, that is, they have a positive and a negative lead. Here are tips to recognizing and properly installing those components which are polarity sensitive: a. Diodes D1 and D2 have a black stripe identifying the negative, or cathode, lead. These components will need to be installed as shown on the layout diagram, matching the location of the black stripe on the diode to the black stripe on the diagram. b. Locate the LED1 flat side on both the diagram and the actual LED. This is the cathode (negative side) and must be installed as shown. c. The battery clip leads should be attached red to positive and black to negative. d. IC socket X1 should be installed so that the small half-round cutout is on the left when the board is oriented as shown in the layout diagram. If your 533566089 Page 7 of 13 socket X1 has no cutout, don’t worry about it. More importantly, IC1 must be installed correctly. Some IC chips will have a semicircle imprint as shown below. If so, that should be pointing to the left (away from the motor). Some ICs are marked with a circle nearest to pin 1 rather than the semicircle shown in Figure 6. If your IC has a circle, that must go toward the lower left corner of the board. Figure 6: IC Chip with Left Side Marker 7. Refer to the illustrations on page 12 for component layout. 8. It is usually best to place and solder a few components at a time, focusing on the lowest profile components first. Install D1, D2, and R1 onto the board. Bend the leads slightly outward to hold the component in place during soldering. Solder them in place, obeying the rules outlined in the Soldering Techniques section. 9. Clip the leads close to the PC board, being careful not to send any clippings into any soft body parts of your body or anyone else’s. 10. Install and solder IC socket X1, but do not yet install IC1 into the socket. Remember to place X1 on the board with the cutout facing left. Bend the corner pins to hold the socket in place while soldering. 11. Install and solder S1, trimming the leads afterward if necessary. Note: The leads may need to be bent straight before inserting into the board. 12. Install and solder C1, C2, and LED1, paying attention to the polarity of LED1. Trim the leads. 13. Install R2, bend the leads slightly to hold it in place and make soldering easier, and then solder it. 14. Install and solder motor MOT1. Hints: (1) A larger soldering iron tip may be required for maximum heat transfer, (2) Position the iron so that the maximum tip surface area is in contact with both the copper pad on the board and the motor lead. 15. Install and solder the battery clip. 16. Inspect the finished board for solder bridges, cold solder joints, and incomplete solder joints. 17. Plug IC1 into socket X1, being careful to orient it correctly as mentioned previously. 18. Optional: Place a small piece of tape onto the motor shaft to make rotation more clearly noticeable. 533566089 Page 8 of 13 Test Procedure 1. Plug the 9 Volt battery into the clip. 2. Press pushbutton switch S1. Verify that the motor runs. 3. Adjust speed control potentiometer R2 from limit to limit while holding S1. Verify that the motor speed changes. 4. Optional: use an oscilloscope to view the motor drive signal across diode D2 using the following procedure: a. Turn oscilloscope Intensity knob clockwise to about the ¾ position and note that the Power LED illuminates as shown here: b. Connect oscilloscope probe or mini-hook leads across D2 as shown in this photo: 533566089 Page 9 of 13 c. Connect the probe or mini-hook cable to Channel 1 input, Input slide switch as shown here: d. Set the Mode to CH 1, Time/Div to 10 uS, Trigger Mode to Normal, and Trigger Source to CH 1, as shown in these photos: 533566089 Page 10 of 13 e. Adjust the black potentiometer, R2, fully clockwise. Hold the PWM circuit board pushbutton to make the motor and adjust the Trigger Level until the signal on the oscilloscope appears something like this: f. Adjust R2 counter-clockwise 3-4 clicks and readjust Trigger Level as necessary. Note that the waveform now appears something like this: 533566089 Page 11 of 13 PWM Motor Speed Control PC Board Layout as Viewed from Component Side X1/IC1 Finished PWM Motor Speed Control Board 533566089 Page 12 of 13 Student name:_______________________ PWM Motor Speed Control Board Project Schematic Diagram Page 13 of 13