Vermes
Advanced Member level 4
This project of a timer is based on processor PIC16F676 from Microchip. Its task is measuring a certain time (you have to choose one time out of two possible times) and indicating the begin and end of measuring by a sound of buzzer. Presented here system fulfills the following functions:
- repeatable measurement of time in all conditions (eg, in complete darkness), and regardless of the status of the person operating (you can be sleepy, or even go to sleep while measuring)
- maximum ease of use (only one button)
- convenience (possibly small size and weight)
- practical low maintenance (it can operate for a long time without any repairs and changing batteries)
Construction of the timer:
The PCB was made in thermal transfer method. Arrangement of SMD components was determined by the location of hole components,and here the element whose position was the most important, was the button.
Schematic:
The principle of operation:
After powering, the controller goes into sleep state until low state appears on input RA2/AN2/COUT/T0CKI/INT configured as external interrupt input (leg 11). When the button is pressed, microcontroller checks the battery state (implemented by system of monitoring voltage and reset IC2 – TCM809R). If the battery voltage is too low (low state on output IC2), microcontroller generates two long sounds and goes into sleep state. When the power voltage is okay, microcontroller checks the position of time selection swtich (you can measure 3 or 5 minutes), generates three short sounds and starts measuring the selected time. After finishing the measuring, there are also three short sounds and it goes into sleep state. Microcontroller starts working when the button SW1 is released and while the program is running (measuring the time) it locks the possibility to release again and restart the program – it is possible only when the program is in sleep state.
The timer in sleep mode consumes 8uA at selected time 3 minutes (78uA at selected 5 minutes, due to the connecting pull up resistor with internal ground), 0,5mA while measuring time and maximum momentary 10mA while squeaking.
Link to original thread (useful attachment) - Czasomierz na mikrokontrolerze PIC16F676