Post_1 - Element14

advertisement
Oven Control with PSOC 4
Post 1
Hi All!
I find the pair of op-amps in PSOC very attractive. Many dreams may come true for these
op-amps. For full utilization of these op-amps I thought of implementing a PID
controller. It is a very accurate and effective controller since the control vector is not only
proportional to the error E, it is also proportional to the differential and the integral of the
error as given by the following equation:
dE
S  KP E  KD
 K I  Edt
dt
Here the op-amps will be used as a differentiator and integrator. The block diagram is
given in post_1_blockdia3.bmp. If only a micro-controller is used the differentiation and
integration has to be done numerically. This is time consuming and may fail to control
effectively. Even when a DSP or a modern micro-controller with hardware multiplier is
used speed of computation is a problem. The computation is usually done off-chip with a
separate IC. The PID controller chip is not available in Bangalore market. If I can get it I
shall use it and compare the results with the PSOC implementation. I shall also code the
numerical differentiation and integration in ARM of PSOC4 and compare the results with
op-amp implementation. I shall implement the project in PSOC4 as well as PSOC3 that I
already have. This will help us to understand what benefit we can get with the enhanced
version, PSOC4.
Program Steps:
1. Initialize all the blocks. Set the desired or set point parameter.
2. Sample the parameter voltage from sensor at regular intervals and then send it to
ADC and MCU.
3. Compute Error Voltages, E= Actual parameter voltage – set-point parameter
voltage
4. Send it to DAC and then to 2 op-amps in differentiator and integrator modes
5. Get KP from the constant of proportionality from the register in MCU
6. Compute KPE in the hardware multiplier
7. Get the op-amp outputs through sample and hold and ADC after a set of samples
are computed
8. Compute S following above equation.
Hardware multiplier is used here twice.
9. Send S to output port for actuation
10. Modify KP , KD , and KI and store in the register
11. Go back to step 3.
First temperature control will be attempted, as temperature sensors are easily available in
the market. The set-point temperature will be kept at around 45 0C. The power
consumption for heating the oven will be less and can be managed with a rechargeable
battery. This will help us for an easy demonstration. The application I can think of is: prebaking of photo-resist which requires an accurate temperature control. The control will be
done for multiple temperature sensors placed at different locations of the oven. I have a
plan to implement PID control for other parameters but it depends on the availability of
sensors and the actuation feasibility.
Download