Shop OBEX P1 Docs P2 Docs Learn Events
BASIC STAMP Analog inputs? — Parallax Forums

BASIC STAMP Analog inputs?

alanfwalanfw Posts: 3
edited 2011-12-06 09:12 in BASIC Stamp
Another Q re my new BoeBot: Does the BASIC STAMP support analog inputs at any of the input pins? The book that came with my BoeBot seems to indicate NO, but is not clear on the issue as I saw something about ADC somewhere and wasn't sure whether these were on-board or whether I needed to obtain a separate ADC module/chip and use the STAMP serial input to transfer data to the STAMP.

Thanks

Alan

Comments

  • Martin_HMartin_H Posts: 4,051
    edited 2011-12-05 19:37
    The Basic Stamp doesn't have an ADC, but uses a resistor capacitor circuit coupled with the RCTIME command to achieve similar results. So you can do things like read a photoresistor or pot. It works quite well.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-12-05 21:20
    There's a good discussion here (use the "app-notes" link) on measuring battery voltage using the RCTIME statement. It also applies to measuring other relatively slowly changing voltages.
  • LeonLeon Posts: 7,620
    edited 2011-12-06 03:01
    If you want a "proper" ADC, interfacing something like a Microchip MCP3201 should be quite straightforward:

    http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010531

    You can get more inputs with the other devices in the same series.
  • ercoerco Posts: 20,256
    edited 2011-12-06 09:12
    Stamp input pins act much like analog comparators. Anything about 1.4 volts reads high, below 1.4V reads low. In some cases, you can condition/calibrate your input signal to work with that, if a yes/no on/off reading is all you need.
Sign In or Register to comment.