





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Lab; Class: Introduction to Electronics; Subject: Electrical and Computer Engr; University: University of Illinois - Urbana-Champaign; Term: Unknown 1989;
Typology: Lab Reports
1 / 9
This page cannot be seen from the preview
Don't miss anything!






Laboratory #9 – pulse width modulation (revisited) Grade Pre-lab: / Lab: / Total: / Objectives
At this point you should have a basic, workable design – a circuit that will navigate the track through most turns, will detect the presence of a split, and will stop on a white piece of paper. From now until the design challenge you should focus on improvements to your circuit so that it navigates every turn, and every split. Your design must be robust enough that it performs well even though the vehicles are all different, even though the table used for the challenge track has a slightly different reflectivity, even though ... You get the idea. During this lab you will experiment with a sequential circuit that can be using to control the speed of the motors. In lab 3 you experimented a little with pulse width modulation (PWM) to drive the motors. Instead of relying variable resistor to vary the motor speed we will supply the motor maximum voltage/current for a limited period of time – a period set by the duty cycle of the signal. The longer the motor is provided with current during each period of the square wave, the faster the motor runs. A block diagram of the pulse width modulator is shown in the figure below. It consists of an oscillator (74LS624)
Pulse Width Modulation - more robust speed control So far the only way we can control the speed of the vehicle is to control the value of the variable resistor attached to the vehicle. As you found when you played with the different navigational circuits that some of the designs - the tape following design in particular - are very sensitive to the speed. In fact the tape following designs will not work without much additional circuitry, and lots of sensors OR the pulse width modulator (PWM). The most important contribution of the pulse width modulator is that of providing a larger range of control at the slower speeds. Because the pulse width modulator pulses the motor with maximum voltage the torque provided is much greater than the torque generated by applying a smaller voltage to the motors provided usng the variable resistor. Because the maximum torque is achieved even when the motor is running slowly, the car can run at VERY slow speeds with the PWM. a) investigate the workings of the Pulse Width Modulator - First we will look at how the PWM works using the digital designer's friend – the logic analyzer. You could monitor the output signals with the oscilloscope since they are time varying, periodic signals, but the oscilloscope only has two channels and is not optimized to interface with TTL logic. A logic analyzer on the other hand has 16 channels and can be programmed to interface with several types of logic (TTL, CMOS ...). ------------------ SETTING UP THE PWM With the vehicle on its stand and the power off, place the PWM module on the protoboard below the CA, and connect pin 8 to ground and pin 16 to Vcc both supplied by the battery through the logic voltage. ------------------ SETTING UP THE LOGIC ANALYZER The logic analyzer (see photo) allows you to monitor 15 time-varying digital signals that are not necessarily periodic. The probe is a ribbon cable with a connector on one end that plugs into the logic analyzer (lower right) and 16 probes on the other end that attach to points in the circuit under test. To connect to points in the circuit we will be using either a 14- or 16-pin test clip to make the signals more accessible. These test clips attach to individual chips - every pin on the test clip should touch only one pin on the IC. Make sure that the clip is firmly seated - ask the TA to check it the first time. You should be able to see why we need these test clips - it is much easier to attach the logic probes to the leads on the test chip than to the chip itself. Once the test clip is in place the individual probes can be attached to the leads and the signals monitored. Attach the logic analyzer to the oscillator (74LS624) - Since the pulse width modulator (PWM) is a sequential circuit it needs a clock pulse to transition from one state to the next. In this circuit the rising edge of a clock
pulse (square wave with 50% duty cycle) is used to change the state of the counter so that it continuously cycles through 0-15. Carefully squeeze the 14-pin test clip and clip it to the oscillator (74LS624) - the chip on the right as viewed from above. The pins on the logic probe are numbered just like the chip. Find the ground pin on the oscillator chip and connect the logic probe with the black label to it - this provides a ground reference for the other signals. Connect the probe with the brown label to pin 6.
-- Controlling the speed of the vehicle Make certain that both PWMs and MUXs are connected to both motors so that you can control with the switch on the MUX module the speed of both motors. To do this you need only use the output of pin 5 from the PWM to drive the CA modules. The CA is then hooked up to the motors in the standard way. Initially set all of the switches on a lowest setting - lets say 0010 (only switch 2 is UP), turn the variable resistor on the car all the way down so that it is at its lowest value - you want the PWM to provide all the speed control.