Hardware Reference
In-Depth Information
Once the PID Tuner is compiled and running, and the Arduino is set up as per Figure
7-1
, the program controls
the PWM pin for the PID controller and simulates a linear rise and fall time for both an ON/OFF and a DEAD BAND
controller; the application uses single key commands to set tuning.
•
Keys
o
,
y
, and
h
turn on or off a single controller type:
•
o
= PID
•
y
= ON/OFF
•
Keys
c
,
r
, and
z
clear, reset, and zero the graph:
•
c
= clear
•
r
= reset
•
z
= zero
•
Keys
S
and
s
increase and decrease the first setpoint, and
A
and
a
increase and decrease the
second setpoint that is used for the DEAD BAND controller.
•
Keys
M
and
m
increase and decrease the PWM output on the Arduino.
•
Keys
p
,
i
, and
d
turn on and off the individual statements of the PID controller.
•
Keys
Q
,
W
, and
E
increase the individual gain values for the PID controller in .01 increments.
q
,
w
, and
e
decreases the gains:
•
Q
=
Kp
+ .01
•
q
=
Kp
- .01
•
W
=
Ki
+ .01
•
w
= Ki - .01
E = Kd + .01
•
•
Kd
- .01
The spacebar starts and stops the reading of controllers and pauses the graph's output.
e =
•
■
as of the writing of this topic, the pID tuner app is in preliminary development; it may be a bit buggy, and it
requires the connection to be manually changed in the code. the application also runs at the fastest running speed and
assumes a nonadjustable time of 1.
Note
Comparing PID, DEAD BAND, and ON/OFF Controllers
With a basic PID controller set up and running, it is time to discuss a couple of other common control methods and
how they compare to PID. Both DEAD BAND and ON/OFF controllers are from the logic controller family, meaning
they use logic controls such as
if
/
else
statements to determine how to change the output.
The DEAD BAND controller is common for thermostats, where a high and a low value are set. If the input is
below the low value, the controller turns on the output, and vice versa for the high value, creating a range that output
must be kept within.