Introduction: Electric Bike Hub Motor - How to Replace a Hall-effect Sensor

Picture of Electric Bike Hub Motor - How to Replace a Hall-effect Sensor

Brushless motors use electronic controllers instead of brush systems to control the timing and distribution of power to the motor. To do this, some controller systems use hall-effect sensors inside the hub, which track the motor's position. This information permits the controller to alternate power with the right timing and in the right sequence and, voila, it spins.

That's obviously the short version and it is a complex compared to standard DC motors, but brushless motors are more efficient and that's the benefit. Better efficiency means you get more mechanical energy per unit of power, which is a good thing! The bad thing is, hall-effect sensors are relatively unreliable in the hot, high voltage, rock-and-roll insides of electric bike hub motors.

In my case, the villain was voltage. Although, I certainly didn't help the situation when I crashed the stupid thing.

When the bike fell, the sensor and power leads--8 wires altogether--were crushed and severed as the axle ground against the concrete. As a result, the current intended for the motor found its way to one of the sensors and killed it as the heat changed the internal composition from silcon to silcon dioxide. The controller, as I said before, depends on these sensors to distribute power, so the whole system fails with the loss of even one of them.

Efficient, yes. Robust, no.

Sure enough, after repairing the wiring, I found that the motor didn't turn smoothly anymore. Rotation was jerky and it didn't produce much torque. This is known as "sputtering." There were also dead spots, where, if at rest, the wheel could not begin to spin. Major major problems. After a little research and hanging around the Golden Motor owner's forum, I learned that my problem was a failed sensor and it needed to be replaced.

This Instructable documents the process I followed to replace this sensor and bring my bike back to life.

First, a thousand thank-you's go out to myelectricbike, who walked me through this step-by-step, provided much of the information you'll read here, and is singlehandedly forging a first-rate forum for Golden Motor product owners.

Step 1: Parts and Tools

Picture of Parts and Tools

  • Replacement Hall-effect Sensors

For the particular motor I own, Golden Motor sales suggests Honeywell SS41 sensors, which I purchased from DigiKey. These are available, of course, from many other vendors. Do yourself a favor and buy extras. They're inexpensive and good to have on hand.

  • Small zip ties


  • Felt-tipped pen
  • Glue (Recommended, but optional)
  • Masking tape
  • Multimeter (Recommended, but optional)
  • Needle nose pliers
  • Oil
  • Ratchet with 7mm Socket
  • Small standard screwdriver
  • Soldering iron, solder, and solder wick
  • Wire cutters

Step 2: Identify Failed Sensor

Picture of Identify Failed Sensor

First, let's sort out the motor's wiring. There are eight wires, or leads, running from the motor. Three wires power the motor and are larger (16 AWG): Green, Blue, and Yellow. Two wires power the sensors and are smaller: Red and Black. And three wires connect the sensors to the controller: Green, Blue, and Yellow. For this project, we are concerned only with the smaller wires.

Now, there are two methods I've used to determine which of the three sensors failed. By the way, both require the motor to be fully assembled, so put the wrench away!

The first is to simply run the motor while one sensor lead is disconnected, then again for the second lead, and a third time for the last lead. If one sensor is dead (and that's your only problem), you'll see that disconnecting one or the other of the good sensors prevents the motor from turning altogether, while disconnecting the bad one has no effect at all--it still sputters. If this works, great. You've identified which sensor needs to be replaced. Remember which lead it is head to the next step.

If that didn't work, try this second method. It is more complex, but useful to identify more nuanced issues or problems stemming from multiple failures.

Prepare a firing order table on a spreadsheet with as many rows as there are magnets (46 for this model motor) and 4 columns. The first column should contain the switch point (1 - 46) and the remaining three should be used to record sensor output from each of the three leads. While the motor is connected to the controller, powered, and at rest--or, alternatively, powered with +5 volts from a workbench power supply--set up a multimeter to monitor the sensor's output. Record the voltage change between the sensor ground and sensor lead as the wheel is slowly turned.

In a perfect world you would use three multimeters and mark your readings from precisely the same point for each sensor. You, like most people, have at most one multimeter, so use masking tape and a felt-tipped pen to mark 46 points around the motor at which to take readings to ensure they correspond for each sensor. Once your table is complete, your problem should be apparent. If not, add an additional three columns to your table and preform a similar test on the larger power leads, but check for continuity instead of voltage change. If it is still unclear why your motor is not working, find help online at the Golden Motor owner's forum or elsewhere.

Step 3: Disassemble Wheel

Picture of Disassemble Wheel

For me, the sensors are mounted opposite the side where the wires enter the hub, but it may be different for you. Use your socket wrench to remove the bolts and a small screw driver to remove the hub cover.

Be aware the hub covers hold the axle and stator in place against the force of the rotor magnets, so be careful when you pry the cover loose. You will hear a pop once the cover breaks free from the wheel and the magnets pull the stator to one side. If necessary, apply a few drops of oil here to help slide the cover off.

Step 4: Remove Failed Sensor

Picture of Remove Failed Sensor

As you can see in the picture, the leads and sensor board are secured to the stator yoke spokes with small cable ties. Use your wire cutters to cut the ties and free the sensor board. With your soldering iron, or solder wick, remove the solder from all five leads and push them to the side. This should also free the sensor board, which you should set aside.

With your pliers, pull the bad sensor (or all three, if you want!), clean out the sensor well, insert the new sensor, and glue it in place (the glue is optional). Replace and solder the sensor board, then the sensor and power leads.

Here, it is wise to test each sensor lead for continuity using your multimeter from the end of the lead at the controller all the way up to the body of the sensor. While checking for continuity, move your leads around to be sure there are no intermittent breaks. If you find any, repair or replace as needed.

Secure the board and sensors with new cable ties and test the sensors once more. Before you put the cover back on, check to see that the sensor board doesn't sit so high that the board will make contact with the cover.

Close up the motor and you should be good to go.

Step 5: Back in Business!

Picture of Back in Business!

For more information about the kit I bought, visit the Golden Motor web site.


jayjoe.quinones (author)2014-10-24

Can you ride without sensors? My controller says its not necessary.

johnpeeter (author)2013-10-06

When the sensor is defective it may be difficult finding an alternative to this approach is to replace them all. In the end, it often goes to 1 when the sensor is bad, the motor can be very reliable,

ghans_00 (author)2013-08-22

thanks for the info's! Bless you Sir!

Mike Rolite (author)2012-04-10

I have just found your article and it has solved a problem I have with my Chinese "Star & Moon" Electric bike. One of the three TO92 Hall effect sensors had failed but I could not find the Part No (S41351) anywhere on the internet, to know whether they were Bipolar, unipolar, latching or non latching types. I have even sent an email to the company in China without success asking them to identify the components.
The middle one was also fitted in upside down and I am not sure whether this was to make the little circuit board easier to manufacture or whether there was an electronic reason for this, as the magnets in the wheel are arranged "N" & "S" alternately.
I see that your TO92's are bipolar latching types and are all facing the same way but apart from that it seems to be almost identical to mine.
I look forward to getting my bike back on the road after about three months out of action

numberonebikeslover (author)2012-03-13

Thanks for sharing your story; I have learned a lot. God bless you bro

jjam1 (author)2011-07-18

We are replacing a hal sensor in a Daymak Gatto. Can someone tell me where this is

chinaeu (author)2011-02-24

very nice job.
could it be better if just buy one electric bike from the market.
here is our link:

mr-motorvator (author)2010-03-18

If you use a sensor-less controller you can save yourself a lot of trouble!  Or use an HV (50V) radio control ESC.  You need a Hall-throttle to pulse width converter (a PIC works fine), but these controllers are TINY! 

177che (author)2010-01-20

This bike is true, I support what.
Take a look at how my folding bicycle

kfirco (author)2008-01-27

HI I purchase from china a brushless hub motor. Its 36v 350w. I am not sure if the controller is original for the motor but thats what they sent me. I connected all the wire from the controller to motor and Now I have left just the power from battery. The connector on the controller has 3 wires... red, black and orange. Can someone tell why is the orange for? I connect the + - from the battery and left the orange aside but it didnt run. Any suggestions?

bipul_1976 (author)kfirco2009-11-18

if your controller 36V350W then it is the right one for the motor.
-the orange wire is for controling input(+36V) for the controller.
-you have to connect + from the battery to orange through a 20A fuse. then it will run. 

efilnikufecin (author)2008-07-26

an alternate approach for when it is difficult to figuring out which sensor is defective is to replace them all. This can in the end make the motor more reliable because often when 1 sensor goes bad, another, or the rest of them have been weakened.

zjharva (author)2008-05-31

Is this a good kit? do you like it?

smihailfrancisc (author)zjharva2008-07-13

please can you tell me the adress where can i order the kit ,thanks

Jeremy.Nash (author)zjharva2008-05-31

The quality is great, relative to the price. And I do like it.

smihailfrancisc (author)2008-07-13

hy paws, im new in ,please can you tell me haw can i order a kit

Amberwolf (author)2008-04-10

If anyone is doing a repair like this and either doesn't have quick enough source of parts (for instance, needing the bike to get to work the next day :-) ) or prefers to do recycling of parts to fix things, many PC case and power supply cooling fans use a standard 3-pin Hall sensor that will replace those in BLDC motors (since those fans *are* BLDC motors, though very simple ones).

Some of the fans use an integrated Hall sensor and motor driver chip, which isn't typically adaptable as just a sensor, and they usually have 4 or more pins, instead of the typical 3 (as in this instructable's photos). If that's the only fans you have laying around, you'll have to order your sensors anyway. :-)

I know many people that either themselves have or know PC-repair friends that have old worn-out cooling fans laying around, so they are a reasonably practical alternative for these sensors. I'm using some myself in a motor I'm converting from an old cieling fan into an e-bike motor for various testing purposes (see for the info I've posted about the e-bike project).

nzlee34 (author)2007-09-16

if you add a bit more control circuitry it is possible to eliminate the hall-effect sensors completely.

Gamester3333 (author)nzlee342007-09-27

Like the controller from a treadmill... That's what I use. It is about 2kW with a 2HP motor, and I could get up to 90 on it... My wheels melted the last time I tried though, plus the bearings were shot. Even so, it was fun. I might make an instructable on it, but I need to find time to dissassemble and reassemble it.

CameronSS (author)2007-07-11

Attached is a picture of my dad's electric bike strapped into its custom carrier on the back of our electric Ford Courier. It uses a German-built motor, and three 12V SLA batteries in a rack under the frame. The bike is a BikeE recumbect, which is now a nonexistent company. So is the difference between brushless and standard DC motors analogous to the difference between fuel injection and carburetors?

OneEye (author)CameronSS2007-07-11

Probably a good analogy. A carbeurator relies on physical phenomenon to adjust fuel/air ratios & delivery to the engine. A standard DC motor relies on physical brushes to transmit determine the position of the rotor and provide power in the right direction to the correct windings. A brushless motor relies on sensors to determine the motor location, then electronically adjusts the current direction in the different windings, much as a cam sensor and the car's computer determine the position of the pistons in the engine to control fuel delivery and quantity.

About This Instructable




More by Jeremy.Nash:Electric Bike Hub Motor - How to Replace a Hall-effect Sensor
Add instructable to: