I am working on a concept where I need to use a 120VAC heater to warm up a space. What I would like to accomplish is having the heater only stay on for a certain amount of time per cycle i.e. 3 minutes. I also only what the heater to run only when the temperature drops below a certain threshold i.e. 60*F. I can get the heater to turn on and off when the temperature gets to low, but I can't figure out how to get it to only stay on for a set duration. Ideally every time it loops back through the program it will kick the heater back on if needed. Any guidance would be greatly appreciated.
I'm running on a SunFounder Mega 2560 and using SainSmart 16-Channel Relay Module for controlling power to my heater.