Maker Pro
Maker Pro

bike computer 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

Lord Garth

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

Sounds as if you are attempting to connect to an old style DB25 RS232
serial port. Use Google and search for "button box". Those documents
will describe the necessary software to read the switch closures.
 
C

Charles Schuler

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?

If it is a reed switch, you will need a power supply and a pull-up resistor.
A USB port should work fine.

The reed switch is passive ... it generates no voltage.

If it is a sensing coil ... a small voltage is generated when the magnet
wipes past the coil ... that will require signal conditioning.
 
P

petrus bitbyter

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.

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

For the bike computers I'm aware of they tie a magnet to the wheel and some
sensor to the frame. That sensor can be a coil or a Hall type sensor but I
never saw a reed switch so far. Nevertheless, for a simple solution I'd tie
a strong magnet to the wheel and a reed switch to the frame. You may heve to
do some experiments to find a reliable combination, but once you have a
working reed switch, you can count pulses through a serial- or parallel port
very easily.

D0(2)------+
|
.-.
3k3 | |
| |
'-'
|
PE(12)-----+
|
\ o
\
\.
o
|
GND(18)----+
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

Above an example to use the parallel port. Drive D0 (pin 2 of the pp
connector) high and you can read the state of the switch through PE (paper
empty pin 12).

petrus bitbyter
 
S

Si Ballenger

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.

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

I assume you are wanting to make a simple revolution counter for
a stationary bike. I made a simple setup by connecting pin 7
(rts) to a resistor (4.7k sounds good) thru a wheel contact setup
to pin 2 (rx). When the com port is opened, pin 7 goes high
supplying ~+10v. When the wheel contact was made, jibberish is
put in the serial port input buffer. I made a simple program
using Just Basic (free) that checks the input buffer for input
every 150 ms. If there is input to the buffer the wheel has made
a revolution.The wheel contact was an index card stuck into the
spokes such that I bowed out a little bit. l taped some aluminum
foil on the card surface so that it would brush two bare wire
ends from the circuit when it went by to make the circuit. This
put the jibberish in the buffer. Below is a simple program I made
to test it to see if it would work. It assumes that one wheel
revolution is ~.00138762 miles.

open "Com1:9600,n,8,1,ds0,cs0,rs" for random as #comm

x = 0
y = 0

[repeat]
timer 150, [delay]
wait

[delay]

dataRead$ = input$(#comm, lof(#comm))

if dataRead$ = "" goto [repeat]

y = y+.00138762
print y

'print x
x=x+1

if x=1000 goto [quit]

goto [repeat]

[quit]
Close #comm

End
 
Top