Maker Pro
Maker Pro

magnetic sensor to PC interface

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
 
L

linnix

Jan 1, 1970
0
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.

Are you mounting a computer on your bike?
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.

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.
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.

You need to amp the signal.
4.7K to VCC and 100s ohms between op amp ouput and port.
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?

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

Depends on the OS as well.
 
W

www.china-powerseller.com

Jan 1, 1970
0
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: [email protected]
 
C

colin

Jan 1, 1970
0
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.

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 =^.^=
 
S

scada

Jan 1, 1970
0
colin said:
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 =^.^=

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.
 
P

PeterD

Jan 1, 1970
0
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.

The bike computer, or the sensor?
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.

The sensor on a bike computer requires power. However, that's not the
end of the world...
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 I understand you right, they are using pin 6 (DSR) but pin 20 is
not ground, but is DTR. Somthing is wrong...
 
W

www.china-powerseller.com

Jan 1, 1970
0
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: [email protected]
 
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.
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.
The micro will read the inputs from the wheel switch and display the
speed.
You need to amp the signal.
4.7K to VCC and 100s ohms between op amp ouput and port.
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
 
If I understand you right, they are using pin 6 (DSR) but pin 20 is
not ground, but is DTR. Somthing is wrong...

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
 
P

PeterD

Jan 1, 1970
0
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

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>
 
Top