A Thermostatically-controlled Exhaust Fan

A Thermostatically-controlled Exhaust Fan

As part of an exterior refurbishing of the exterior of our home, we replaced a louvered ventilation area with an exhaust fan because we have a powerful air conditioner heating up the garage. It has a switch below it, but this project makes it easier to use.
In the AUTO position of this 3-way switch the fan voltage is controlled by a power relay, which is controlled by the control board of this project, which is a thermostat.
A limit switch is fastened to the segmented front door as an interlock because an opening is needed to allow fresh air to enter during fan operation.
Here are photographs

Here are the circuit diagrams

Here is the code