Saturday, December 4, 2021

A simple timer switch using a potentiometer

 

A draft, not yet complete...

A digital timer that uses a potentiometer and ADC to select a time interval. The input triggering circuit is isolated from the mains using an optocoupler.

BT136 triac

MOC3061 optocoupler

pic12f675 - the cheapest microcontroller i could find, with an ADC.

The potentiometer is missing in the circuit below, its connected to the ADC






For the source code, see https://github.com/manojmo/pic_micro/blob/master/pot_minutes_calc.c

Based on the potentiometer voltage read from the ADC, it calculates the ON time, turns on the triac, waits till the ON time expires, then turns OFF the triac.

No comments:

Post a Comment