U12 as temperature controller
Posted 27 August 2012 - 06:27 AM
I’m currently trying to use a U12 labjack in order to realize a temperature controller for one of my equipment.
The first electronic circuit allows me to measure precisely the temperature.
By using a voltage divider circuit and the formula R2 = Va / [((Vs-Va)/R1) – (8.181µ * Va) + 11.67µ] as presented in the U12 User’s guide, I am able to estimate the thermistor resistance value and to deduce the temperature via a Labview program. The thermistor characteristics can be found here
The other electronic circuit is used to control the current/voltage injection on two heating resistances in order to heat the equipment.
I used the labjack AO0 and a NPN transistor BD243 (Data sheet) in order to control the applied voltage in the two heating resistances. I use a PID controller programmed in labview in order to control the AO0 voltage and to regulate the temperature in the equipment.
I have two problems with my circuits.
The first one is with the temperature measurement circuit. If I use it alone without any other operation on the labjack it works quite fine. I can measure the temperature and its variation very precisely (even more precisely if I use it with a differential measurement). But if I start to modify the output value of the AO0 of the labjack (without any modification of the temperature in the surface where my thermistor is placed) I observe, at each variation of the AO0 output value, an important variation in the the voltage measured by the AI0 input of the labjack. Therefore the deduced temperature varies whereas there is no variation of temperature in reality. How could I get rid of those variations in the voltage measurement when I use an analog output of the labjack?
The other problem comes from the second circuit. When I set the AO0 output of the labjack to a high voltage (>3V) in order to supply the base of the NPN transistor, the majority of the power coming from the external power supply is dissipated in the NPN transistor and not in the heating resistance. Do you have a solution to dissipate the majority of the external power supply in the heating resistance? Maybe I should use the digital IO of the labjack and a Darlington arrays as proposed in this subject ? But would it be compatible with my external power supply of 12V/1A?
Thank you a lot in advance for your interest in my demands.
PS : My knowledge in Electronics are quite basics so I apologize for those beginner questions :)
Posted 27 August 2012 - 02:36 PM
So you see an effect on AI0 when you change AO0. If you don't change AO0, you don't see a problem on AI0.
How could I get rid of those variations in the voltage measurement when I use an analog output of the labjack?
First, convince yourself that it is not a problem with the U12. Remove all connections from the U12 except for USB. Open LJlogger and you should see that all 8 single-ended inputs read about 1.4 volts when floating like this. Now vary "Analog Out 0" and you should see that changing it has no effect on the analog inputs.
The voltage from your thermistor circuit is proportional to the excitation voltage. You are using +5V as your excitation, so perhaps when you change your output circuit that is causing +5V to change. What if you disconnect everything from AO0 and then change it? What if you use AO1, set to perhaps 4.0V, as your excitation rather than +5V?
You are trying to control how much power is delivered to the heater over a given time. The most common way to do this is with PWM control. The idea is that you turn power to the heater on/off, and the percentage of time on determines the percent power you are delivering to the load. For example, if you toggle power on/off at 10Hz with a 50% duty-cycle, you will deliver 50% power to the load.
When I set the AO0 output of the labjack to a high voltage (>3V) in order to supply the base of the NPN transistor, the majority of the power coming from the external power supply is dissipated in the NPN transistor and not in the heating resistance.
The U12 is not the best at doing PWM output. You have to use the PulseOut functions to create the PWM, and then pause once in a while to read your analog output so you can calculate a new duty-cycle and then to PulseOut again.
Our newer devices, such as the U3, are much better at doing PWM. You can configure a timer on the U3 in PWM output mode, and then just update the desired duty-cycle whenever you calculate a new value.
I will see if someone else can comment about your technique of trying to do analog control with a transistor.
Posted 28 August 2012 - 11:27 AM
Posted 03 September 2012 - 01:34 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users