Japanese PAS (Ebike) speed sensors and how they work

Pedal Assist bikes in Japan have several requirements to allow them to be classified as bicycles instead of motor vehicles.  The main requirement is that the motor can only output a power ratio of a maximum of 2 at speeds up to 10kph, and tapering down to 0 at 24kph.  

That means that if the rider is putting in 50 watts during normal riding, the motor pay output 100 watts, so the total power (rider + motor) will be 150 watts.  Going up a hill, the rider may put in 100 watts, and in this case the motor may put out 200 watts, for a total of 300 watts.  If the rider is going faster than 10kph, then the output will be reduced accordingly.  

Note that none of the following is intended to recommend that anyone modify their bike.  It is interesting to know how things work, and so I examine them.  In most countries, it is illegal to use a bike modified in a way which would make it noncompliant with regulations - but there are some cases where it might make sense:
a. You are modifying an imported bike.  For example, the rules in some states in the US are very lax compared with Japan, so you may want to modify a Japanese eBike to fall within a US class 3 eBike. 
b. You are  modifying a bike to use on private property where the laws don't apply.  
c. You are modifying a PAS bike into something that will be made road legal and registered as a Moped, etc.
d. You want to slow down an eBike for use by children.  
I am not a lawyer, and the above is not legal advice, just my understanding.

In order to accomplish this, the bike's pedal assistance system needs to know two things:
1. The mount of power the rider is putting in.
2. The speed at which the bike is moving.

Both of these have to be measured indirectly.
Typically there is a torq meter inside the motor which measures how hard the rider is pushing the pedals.
In addition to that, the bike speed cannot be known directly, so the rotation speed and size of the wheels can be used to determine the speed indirectly.

But how is speed determined?

For Japanese PAS bikes, there is typically a sensor in or near the rear hub.  This may be an optical sensor, or a magnetic sensor.  Next, there is a specially encoded disk that spins with the hub.  This disk will have a series of holes or transparent vs. opaque sections if an optical sensor is used.  In case of a magnetic sensor, a series of magnets will be mounted in a circle, or a single circular magnet with multiple poles (so that it acts like many magnets) will be used.

The firmware of the bike will know how many holes or magnets are mounted on the circle, which means that it can count the pulses from the sensor to determine the number of rotations.   

I will use some samples I happen to have access to in order to demonstrate.

Here is the disk for the Panasonic XM-1.  This is mounted to the disc brake, and spins with the wheel.  Five magnets are mounted in a circle, so the when the firmware detects 5 pulses, it will know that the wheel has rotated once.  When it has rotated once, then the bike has traveled the distance of the outer diameter of the tire.  In this way, pulses per second can be translated into speed in Kph.  

This is the side that faces the sensor.  
Sensor side

This is the side that mounts to the disc.
Disc side

The sensor is a fairly standard magnetic hall effect sensor.  Panasonic uses JST JWPF 2-Pin waterproof connectors.


Below is the magnet disk used in the Yamaha YPJ-MT Pro.  Here there is an inner magnet section, which spins inside an outer cassette.  

This is the side facing the wheel.  There is another plastic piece of the cassette attached to the wheel, which spins and drags the magnet by the 4 small lugs.  

Here is the magnet disk removed from the cassette (hub side) on top, and the cassette on the bottom.  


Below is the outward facing side of the ring.  The brown part is one large magnet that acts like many small magnets.  (If you drag a screwdriver around this ring, it will stop about 20 times).  

    Since the system assumes that the number of pulses per rotation is as per design, the apparent speed as measured by the system can be manipulated by increasing or decreasing the number of pulses detected by the sensor.  
    Some eBike "Tuning" systems accomplish this via electronic means by intercepting the signal from the sensor and sending out a different signal to the bike's computer.  (Other tuning systems work by intercepting the magnetic signal before it reaches the sensor, and then sending a separate magnetic symbol to the sensor at a different rate).
    In fact, this can be accomplished by much more primitive means without the need for fancy electronics.  
    By decreasing the number of magnets (or holes) on the rotating disk, the bike will detect fewer pulses, and think that the wheel is rotating slower than it actually is.  Therefore the bike will think that it is traveling slower than it actually is, and potentially apply more support than it "should".  For example, if a disk has 24 magnets to start, and we remove half of them to create a 12 magnet disk, then the bike will register an actual speed of 15kph as 7.5kph.  Since this is below 10kph, full support would be offered even though it should be offering reduces support at this point according to the design restrictions.  At an actual speed of 20kph, the bike would register 10kph and start to reduce the level of support.  The bile would think it is between 10 and 24kph when it is actually between 20 and 48kph, and fade out support within this range.  At a speed of 48kph, it would register ad 24kph and cut off support.  
    By altering the ratio of magnets (or holes) as compared to the original number, the magnitude of the change can be adjusted from a slight boost to a drastic increase  
    Likewise, the assist limits can actually be decreased as well!  By increasing the number of magnets (or holes) on the disk, the more pulses will be sent, and the bike will think it is going faster than it really is, and offer less support than it otherwise should.  For example, for a bike with 24 magnets, replacing the disk with one which has 36 magnets would cause the speed to be detected at 150% of the actual speed.  This means that the bike would detect 10kph at 6.66kph and start to reduce support.  Likewise, at an actual speed of 16kph, the bike would detect a speed of 24kph and stop all support entirely.  This could be useful when allowing small children to ride on the bike.

    Note that since this method of "tuning" relies on tricking the system, the speed and distance displays on the bike's built in computer will show the speed that the bike "thinks" it is moving at, rather than the speed at which it is actually moving.  In order to tell the true speed, the rider either has to perform the math in their head, or have a separate speed meter attached.  
    
    All of the above is about increasing or decreasing the speed at which the assistance level begins to drop, but none of that will increase the torq or wattage.  Many of the non-sporty style PAS bikes have a separate assist gear connected to the motor which drives the chain, and people sometimes modify this by changing, for example, a 9 tooth gear for a 14 tooth gear.  

You can see a youtuber using this method to "tune" their bike, using only parts from the dollar store in the following video:
https://www.youtube.com/watch?v=x3CGcRozmuw
See assist gear hacking at 4:11.
See magnet sensor hacking at at time 4:47.


Comments

Popular Posts