• Howdy! we're looking for donations to finish custom knowledgebase software for this forum. Please see our Funding drive thread

Bafang G360 with KT controller programming

Merrix

100 µW
Joined
Oct 12, 2021
Messages
8
I have a bike with the G360 500W motor and am having a hard time getting the speedo to work properly. It works intermittently but will drop to 0 while coasting.

Does anyone know what P1 and P2 settings should be? I know there's 6 magnets around the outer case/gear. I tried a combination of settings and I am stumped :confused:
 
Does your G360 have an internal speed sensor? Are you connecting to the motor with a 9 pin cable or is it the three bullets and a 2x3 rectangular connector? If the latter, do you see a white wire coming out of the motor harness? That would be the speed signal.

The KT controller knows how fast the motor is spinning when it is running the motor. It uses the P1 setting to compute the wheel speed from the gearing/magnets. Finally, it has the wheel diameter to calculate the speed. With a direct drive motor, the motor is always spinning and the controller knows the speed. When you have a geared motor, the motor does not spin when coasting, so the controller switches to the speed sensor.

A zero value for P2 tells the controller there is no speed sensor. A non-zero valo indicates speed sensor present, and the value is the number of times it flashes during one revolution. Bafangs that have sensors usually use the value of 6. Try that. If the speedometer works when coasting, you're almost there. It means the speed sensor was in the motor, and the wiring supports it.

If not, then you got a wiring problem, or you have no sensor in the motor. You can always buy an external sensor, put it on the rear wheel, and most KT controllers have s separate connector for it. The controllers with waterproof harness don't though,

P1 can be measured by counting how many times one Hall Sensor flashes during a revolution. Otherwise, you start with 46 and play around. It normally only affects the RPM calculation, but if it's set too low, single digits, it somehow impairs motor rpm,
 
Merrix said:
I have a bike with the G360 500W motor and am having a hard time getting the speedo to work properly. It works intermittently but will drop to 0 while coasting.
If it never reads a speed except when the motor is running, it means the speed signal wire on the controller is connected to one of the motor hall sensors, and not to a wheel speed sensor.

You can verify this by putting the bike upside down or otherwise held with the wheel offground, and while watching the speed display, manually turn the wheel *backwards*. It will then read a speed...but not when you manually turn the wheel forwards.

A geared hubmotor like this doesn't spin the motor except when it is under power, and if the motor isn't spinning, it won't have any signals on it's hall sensors.

These types of motors usually ahve a separate speed sensor mounted to monitor magnets (usually six) on the inside of the side cover, and the wire for this is usually white. The wires for the motor hall signals are usually yellow, blue, and green.
 
In my experience, this is all going to depend on the age of the motor. The early ones are going to require an external speed sensor wired to the white wire (the same one often confused as a temp sensor input) within the lead going to the motor. Sometimes it's easiest to find/splice that wire inside the controller, sometimes it's easily located/found externally. The newer Bafang motors (most frequently the ones using a waterproof connector) have a relocated new internal (full time) speed sensor built in.

Noteworthy maybe, with the fact the speedo is working when under power, I think it's fair to assume there's nothing wrong with the wiring anywhere. This motor is very likely going to need an external sensor to read 100% of the time. Not a big deal, easily sourced (even Amazon carries them), usually less than 20 bucks.

The speed sensor hot and ground can be borrowed from the PAS sensor, and the sensor's sensor lead can be spliced into the white wire located in the controller side of the harness leading to the motor. I generally just cap off the white wire leading back from there (leading to motor) as it's no longer necessary.
 
docw009 said:
Does your G360 have an internal speed sensor? Are you connecting to the motor with a 9 pin cable or is it the three bullets and a 2x3 rectangular connector? If the latter, do you see a white wire coming out of the motor harness? That would be the speed signal.

The KT controller knows how fast the motor is spinning when it is running the motor. It uses the P1 setting to compute the wheel speed from the gearing/magnets. Finally, it has the wheel diameter to calculate the speed. With a direct drive motor, the motor is always spinning and the controller knows the speed. When you have a geared motor, the motor does not spin when coasting, so the controller switches to the speed sensor.

A zero value for P2 tells the controller there is no speed sensor. A non-zero valo indicates speed sensor present, and the value is the number of times it flashes during one revolution. Bafangs that have sensors usually use the value of 6. Try that. If the speedometer works when coasting, you're almost there. It means the speed sensor was in the motor, and the wiring supports it.

If not, then you got a wiring problem, or you have no sensor in the motor. You can always buy an external sensor, put it on the rear wheel, and most KT controllers have s separate connector for it. The controllers with waterproof harness don't though,

P1 can be measured by counting how many times one Hall Sensor flashes during a revolution. Otherwise, you start with 46 and play around. It normally only affects the RPM calculation, but if it's set too low, single digits, it somehow impairs motor rpm,

The motor does have an internal speed sensor with 6 matching magnets on the side cover. The motor connection is the smaller circular 9 pin.
efmpjLh.jpg


The original electrical (controller, display, PAS and throttle) has all be swapped due to the bike being obsolete and no longer supported by the manufacturer. I am going to do some more testing with all of your suggestions and report back.

Thank you everyone.
 
Back
Top