KT Controller with middrive, erratic spedometer under power

Joined
Oct 19, 2024
Messages
4
Location
Germany
I'm working on reviving an old iBike middrive powered ebike using a KT controller with LCD11 display. I've got most of the bugs worked out now, but the speedometer is weird, and I haven't found anything similar scouring the web.

My KT controller is wired to the hall sensors in the motor, additionally I've wired a hall sensor on the rear wheel with a magnet to the white sens wire. When coasting the speed readout is correct (P2 = 1), but as soon as I apply power to the motor the speed reading goes haywire, showing random numbers between 40 and 80kph, this happens even at a standstill!
This causes the motor to cut in and out since it keeps going over the speed limit.
I thought the controller might be reading the speed from the hall sensor in the motor, but changing the P1 value doesnt seem to have any effect (tried values between 0 and 255).
Using the walk assist with the motor detached from the rear wheel reads a constant 79.9km/h, no matter what P1 is set to. P1 does change how fast the motor spins, however.

If anyone has any ideas, I'm all ears!
 
I think I've found the culprit. Connected my oscilloscope to the sens wire, when the motor is running the signal goes haywire. Wasn't expecting that much noise. Nearly 10V pk-pk of noise.
I suppose a capacitor to gnd should help fix that, any ideas on sizing for it to not affect the actual hall sensor?
 

Attachments

  • PXL_20241019_173738082.jpg
    PXL_20241019_173738082.jpg
    3 MB · Views: 2
Most of the signal noise issues I’ve seen on the forum that were resolved in that manner (PAS, Cycle Analyst, etc.) used a 0.1uF.

Is the cable for the external speed sensor shielded?
Hey,

the cable is not shielded, and adding shielding would be virtually impossible, unfortunately. I've added an external pull-up resistor and filter capacitor to my hall sensor wiring. The signal looks very clean on the scope when running it in the stand now. Between about 15-20 kph I still get weird speed readouts jumping between 20-40. So much better than before, but still not ideal.
Weirdly, if I just short the signal to ground, the speed dislay stays as 0, without any erratic readouts whatsoever.

Edit: with connecting a scope now, shows a nice consistent signal, but every once in a while the signal remains at the high level for an entire period between two pulses, which perfectly corresponds to the weird speedo readouts.
1729769329023.png
a recreation of the scope signal :)
 
Last edited:
This has always been a problem for me when using an external speed sensor with hub motors and KT controllers. Speed goes nuts on acceleration. OKay with steady speed. No problems when using the internal speed sensor inside the motor. I've just lived with it.

I've had the internal sensor fail in one case. Went to external sensor and the noise happened. Tells me the sensor ground is likely bouncing relative to the motor cable's ground, They go to the same traces on the circuit board, but you never know. For me, it hasn't been bad enough that I want to tzp my speed sensor off my motor cable.
 
This has always been a problem for me when using an external speed sensor with hub motors and KT controllers. Speed goes nuts on acceleration. OKay with steady speed. No problems when using the internal speed sensor inside the motor. I've just lived with it.

I've had the internal sensor fail in one case. Went to external sensor and the noise happened. Tells me the sensor ground is likely bouncing relative to the motor cable's ground, They go to the same traces on the circuit board, but you never know. For me, it hasn't been bad enough that I want to tzp my speed sensor off my motor cable.
Glad it's not all on me then! With my settings dialed in for it to behave more smoothly it's gotten much less severe, so I'll just live with the occasional jumpy signal.
For context, I'm using an arduino to read the original torque sensor and convert it to a throttle signal. During a test ride today, I noticed my controller will flash 01 info under power when the battery is low. That's supposed to be a faulty throttle error from what I've gathered. Ever experienced something similar?

I'll probably have to dig all the wiring back out and probe around at the arduino pins...

Thanks!

Edit: Found the culprit. Regulator on my fake arduino started giving out, kept spitting out more voltage until the magic smoke came out.
 
Last edited:
Back
Top