temperature controlled lamp

hi, i am new to the arduino experience, but very fascinated.
i am trying to build something and i could really use some pointers.
i am trying to make an egg incubator for a friend, that is controlled via arduino.
a 12 v lamp will be used for heating, and a SHT1x sensor to monitor
temperature and humidity. a pc fan is also used for air flow.
my problem is that, after i read the temperature, i want to pwm the lamp.
if temp<37 Celsius, turn lamp even more on to heat up.
if temp>38 Celsius, turn lamp less off to cool down.
is it correct to set the lamp to half its brightness a startup,
check the temp, and then set it to higher or lower?
hope this makes sense to somebody

Makes sense to me, at least as a starting point. Depending on how noisy your temperature sensor is, you might not want to check it too often (once every 10 seconds or so?) else you might find you're "chasing your tail" and adjusting the PWM too fast.

Have you determined how you're going to switch the 12V lamp on and off? A power supply for the lamp? How much current does the lamp draw?

-- Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html

thanx for the input, i am still designing the project, writing the code, which helps in the design (?), i will update this post, even, have some more questions...

cheers from greece

Hi there

Funnily enough I just built a very similar thing for a friend, not for eggs, but to brew some home brew using the heat source of a light bulb.

Slight different though, not a 12V lamp in our case, but I switch 230VAC 100W lamp, which produces enough heat to warm a cupboard with the home brew 30L or so vessel inside, and comfortable keeps the temp at 20 degrees C. So no PWM in my case, just fairly crude on/off control with hysteresis - which was sufficient as a first pass for him. It has successfully just brewed the first batch, and the beer is now bottled and inside the cupboard again for a week or two as it pressurises.

I am using a SHT15 and the prototype Relay Shield I made.

I am also datalogging every 5 minutes (I think from memory) into the built in EEPROM of the Arduino, and have built a python program which extracts this information to graph the last 24h or so of data. The Arduino also streams data out of the serial port so the laptop can see live data. The laptop can also send commands to change the setpoints, hysteresis etc which is saved in the EEPROM also. Oh it has a 16x2 LCD which displays the current data and setpoint etc too.

Let me know if you want any code.

Quite a fun little project and good for learning about LCD's, EEPROM, logging, crude temperature control, SHT15's, etc.

We will be improving this alot for the next version, and making a dedicated board so I can get my arduino back - lol.


I can't see straight on/off being a problem for keeping an egg warm using a 12V lamp. The hysteresis will do the balancing for you. Its not like the egg will suddenly get hot the instant the lamp turns on.

I've been adjusting my code that controls my central heating, extreme latency, you turn it on, 10 minutes later the room starts to heat up, 20 minutes after its turned off, the room is still warming up. Shouldn't be so much of a problem without umpteen gallons of water in the equation...... ;)