Thermostat design

I am looking for a guidance in order to choose which hardware to use in order to have a pretty stable temperature inside a closed plastic box. This is for an egg incubator.
The goal is to be able to maintain a temperature approx. in the range 38°C..39°C
Here are a few ideas..
I will put a fan inside so that the air will flow and the temperature probe will hopefully measure an average temperature. If that happen to be a good idea, how should I position the fan ?
I have this temperature sensor : DHT11. Does anybody know how precise it is in practice ?
I run one manual test with a ~45W halogen bulb inside the box. The temperature rised above the target temperature 38°C. When I turned it off, the temperature dropped fast, and I lost a few degrees. I would like to have something a little smoother, because variation in temperatures are not good for the eggs.
So my idea was to put two bulbs of a lesser power, keep one on all the time and see which hysteresis I have by controlling only one bulb with a relay. I have already established that one 35W bulb lit all the time will never (after a 6 hours test at least) make the temperature rise above 33°C. (at constant room temperature approx 19°C)
How could I make the temperature inside the box easier to control ? It seems that this bulbs are also dimmable, but I don't know if it's worth going that way (money wise..)

last time i checked unborn chickens are blind.. therefore u can get away with just slow on/off cycling of ONE
heating light..

create a rediculously slow pwm in software of ur own making.. one second or maybe 2 sec period..
then cause a pulse during that cycle based on feedback from the temp sensor..
run to one SSR

and its done

Hi,

Use a metal encased DS18B20 or a 10k NTC sensor, the DHT11 not that good.

As said, use a suitably sized SSR, but use PID code to control it.
http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/

ricky101:
Hi,

Use a metal encased DS18B20 or a 10k NTC sensor, the DHT11 not that good.

As said, use a suitably sized SSR, but use PID code to control it.
Improving the Beginner’s PID – Introduction « Project Blog

From what I've read, PID is not suitable for a digital output like an on/off heater, it is for an analogue output. Also, it's killing a fly with an atom bomb. It's definitely possible to regulate the system you have outlined, with a simple on/off feedback loop with a small amount of hysteresis.

Reply #1 suggests a kind of analogue control, but your PID would require careful configuration to accomodate the time constants introduced by the PWM.

Could try one 35W halogen bulb on continuously, and one 25W power resistor, one end connected to a 2.5A or higher 12VDC supply, the other end connected to a logic level MOSFET controlled by PWM. The PWM would give 255 steps for fine control of temperature.

Antoino:
I run one manual test with a ~45W halogen bulb inside the box. The temperature rised above the target temperature 38°C. When I turned it off, the temperature dropped fast, and I lost a few degrees.

Interesting point. Make sure the halogen lamp can't shine on the thermal sensor. The radiant heat will skew the ambient measurement. Perhaps this has already happened in your experiment. Make sure all heat sources are shielded from the sensor.

aarg:
From what I've read, PID is not suitable for a digital output like an on/off heater, it is for an analogue output. Also, it's killing a fly with an atom bomb. It's definitely possible to regulate the system you have outlined, with a simple on/off feedback loop with a small amount of hysteresis.

Reply #1 suggests a kind of analogue control, but your PID would require careful configuration to accomodate the time constants introduced by the PWM.

I just use simple on /off control on my stats but thats within fish tanks which naturally "smooth" things out and can be maintained to 0.1c and yes the OP could use that ok.

However friends using controllers for reptile / air heating say they use PID and being as the code is already there should not be much more complicated to use.
Have run the code metioned above myself and it does work, though have not used it in a air heating way.

If the OP searches the web he should find lots of useful sites on egg incubator controllers, heres just one which uses the better DHT22 sensor.
http://goran-sostarko.from.hr/articles/

aarg:
Interesting point. Make sure the halogen lamp can't shine on the thermal sensor. The radiant heat will skew the ambient measurement. Perhaps this has already happened in your experiment. Make sure all heat sources are shielded from the sensor.

Can you elaborate ? I think I already run into the problem last week when trying to use the same temperature probe, under an infra red bulb. The reported temperature was so high that I concluded the sensor was somehow not suitable in this case. (50+ ° C instead of 30/35°C - ish)
How would you shield the probe practically ? Is it just a matter of not being in the line a sight a any bulb ? Or could there be another problems induced by the shield ? I could put the probe behind a thin steel plate, but wouldn't the steel store some heat and also skew the results ?

Antoino:
Can you elaborate ? I think I already run into the problem last week when trying to use the same temperature probe, under an infra red bulb. The reported temperature was so high that I concluded the sensor was somehow not suitable in this case. (50+ ° C instead of 30/35°C - ish)
How would you shield the probe practically ? Is it just a matter of not being in the line a sight a any bulb ? Or could there be another problems induced by the shield ? I could put the probe behind a thin steel plate, but wouldn't the steel store some heat and also skew the results ?

Yes, line of sight. Look up "black box radiation"

Also I disassembled one incubator that gave me good results in the past, and the heating element is a heating wire which is coiled on the intake side of a fan, maybe 10 turns over a diameter of 90mm. Its power is approx. 50 Watts

You don’t have to use the full PID controller system - I have a hummingbird feeder heater that I control with a PIC processor using PI (Proportional, Integrating) and it works quite well - I use about a 2 second cycle time with PWM to control the amount of heat in the heat plate on the bottom of the feeder. Here are a couple of articles worth checking out:
PID for Dummies
PID without a Phd
Home Brewed HERMS ← see the HERMS article