Kelly KLS4812S Programming interface cable?

c111jp

10 mW
Joined
Feb 25, 2023
Messages
25
Location
Tokyo
Hi, sorry for yet another controller thread. I am looking for controller when this Kelly KLS4812S popped up locally for sale. It's apparently used only for a week, size is pretty compact and it seems to be quite better than generic chinese controllers. Since it's programmable, I don't know what kind of settings are on it right now so I would definitlely want to be able to access it one way or another if I buy it. Problem is, the controller I found for sale is bare controller only with no programming cables and such. I've looked up the programming cable and it seems like it needs their special SM-4A to RS232 converter plus DB9 to USB. Cables cost more than I would pay for controller (and about half of new controller) and would need to wait pretty long for it.

Is there any way to hook something up and make a interface for these controllers? Like connecting RS232 - USB / RJ45 directly to their SM-4A connector or something?
They also support bluetooth with Android, so maybe some sort of bluetooth dongle that would work? I've seen somebody mention on this forum they got some Kelly controller to work with HC-05 modlue but that's all they wrote, no other information.


It's rated as 50A standard and 120A peak, but I would not need anything over 30A. I assume it can easily be programmed to set current once connected but just wanted to double check that's indeed one of the settings that can be changed. Also saw that when new, it comes with some capacitors and requires hooking them up for "precharging" circuit additionally ? Thought this is all internally already dealt with within the controller since my both current and previous generic controllers don't require such mods.

Pictures of controller attached.
 

Attachments

  • 1.jpg
    1.jpg
    47.8 KB · Views: 7
  • 2.jpg
    2.jpg
    45.7 KB · Views: 7
  • 3.jpg
    3.jpg
    47.3 KB · Views: 6
  • 4.jpg
    4.jpg
    55.3 KB · Views: 6
You can check Kelly's website for the manuals that explain their functions, limits, programmability/etc., and required external wiring / components for each of their controllers, and the software for programming them, and what cable / connections are required.

Generally controlelrs don't have precharge built in (until you get to some very large ones that have contactor controls and such, but still use external parts for the actual function). The bigger the controller the bigger the caps and the higher the inrush current at power connection, and the more damage that can do, so the more important precharge is.
 
You can make your own bluetooth dongle from a hc05 module.
I have like 3 of these Kelly PC serial dongles.
If you'd like I could send you one, you just have to pay shipping.
 
You can check Kelly's website for the manuals that explain their functions, limits, programmability/etc., and required external wiring / components for each of their controllers, and the software for programming them, and what cable / connections are required.

Generally controlelrs don't have precharge built in (until you get to some very large ones that have contactor controls and such, but still use external parts for the actual function). The bigger the controller the bigger the caps and the higher the inrush current at power connection, and the more damage that can do, so the more important precharge is.
It says "Configurable limit for motor current and battery current" so I guess current is adjustable. The more reason to be able to program the controller.

I think being reasonably small controller it wouldn't need the precharge for 48V but I could be wrong. Never had any problems with my previous controllers though.

You can make your own bluetooth dongle from a hc05 module.
I have like 3 of these Kelly PC serial dongles.
If you'd like I could send you one, you just have to pay shipping.
Oh thanks for the info and offer! I will pm you separately.
 
Ok, I've got the controller and here are my impressions so far in case somebody is trying to decide whether to ditch their usual chinese controller for something more $$ like this. I also have few questions below related to programming options etc.

First of all, the thing is TINY! It's way smaller than average 12-15fet chinese controllers. This enabled me to place it under bottom bracket for even stealthier look. That means I had to redo all wiring and everything alllll over again which is like 10th time in last few months but it does look better.

I got serial sm4a-rs232 dongle from eee291 (thanks once again). I bought cheapest generic usb to serial cable but wasn't able to connect to it (windows 7). I borrowed laptop with serial port (windows 10) and I managed to get it to work. It would show read error but if I play with it a bit, quickly opening and closing program, eventually it will start the program. Once the program is started, it will work normally without any problems even if I reconnect the cable. Latest Kelly program I could find is for Win7 so that might be the issue as well. I might buy different cable but honestly that whole serial connection is very sensitive and unpractical, it's just not worth messing with. Seems like bluetooth dongle is way better idea and they are 35-40$ on ali right now.
Being able to read errors through program / app or LEDs on controller is also pretty useful feature.

Riding with this thing, first of all, WOW! The motor is SILENT. Actually, not silent. It was silent before with questionable sinewave controllers, now it doesn't emit any noise whatsoever, same as if you would use only pedals, no additional motor noise. Feels almost unreal. This is even crazier considering I had some motor noise issues that popped up recently and now it's all gone including normal motor operation noise. And here I was ready to ditch this motor considering it"old and tired". ("standard" 1000w DD hub motor)

That being said... While it feels just so efficient and "smart", it doesn't seem to be all that efficient in actual battery consumption...
With my previous controller, with my current battery SOC mapping which I tried to map as accurate as possible, I would generally get about 1km per 1 percent (%) of battery on my average ride. On my yesterday's 35km round trip commute (70km), I spent around 41% one way and 45% back. That's quite more consumption when you are chasing every %. Of course, this is pretty hard to measure but the difference is pretty obvious. First ride was relatively slow riding so on my way back I figured I will try to keep faster tempo since I'm maybe riding out of the motor's efficiency range being so slow. Obviously didn't help. The absolute main reason I went for this controller were possible efficiency gains. Even if there is none to be gained, I most definitely don't want to spend more battery with way more expensive controller that sort of boasts efficiency as main selling point, on relatively same power and lower speed (read below). Normal motor noise didn't bother me at all with chinese controllers, it was still pretty quiet and in fact, it even gives you some sort of "feelling" and "feedback" so I personally like that. Both is nice but I would't fork extra 250+$ just to get rid of the "noise". Not if there is no actual efficiency involved. Controller is rated as 50A, 120A peak, which is as I later found out phase current, not battery current so not sure how would I compare it to my other generic chinese 38A controller. My phase current is set to 100% and my battery current is set to 40%. Even with those settings, I still saw occasional spike over 40A on BMS so I will throttle that down some more. The PWM is maxed out at 20kHz. In theory, this should be the most efficient setting, it certainly "sounds" that way but here is something that caught my attention. In this video on 11:15, the guy mentiones that the higher the PWM, the more efficient will the motor be and the lower the PWM, the more efficient will the controller be . Would that make any sense? I guess it makes some sense if the controller is using a lot of "computing" power to keep motor smooth but then ends up spending a lot of energy itself while doing so. Would there be any other settings in the program that could affect overal power consumption, other than current of course? In any case, there is probably some energy wasting going on as the controller does get a bit warm, not hot or anything like that but enough to feel some. Compared to both of my generic controllers that were never above body temperature on touch no matter what I did to them. This could also be up to it's smaller size and maybe better internl heat sinking and conductivity, I don't know... Anyway, I will still need to test some more but this were my brief observations so far. It's even more so disapointing because...



Speed. My both generic controllers have "3 speeds" (one has connector and on other I just bridged pin K2 to ground on PCB for max speed). With no pins bridged (2nd or normal speed) I would get about 40-42km/h depending on the SOC so I guess that's what this motor can "naturally" get with 48V battery etc. With 3rd gear enabled I would get 47-50km/h. Kelly controller runs out of breath around 35km/h and tops out at 40km/h. Everything in settings that I think would be speed related is maxed out. RPM set to 16 000 just in case, frequency at max 1200, all three forward speeds to 100% etc. Seems like both of my 20$ controllers have some sort of field weakening / phase advancing for that "overboost" while this 300$ Kelly doesn't have that function. That's very disappointing and even though I don't need it often, it's very important when I do. My brainpower 38A controller slows down a bit around 40kmh and then starts throwing nice punch of boost after around 42kmh. Would there be any settings with Kelly that could alter this a bit, or at least make it a bit more alive near the max speed?

Which is my next question. Can anyone explain in human terms what would each of PID settings for this controller do? Kelly manual barely mentiones anything on this and I couldn't find anything Kelly specifics around internet either. I know some basics of PID control but I don't understand which units they are using in the program or how would they exactly affect motor operation together.

PID related settings available are:
IQ Kp
IQ Ki
ID Kp
ID Ki
(there is no even mention of this in the manual)

Then:
Torque Speed Kp
Torque Speed Ki
Speed Err limit (particulary interested in this)
Manual mentions these but nothing really useful other than "please lower values if acceleration too strong".
Would any of these settings in any way affect top speed or is it just torque related?

What does controller use poles (magnet) count for exactly? Is it just to determine RPM? Mine was set to 36 by default, not sure if from factory or by previous owner. I had my motor opened like 10 times and never actually counted the magnets. I know I could short the phases and count that way but everything is nicely tucked away and isolated already so don't want to touch it. Looking around the net, seems like most of those generic "1000w" DD hub motors have 46 magnets so I've changed setting to 46. Haven't noticed any difference in any sense.


Any input is appreciated.
 
The IQ settings should generally not be messed with in my opinion.
Maybe something can be set here to increase efficiency, no idea how or what should be changed though.

On a QS 138 I've noticed that it was getting warm fairly quickly, just by chance I ran the auto identify procedure again and suddenly it ran much cooler. Maybe you could try to run auto identify again to see if the consumption changes.

For me the speed kp and ki values are always set to max as this maximizes torque especially at low rpm. If you're getting too large current spikes you could try actually lowering these two values.

The speed err limit refers to how strict the set rpm limit is held. For instance if it's set to a high value it will overshoot the set speed for a second or so. Set it to a small value and it will cut current abruptly as it reaches the set value.

The pole count is just to determine rpm, most people don't need to change it.
 
The IQ settings should generally not be messed with in my opinion.
Maybe something can be set here to increase efficiency, no idea how or what should be changed though.

On a QS 138 I've noticed that it was getting warm fairly quickly, just by chance I ran the auto identify procedure again and suddenly it ran much cooler. Maybe you could try to run auto identify again to see if the consumption changes.

For me the speed kp and ki values are always set to max as this maximizes torque especially at low rpm. If you're getting too large current spikes you could try actually lowering these two values.

The speed err limit refers to how strict the set rpm limit is held. For instance if it's set to a high value it will overshoot the set speed for a second or so. Set it to a small value and it will cut current abruptly as it reaches the set value.

The pole count is just to determine rpm, most people don't need to change it.
I did phase identification couple of times already but no changes really. Just to clarify, controller doesn't get very hot but just warmer than my generic controllers. I would say about 45c in normal use vs about body temperature for generic controllers. Noticed there is controller temperature in the program so will need to check exact temperature during use.

Is there any way to "factory reset" the controller and change settings to default? Since I bought it used, I don't know actually which settings have been played with and which are default so it could be already all over the place when I received it...

After trying to figure it out for a while, today I said screw it, and started playing with settings, good old trial and error style. Wanted to see what kind of effect they have on noise, current draw and rpm. Needless to say I am even more confused now lol.

Settings with received controller are as following:

IQ Kp 1500
IQ Ki 30
ID Kp 1500
ID Ki 30

Torque Speed Kp 3000
Torque Speed Ki 80
Speed Err limit 1000

With these settings, motor spins at 336rpm with no load. That equals to exactly 42kmh.
So first I've mainly played with IDs (direct) trying to achieve more RPM since it's to my understanding responsible for magnetic flux as opposite to IQ (quadrant) which is responsible for Torque. It deffinitely affects the top speed and how motor behaves near top speed but I was never able to achieve higher top speed, only lower.
I tried all sorts random and bogus numbers like ID Kp 30000 ID ki 1000, both 30000, Ki higher than Kp etc. I've found that with both set to 0, motor is able to spin at 390- 395rpm which is quite a gain. That would equal to 50km/h. The problem is, when under load, once it's I'm around 34-35, it's sort of like the timings go out of whack and so it runs out of steam, starts making slight noise and it tops out at around 37kmh, rather than achieveng 390rpm and 50kmh. So, with no load it spins FASTER than when set to 1500, 30 but when under load it's actually slower. Pretty interesting...
I tried changing IQs as well and it goes all the way from motor not moving at all (0) to locking completely into place (30 000 and such settings). I eventually returned IQs back and I settled with ID Kp 7000 and ID Ki 300 since I found that while not increasing top speed, it does get more alive near top speed.

I also played with PWM and the sound at lowest 5 is actually quite annoying, coil whine like rather than that motor growl that cheaper controllers get so It's probably best to leave at max 20, unless it really has a huge impact on controller's power consumption (will test further).

Changed throttle MAP to 70 as I prefer it to be more responsive after 50% of throttle.
Then I also changed :
Torque Speed Kp to 1500, Torque Speed Ki to 100 and Speed Err limit 2000.

On to my surprise, all of this didn't had too much impact on the current drawn from the batterry for given load but it's really hard to track what's happening in which moment. I would still overshoot so I've lowered batt current to 30%, and even still, it will spike over 40A in some moments. Seems like I will need to lower phase current as well to avoid spiking over 40A...
Went on a 35km round commute again (70km total) and I did end up spending a bit less battery. The bike is more smoother in the range I ride the most but power cuts out a bit more abruptly and with slight lag once you release the throttle (you can kinda hear the "magnets" for a brief moment once it does). As always, there were few situations where I needed that 40 over punch so it's quite annoying. Also, that "regen" effect appeared where when you release throttle on higher speed then give it again, motor will actually try to slow down for brief moment as you're passing through lower throttle input.
I've also tried changing poles count just to see what it does and I haven't noticed any changes in operation, other than program showing wrong RPMs.



Overall, it's quite above my "expertise" and it doesn't help that Kelly slightly skews terminology while using unknown units etc. I know it's all way too complicated for simple posts but if there is any kelly controller or FOC expert in general that would like to chime in on PID settings, just for laughs, it's very welcome.



In the meantime, I've contacted Kelly to ask specifically about field weakening for this controller. My message:
Hello,
I have purchased your KLS4812S controller. Is it possible in any way to setup a field weakening / phase advancing with this controller?
Thanks

Reply I got is:
The default program is without weak magnetic function. Special instructions are required before purchasing.
Thank you!

Not sure I understand what exactly they mean with this... Whether they will flash some sort of special firmware, or send you some sort of special instructions or just simply instruct you to buy their controller which does have it.
 
Hi. Not much I can help you with but can commiserate and share that I had many of the same experiences with a Kelly KVD7212N and KLS7212S. The “regen” behavior when coming back onto throttle while moving was deal breaker for me. It was especially pronounced when operating in the lower “1” and “2” power settings. My bike is geared for high torque so all interactions between the motor and the wheels are amplified.



The written instructions from Kelly are cryptic and the customer service, while prompt, wasn’t able to deliver any solutions to the problems I was experiencing. Nor were they able to empower me with any information regarding the underlying theory of the controller function as expressed in the user interface.



Lastly, I blew up the KLS7212S within 10 minutes of installing it due to a current/voltage spike when coming off the throttle. Admittedly the controller was undersized (since they advertise phase current rather than battery current) but the controller was unable to protect itself which seemed unreasonable given the cost and the long feature set list. Be careful flipping settings randomly or you may damage something.



Interested to keep following this thread to hear from people who dedicated themselves to deeper study of the Kelly system. Especially those who have found success in achieving controllability rather than just maximizing speed, power, and efficiency.
 
Back
Top