Maker Pro
Maker Pro

Simple Arduino question

I have a cheap bicycle computer that I want to change the odometer reading on. I know that it works by a proximity switch that completes the circuit and tells the computer to add the number of millimeters per revolution. I want to set the computer to an odometer reading more in line with my logs, so I would like to put the Arduino in place of the switch and program the Arduino to trigger the computer the desired number of times.

The question I have is how do I hook it all up? I know how to use a transistor to power a larger load with a smaller one but in this case I want to power a small load with a larger one. The computer runs at 1.5v. How would you hook that up?

Thanks in advance for your advice.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
It's hard to say.

The input is probably a voltage that changes from near zero ot some significant fraction of 1.5V. That's easy enough to do with an Arduino using a voltage divider(say a 2k7 and a 1k resistor to get a voltage swing between 0 and 1.35V)

You can calculate the number of pulses easily, perhaps start by calculating the number required for a km and testing that before going for a larger number.

You may find that the unit itself does a sanity check and refuses to accept pulses faster than a certain rate. (how many bikes go faster than 100km/h?)

Alternatively, bike computers I have had allowed the odometer to be set after changing the battery. Do you have the instructions? Does yours have this feature?
 

KrisBlueNZ

Sadly passed away in 2015
You don't need an Arduino to generate a stream of pulses - a 555 oscillator will do fine and you can find circuits all over the net.

Do you know the nature of the rotation pickup device? If it's a Hall sensor, or unknown, it's probably simplest to activate it with an electromagnet. A 555 can drive an electromagnet directly if it has enough resistance, i.e. if you use lots of turns of thin wire. Alternatively you could find an old AC mains transformer, take out one of the two blocks of laminations, and wire to the primary, and that should work as an electromagnet. It won't need to be very strong if you put it close to the pickup.

If the magnetic pickup is just a reed switch (small glass tube with contacts inside it which connect together when put in a magnetic field), you can use an electromagnet, or just wire a relay contact across the switch, if you can get easy access to the wires.

Edit: Connect a diode in reverse across the electromagnet to absorb the "back EMF" that it will generate when the current flow into it is interrupted. If you need clarification of anything here, please ask.
 
Okay to start I do have the instructions and it says you can do it but doesn't explain how. I emailed the company and asked them if it is possible to do and they said the instructions were misprinted it's impossible. I think that's why I want to do it so badly.

The sensor is read by the computer by two leads. Measuring voltage across these leads does indeed produce 1.35v.
The default position of the sensor is off and the computer does have a sanity check.

Jumping the two leads adds the value of the circumference of the wheel in millimeters. The math is not difficult to figure out and I happen to have an arduino sitting around.

I know I could program the arduino to send an on off signal to mimic the rotation of the wheel at an acceptable speed for the computer and eventually obtain my reading.

My experience with electronics is fairly limited, I'm confused how the circuit would look. I'm mostly confused that the computer is a 1.5v system while the arduino is 5v and I don't want to fry the thing. I've attached a picture of what I'm working with.

comp.JPG

Thank you
 

KrisBlueNZ

Sadly passed away in 2015
Your simplest option is to use a small relay such as a reed relay. Here are some suitable options:

Reed relay; coil 5V 5 mA (can probably be driven directly from the Arduino, but still needs a reverse diode):
http://www.digikey.com/product-detail/en/9007-05-40/306-1251-ND/710440 USD 1.63

Reed relay; coil 5V 10 mA (driver transistor or small MOSFET recommended):
http://www.digikey.com/product-detail/en/9007-05-00/306-1062-ND/301696 USD 1.10

Reed relay; coil 5V (current not specified - use a driver transistor or MOSFET):
http://www.radioshack.com/product/index.jsp?productId=2062478


Some relevant information on driving relays from an Arduino (all found by by Googling drive relay from Arduino):

http://forum.arduino.cc/index.php/topic,22244.0.html
http://arduinoexplained.blogspot.co.nz/2012/09/relay-control-101.html
http://teaching.ericforman.com/5v-spdt-relay/

You will need to produce a short active pulse - I suggest about 50 ms - to close the relay briefly for every simulated wheel revolution.
 
Top