DIY electric bike: brake sensors


Hello friends!

Today we will talk about the types of brake sensors, consider their principle of operation, methods of connecting to an electric bike controller, advantages and disadvantages.

Imagine that you came to a mass event on an e-bike, met friends, stopped, started chatting, but forgot to turn off the e-bike.

At some point, a friend or girlfriend, who had never seen an electric bike, approached him and, absorbed in interest, turned the throttle. Naturally, the bike will run. You do not expect this, and you can either fall yourself, or run over the person who is standing in front of you, or even the child.

A similar situation can happen if you are just standing at a pedestrian crossing waiting for a green traffic light, and someone (or maybe you yourself) touched the bicycle pedal, which triggered the PAS sensor — the bicycle will roll onto the road, possibly with you. And the more powerful the electric bike, the more dangerous it is.

To exclude such situations, sensors are installed on the brake levers, thanks to which the motor will not turn on even when the brake is lightly pressed.

Another purpose of brake sensors is to enable recuperation on electric bicycles and electric motorcycles with direct drive motors.

The most common e-bike brake sensors today are push-button sensors — in fact, they are just a button that closes or opens 2 contacts when the brake lever is pressed.

Such sensors, for example, are installed in the brake levers that come with the Bafang central motor.

In this case, pressing the handle closes two wires that go to the controller of the e-bike. If you remove the cover on the handle, you can see the same button.

However, if you look at the sealed connector installed in this case, you can see that it has three pins, not two. Where did the third contact come from and what is it for?

The fact is that there is another type of brake sensors operating in a 3-wire circuit. And in this case, a 3-pin connector was used to ensure versatility — that is, instead of these brake levers, it was possible to connect others operating in a 3-wire scheme. We’ll look at them in the next section.


Some do-it-yourselfers make brake sensors based on microswitches, but as a rule, these designs are not very reliable and look unaesthetic.

Many people might think that the magnetic sensor contains

But in fact, a reed switch, like any mechanical device, is subject to wear and tear, and eventually fails. Therefore, the so-called

To put it simply, the sensor is triggered when it enters a magnetic field. It has three pins (from left to right): «+ 5V», «GND» and signal. The first two are the power supply of the sensor, and the output signal is taken from the third pin (relative to the second pin «GND»). Accordingly, all three of these wires go from the sensor to the controller of the e-bike.

For the Hall sensor to be triggered, a magnet must move past it. And here the most interesting thing begins — how to securely fix the sensor and the magnet on the brake lever so that when the handle moves, the magnet moves over the sensor?

Let’s take a look at the best-selling brake sensor on Aliexpress. In addition to the sensors themselves, the kit includes magnets and high-quality 2-sided adhesive tape from «3M».

And this is how the seller proposes to install them: glue the sensor body to the brake handle body, and glue the magnet on the handle itself.

Looks pretty good, doesn’t it?

However, in practice, judging by the feedback from users, not everything is so smooth — in one case, the buyer used another magnet (not from the kit), fixing it on a metal plate and pulling it to the handle with ties.

In the second case, the magnet and sensor are fixed as recommended by the seller, but additionally reinforced with ties, although judging by the distance from the magnet to the sensor, such a system is unlikely to work correctly.

It is worth considering that over time, nylon clamps tend to lose elasticity and then break.

In Russia there is a company that, in addition to assembling electric bicycles, is engaged in the development and production of brake sensors for hydraulic brakes — this is

Here’s an example of their brake sensor on an Avid Elixir 9 Trail, here the aluminum construction is not yet anodized.

Judging by the use of screw connections, the structure is quite reliable (compared to nylon clamps), and after anodizing, when the aluminum turns black, it should look quite harmonious.

And here are a couple more of their work — the brake sensor installed on the Avid Elixir 1 and the brake sensor on the Hayes Nine.

The advantage

The considered brake sensors have a sealed connector at the end of the wire, which is designed, as a rule, to be connected to an integration cable, for example, the one that comes with the Bafang central motor.

Through this cable, the sensors on the left and right brake levers are connected to the controller, which is installed in the central motor housing.

Decision with

If you order an inexpensive electric kit with a wheel motor, you will most likely receive Wuxing pens with long enough wires and leaking connectors at the end.

This is a cheaper solution, but it spoils the appearance with an abundance of wires, and also complicates diagnostics and repairs during operation.

Let’s get back to the connection issue. There are two connectors on the controller for connecting the brake sensors — they are easy enough to distinguish, since they are connected in parallel. If we recall the integration cable, there this parallel connection is made on the steering wheel, and there are already 2 wires going to the controller in the cable itself, and not 4.

But what if we don’t have a 2-wire circuit with a push-button sensor, but a 3-wire circuit with a Hall sensor? Where can I get the third wire?

In fact, everything is simple: the third wire we have is the power supply of the Hall sensors — the voltage is +5 volts. And it can be safely taken from the power supply of the Hall sensor installed in the throttle handle. It is slightly different there, but also powered by +5 volts.

Therefore, we find the throttle stick connector according to the description of the controller from your kit, then we find on it a contact with a voltage of +5 volts and solder the wire in parallel, which we use as a missing contact on the brake sensor connectors.

I hope the information was useful for you or just interesting.

Read also: