​ ​ ​ ​ Picaxe 14M2 Switching output when no input
Results 1 to 5 of 5

Thread: Picaxe 14M2 Switching output when no input

  1. #1
    New Member
    Join Date
    Apr 2017
    Location
    Australia
    Posts
    4

    Default Picaxe 14M2 Switching output when no input

    Basically i have a program that when C.0 detects an electrical signal it should turn B.0 on which runs a relay which runs a motor. The problem isn't with the latter part but with the initial.
    My 14M2 is switching B.0 on when there is no input, why is this and how can i stop this from happening?

  2. #2
    Senior Member
    Join Date
    Jan 1970
    Location
    Perth, Western Australia
    Posts
    4,445

    Default

    Quote Originally Posted by OneofLast View Post
    Basically i have a program that when C.0 detects an electrical signal it should turn B.0 on which runs a relay which runs a motor. The problem isn't with the latter part but with the initial.
    My 14M2 is switching B.0 on when there is no input, why is this and how can i stop this from happening?
    Have you connected the input pin you want to use to a pull-up or pull-down resistor to keep it in a stable idle state? When a pin is used as an input, it has an extremely high impedance and is very sensitive to electromagnetic fields and electrostatic discharges and will float between low and high states without any physical connection. Refer to "Input Device 1" in Manual 3.

  3. #3
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    24,308

    Default

    Quote Originally Posted by OneofLast View Post
    My 14M2 is switching B.0 on when there is no input, why is this and how can i stop this from happening?
    It does sound like you have a floating or unreliable input but as B.0 is the Serial Out pin it could be that it is being triggered by a SERTXD, SEROUT or DEBUG command. It cold also be that the PICAXE is seeing what it thinks is a download initiation.

    Perhaps post your circuit diagram and source code.

  4. #4
    Moderator
    Join Date
    Mar 2008
    Location
    Western Australia
    Posts
    12,265

    Default

    Quote Originally Posted by hippy View Post
    It does sound like you have a floating or unreliable input but as B.0 is the Serial Out pin it could be that it is being triggered by a SERTXD, SEROUT or DEBUG command. It cold also be that the PICAXE is seeing what it thinks is a download initiation.

    Perhaps post your circuit diagram and source code.
    In the last case the SerialIn pin could therefore be floating - if there is no permanently connected programming circuit.
    westaust55

    Hey Hamlet, 2B OR NOT 2B = $FF

  5. #5
    Senior Member
    Join Date
    Feb 2010
    Location
    Don't Mess With My Texas!
    Posts
    2,545
    Blog Entries
    7

    Default

    Try to imagine for a moment what it would be like to work on your television with a blindfold over your eyes. ... We'll wait.

    You'll get more than guesses if you supply more than wishes.


    Quote Originally Posted by OneofLast View Post
    Basically i have a program that when C.0 detects an electrical signal it should turn B.0 on which runs a relay which runs a motor. The problem isn't with the latter part but with the initial.
    My 14M2 is switching B.0 on when there is no input, why is this and how can i stop this from happening?
    - Tex
    __________________________________________________ _______________________
    These words are my opinion, WYLION. Any resemblance to truth or fiction is accidental at best.
    "Truth lies dormant in our future history." ― Tex Clodhopper LXVI
    "Confidence is ignorance. If you're feeling cocky, it's because there's something you don't know." ― Eoin Colfer, Artemis Fowl

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •