voltage every time the wheel magnet passes by so it needs NO voltage to make it work.
How can we check? I connected my multimeter on the mA scale across the end of the sensor wire in the handle bar mount shoe ( place where it enters the computer).
The reading is of course zero mA. Next I took one of those little kitchen fridge magnets and waved it very close ( 1mm) to the “Unknown type” of sensor. I had to find the best direction to move the magnet over the sensor, but eventually I got a reading of a about 50 uA
Well I cheated as I knew it was a coil sensor, but if it hadn't been a coil sensor, instead some sort of HALL device, then we would have no change at all when the magnet was passed across the sensor body.
Just for the sake of argument, the one you found gives a pulse of current or volts when you pass the magnet across it, then what?
In that case we would need to condition the pulse output. For those interested, basically a limiting amplifier to ensure that even at the slowest speeds there is enough signal for the PIC to detect at the PORTB input. But this could be tricky, without an oscilloscope, so unless you really have set your heart on making it work, best look for a HALL device type sensor.
OK let's suppose we have found a HALL device, it is easy to test?
No panic about getting a voltage supply, lets look at the following drawing on how to test a HALL type sensor. The voltmeter on the ohms range will normally give you the required voltage-...
The above may not work if the sensor we have found is not meant for a bike wheel.
For a bike wheel?
Yes, we don't want to measure the flux strength, we only want to measure if there is flux or if there isn't. Something that detects that sort of situation is a simple magnetic switch .
Are there other types?
Yes, there are linear detectors aimed at flux measurement. These are much more complex and require more care in use.
There are many bike types. But the type we are using belongs to the first group , the simpler on off switch. Let's look at the history biefly again
The metal plate used in the beginning was replaced later by semi-conductor materials which gave a much larger Hall current. Looking at it another way, the original device required a lot of current , amps to get a hall output, microamps. The modern device has reduced this two milli amps. For a bike this is still a lot of current drain for the battery, and switching sampling, duty cycle operation schemes are employed to keep the current down.
So, if we talk about milli amps, our drawing resisto R = 100k r will have to be scaled to allow more current to pass. ( otherwise the device will not be able to function).
A lower limit however is needed. If with 1 K for R there is no change, then something else is wrong. Either the sensor is dead, or we have found the original HALL tray. For a bike, no good. Look for another.
The Bike mounted PCB
The pcb is too big for mounting on the bike so we have to reduce it in size.
We do two things.
The latter at first sight is the most complex, but no it isn't. Lets compare the circuits to see how it is almost done for us. The PCB at the bottom has everything, while that on the top
Fig 35. Bare bones PCB for simple bike computer
Fig 36 complete PCB simp bike +"development " components
has been pruned to the bare bones necessary for the bike. We can see where
the timer and power supply bits have been eliminated, and the board is very much smaller. What else has been done?
Well the key is the LCD.
It is now mounted over the pcb tracks. Fig35 Simple Bike PCB
The other components are mounted as before on the non PCB copper side. Does this mean we now need a PCB with tracks top and bottom'? No, because we use the original connections.
Bike only Theoretical diagram
The theoretical circuit diagram is shown below. By bike only, we mean that all the extra components for testing have been removed. Also above ,the important interface component for the sensor, R, has had a large discussion on how to connect different types of sensor to the Simple Bike Computer.
Fig.37 Simple bike computer ( no development components)
This tries to be a general circuit for any type of sensor.
Earlier in fig35 we have shown and discussed, the varable factors and some ways to adapt a HALL sensor to the microcontroller PORTB.
We hope we have covered the topic in sufficient depth for the reader to be aware of the different types of sensors and so to be able to adapt his sensor to the PIC.
The Box
We are now ready to put it all into a box, but first lets look at the lid diagram below.
This is the most complex mechanical part.
The lower side view is of course will be the component side. I have tried to combine various photos to see how the lid will look spread out.
Please note that the top of the lid will have the LCD inside and only the Display and the silver coloured bezel visible.
Let's try to see how the components and the LCD have been realigned.
Visualize sliding the LCD module , round and down onto the pcb side. .The connecting pins are unmoved. BUT, we have now covered the lowerside tracks and the lid top diagram can only show the mounting holes and the LCD module .
Fig 38 The box lid with PCB
The lower diagram, Lid underside view shows the components. The blackened areas are components only used on the complete version. We have blacked out the timer and the power supply stabilizer..
The bottom portion of fig38 lid drawing, shows th rest of the box.
The height is about 1.4 inches. The top 0.4 inch is taken up by the Display and LID as well as the underside components.
The remaining 1 inch below houses four AA size 1.5V batteries. . The conection to the sensor is best made detachable, say with a 3.5mm audio phone jack and socket. Mount the socket on the side of the box. Tthe battery on/off switch will be mounted on the side as well..
There should be sufficient space for the box to be mounted on the handlebar in the space between the brakes and gear changes.
The box itself can be secured to the handlebar by many means. I personally use
Plastic ties, but a jubilee clip is also a good choice. See fig 39
Fig39 25mm Jubilee clip
The appendix that follows holds the up dated PCBs