Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Implementing precise single shots with AVR timer

Microcontroller timers are meant to count clock cycles in hardware and there are many ways and configurations where timers are handy. First of all timers are meant to work purely in hardware without utilizing CPU, secondly timers help generate waveforms like PWM, trigger events, count time between events and so on. But there is one use that in most cases is missed and not documented – precise single shots that allow to generate only single pulse shot with precise length. And this method doesn’t require CPU to be involved – just set and forget. The idea of this method lies in using fast PWM (refer to datasheet for more info) mode a bit differently. Normally in this mode timer works by counting to TOP value, somewhere in between there is… Continue reading

Water pool filling timer

Filling tank with water is very boring task. Standing and watching it until it fills up is a waste of time especially if volume is quite big. IT is better to leave this task for automatics. There can be several ways of controlling filling process. One is to use timer which shuts valve after predefined time period. Another method relies on water level sensor which detect when water level reaches some level. Second method is more accurate, but needs more setup. Kyle was asked to construct water filling timer which would turn off valve after some time. In this setup user starts timer by opening valve. After time runs our, valve is shut. So user has to determine the time needed to fill pool with water and program this value… Continue reading

Timer switch for UV exposure box

If you are building UV PCB exposure box or any other device that require timed switch, then take a look at this project. It is pretty basic solution built around Atmega8 microcontroller. Swithc is powered using simple power supply built using full bridge rectifier and LM7805 voltage regulator. Couple seven segment LED displays indicate time remaining until relay switch is activated. It has single relay activated using transistor key. Additionally when timer count down is finished a buzzer sounds alarm. Since microcontrollere doesn’t do any other tasks it is clocked using RTC crystal 32.798kHz. It makes easier to scale down timer clock down to seconds. Continue reading