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 a MATCH value where timer outputs HIG and drops to LOW when TOP is counted. This way there is a PWM signal generated. Josh came up with idea that in this case we can generate only single pulse by setting MATCH value above the TOP and set initial timer counter… Continue reading

Testing stepper motors with pulse generator

This is a quick portable circuit used to test stepper motors. It is based on small PIC 12f675 microcontroller. The pulse speed is changed with potentiometer. It allows smoothly variate between 20Hz and 3kHz. It has couple jumper bridges to select enable and dir pins. Servo tester is powered with four NiMh rechargeable batteries that give total 4.8V.  This circuit can also be used as general purpose pulse generator if needed. Continue reading

Multilab – The Best Tester in Your Electronic Lab!

Do you need some help or assistance when you’re dealing with the electronic projects? Isn’t it frustrated and annoyed, if you cannot find the proper testing tool, especially you’re in the middle of a project? In this case, all you need here is a multilab, but it would be better, if you can create the multilab by your own hand! Theoretically, the multilab is a multipurpose lab test instrument. It has fully equipped with these following components, such as: An Arbitrary function generator, A digital pulse generator, A high-resolution DC voltmeter, and A DC reference source. If you’re suggesting to cut down the cost, then you might want to eliminate the conventional “front panel” and substitute it with a Palm Pilot PDA. In this case, you can keep the whole project’s size becoming even smaller and inexpensive than before. In addition, the Z8 Encore’s DMA channels are also an ideal component for the ‘arb function’, where is allow the irDA encoder/decoder block to implement the IR link to the Palm Pilot much easier and faster! By the way, the Palm… Continue reading