Shop OBEX P1 Docs P2 Docs Learn Events
controlling input voltage on the BS2 — Parallax Forums

controlling input voltage on the BS2

ArchiverArchiver Posts: 46,084
edited 2002-07-31 08:08 in General Discussion
I need to control the input voltage to a general-purpose pin on the
BS2. This voltage reflects the state of a remote device: When the
voltage is 1.7V, I want to ignore the [noparse][[/noparse]remote] device; however, when
the voltage drops to 1.5V (for a two-second period), I want to
trigger an event on the BS2.

My problem lies in the fact that 1.5V is still "HIGH" on the BS2.
What I need to do is somehow drop this input so that it's
consistently less than 1.5V. (However, given the .2V differential on
the remote device, I'm not sure how to go about this.)

Any tips or insight appreciate!

Thanks,
--Donn

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-07-31 08:08
    There may be a more simple solution, but how about this:

    Use a serial ADC chip such as the Texas Instruments TLC548.

    The routine to read the chip is very simple, eg the following will work:

    ReadAD:
    LOW ADenable
    SHIFTIN ADdata, ADclock, MSBPRE, [noparse][[/noparse]datafromAD]
    HIGH ADenable
    if datafromAD < 77 then DOsomething
    goto ReadAD

    Then, all you have to do is tell the BS2 that if the data from the chip is
    less than 77 (approx value representing 1.5V when +Vref is 5V), to do what
    you want it to do...

    Sample circuit, showing how easy it is to use this chip (and hence other
    similar chips from T.I) is at my web site (url below, click on electronics,
    follow the links...).


    Cheers,


    Ben, Wellington, New Zealand.

    --
    http://www.lennard.net.nz/
    Ben Lennard, NCEE, Dip EE

    Web Hosting and Electronics R&D

    Hm: +64 4 972 7567
    Mb: +64 21 536 627
    87 Spencer Street
    Crofton Downs
    Wellington
    New Zealand

    "To the optimist, the glass is half full. To the pessimist, the glass is
    half empty. To the engineer, the glass is twice as big as it needs to be."

    No animals were harmed in the transmission of this email, although the
    Dog next door is living on borrowed time, let me tell you! Those of you
    with an overwhelming fear of the unknown will be gratified to learn that
    there is no hidden message revealed by reading this warning backwards.




    > From: "donnmoidaho" <donnmo@l...>
    > Reply-To: basicstamps@yahoogroups.com
    > Date: Wed, 31 Jul 2002 04:46:31 -0000
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] controlling input voltage on the BS2
    >
    > I need to control the input voltage to a general-purpose pin on the
    > BS2. This voltage reflects the state of a remote device: When the
    > voltage is 1.7V, I want to ignore the [noparse][[/noparse]remote] device; however, when
    > the voltage drops to 1.5V (for a two-second period), I want to
    > trigger an event on the BS2.
    >
    > My problem lies in the fact that 1.5V is still "HIGH" on the BS2.
    > What I need to do is somehow drop this input so that it's
    > consistently less than 1.5V. (However, given the .2V differential on
    > the remote device, I'm not sure how to go about this.)
    >
    > Any tips or insight appreciate!
    >
    > Thanks,
    > --Donn
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and Body
    > of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
Sign In or Register to comment.