Shop OBEX P1 Docs P2 Docs Learn Events
Basic question from a Real Beginner — Parallax Forums

Basic question from a Real Beginner

ArchiverArchiver Posts: 46,084
edited 2000-07-17 17:48 in General Discussion
Hi All,

Sorry if the question seems basic, but I was wondering if the Stamp can
compare voltages that appear on the input pins. I have an application that I
need to compare several voltages to choose the lowest voltage. The highest
the voltage reaches curently is 6 volts, but can easily be reduced. Is this
possible with the Stamp????

Thanx in advance for the help.
Mike

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-07-17 08:22
    Greetings,

    On Mon, 17 Jul 2000 HQ54@A... wrote:

    > Sorry if the question seems basic, but I was wondering if the Stamp can
    > compare voltages that appear on the input pins. I have an application that I
    > need to compare several voltages to choose the lowest voltage. The highest
    > the voltage reaches curently is 6 volts, but can easily be reduced. Is this
    > possible with the Stamp????

    The Stamp does not contain an A-to-D converter, which is what you will
    require. Consider using a pair of ADC0831 8-bit A-to-D converter chips,
    or a single LTC1298 12-bit 2-port A-to-D converter chip.

    Both of these chips interface easily to the BS2 using an I2C interface.
    See the www.parallaxinc.com webpage for applicable Application Notes (with
    example software). You can get these chips from Parallax for $5 - $10
    respectively.

    --- Jay

    /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/~~\
    | Jay Nugent jjn@n... |____|
    | Nugent Telecommunications www.nuge.com |
    | Web-Pegasus www.webpegasus.com |
    | (734)971-1076 (734)971-4529 /Fax |
    | |
    | ISP & Modem Performance Monitoring Svcs. |
    | Discount Reseller of 123.Net ISP Services|
    | Internet Consulting / Linux SysAdmin |
    | Web Hosting / DNS Hosting / Shell Accts. |
    | Embedded Controllers / Engr. & Design |
    /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/ |
    \_________________________________________\__/

    3:00am up 67 days, 8:53, 6 users, load average: 0.29, 0.06, 0.02
  • ArchiverArchiver Posts: 46,084
    edited 2000-07-17 12:59
    Threshold for hi-low state is about 1.4V for the Stamps pins.
    Furthermore you could scale your voltage thru a resistor divider to fit
    this value.

    ACJacques

    HQ54@A... wrote:
    >
    > Hi All,
    >
    > Sorry if the question seems basic, but I was wondering if the Stamp can
    > compare voltages that appear on the input pins. I have an application that I
    > need to compare several voltages to choose the lowest voltage. The highest
    > the voltage reaches curently is 6 volts, but can easily be reduced. Is this
    > possible with the Stamp????
    >
    > Thanx in advance for the help.
    > Mike
  • ArchiverArchiver Posts: 46,084
    edited 2000-07-17 17:48
    HQ54@A... wrote:
    > Sorry if the question seems basic, but I was wondering if the Stamp
    can
    > compare voltages that appear on the input pins. I have an application
    that I
    > need to compare several voltages to choose the lowest voltage. The
    highest
    > the voltage reaches curently is 6 volts, but can easily be reduced. Is
    this
    > possible with the Stamp????

    Hi Mike,

    The stamp's RCtime command can be used to measure and compare voltages
    and to achieve approximately the same repeatability as an 8 bit A/D
    converter. It might be simpler to use an A/D converter with multiple
    inputs, but maybe not. RCtime does take a resistor and a capacitor for
    each pin input. An addtional resistor (to Vdd) is required if the minimum
    input volage will be less than 2 volts.

    100k 220
    unknown V --/\/\---o--/\/\-P0
    >2V |
    === 0.068uf
    |
    Vss


    dut var word
    low 0
    loop:
    RCtime 0,0,dut
    low 0
    debug dec dut
    goto loop

    That will give values of about dut=280 at 18 volts input and dut=2900 at
    2.5 volts input. So to find the maximum voltage, you step through your
    channels and pick the one that shows the lowest dut value. To get the best
    results, adjust the value of the 100kohm or the 0.068uF to give readings of
    about 200 at the maximum expected input voltage, 6V in your case. The dut
    reading will be "noisy" when the value of DUT is larger than 1000, so you
    may have to do some filtering on it for the best accuracy at the lower
    voltages. Wire your system to bring the ground leads for your unknown
    voltages in very close to the Vss pin of the stamp, to avoid extra ground
    loop noise.

    -- Tracy Allen
    Electronically Monitored Ecosystems
    http://emesystems.com/BS2misc.htm#battery voltage & RCtime


    -- Tracy Allen
Sign In or Register to comment.