The Speed Sensor and Wheel Magnet
The small magnet on a spoke belongs to the speed sensor. Together the magnet and a sensor on the frame or fork tell the bike how fast the wheel is turning.
What the pair does
Upway describes the speed sensor as reading a magnet on the wheel or spoke and telling the display how fast you're going.1 The magnet sits on the wheel or spoke, and the sensor reads it. That's the whole job. The display then shows the speed. Nothing here is about pedaling.
Wikipedia says a Hall-effect sensor can detect magnets on a wheel to measure speed. Such sensors respond both to static magnetic fields and to changing ones.2 The sources here don't say which type your bike uses.
How a pass becomes a speed
Wikipedia's example is a wheel with two magnets passing a Hall-effect sensor. That arrangement is used to measure and regulate the speed of rotating objects.2 Upway describes the result simply: the display shows how fast you are going.1 Your manual explains any wheel setting your bike needs.
Wikipedia's example wheel carries two magnets. How many magnets your bike has, and where they sit, is not something the saved sources say. Look in your manual or at the maker's parts diagram. Don't guess from another bike. A bike shop that knows your model can also answer it for you.
A different part from the cadence sensor
The cadence sensor reads a magnet ring near the crank and tells the motor you're pedaling. The speed sensor reads the wheel magnet. They're separate components, and a fault with one doesn't necessarily affect the other.1
The crank end of the story is on the cadence sensor page. The overview page places all the sensors side by side.
Magnets on a rotor and other spots
Upway says the magnet is on the wheel or spoke.1 That wording leaves room for other spots. If yours sits on a brake rotor or elsewhere, the manual or the maker's parts diagram is the place to confirm it.
I haven't saved a source about rotor-mounted magnets, so treat that as a prompt to check, not a rule.
If something seems off
Upway says any code referencing the pedal assist system, cadence sensor or speed sensor is worth taking seriously. Codes vary by brand, so check your user manual.1 If the manual doesn't explain a code on your screen, a bike shop that knows your model is the next place to ask.
Don't bend or pry at the sensor to fix it. A loose magnet, a shifted sensor or a bent bracket is a job for the instructions in your own manual or for a bike shop.
Reference list
- How to Fix an E-Bike Pedal Assist Sensor, Upway
- Hall-effect sensor, Wikipedia