Shop OBEX P1 Docs P2 Docs Learn Events
three state input — Parallax Forums

three state input

ArchiverArchiver Posts: 46,084
edited 2001-09-25 07:49 in General Discussion
I'm trying to monitor an input with three states, on(normal), flashing(error),
and off(loss of power, or just turned off) with my bs2. I'm thinking that either
the count or rctime instruction will work.
For the count instruction, I'd use debug to see what count returns for the
flashing state. Then for any count below the flashing rate, then read the
current state of the pin.
For RCtime, use a cap to even out the flashing to become one voltage level,
off being and on being their own voltage level. For a total of three voltage
level.
I'm trying to monitor an LED output from my automatic catbox. The LED don't
work anymore, but the output does. Do I have to isolate the two circuits, the
catbox and the bs2? If so, is it ok to tie the ground of both circuits together?

Linux user #228897 computer #109948
website http://www.capdiamont.com


[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-09-25 07:49
    Hi,

    The best way is to use an optocoupler.
    First, this repairs your catbox circuitry in that the LED current flows
    again (there
    may be a feedback circuitry that uses this current). Secondly, the open
    collector
    output of the optocoupler can be tied directly to a stamp pin and a pullup
    resistor.
    Third: there is no change voltages higher than 5V can reach the stamp.

    regards peter


    Oorspronkelijk bericht
    Van: capdiamont [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=bvKImz3-7eNkDoeow5X0Z5Y8qL8wNTcpn5XmfN1T8cz8wJITUqtMcsVhh0owomHxW0flHTuUzxFDvA]capdiamont@m...[/url
    Verzonden: dinsdag 25 september 2001 05:48
    Aan: basicstamps@yahoogroups.com
    Onderwerp: [noparse][[/noparse]basicstamps] three state input


    I'm trying to monitor an input with three states, on(normal),
    flashing(error), and off(loss of power, or just turned off) with my bs2. I'm
    thinking that either the count or rctime instruction will work.
    For the count instruction, I'd use debug to see what count returns for
    the flashing state. Then for any count below the flashing rate, then read
    the current state of the pin.
    For RCtime, use a cap to even out the flashing to become one voltage
    level, off being and on being their own voltage level. For a total of three
    voltage level.
    I'm trying to monitor an LED output from my automatic catbox. The LED
    don't work anymore, but the output does. Do I have to isolate the two
    circuits, the catbox and the bs2? If so, is it ok to tie the ground of both
    circuits together?

    Linux user #228897 computer #109948
    website http://www.capdiamont.com


    [noparse][[/noparse]Non-text portions of this message have been removed]


    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.