Shop OBEX P1 Docs P2 Docs Learn Events
Floating button? — Parallax Forums

Floating button?

ArchiverArchiver Posts: 46,084
edited 2000-12-05 09:45 in General Discussion
Ok, I'm building a two motor walker with
some modified servos. My servos have a pretty bad error in them that I can't
seem to fix, so I've put a switch that tell me when they are centered. It's
basically a wire and a resistor that connect. So, I've wired it up just like
the stamp manual for a button, but I'm using a 470ohm resistor. I'm using
the button command that triggers when high. Just using debug to print the
results, I get a solid 1 when connected, but a fluctuating 1 and 0 when not
connected. Why? Also, if I move my hands shadow across the wires the value
changes. Freaky. Can anybody help?
-William

____________________________
http://robot-central.webjump.com/
Robotics books, projects, resources,
links, news, and more!

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-03-11 22:17
    William,

    "Triple" check your wiring arrangement. It sounds like the stamp pin is
    floating.
    It will not float if the resistor is connected properly.

    David


    Original Message
    From: William Cox <william@c...>
    To: Stamps <basicstamps@egroups.com>
    Sent: Saturday, March 11, 2000 2:10 PM
    Subject: [noparse][[/noparse]basicstamps] Floating button?


    > Ok, I'm building a two motor walker with
    > some modified servos. My servos have a pretty bad error in them that I
    can't
    > seem to fix, so I've put a switch that tell me when they are centered.
    It's
    > basically a wire and a resistor that connect. So, I've wired it up just
    like
    > the stamp manual for a button, but I'm using a 470ohm resistor. I'm using
    > the button command that triggers when high. Just using debug to print the
    > results, I get a solid 1 when connected, but a fluctuating 1 and 0 when
    not
    > connected. Why? Also, if I move my hands shadow across the wires the value
    > changes. Freaky. Can anybody help?
    > -William
    >
    > ____________________________
    > http://robot-central.webjump.com/
    > Robotics books, projects, resources,
    > links, news, and more!
    >
    >
    >
    >
    > -- Easily schedule meetings and events using the group calendar!
    > -- http://www.egroups.com/cal?listname=basicstamps&m=1
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-03-12 00:31
    Do you think the lower value resistor could effect it? (470 as opposed to
    10k)
    -William


    Original Message
    From: David Covick <dac@w...>
    To: <basicstamps@egroups.com>
    Sent: Saturday, March 11, 2000 5:17 PM
    Subject: [noparse][[/noparse]basicstamps] Re: Floating button?


    > William,
    >
    > "Triple" check your wiring arrangement. It sounds like the stamp pin is
    > floating.
    > It will not float if the resistor is connected properly.
    >
    > David
    >
    >
    >
    Original Message
    > From: William Cox <william@c...>
    > To: Stamps <basicstamps@egroups.com>
    > Sent: Saturday, March 11, 2000 2:10 PM
    > Subject: [noparse][[/noparse]basicstamps] Floating button?
    >
    >
    > > Ok, I'm building a two motor walker with
    > > some modified servos. My servos have a pretty bad error in them that I
    > can't
    > > seem to fix, so I've put a switch that tell me when they are centered.
    > It's
    > > basically a wire and a resistor that connect. So, I've wired it up just
    > like
    > > the stamp manual for a button, but I'm using a 470ohm resistor. I'm
    using
    > > the button command that triggers when high. Just using debug to print
    the
    > > results, I get a solid 1 when connected, but a fluctuating 1 and 0 when
    > not
    > > connected. Why? Also, if I move my hands shadow across the wires the
    value
    > > changes. Freaky. Can anybody help?
    > > -William
    > >
    > > ____________________________
    > > http://robot-central.webjump.com/
    > > Robotics books, projects, resources,
    > > links, news, and more!
    > >
    > >
    > >
    > >
    > > -- Easily schedule meetings and events using the group calendar!
    > > -- http://www.egroups.com/cal?listname=basicstamps&m=1
    > >
    > >
    > >
    >
    >
    >
    > -- 20 megs of disk space in your group's Document Vault
    > -- http://www.egroups.com/docvault/basicstamps/?m=1
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-03-12 04:34
    > Do you think the lower value resistor could effect it? (470 as opposed to
    > 10k)
    > -William
    >

    470 ohms should be fine. this is 10mA at 5 volts. I don't think a 10k
    would make a difference.

    I don't see why it would float?

    Quadruple check the resistor connections and your code.

    Does anyone else have any ideas?

    David
  • ArchiverArchiver Posts: 46,084
    edited 2000-12-05 09:45
    you need to add a pulldown resistor between the switch and the I/P
    pin, the value of the resistor could be 4k7 - 20k

    hope this helps

    JON
    --- In basicstamps@egroups.com, "William Cox" <william@c...> wrote:
    > Ok, I'm building a two motor walker with
    > some modified servos. My servos have a pretty bad error in them
    that I can't
    > seem to fix, so I've put a switch that tell me when they are
    centered. It's
    > basically a wire and a resistor that connect. So, I've wired it up
    just like
    > the stamp manual for a button, but I'm using a 470ohm resistor. I'm
    using
    > the button command that triggers when high. Just using debug to
    print the
    > results, I get a solid 1 when connected, but a fluctuating 1 and 0
    when not
    > connected. Why? Also, if I move my hands shadow across the wires
    the value
    > changes. Freaky. Can anybody help?
    > -William
    >
    > ____________________________
    > http://robot-central.webjump.com/
    > Robotics books, projects, resources,
    > links, news, and more!
Sign In or Register to comment.