Feedback and Control Systems Project
Feedback and Control Systems Project
Technology Complex
Application
of PID
Controller
A self-balancing pole using angle sensor
and microprocessor
I.
Introduction
II.
Theoretical Framework
MPU 6050
2.375-3.46 V
1.71V to VDD
I2C
VLOGIC
AD0
SCL
SDA
gizDuino V4.1
External: 8-12 V USB: 5V
ATmega 168/168P
ICSP
20 I/Os
3.3V
16MHz and 12 MHz
2.7 x 2.1 in
Methodology
1. The MPU-6050 sensor is attached to a small PCB assembly to hold
interconnecting wires. The small PCB assembly is attached to a pole that
must be made to stay in upright position by the DC motor.
2. The pole is attached to the shaft of a DC motor. The DC motor is then
attached to a frame to be mounted on a breadboard.
3. The terminals of a DC motor are connected to the output of the H-bridge
motor driver circuit.
4. The control terminals of the motor driver circuit is then attached to Arduino
digital out pin 9 and 11. The two pins corresponds to forward and reverse
motor operation.
5. The potentiometers for proportional, integral, derivative and set point
control are then attached to Arduino analog input pins A0 to A3 respectively.
Block Diagram
Arduino
Reference
Angle
Motor
Driver Circuit
DC Motor
MPU 6050
(Angle
Sensor)
Figure 3.1. Block diagram of the system
Schematic Diagram
IV.
Experimental Setup
a. Components
i. DC motor
ii. MPU-6050 (Angle Sensor)
iii. 4 - 100K Potentiometer
iv. Motor Driver Circuit
v. Arduino
b. Actual circuit
Figure 5.1. The response of the system when the stick is initially on the left
side.
Figure 5.2. The response of the system when the stick is initially on the
right side.
90 ( 10.1 ) =81
to
response time is approximately 327 ms. The response curve does not
manifest any overshoot or oscillations, but is not yet zero. The error is
made smaller as time progresses due to the integral action.
Figure 5.2 shows the response of the system when the stick initially
points to the left side. Notice again the fast response of the system as the
angle is quickly reduced close to zero. By the same definition of response
time as given above, the response time is approximately 134 ms. The
response time is smaller than is shown in Fig. 5.1, but notice that there is
a manifestation of an overshoot. The overshoot made the angle less than
the reference angle but it is made closer to zero as time progresses due to
the integral action.
Figure 5.3 shows the response of the system when already stabilized to
reference angle. At about
subjected to the system by forcing the stick to move to the right. Notice
the quick response and the oscillatory motion as the system tries to bring
back the stick to upright position. When the stick is forced to move to the
left at about
for the system to take the stick back to upright position again. The
asymmetry of these results is due to the characteristics of the DC motor
itself as discussed in the previous paragraph.
VI.