Shop OBEX P1 Docs P2 Docs Learn Events
Fast Pot Input — Parallax Forums

Fast Pot Input

BlammoBlammo Posts: 3
edited 2008-08-01 20:29 in BASIC Stamp
Hi all,

I'd like to use a pot (or anything with a smooth scale and a twistable physical interface) to set the frequency of a strobing LED in realtime. Unfortunately, when I use the POT command, there is a very discernable interruption while it measures the capacitor discharge time, which is a problem.

How would I be able to overcome this? Obviously the stamp doesn't support multithreading, so anything that requires time to perform is out. Does anyone know of a component that can translate angles into serial output or use I/O pins to represent a numerical value?

Thanks for any help,

Blammo

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-01 20:21
    You could use a cheap, simple analog to digital converter. The ADC0831 is a single channel device that comes to mind ($6). There's also a 4 channel device, the ADC0834 ($9). Both of them are discussed in Stamp tutorials (like Basic Analog and Digital) and Nuts and Volts Columns. Just set up the pot as a +5V voltage divider and read the voltage with the ADC.

    There are also position decoders that can be used like a pot, but the above suggestion is cheap and will work with the existing pot.
  • metron9metron9 Posts: 1,100
    edited 2008-08-01 20:29
    Actually you could use a 555 timer, the pot will directly control the frequency and you don't need the stamp. You could measure the frequency the led is blinking however with the stamp. Another way is a digital pot controlled by the stamp using a 555 timer for the frequency generator.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
Sign In or Register to comment.