Shop OBEX P1 Docs P2 Docs Learn Events
Reading analog voltage — Parallax Forums

Reading analog voltage

vchanvchan Posts: 5
edited 2007-09-06 01:22 in BASIC Stamp
Hi,

How do i read a varying analog voltage (between 0-5V)? I'm sending the signal to PIN7, but all it's giving me is whether it's High (1) or Low (0). I need to read the actual voltage (e.g. 2.6, 3.8, etc)

Please help... this is urgent...

Thanks,

Vince

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-21 20:27
    Check this website for a simple analog to digital converter using the RCTIME statement:
    www.emesystems.com
    You'll have to work your way down through some excellent BS2 tutorials. The particular use
    discussed is as a battery voltage monitor.
  • FairuzFairuz Posts: 12
    edited 2007-09-02 02:25
    Hie...

    same like Vince, I'm also looking for method to measure analogue voltage using RCTIME. From the tutorial, the voltage does not varies linearly with RCTIME. I need a method to measure the voltage linearly with Basic Stamp.

    Thanks
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-09-02 02:39
    Parallax's MoBoStamp-pe includes four 10-bit analog input channels.

    -Phil
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-09-02 04:28
    RCtime works best for voltages substantially different from the Stamp threshold of around 1.4 volts. It is not so good for monitoring all steps between 0 and 5. For that an external analog to digital converter is much better, something like the ADC0831 series for 8 bits resolution. Lots of application notes and tutorials from Parallax are available.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Bryan K.Bryan K. Posts: 47
    edited 2007-09-06 01:22
    If you want more channels, the ADC0838 is pretty good. I used it with the BASIC STAMP, it works flawless with it.
Sign In or Register to comment.