Subscribe

Pot as interrupt generator

Posted by Circuit Labs on Thursday, November 13, 2008

Author: Eric Vanderseypen

      In battery-powered, microcontroller driven circuits, as well as with microcontrollers operating in cars, it is desirable to switch the micro into power-down mode once a task has been completed. An interrupt request is then required to wake up the micro. This circuit allows an interrupt to be generated in a simple way using a common potentiometer.

In the example circuit, the pot may also copy its spindle position to the ADC. This enables the pot to  be used for continuously variable settings (like volume) as well for getting the micro out of its power-down mode.

Click to enlarge or download PDF version for larger diagram

        IC1A is configured as a differentiator with R3 preventing oscillation by keeping the gain down to 10 times. Because the opamp operates off a single-rail supply voltage, an 18k/10k potential divider (R1/R2) is able to create a virtual ground level at +1.75 V. This can be done because the LM358 can handle input levels of up to 3.5 V when supplied at 5.0 volts. IC1A supplies a brief High pulse at a falling input voltage, and a similar Low pulse when the input voltage rises. In order to get a High pulse when the potentiometer spindle is turned cw or ccw, IC1B is set up as an inverter. Next, each opamp output drives the base of a BC547 transistor.

      The 5 V-to-0 V transitions at both collector outputs are shaped and combined into a usable interrupt pulse by three NOR gates IC2A, IC2B and IC2C.
       If the potentiometer spindle is turned very slowly, it is possible that the circuit does not respond. That is why an LED has been added that lights briefly when a pulse is generated.
      Finally, a tip: a 100-pF capacitor may be connected in parallel with R5 for additional suppression of self-oscillation.

(Elektor Electronics Magazine - 10/2005)



Download this article #e05a075.pdf >> or SkyDrive link

0 comments:

Subscribe to: Post Comments (Atom)