GBAmp3 Mod PCB Order Now
also available at retromodding.comand Deadpan Robot

Friday, February 18, 2011

Another temperature related project

While Duothermo project is frozen I started working on new one. It's a very simple thermostat project. I need it to keep temperature in chicken coop with help of 12V fan heater running on battery. First I used a p-channel mosfet with pnp transistor to set level to 12V from 3.3V. Heater is pretty powerfull for this. Then this is just melt my mosfet. Heater eats about 10 amps 12V. Mosfet is rated at 15A. Maybe I did something wrong :)
Then I found some automative 12V power relay rated at 20A. And made a simple driver with n-channel mosfet to swith relay from 3.3V and it works ok, relay just gets warm.
This driver done as a shield for TI LaunchPad kit on prototype perfboard, you can see mosfet driver shield picture in the twitter.
Now it's time to write firmware. What I want is to save my battery from over discharge it means not more than 5.5 hours of heater overall runtime. Turn heater on when temperature is 5C lower than needed. Status indication with leds on launchpad board. Manual mode switch with button. External wire with temperature sensor, because relay is getting warm and shield is too close to mcu then internal sensor is not sutable for temperature reading.

Project code repository: code.avrnoob.com/thermostat