Temperature controler

Thread Starter

Jops

Joined Mar 8, 2017
7
Hey,
I am designing a microcontroller based temperature controller(-10 to 90 degree celsius) with thermistor and solid state relay with resistive load. 240v, 240W. ? My plan is to use PIC 16f877A()since it has ADC and 10kohm NTC thermistor with voltage divider as input. I am not sure whether I should use 240 ohm resisitive load with BJT at output. Are these the best parts to use? Any better solution to save space and time?How can I connect the resistive relay to PIC?
 

Dodgydave

Joined Jun 22, 2012
11,395
I have done it with a pic and ntc thermistor, but its easier with a Lm35 sensor, for what your going to make you can buy one ready-made with a led display on ebay a lot cheaper than you can make..yes i know it defeats the object!!
 

Thread Starter

Jops

Joined Mar 8, 2017
7
I have done it with a pic and ntc thermistor, but its easier with a Lm35 sensor, for what your going to make you can buy one ready-made with a led display on ebay a lot cheaper than you can make..yes i know it defeats the object!!
That is exactly what i thought. But this is an assigned task and I am to use thyristor. Glad you have done it with PIC. It will be relieving if you could answer the following queries.
How do you compare to set temperature limits in PIC?
How do you set the limits in PIC?
How can you connect a resisitive solid state relay to PIC?
 

Dodgydave

Joined Jun 22, 2012
11,395
To compare limits, you need a two channel A/D pic or more, one channel is the sensor, the other is a potentiometer setting a voltage, and you just compare the two results of the a/d registers, and when they are equal you tell the pic to switch the output on/off.

You need to add hysteresis in the comparing, like 2- or 3degrees C, this allows the relay to switch better and prevents Chatter.


If you're using a solid-state relay, you just need a series resistor in the opto led circuit..

Best to post the model of the relay then we can assist you further to advise if you can drive it directly or with a resistor.
 

Reloadron

Joined Jan 15, 2015
7,888
That is exactly what i thought. But this is an assigned task and I am to use thyristor. Glad you have done it with PIC. It will be relieving if you could answer the following queries.
How do you compare to set temperature limits in PIC?
How do you set the limits in PIC?
How can you connect a resisitive solid state relay to PIC?
So this is a homework assignment as you refer to assigned task? Yes, you can use a controller, a SSR and some programming.

Ron
 

DickCappels

Joined Aug 21, 2008
10,661
(Some text removed for clarity)

How can you connect a resisitive solid state relay to PIC?
You can connect the output of the PIC in the same was as the output of the gate in your schematic (reproduced below for convenience) is coupled to the input of the optoisolator. .

upload_2017-3-9_20-55-31.png

By the way, do you know this circuit is ok? The 56 ohm resistor concerns me a little, and of course the output of your optoisolator needs to be rated at more than the peak voltage across Line and Neutral.
 

Reloadron

Joined Jan 15, 2015
7,888
You can connect the output of the PIC in the same was as the output of the gate in your schematic (reproduced below for convenience) is coupled to the input of the optoisolator. .

View attachment 122131

By the way, do you know this circuit is ok? The 56 ohm resistor concerns me a little, and of course the output of your optoisolator needs to be rated at more than the peak voltage across Line and Neutral.
Dick, as drawn when the triac fires won't it place a short across Line and Neutral? Should there be a load in series with the triac? Something just doesn't look quite right, what am I missing?

Ron
 

Thread Starter

Jops

Joined Mar 8, 2017
7
To compare limits, you need a two channel A/D pic or more, one channel is the sensor, the other is a potentiometer setting a voltage, and you just compare the two results of the a/d registers, and when they are equal you tell the pic to switch the output on/off.

You need to add hysteresis in the comparing, like 2- or 3degrees C, this allows the relay to switch better and prevents Chatter.


If you're using a solid-state relay, you just need a series resistor in the opto led circuit..

Best to post the model of the relay then we can assist you further to advise if you can drive it directly or with a resistor.
 

Thread Starter

Jops

Joined Mar 8, 2017
7
I might be stupid but still trying to understand PIC
Can I store two fixed temperature values in EEPROM and compare the measured value from thermistor?
 

DickCappels

Joined Aug 21, 2008
10,661
Just want to make this clear: The circuit in post #11 was supplied by the thread starter and I only reproduced it for convenience. I do not endorse the circuit to the right of the LED in the optoisolator.
 

AnalogKid

Joined Aug 1, 2013
12,127
The response curve (resistance versus temperature) of a platinum thermistor looks logarithmic, but it is more complex than that. While you can program the equation into a pic to solve for the trip voltage for any given temperature, it is easier to create a lookup table with 86 values.

Separate from that, a PIC can drive the optotriac directly, no logic gate needed.

ak
 

EM Fields

Joined Jun 8, 2016
583
The response curve (resistance versus temperature) of a platinum thermistor looks logarithmic, but it is more complex than that. While you can program the equation into a pic to solve for the trip voltage for any given temperature, it is easier to create a lookup table with 86 values.

Separate from that, a PIC can drive the optotriac directly, no logic gate needed.

ak
Platinum thermistor? ;)
 
Platinum thermistor? ;)
Who knows where that came from? A platinum RTD (e.g. PT100) is a different animal than a thermister.
They are used in 3 and 4 wire systems.

With a simple thermister you can use it in a voltage divider and sometimes with a paralleled resistor.
They can be PTC or NTC, Positive or Negative temperature coefficient.

You might really be building a limit switch or bang/bang controller and not really a temperature controller.
Real controllers use a form of PID. Constants that shape the controller output based on it's thermal behavior, otherwise you usually end up with a system where the set point an measured value don't agree.
 
Top