The throttle signal to a motor controller (specifically: hacking it)

riding_on

1 W
Joined
Sep 8, 2023
Messages
58
Location
NY
So I went and bought a 3kw rear hub motor off of Amazon (I can be as lazy as the next guy sometimes, what can I tell you), and while I could fill several paragraphs with how absolutely blown away I am by the power and speed -- I've only gone up to 48.8 mph so far, but it felt like it might actually hit 70 if I wanted to push it -- I have a major issue with how the throttle functions. With the kind of power this thing has pushing an object that only weighs 60 pounds (+ me), it's almost unmanageable.

Even set at the lowest power level, it's difficult to be gentle enough with the throttle at the best of times. In traffic or under some other distraction(s), I may just get myself killed. Sadly I'm not actually exaggerating. So I'm left with several choices.

1. Just let it happen and probably die (death is a hard limit for me, so not going to work).
2. Junk the thing (I like my motorcycle-in-disguise too much, so I'm not going with this option either).
3. Begin training to be a surgeon so that I have the required dexterity (my fingers have always trembled slightly, so this one's out as well).
4. "Hack" the throttle so that it works differently.

In the interests of 4, the display is a TFT UKC1, the controller is a NIUBOKEJI sinusoidal wave controller with model no. NB72186, and the kit packager is NBPower. I have no idea who manufactured the motor, but judging from the settings in the display menus, the throttle does not use pulse width modulation (PWM). What are my options for making sure a stray sneeze at the wrong time doesn't send me off a cliff at 60+ mph?

Sadly, anybody who reads through the listing at https://www.amazon.com/dp/B08R3VVYYH probably knows as much about it as I do.
 
A cycle analyst from ebikes.ca would modulate your throttle for you. It has a wide range of methods to control the throttle signal. It would be annoying to have 2 displays but you could probably run the Cycle Analyst between your display and throttle or between the display and controller.

Users have also had luck removing the display and just shorting some of the wires for these controllers to run without the display.

You could also buy a more advanced controller that allows you to use a current or power based throttle and provides some adjustability of the ramp up time.

Typically the cheap controllers with amazon kits were speed based so when you turn the throttle to a particular point the controller uses all the amps to achieve that speed. When ebikes were 500-1000 watts this was not a problem and felt intuitive with a nice smooth acceleration curve due to the lack of power. Manufacturers of controllers and diy hackers just continued building bigger controllers by adding more mosfets and setting for more current but the speed based logic remained the same. It is violent above 2500 watts without something like a cycle analyst to buffer the users throttle input and send it to the controller in smoother ramped signal.

From what I have heard the sinewave controllers are slower with ramp up time than the old square wave ones. So even as crazy as yours is it could be worse.
 
The CA is the easy fix. You can fine tune the throttle ramp rate to keep the wheel from lifting unintentionally to your comfort level. Those UKC1 displays are used on sabvoton and lishui controllers, both of which have some programability, or open source firmware options for some/most models, but I’ve never heard of the kit controller maker, so programming is probably not an option.
 
In the interests of 4, the display is a TFT UKC1, the controller is a NIUBOKEJI sinusoidal wave controller with model no. NB72186, and the kit packager is NBPower. I have no idea who manufactured the motor, but judging from the settings in the display menus, the throttle does not use pulse width modulation (PWM). What are my options for making sure a stray sneeze at the wrong time doesn't send me off a cliff at 60+ mph?

The throttle is just an analog voltage, usually from around 0.8v to around 3-4v.

If the controller is not an FOC controller, the throttle modulates the bike's speed.

What you want, ideally, is something that modulates the bikes torque. The best way to do that is to use an FOC controller that does this natively. If yours doesn't, you can replace the controller with one that does. An FOC controller has to be tuned to the motor it's on to work, so if yours has no tuning software or phone app, either it came pretuned for the specific motor it came wiht or it's not FOC. There are often autotune routines but they have to be run by the user when setting it all up the first time. Some of them have better software that make this easy, like the Phaserunner, and some feel indecipherable. The PR may not be enough power for you, but it's the easiest to configure.


The next best thing is the Cycle Analyst v3 (SA Standalone version), and setting it up for torque (current) throttle mode. It is not as good as an FOC controller, since the FOC modulates the actual motor current, and the CA doesn't have access to controller internals to be able to do that, so it modulates battery current...but it is still better than just modulating speed with a system like yours.

It's a box that goes between your throttle and ebrake and other inputs and your controller, to translate those into a single throttle signal to run the controller by your chosen settings. The CA doesn't have to be on your handlebars if you don't need any of the data it provides visible while riding. If you need any on-ride control of it there are remote buttons/knobs you can install.



Other options include replacing the probably-hall based throttle you have now with a potentiometer based one and adding adjustable pots to it's ground and 5v supply, so you can shift it's operating range around to match your physical range control needs. Ideally you'd use a logarithmic pot (like a volume control does) isntead of linear (like most throttles), to have finer control at the low end.

Or a cable operated throttle, which is a box with the throttle itself in it and a separate grip control unit that just pulls a cable from the box. You can make different-shaped/sized pulleys for the box to change the way the cable pulls it to change the response.
 
Other options include replacing the probably-hall based throttle you have now with a potentiometer based one and adding adjustable pots to it's ground and 5v supply, so you can shift it's operating range around to match your physical range control needs. Ideally you'd use a logarithmic pot (like a volume control does) isntead of linear (like most throttles), to have finer control at the low end.
And you claim that your mind doesn't do math. Shame on you :giggle:

So I'm not sure about the difference between phase amps and actual battery draw, but it looks to me like the v6 Phaserunner is plenty for my purposes (my battery is only rated up to 60 amps anyway). But it appears that I'd require a Cycle Analyst anyway, because it isn't compatible with a TFT UKC1 display? Is that correct guys?
 
And you claim that your mind doesn't do math. Shame on you :giggle:

So I'm not sure about the difference between phase amps and actual battery draw, but it looks to me like the v6 Phaserunner is plenty for my purposes (my battery is only rated up to 60 amps anyway). But it appears that I'd require a Cycle Analyst anyway, because it isn't compatible with a TFT UKC1 display? Is that correct guys?
Yes, the UKC1 won't be compatible with the Phaserunner.

The phase amp limit is generally 2x to 3x battery current. The phase amps affect torque off the line or when climbing at lower speeds. You can feel the response of higher phase amps when accelerating.

Here's the simulation of phase amps equaling battery amps, and 3x battery amps. Pay attention to the available torque.

2x vs 3x:

Your kit controller probably has double the power of the phaserunner, so that alone should tame your throttle.
 
Last edited:
And you claim that your mind doesn't do math. Shame on you :giggle:
It doesn't, beyond simple basic stuff--I just know the name of the part and how it works. (give me a formula with clear variables I can fill in and do the math on a calculator, and I can manage that at some point, but if I have to make the formula or swap it around to solve some other problem, forget it. :(


So I'm not sure about the difference between phase amps and actual battery draw, but it looks to me like the v6 Phaserunner is plenty for my purposes (my battery is only rated up to 60 amps anyway).
Phase amps are what the motor draws from the controller, while battery amps are what the controller draws from the battery. They're different because the controller is a power converter, power stays the "same" (minus losses) but voltage and current change.



But it appears that I'd require a Cycle Analyst anyway, because it isn't compatible with a TFT UKC1 display? Is that correct guys?
The PRv6 is compatible with a bunch of displays (I don't recall which ones but I think that's on the PR page at ebikes.ca )...but to clarify: The CA is not a display, and doesn't communicate with the controller like a display does--it just makes a throttle signal available to it. It can be used to do a lot of the things that controllers with displays normally do internally, such as have different assist levels or preset modes of operation, so many times a system with one doesn't need the display for the controller itself anymore.

Since many people find it's look dated, and don't want most of the info it provides onscreen, Grin makes a CA-type device that's part of a cable harness instead.

But...with the PR you don't actually need the CA or CA functions for your specific purpose, as you can do some tuning of response within the PR itself, and between that and the way an FOC controller works, it would probably solve your problem with just that.

A display can be used to change assist levels, etc. in the PR, but if you wanted to make changes to the PR core settings, you would need to connect it to a computer or android device and use the PR setup suite.

To use the display I think you have to make some non-obvious settings changes in the PR suite first in the most advanced tab; I haven't gotten to doing this for mine yet as I don't really have the need, so that experiment falls far down my roundtoit list. :/ There's no info from Grin yet on how to do this or which displays are specifically compatible, but the core controller can do it (it's based on an ASI BAC controller, which can do it; if ASI has settings for how to do that available, then they probably also apply to the PR).
 
Last edited:
Thanks for sharing your expertise, guys; seems pretty silly to have all those watts just to be able to go 28mph up steep hills (max for a class III [legal] ebike in my state), but I really, really hate those inclines.
 
I understand. With my trike loaded up, *everything* is a steep hill. ;)

Even unloaded, it's all inclines, even on flat roads (also true even walking just myself, but that's just age).

So I have even more watts to get going, even though I ride even slower.
 
Back
Top