1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

useing my pc to moniter the state of an external switch

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by zxrepairman, Nov 4, 2002.

  1. zxrepairman

    zxrepairman New Member

    Joined:
    Nov 4, 2002
    Messages:
    3
    Likes:
    0
    What i am trying to do is to moniter a external switch and graphically represent it on my pc the software side i think i can solve but the electrical side is causing me a few headaches..i need to do this either through the usb,parallel or serial.as i do not want or need to control the switch
    can i use the power from the computers port serial,usb or parallel send that current to the switch and determine wheather or not it is on or off .

    or will i have to incoperate a A D C into the cable and use a external powersupply.

    or is there an entirely different and easier way my main object is that it is cheap and not involve opening up the pc

    as you probably tell i am new to this so any help however small is gratefully recieved
     
  2. thec

    thec New Member

    Joined:
    Sep 30, 2002
    Messages:
    40
    Likes:
    0
    Location:
    Alvesta, Sweden
    Just hook up one input pin on your parallell port with a pull up resistor to 5V and let the switch bring it down to ground and you're set for the external design.

    Be sure to do things exact on the parallell interface since errorous voltages etc can burn the port. I would recommend an "optic switch" to isolate the port from your hardware application.

    The software is (as you say) pretty easy to code, it's easy to scan the parallell port.

    If you really need to work with serial interface, I would create some kind of middleware like a basic stamp to maintain the communication, but that's really overkill :)

    Good luck
    //Albert "thec" Sandberg
     
  3. zxrepairman

    zxrepairman New Member

    Joined:
    Nov 4, 2002
    Messages:
    3
    Likes:
    0
    thank you very much for the reply its helped me very much i have been looking into what you said as i am new to electronics and i think your solution is the best so far for what i want to achieve.

    i assume this is a non standard cable that i would be making or does such a cable exist if so do you know the name of such a cable.

    again many thanx
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. pebe

    pebe Member

    Joined:
    Sep 24, 2002
    Messages:
    354
    Likes:
    1
    Location:
    Ellon - Scotland

    Switch to PC

    :!: A word of caution. You need one side of the switch to be at ground potential and you need to know that when the switch goes open circuit, the voltage is DC and is not excessive. I mean don't try to read the status of a switch connected to the mains.
     
  6. zxrepairman

    zxrepairman New Member

    Joined:
    Nov 4, 2002
    Messages:
    3
    Likes:
    0
    there is no power going to the switch.

    as i understand it(possibly wrong) the solution proposed would not need any additional power supply as the 5amp pull up resitor would supply the parallel port with a on state and by openeing the switch it would cause a short and drop to a off state. so it would be in affect a one bit data stream

    i as stated in my original question electronics is not my strong point(dont ask what is i havent found it yet)so if you can see that i have missed the point please feel free to tell me
     
  7. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
    I think it should be 5k or something :roll:
     

Share This Page