No announcement yet.

connecting brake sensors

  • Filter
  • Time
  • Show
Clear All
new posts

    connecting brake sensors

    This has likely been discussed earlier, but I cannot yet find a clear answer. I have been building a bike. It has a Bafang Ultra motor. I have recently gotten to the point of hooking up the electrics and testing out the operation. So far, the motor and bike seem to operate well enough. But I have not been able to successfully connect the brake sensors yet. The brakes I have installed are Tektro HD-E725 hydraulic. The levers come with integrated brake sensors which are wired to red 2-pin connectors. Obviously, there is the immediate problem that the Bafang wire harness has 3-pin yellow/orange connectors, not red 2-pin. I have already tried just connecting the blue and black wires in the Bafang cable (disregarding the red wire altogether) to the red and black wires coming from the Tektro sensor, but this produced no result when the brake lever was squeezed. Is there some fundamental incompatibility between the Tektro sensor and the signal needed to activate the Ultra brake cutoff? Or should I try connecting other wires? Or, is there some other issue I have overlooked?

    I expect I could make the brake cutoffs work by disregarding the built-in Tektro sensors altogether, and simply adhering the independent Bafang sensors and magnets to the brake levers; they are already wired with 3-pin connectors. But I would prefer to have the built-in Tektro sensors function, if possible and especially if there is a straightforward solution.

    Can someone with experience offer help with this issue? Thanks.

    I abandoned brake sensors many thousands of miles ago and haven't looked back - I don't think they are good or useful... it's like having a moto that every time you activate the brakes it cuts the motor and disengages the clutch - what's the point? The *only* thing I've found them the least bit useful for is for downshifting when slowing but there are downsides - e.g. I like to be able to just touch the throttle for slow speed stuff and modulate the brakes and if they are going to cut the motor that's just plain dangerous...

    Anyway if you really want them for some reason I'd bet they can be made to work... but I'd say if it takes more than two neurons to do, try without and see if you feel like you are missing something...


      Ignore above guy, all he does is preach and not help.
      The bafang system is power is supplied on +5v and the 'brake sensor' closes contact to 'ground' and kills the motor and for a half second after release. You should have a signal on the display when the contact is closed (without the presence of the magnet)
      Having the same motor as you, if you want to use it and have power kick back in quickly, wire it to the gear shift connector, same principle but the controller gives power back instantly. On throttle it cuts power totally but only limits when on pedal assist, to about 250w.
      as for what wire does what, test it.. Chinese tat can use whatever wire they happened to grab sadly, but online search is a good start..
      Last edited by supracan; 03-21-2022, 01:35 PM.


      • snk
        snk commented
        Editing a comment
        supracan, further to your earlier comments: I have tried experimenting to connect up my 2-pin brake cutoff connectors using only the black and blue wires from the Bafang harness side. But no success, as the brake cutoff icon fails to come onscreen when the brake levers are squeezed.

        I have used an ohm meter to test the brake sensors on each side. Each shows a completely open circuit at rest, and then a modest increase in resistance when the levers are squeezed. I have so far understood this to be normal and operable. I also have tested voltage at the harness side. When connected to the black and blue wires voltage shows at about 4.8 volts. It is the same when the meter is connected to the black and red wires in the harness.

        I also tried connecting up an actual Bafang brake lever, one I received with a BBSo2 kit and that has a built-in brake sensor, and connects with a 3-pin yellow connector. This also failed to produce the cutoff icon on the display.

        Could I have some component misconnected here? The motor and system so far seem to function ok otherwise, and without error codes. But is there something different about the way brake sensors should be connected into the Ultra motor? In your earlier comments you had suggested connecting the brake sensors into or with the shift sensor. I have a shift sensor connected into one of the 3-pin yellow connectors of the Bafang harness and so far it seems to work properly. Is there a different way the shift sensor should be connected, or in what way do you combine the brake sensors into the shift sensor? Maybe that would be a way that I can get the brake cutoff to work.

        I am also wondering whether I should just buy the add-on Bafang sensor and magnet, and try creating a sensor with a 3-pin yellow connector that way instead of with the built-in brake sensors. But as indicated above a Bafang brake lever with 3-pin connector did not produce the result. Also, a neighbor across the street just bought a Luna X2 bike, with Luna version of the Ultra motor. I see that it comes with no brake sensors or cutoffs of any kind. This all makes me wonder whether brake sensors will be recognized at all by my motor.

        Anyway, I thought that if I can get further details from you as to how you route the brake sensors into your shift sensor function, that might be a way that I can get brake cutoffs without connecting the sensors in the more usual way.

        Thanks for any further information you can send. Steve K

      On both bikes I've had with bafang motors (one a 750W geared hub, the other a BBSHD mid) the brake sensors cut all power whether in PAS or on throttle - I suppose there might be some versions of firmware that reduce power when in PAS but this is news to me. Would be far from the first time I got enlightened from participating in the forums though ;-} Interesting if so, still not sure what it brings to the table like that but interesting concept none the less...

      Not using the brake sensors is a very viable "option" and most of the folks I ride with also disconnected them or never hooked them up in the first place - they are painful to install on brakes not already equipped although OP has brakes with them so if they were more plug-and-play I'd say try them and see whether they like them more with or without... but in my experience as soon as they present a challenge I would still suggest trying without and see if you feel like you'd prefer to have them before spending energy on hooking them up.

      I'm open to someone explaining why they value them too - forums are meant for open dialog, especially if it's courteous and avoids personal attacks which in my experience diminishes the value of those posts and members

      Gearsensor is a completely different animal and I'd go out of my way to hook those up



        Thank you both for taking the time to comment. I know there are people who have differing opinions about use of the brake sensors. I converted an older mountain bike with a BBS02 last summer, brake cut offs and all, and it had not yet occurred to me that they are useless or a problem. But I would like to stay away from debating the efficacy of brake sensors right now, and focus instead on getting my Bafang Ultra system to work as God, and apparently the Bafang overlords who designed the motor, intended. And that includes functioning brake cutoffs. I know I can disable them later if I find a reason that they are undesireable.

        There are only two wires coming from the built-in sensors in the brake levers, and only three wires involved in the Bafang connection wire, so you would think this would be a simple matter of just experimenting with connecting the different wires until the cut off icon appears on the display. I had read that the Bafang sensors use 5 volt. Another ebike guru indicated that wire was not needed for my built-in sensors, and he advised I should ignore that wire (red) in the Bafang harness side, and basically just connect the other two wires (blue and black) to the two wires coming from the brake levers. As indicated earlier I got no result by doing that, nor so far by trying any other combination of wire connections. I will likely experiment further with this, but I am hoping that someone who has connected this same style of brake sensor into the Bafang Ultra will chime in with some definite solution.


          Ignoring red on the input is likely correct

          I'd take an ohmmeter to the wires on the brake sensor and ensure they do what we're expecting when you pull the lever - when the lever is pulled they should go very low resistance and open (infinite resistance) when released and as long as they do that then they should work by plugging into the other two pins on the input. I'd also take a look at the sensor with the leads going both ways to the meter - i.e. reverse the leads to make sure there's no "active component" nature to the sensor... If they do anything different than low and open for the ohmmeter connected both ways then we have a different challenge... Some may need a pull-up (to the red) in order to pull-down...

          When it comes to chinese engineering and definitely electric bikes I've found they often have little clue about the end use case and cut every corner to get "it out the door"... it seems like they don't ever ride them! Frankly if they do ride then they likely are city commuters that really just want a sit and ride bike and that may or may not be the way we use them (it's definitely not how I use them!). For example the controller programming on every chinese bike I've experienced has been bad (some just plain atrocious), setup for cruise control and completely inappropriate for eMTB riding. For good or ill it makes me question everything they do.

          Having given the chinese engineers a good bashing I will say that when I've pulled apart a BBSHD I was surprised at how well they were engineered, at least for chinese standards - they aren't going to compete with the german or japanese engineering but for a chinese design ahead of what I normally see... at least we can twiddle the controller parameters since what I see coming out the door can be really bad too...


            Is the Tektro switch normally open or normally closed? The bafang are normally open. Check the Tektro switch for continuity.


              I did get a chance to connect an ohm meter to sensors today. They are as predicted by AZguy, completely open circuit when handles left at rest and some resistance when squeezed, both of them . If the Bafang side is the same when the brake is not activated, I am left guessing again. But I intend to try connecting the wires again to see whether I made some mistake the first time I tried. That will not be for a few days, as I need to be away the next few.


              • AZguy
                AZguy commented
                Editing a comment
                I'd next check voltages on the cable the sensor connects to

                When the motor is powered connect one side of the DVM to the [hopefully] black wire (pin 8) and probe the other two - both should read close to 5V...

                I would not ever connect the brake sensor to the red and black wires (pin 6 & 8) this could damage something in the controller!

              Brake icon should illuminate when the brake signal wire is shorted to ground…. According to this diagram that would correspond to pins number 4 and number 8.

              Have you tried doing that directly with a piece of wire? May help to isolate where the problem is. Perhaps too much resistance in the brake switch?

              See my completed Magic Pie V5 rear hub motor E-Bike build HERE.


                Once you’ve taken a 5,000 to 10,000 km ride, you can already change brakes or brake pads if you want to. If the remaining brake pad materials are only 1.5mm or less, it’s time to start installing bike brakes that are perfectly functioning.


                  sink, did you ever find a solution to this problem? I have the same issue .