Sunday, November 28, 2010

Peltier driver

Introduction
A peltier element can be looked upon as a resistance through which if you send current in one direction it heats up and if it is sent in the opposite direction it cools. Such an element is extremely important for situations where you need very precise temperature control and as far as I know Thorlabs has been able to achieve a temperature stability of .001 K using Peltier element.
However, the main challenge in working with a peltier element is that it has an extremely low resistance ( the one I am using has a resistance of 2 ohm) and often requires a high current ( of the order of 1A or more depending on the situation). Thus the challenge is to build effectively a voltage controlled current source but one which can give an output current of 1-2 A.
Normally one would think that a high power transistor would suffice. However, for such transistors, the hfe is often very small and hence one would require a boosting stage after the control circuit. This increases the complication because making a two stage amplifier is a really messy business.

Circuit diagram

The original concept for the following circuit was taken from a diploma thesis of a couple of students (George Kolling and Marting Warning) from University of Limerick. However, their circuit required the use of an OP-AMP which could deliver a high current ( of the order of hundreds of mA, normally 741 delivers of the order of 10-20 mA). Since that was not easy to get, the circuit was modified to be able to operate using 741. The circuit diagram is given below:
The initial inversion stage is added to make the output and the input to be of the same phase. The first stage of push-pull amplifier by the BC series of transistors is added because the second push-pull stage made by TIP series requires a base current of the order of 100 mA. In the original circuit there was only one stage push-pull amplifier made of TIP series and the required current was supplied by the OP-AMP LM6167. However, due to non-availability of OP-AMPs capable of delivering 100 mA, the first stage of the push-pull amplifier was used.
This circuit is capable of delivering upto 3-4 A current. However, till now it has been tested for a sinusoidal current with a maximum of 1.2 A, which was of course sufficient for the purpose I was using. The current was limited by the current supplying capability of the power source I had.
The 100K pot giving the feedback to the second Op-Amp controls the gain of the circuit.

Conclusion

This circuit can be used not only to drive a Peltier element, but also many other applications where a high current is required. It can act effectively as a VCCS with a maximum current of about 3-4 A or maybe more.
If high current Op-Amp is used then the first stage of the p-p amplifier as well as the initial inverting stage can be removed.


Thursday, November 11, 2010

Low frequency PID controller

This post is about how you can develop your own low frequency PID controller. Before I start giving out the details, let us refresh our knowledge about PID-

Theoretical Background for PID control

Whenever we want a system to reach a definite set point, we generate an error signal, which is a measure of how far our system is from the setpoint we want. usually it is in the form of a voltage. The most common example is that of a temperature controller. Usually the difference of resistance of the temperature sensor from that of the desired resistance, which is achieved when the desired temperature is reached, expressed in terms of the voltage gives the error signal. The PID controller generates a correctional signal, which drives the control unit of the system, with the correctional signal being a function of the error signal.
The output of the PID controller as a function of the error signal is given as follows-


As can be seen, the output voltage is proportional to not only the error signal but is also dependent on the 'history' of the signal as is given by the integral of the error signal and is also dependent on the rate of change of the error signal.
P, I and D controls how much will each of the terms affect the output voltage.
If we have only P, i.e., I and D are zero, then the system either oscillates about the setpoint which we are trying to achieve or never completely reaches the setpoint. The integral term kinds of dampens the oscillation about the setpoint while the differentiation terms increases the effect of dampening.
However, now definite theory of this process exists and though there are some established norms for determining the values of P , I and D for some specific systems, their choice is mostly made by trial and error, checking when the system responds in the most optimised manner.

Circuit for a low frequency PID control

By now most of the people who are familiar with electronic implementation of calculus, are thinking that this can be done using OP-AMPs, or operational amplifiers. It is true using standard Op-AMPs like 741 for low frequency operation. Below I am giving the circuit for the PID controller that I worked on for precision temperature control-

Multiple Op-Amps have been used other than the basic requirement of 4 so that we can maintain the frequency stability of the differentiator and integrator stages and also to maintain the required phase relationship between the error signal and the output voltage. The resistors which are equal are labeled as R and the variable resistors which are used are of 10K Ohm for the P stage and 1 M Ohm for the integrator and differentiator stages.

Design Hurdles

The main difficulty was faced during developing the integrator stage. It is the most unstable stage of the whole circuit and often showed a large offset voltage and low frequency modulation. It was removed by placing a high values resistor parallel to the feedback capacitance.
Another hurdle which was faced was due to impedance mismatch of the differentiator stage and adder stage. It lead to huge flyback for the D stage and was removed by using resistors for the adder stage comparable with that of the feedback resistance of the amplification section of the D stage,

Conclusion

All the ICs used was 741. This circuit is designed for very low frequency operation and was mainly tested for frequencies near 100 Hz. For high frequency operation, the integrator and the differentiator circuits have to be modified to compensate for bias stability of integrator and noise stability for the differntiator.