This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Topic: questions about a sensor (READ READ READ)

hello,

i bought a bike speedometer, but i wish to adapt it into a more complex tooly with a microcontroller, the problem is that i can't identify at all the sensor, because it's not powered (7 wires only, cannot see picture) but it gives me voltage when the magnet aproachs. as i know there are magnetic sensors who works as switches but this gives me voltage... it's a little confusing. it give me peaks of 12V ! -i did the measures without powering it to the speedometer, -

i think all what i have to do to interface a MCU to it is use a diode fectifier and convert it to DC now use OPamp stages to bring the voltage level to my desired ADC range and calibrate it.

  • The sensor is just a little coil that works as a generator and produces the voltage pulse when the magnetic field changes.

    No need for Op-amp, if it reaches 12V. An Op-amp is normally used when the input signals are too small to detect without amplification. When the sensor is strong, it is cheaper to clip or dampen it. And an inductive sensor input must always be clipped to protect your electronics.

    If the voltage is >= 5V (or maybe 3.3V since a 3.3V processor is probably better in battery-driven equpment) you can just clip the value to the 0 to 5V (3.3V) range and send in to a processor pin with interrupt capability.

    Configure an interrupt handler for the external interrupt.

    Add a bit of software filtering to catch multiple pulses too close together. You don't want to get your speedometer to display 180km/h just because you drive past some induction-controlled traffic lights like a very high-end bike computer I have...