Page 813 - Mechatronics with Experiments
P. 813
LABORATORY EXPERIMENTS 799
Furthermore, this voltage may be passed through a low pass filter before it is connected
to the ADC,
V ( jw) = LPF( jw) ⋅ V ( jw) (11.132)
ADC mea
where LPF( jw) is the frequency response of the low pass filter.
11.12 EXPERIMENT 12: CLOSED LOOP DC MOTOR
POSITION CONTROL
Objectives
Closed loop position control of a DC motor using a position feedback sensor and PWM
output signal in conjunction with an H-bridge amplifier circuit, and PIC microcontroller.
Components
Item Quantity Part No. Supplier
DC Motor 1 154915 (www.jameco.com)
Optoisolator 1 114083 (www.jameco.com)
Potentiometer (200 Ω) 1 181972 (www.jameco.com)
IRF511 (MOSFET) 2 39C4310 www.newark.com
IRF9520 (MOSFET) 2 07B1521 www.newark.com
1N4003 Diode 4 76970 www.jameco.com
Opto-interrupter 2 273560 www.jameco.com
Disk with holes 1 Can be constructed in lab A tick paper or plastic disk
PIC Demo Board/connectors 1 set DM163022 or DV164006 www.microchipdirect.com
Theory
In this lab, we implement a closed loop position control of a DC motor using a PIC
18F452 (or PIC 18F4431) microcontroller. In order to perform closed loop position control,
we need a position sensor. For the purpose of understanding the incremental encoder
working principles and keeping the cost low, we will construct a very simple “home-made”
incremental encoder. For that we need two things (Figure 11.33):
1. A disk that has evenly spaced holes that will block and pass the light alternately. For
our purposes, we will have 4 holes on the disk. The higher the number of holes, the
better the position sensor resolution, but the more difficult it is for us to mechanically
assemble the experiment. So, we will experiment with a relatively low resolution
home-made incremental encoder. This disk can be made from a thick paper or plastic
or glass.
2. Two opto-interruptors. Opto-interruptors are placed over the disk. As the disk rotates,
the light path is interrupted by the solid sections and passed by the hole sections of the
disk. If we use only one opto-interruptor, we can detect the change of position, but we
cannot detect the direction of position change, that is we cannot detect the direction
of speed. So, the second opto-interruptor is used for that purpose. The second opto-
◦
interruptor is mechanically placed at a 90 mechanical phase angle relative to the
first opto-interruptor position over the hole–solid sections of the disk. Note that 360 ◦
is considered a complete cycle of the one hole and one solid section of the disk. If
the disk is rotating in a clockwise direction (forward), the digital output signal from