Connect with us

magnetic sensor to PC interface

Discussion in 'Electronic Design' started by [email protected], Mar 7, 2007.

Scroll to continue with content
  1. Guest

    Hi All - I found this newsgroup and was wondering if anyone could help
    me.
    I'd like to connect a magnetic sensor (bicycle computer) directly to
    my computer through one of the ports without a power supply.

    Basically the reed switch will have a current induced in it so I'm
    thinking I'd ideally like the circuit to be passive with minimal
    external circuitry.

    I have a pic of a basic circuit I found but don't know how it works
    and I don't know how to post it. Basically it has a connection to pin
    4 through a 4.7kohm resistor a direct connection to pin 6 and a ground
    through pin 20.
    If you tell me how to post a pic I can show the diagram.


    Can anyone make suggestions about circuit design - can I feed the
    wires directly into my parallel/serial port?

    I'm also trying to write a program in VB6 to read the input, but not
    having much luck.

    I'd really appreciate any help anyone could give me.
    Thanks
    Pete
     
  2. linnix

    linnix Guest

    Are you mounting a computer on your bike?
    It will not have enough power to run a micro.
    The best way is to get power from USB,
    whether you interface to it or not.
    You need to amp the signal.
    4.7K to VCC and 100s ohms between op amp ouput and port.
    Probably not.
    Depends on the OS as well.
     
  3. Dear friend :
    It is my fortunate writing to you . you will discover this is a wealth
    accumulation place.
    The website of our company is http://www.china-powerseller.com
    We are a big agent for Laptop
    Mobile Phone\Digital Camera\CDJ\DJM\Apple Ipod\PSP\VEDEO GAMES
    \Television\GPS\Telescope in CHINA .
    All of our commodities is the most advanced quality but lowest price.
    we also have the

    safest and most
    convenient transaction way to guarante the transaction arries on
    normally .
    looking forward to your coorporation and cause all of us both to
    profit.
    you can contact us by Email:china.seller#hotmail.com
    MSN: china.seller#hotmail.com
    best wishes!
    your sincerely

    http://www.china-powerseller.com
    MSN/Email:
     
  4. colin

    colin Guest

    Reed switches dont work by having currents induced in them,
    they are just switches, unless you mean its a coil ?

    if its a read switch you can connect it from RTS to CTS on your serial port.
    you would need a suitable program to set and read RTS/CTS.
    you can access these signals through msdos with the mode command.
    this will probably work but wont be that fast or imune to spurious signals.

    You might be able to connect it to a game port too,
    these are after al designed to interface to joysticks wich have switches.

    Colin =^.^=
     
  5. scada

    scada Guest

    Working off of Colin's suggestion, you could write a program in VB that
    would set RTSEnable, then in
    OnComm comEvCTS add value 1 to a variable. Read that variable every second
    to give pulses per second. The rest is just math, depending upon what you
    want to do. Use your micro switch to loop RTS to CTS on each contact
    closure.
     
  6. PeterD

    PeterD Guest

    The bike computer, or the sensor?
    The sensor on a bike computer requires power. However, that's not the
    end of the world...
    If I understand you right, they are using pin 6 (DSR) but pin 20 is
    not ground, but is DTR. Somthing is wrong...
     
  7. Dear friend :
    It is my fortunate writing to you . you will discover this is a wealth
    accumulation place.
    The website of our company is http://www.china-powerseller.com
    We are a big agent for Laptop
    Mobile Phone\Digital Camera\CDJ\DJM\Apple Ipod\PSP\VEDEO GAMES
    \Television\GPS\Telescope in CHINA .
    All of our commodities is the most advanced quality but lowest price.
    we also have the

    safest and most
    convenient transaction way to guarante the transaction arries on
    normally .
    looking forward to your coorporation and cause all of us both to
    profit.
    you can contact us by Email:china.seller#hotmail.com
    MSN: china.seller#hotmail.com
    best wishes!
    your sincerely

    http://www.china-powerseller.com
    MSN/Email:
     
  8. Guest

    Are you mounting a computer on your bike?
    No - I want to use my laptop as a bike computer/speedo. The bike is
    mounted on a frame for working out indoors.
    The micro will read the inputs from the wheel switch and display the
    speed.
    How do I add an op-amp?

    As things stand today I have a basic program that reads toggles in
    pin6 but the wires feed directly in with no resistors aside from the
    4.7k on pin4. I don't understand what's happening in the circuit or
    whether it's safe. If I add a resistor on pin6 my program can't detect
    any changes in pin6. Why?

    How does this sound? The circuit is fed from from the PC through pin4
    through the resistor (4.7k) and when the switch closes it toggles the
    state of pin6. If I add a resistor to pin6 there is not enough voltage
    to change the state of pin6 - hence the need for an op-amp. Am I close
    here?

    Pete
     
  9. Guest

    If I understand you right, they are using pin 6 (DSR) but pin 20 is
    Ok - yea. According to the diagram pin20 is DTR, pin4 (with 4.7kOhm)
    is RTS and pin6 is DSR.
    Can you give me a dummies explanation of what's happening?

    What's DTR, RTS and DSR?
    Is it safe?
    Where's the power coming from?
    Thanks
    Pete
     
  10. PeterD

    PeterD Guest

    DTR - Data Terminal Ready
    RTS - Ready to Send
    DSR - Data Set Ready

    Depending on which side of the cable you are, DSR is "I am ready to
    communicate" and DTR is "The other side is ready to communicate". One
    is an input, the other is an output. So... The computer raises the
    appropriate signal (DTR or DSR) and the other end raises the other.

    So if your computer raises DTR, then the reed switch in the sensor is
    connected to DSR, then DSR will be raised whenever DTR is raised (IOW
    it gets its power from DTR).

    WHich is which depends on which side of the communications you are on,
    but you don't have to care!

    I bet this explanation is as clear as mud... <g>
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-