This post describes the overall function of Timer. I'll talk about the challenging & interesting areas of the design in a separate post.
The TI UCC28880 is a monolithic direct off-line switch mode controller functioning as a non-isolated buck to provide a regulated 5VDC and maximum of 100mA. It is a variable frequency/duty cycle controller with a maximum switching frequency of about 80kHz. C9, C10, and L2 filter differential mode noise and also provide bulk capacitance to supply. L3, C12, and C13 form the output LC filter and D4 is the free-wheeling diode. Q6 & Q7 and the associated resistors provide temperature compensated and level shifted feedback to the controller. For details on this see my project Temperature Stabilizing the TI UCC28880.
Q8, Q9, U5, and their associated diodes & resistors form the continuity sense circuit used by the application override feature. This is accomplished by injecting a low AC voltage (13V), very low current to the output. When the circuit is closed Q9 is biased and it's collector output is amplified and shaped into a logic signal that can be processed by the controller. For details on this see my project In-Line AC Continuity Sense.
The AC switch circuit is a hybrid of mechanical & solid state. This is done to extend the life & reliability of the unit. How: loads below ~ 2A are handled exclusively by the SSR. The majority of applications that household timers are used for is lighting which will likely be below this. So the cycle count on the mechanical relay is greatly reduced and there is no concern that light loads won't be sufficient to properly 'wet' the relay contacts. MOSFETs Q3 & Q4 dissipation is low and hence no heat sink or thermal management is required.
Loads exceeding the MOSFET's safe threshold use the mechanical relay. The SSR is also used to reduce the switching stress on the relay. First, all turn-on events are done with the SSR. Current is constantly sampled and when it exceeds the SSR threshold for 2S the relay is turned on. After a brief overlap period the SSR is switched off. At the end of the timing cycle, before turning the output off, the SSR is switched back on, the relay is then turned off, and after a small delay the SSR is turned off. This methodology operates the relay zero voltage / current conditions and thus prevents arcing & the associated carbon build-up on the relay contacts. Under these conditions the MOSFETs are switched on under 0 volts / current but the turn-off is done under full load. However, the duration of the event, along with the shaped turn-off and selected SOA of the MOSFEts prevents failure or the need for additional thermal management.
Q2, L1, D1, and their associated components form the isolated gate drive necessary for the MOSFET-based SSR. Turn on/off times are generally less than 100uS. See project MOSFET Based Solid State Relays (SSR) for a detailed examination on this approach and shaping switch times.
U3 is a 20A hall effect current sensor that provides a resolution of 100mV/A centered at Vdd/2. This value is continuously sampled by the controller to control the switching function and provide over-current protection. U2 is an active, linear temperature sensor with a resolution of 10mV/C and used to provide thermal protection to the unit.
Q1 is a photo-transistor that along with C4 & R2 output a voltage that is logarithmically related to the luminous energy it senses. This is processed by the controller to interpret gestures, set the status LED brightness, and control the output when used in light sensing modes.
U1 is a Microchip 8-bit, midrange, controller that manages all aspects of operation. Y1 is a 32.768kHz tuning fork crystal connected to the controller's secondary oscillator and used maintain chronological time with an accuracy of about two minutes per year.