Splitting a PWM signal from a Linear Hall Sensor

Thread Starter


Joined Jul 24, 2019
I have a special two-way throttle designed for an electric motorcycle that I'm trying to adapt to a secondary application. The way the throttle was manufactured, an AS5040 hall sensor hides inside of the handlebar tube. A permanent magnet inside the twisting component of the throttle rotates a small neodymium magnet over the face of the chip. When you twist the throttle normally from its resting position, the duty cycle increases and the motorcycle accelerates. When you twist the throttle from its resting position forward (over-the-top), the duty cycle decreases and the regenerative braking kicks in. The motor controller I have to adapt the throttle for does not support variable regenerative braking unless the braking sensor's input is provided on a separate input pin from the throttle. The hall sensor is 5v and uses a 1kHz carrier freq.

Presently, the dead zone is at 50% duty cycle, 80% duty cycle is maxed throttle, and 35% duty cycle is max braking. A further complication is that the controller will only increase the braking with an increasing duty cycle. So if I simply connected the output of the throttle to both the throttle and braking pins, it would result in maximum braking as soon as the throttle transitioned from the dead zone to the braking zone.

In my mind, the only way to accommodate this is to feed the throttle signal into a microprocessor that would split the signal depending on the value of the throttle output.

If there's a simple way to split the output and provide an unaltered output to the throttle, and an inverted output to the brake, then I imagine that would also be workable. I could simply define the dead zones separately for the brake and throttle to make it workable.

My background is mechanical, but I'm not afraid to learn; I just might need some handholding. Thanks for your patience.