Temperature Control for Hatching Chicks

© 2005 - 2008 Emant Pte Ltd www.emant.com
LabVIEW™ is a registered trademark of National Instruments

...Table of Contents Table of Contents............................................com 2 ..... 10 End of Exercise..........................................................................2 Objective..................................................................................................................................................... 3 Problem................................................ 4 PID Control.......... 11 Jul 2008 © 2005 ............................................................ 5 Thermistor.........................................6 Front Panel....................................... 3 Prerequisite.......................................................................................................................................................................................................................................................................................................................................emant.............................................................................................................................................. 3 Part List.................................................................................................................................................................................................................. 6 Build the circuit.......................................................................................................... 9 Block Diagram..............................5 Heater....................................................................................................... 4 Solution.......................2008 Emant Pte Ltd www....................................................................................................................................................................................

com Part List • • • • • • • • • EMANT300 Low Cost USB DAQ module Protoboard or Solderless BreadBoard R1 1.5K ¼ W resistor RT1 Thermistor 10K NTC Q1 MPSA13 Darlington R2 22ohm 3W resistor R3 220 ¼ W resistor D1 LED LabVIEW Development System ver 7. Control Lamp output using PWM (Pulse Width Modulation) Using PID VI Prerequisite • • Must be familiar with Data Acquisition and LabVIEW (preferably have completed the exercises in the Build the Light Intensity Logger instructional guide) Basic electronics (simple resistor and transistor circuits – preferably have breadboarded simple circuits before) You should have the following folder PID Temperature Control.emant.Objective • • • Learn Interfacing Electronics to the USB Data Acquisition Module. It can be copied from the CD or downloaded from www. Jul 2008 © 2005 .2008 Emant Pte Ltd www.com 3 .emant.0 or later Warning: The information described is for instructional use only and is not intended for industrial purposes.

7-38.2008 Emant Pte Ltd www. lowers the percentage of hatchability.3 C. After searching through some websites. and the derivative (D) controls (PID Control). Can you help Peter? Solution One way to heat up the incubator would be to use a heating element. If the temperature remains beyond either extreme for several days.emant.1-39. Jul 2008 © 2005 . Long periods of low temperatures will reduce the rate of embryo development. he found the following information: Maintain the temperature in the 37. and causes abnormal embryos. We will use the proportional (P). we will make use of a 22ohm 3W resistor to simulate the heating element. overheating speeds up embryo development.2 C temperature range (37.Problem Peter was asked by his science teacher to incubate a few chicks for a science project. it is difficult to keep the temperature fairly constant using a lamp without some form of control. the integral (I). In our exercise.4 C.2-38. range. hatchability may be severely reduced. A basic control solution comprises the following We measure the temperature using a thermistor and heat up the incubator using a lamp. However.com 4 . Overheating the embryo is much more damaging than is under heating it. if possible). Avoid temperatures outside the 36. Excessively low temperatures will kill the embryos.

Thermistors have an electrical resistance that varies non-linearly with temperature.com 5 . but never eliminate. B. let's take a look at how the PID controller works in a closed-loop system using the schematic shown above. • • • Kp = Proportional gain Ki = Integral gain Kd = Derivative gain This signal (u) will be sent to the lamp.vi has already been created for you.emant.2008 Emant Pte Ltd www. and C are constants which can be determined by measuring three sets of resistance and temperature values during calibration. and the new output (T) will be obtained. This new output (T) will be sent back to the sensor again to find the new error signal (e). the steady-state error. The PID. This error signal (e) is sent to the PID controller. The controller takes this new error signal and computes its derivative and its integral again. Thermistors are specified according to its nominal Jul 2008 © 2005 . Go to the PID Temperature Control folder and open PID. and improving the transient response. T is the absolute temperature (in Kelvin) and A. but it may make the transient response worse. A derivative control (Kd) will have the effect of increasing the stability of the system. The signal (u) output from the controller is equal to the proportional gain (Kp) times the magnitude of the error plus the integral gain (Ki) times the integral of the error plus the derivative gain (Kd) times the derivative of the error. The variable (e) represents the tracking error.vi Study the VI if you wish. Thermistor Thermistors are widely used because of their sensitivity. reducing the overshoot. An integral control (Ki) will have the effect of eliminating the steady-state error. Most thermistors have a negative temperature coefficient (NTC). ruggedness and low cost.PID Control First. the difference between the desired input value (R) and the actual output (T). It is basically our LabVIEW implementation of the above formula. small size. A proportional controller (Kp) will have the effect of reducing the rise time and will reduce. This process goes on and on. The Resistance -Temperature characteristics of most thermistors can be described by the Steinhart-Hart equation: 1/T = A + B*(Ln RT) + C*(Ln RT)3 RT is the resistance of the Thermistor. their resistance decreases with increasing temperature.

The main advantage of a PWM circuit over a power amplifier is the efficiency. we will drive the resistor by PWM (Pulse Width Modulation) using a darlington NPN transistor.5K ¼ W resistor RT1 Thermistor 10K NTC Q1 MPSA13 Darlington R2 Heating Resistor 22 ohm 3W Optional Components R3 220 ¼ W resistor D1 LED Jul 2008 © 2005 .VI Heater We will be using a 22ohm 3W resistor to act as the heating element. As the thermistor VI has been already developed and explained in the application note Measuring Temperature using Thermistor. we will need to provide a current source to convert the resistance to voltage. Parts List R1 1.resistance at 25 oC and commonly available thermistors range from 250 ohms to 100 kohms The thermistor that we are using has the following characteristics • • Nominal resistance @ 25 oC: 10 kohms negative temperature coefficient (NTC) As the DAQ module Analog Input measures only voltage. the average on time may be varied from 0 to 100 percent. We will use the 8 bit current DAC (digital to analog converter) and set the current to 100uA.com 6 .2008 Emant Pte Ltd www.emant. At a 50% level. Build the circuit Construct the following circuit either using a solderless breadboard or a protoboard. The darlington transistor is used over a regular NPN transistor to reduce the current output requirement of the digital output. In this manner. almost all of which is transferred to the load. we will use the sub VI Temp Control Thermistor. To reduce the heat from the electronics. the PWM will use about 50% of full power. a variable amount of power is transferred to the load. A PWM circuit works by making a square wave with a variable on-to-off ratio.

com 7 .2008 Emant Pte Ltd www.emant.Connection diagram Circuit constructed using ProtoBoard Jul 2008 © 2005 .

4.1. IDAC. If you are using the Light Application Adaptor. Connect the EMANT300 to the USB port.vi from the PID Temperature Control folder. otherwise your analog input measurements will be wrong. Connect the components.2008 Emant Pte Ltd www. Jul 2008 © 2005 . VDD. Open Temperature Control for Hatching Chicks. 2. 5.emant. You will use this VI to verify that your circuit is built correctly. Connect the 22 ohm load resistor and thermistor in a way that they make good thermal contact. DO NOT CONNECT THE EMANT300 TO THE USB PORT YET.is already connected to AGND. GND are available as screw terminals. Connect to the EMANT300. Take note of the connections for the transistor. Also in the Light Application Adaptor. Note: If you are using the Light Application Adaptor. PWM. it is important that this connection is made.com 8 . REFIN. 3. If you are connecting directly to the EMANT300. This connection allows the internal reference to be connected correctly. AINCOM is already connected to AGND. AIN3.

Front Panel Jul 2008 © 2005 .emant.com 9 .2008 Emant Pte Ltd www.

The sub VI Temp Control Thermistor. 4. 9.2008 Emant Pte Ltd www. 6. you may not be able to heat up the area around the thermistor to above 38 C (this will depend on the environment of the room you are working in). 5. The VI also allows you to control the heater output manually by setting the manual override. 7. Note that setting the PWM output to 0 turns off the heater and 100 turns on the heater completely. The VI first configures the EMANT300 to use the PWM output rather than the counter. 3. The temperature should change. Click the Run button to run the VI.VI returns the temperature in Celsius as measured by the thermistor. the gauge output and the LED Jul 2008 © 2005 . this measured temperature value is then compared with the set value to generate the PID output. the LED intensity should also change as you adjust the heater output. As the load resistor is not designed to be a heating element. Switch the Manual Override down. In normal operation.Block Diagram 1. If you have connected the optional LED. One way to check the your circuit is to observe the temperature when you change the PWM output. 2.emant. 8. This will set the heater output to manual override. When you change the manual heater setting dial.com 10 . The PID output is between 0 to 100% and is used to drive the PWM output.

emant.Observe the temperature reading.com 11 .intensity will change. then you are ready to set the temperature and put the heater under PID Control. End of Exercise Jul 2008 © 2005 . 10. Set the PWM to 100.You can experiment with different set points as well as different PID values. Call the temperature measured Tamb. To understand how to set the PID values is outside the scope of this exercise but information on PID tuning is readily available from the web or textbooks on control. If you observe the LED intensity changing. 13. 11. Call the temperature measured Tmax. I and D values as shown in the front panel.Set the PWM to 0. 12.2008 Emant Pte Ltd www. is it giving the correct values? If yes.Press to stop the VI. Use the P.your circuit is connected OK. Set the control temperature between Tamb and Tmax that you measured earlier.

Sign up to vote on this title
UsefulNot useful