NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Thermostat Project

June 14, 2009
by JimCahill
JimCahill's Avatar

I wanted to share my project of modifying the temperature sensor project and turning it into a thermostat. I added a digital output to drive an LED to "warm" the temperature sensor when the current (actual) temperature falls below the desired temperature.

Two pushbuttons come in as digital inputs--one to ramp the desired temperature up and the other to ramp it down.

The logic is simple bang-bang control to turn the LED on and off based on the relationship of actual temperature to desired temperature. It simulates a thermostat in heater mode. The LED is off when the current temperature is above the desired temperature and turns on once the current temperature falls below the desired temperature. It remains on until current temperature climbs one degree above desired temperature.

My coding skills are rusty at best, so there is lots of room for improvement for anyone who wants to make it better.

One note, I tried it with a flash light bulb and two MOSFets in parallel to supply the required current for the bulb to provide more heat to the temperature sensor, but the electrical noise was impacting the temperature sensor readings, so I had to go back to the LED. This is another opportunity for improvement by those more experienced than me.

Post a Reply

Please log in to post a reply.

Did you know that interrupts can cause problems if you're not careful about timing and memory access? Learn more...