7encoder-atmel

7encoder-atmel - Encoder Laboratory Encode-1 DC Motor with...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Encoder Laboratory Encode-1 © San José State University Department of Mechanical and Aerospace Engineering rev. 2.1 06OCT2007 DC Motor with Shaft Encoder Learning Objectives By the end of this laboratory experiment, the experimenter should be able to: Explain how an encoder operates and how it can be use determine rotational speed and angle of a motor shaft Use the IRL520 power MOSFET to control power devices Explain the concept of Pulse-Width Modulation to control the speed of a DC motor Interface the Atmel Atmega 128 microcontroller to an encoder Components Qty. Item 1 Atmel Atmega 128 microcontroller, STK500 and STK501 interface boards, and serial port cable. 1 1M Ω resistors 1 Solderless breadboard 1 1N4148 diode 1 IRL520 power MOSFET 1 DC motor with encoder Introduction In this lab you will investigate how rotational speed and rotational angle can be determined using a rotary encoder. A rotary encoder consists of a disk with alternating opaque and clear radial regions. In operation, a light source is positioned on one side of the disk, and a photosensitive device, such as a phototransistor is positioned on the other side of the disk. As the disk rotates, the passage of the opaque and clear regions of the encoder disk alternately block and allow light to impinge on the receiver, which produces corresponding voltage pulses. The rotational speed of the encoder disk can be determined by counting pulses during a known time period. The angle of rotation corresponds directly to the number of pulses, since the number of pulses per revolution is constant. We will also look at controlling the speed of a DC motor using the concept of Pulse-Width Modulation (PWM). Procedure Function Generator Output to Control Duty Cycle 1. Set up the function generator (FG) to output a 1 kHz square wave (remember to set the output termination to HIGH Z). Look at the signal on the ‘scope. 2. Set the amplitude to 8 V p-p 3. Offset the waveform by 4 V, so that you have a 0 to 8 V square wave. 4. Select the ‘% Duty’ function on the FG by pressing the Shift key, then the Offset key.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Encoder Laboratory Encode-2 © San José State University Department of Mechanical and Aerospace Engineering rev. 2.1 06OCT2007 5. Rotate the knob and see what happens to the output waveform when you vary the duty cycle. What are the limits you can set the duty cycle to? What does “duty cycle” mean? Describe in your own words. DC Motor Speed Contol Using Duty Cycle 6. Build the circuit shown in Figure 1. Don’t forget the diode. Important note : MOSFET’s are very sensitive to static electricity. Make sure that you are not carrying static charge before you handle these devices. It is best to work on a properly grounded anti-static surface with an anti-static bracelet on your wrist. If these precautions are not available, then discharge yourself by touching a grounded metal surface (such as the frame of the bench) before you handle a MOSFET. Always handle a MOSFET by its large metal tab
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

7encoder-atmel - Encoder Laboratory Encode-1 DC Motor with...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online