Temperature control with ?

I want to heating incubator with PID + SSR + Arduino. Temperature need to be 37.7C degree in incubator. Maybe temperature can change between 37.5-37.8 in incubator for healty baby chicken. but it is changing between 36.5 and 39.5 at my project. My project with relay. I want to use SSR and I want to drive it PID method. I am having problem with Kp, Ki, Kd parameters. How can I set parameters. I need a starting point.

thanks

No help ?

How to post an image

No help ?

Hello,
You are unlikely to get much help unless you show us that you have attempted to do this yourself and got stuck with something. As it stands your question suggests you just want us to give you a finished solution. If you want a finished solution ask the moderators to move this to 'gigs and collaborations' and give some indication of how much you are willing to pay.

If you want to learn and do it yourself start by reading:
General guidance and
How to use this forum

Thank you.

PerryBebbington:
How to post an image


Hello,
You are unlikely to get much help unless you show us that you have attempted to do this yourself and got stuck with something. As it stands your question suggests you just want us to give you a finished solution. If you want a finished solution ask the moderators to move this to 'gigs and collaborations' and give some indication of how much you are willing to pay.

If you want to learn and do it yourself start by reading:
General guidance and
How to use this forum

Thank you.

I don't want a finished solution. If I find a finished solution the job is over but I haven't learned. I know this. my english not perfect. so maybe I couldn't say what I want. I want to learn and I'm researching. I have been working on this project for 2 weeks. I just want a starting point. the temperature does not remain constant in my project. this is my problem. I mentioned this. I could not find a document on this subject. I am studying on PID for Kp, Ki and Kd.

I learned How I can post an image..thanks

Have a look at DS18b20 temperature sensors and look how PID works .

Write something simple to turn a led on/off depending on temperature , then move into turning the heater on /off , then implement PID .

Your specification for required temperature control is very tight and might be a bit hard to achieve !

It is rare to require a full PID control system for a heating application. An incubator should be very close to a steady state heat loss without much perturbation. Proportional control should be adequate. Ideally, you want to size the heater so that a 50% duty cycle will maintain the desired temperature. If a heater is too large for the steady state heat loss, the system will be very hard to control.

Here is some example code of how to introduce a proportional band into the heater control. This examples uses a 5 second "slow pwm" window and a 4 degree proportional band. It also use a multiplication factor to avoid working with floats. See if it gives you any ideas.

//all values *10 to convert one decimal point temperature readings to integers
//measured temperatures from sensor in tenths of degree
float tempSensorReading; // will come from your DHT
int workingTemperature = tempSensorReading *10;
int setPoint = 37.7 * 10;
int difference;
byte dutyCycle;
// four degree proportional band 100% to 0% duty cycle linear transition
//use even number for symmetry around setPoint
byte proportionalBand = 4 * 10;

void setup()
{}
void loop()
{
  tempSensorReading =  //some temperature from DHT sensor in tenths of degree
  workingTemperature = 10 * tempSensorReading;
  difference = setPoint - workingTemperature;
  difference = constrain(difference, -20, 20);
  dutyCycle = map(difference, -20, 20, 0, 100);

  //call slowPWM function with linear proportional dutyCycle
  slowPWM(dutyCycle, 5000); // %duty cycle, period milliseconds
}

void slowPWM(byte dutyCycle, unsigned long period)
{
  const byte outputPin = 13;//  LED pin for visualization
  pinMode(outputPin, OUTPUT);
  static byte outputState = LOW;
  static unsigned long lastSwitchTime = 0;

  unsigned long onTime = (dutyCycle * period) / 100;
  unsigned long offTime = period - onTime;

  unsigned long currentTime = millis();

  if (outputState == HIGH && (currentTime - lastSwitchTime >= onTime))
  {
    lastSwitchTime = currentTime;
    outputState = LOW;
  }
  if (outputState == LOW && (currentTime - lastSwitchTime >= offTime))
  {
    lastSwitchTime = currentTime;
    outputState = HIGH;
  }
  digitalWrite(outputPin, outputState);
}

hammy:
Have a look at DS18b20 temperature sensors and look how PID works .

Write something simple to turn a led on/off depending on temperature , then move into turning the heater on /off , then implement PID .

Your specification for required temperature control is very tight and might be a bit hard to achieve !

thanks for help. I am working on DHT21 (AM2301). I can control heating with relay. I wanto learn how I can drive a SSR with PID. I searched about PID and I couldn't set P-I-D parameters.

thanks again

cattledog:
It is rare to require a full PID control system for a heating application. An incubator should be very close to a steady state heat loss without much perturbation. Proportional control should be adequate. Ideally, you want to size the heater so that a 50% duty cycle will maintain the desired temperature. If a heater is too large for the steady state heat loss, the system will be very hard to control.

Here is some example code of how to introduce a proportional band into the heater control. This examples uses a 5 second "slow pwm" window and a 4 degree proportional band. It also use a multiplication factor to avoid working with floats. See if it gives you any ideas.

Hi,

I wanted to learn PID with incubator heating control. thank you very much for help and descriptive information.

Google "PID tuning" for general tutorials on how to adjust the parameters. But you probably don't need Ki and Kd for heating, just a reasonable value for Kp.

yusiskan:
I don't want a finished solution. If I find a finished solution the job is over but I haven't learned. I know this. my english not perfect. so maybe I couldn't say what I want. I want to learn and I'm researching.

OK, thank you for clarifying that.

What cattledog suggested in reply #5 is pretty much what my approach would be. My heating system works on similar principals with slow PWM with a 720 second cycle time. Room temperature is usually maintained to within 0.1 or 0.2 degrees, so I know the approach works well.

Good luck.

jremington:
Google "PID tuning" for general tutorials on how to adjust the parameters. But you probably don't need Ki and Kd for heating, just a reasonable value for Kp.

I saw some PID tuner apps ago. I was trying them. thank you very much for help and descriptive information.