Controller for electric ATV with BLDC motor

lforbes

New Member
Hello all, I have a smallish electric ATV (Venom E-Grizzly) with a 48V 1500W, Hall sensored BLDC motor. This machine has IMO poor low speed control in that it starts abruptly and lunges forward to about 40% of the top speed i.e. there is no way to drive it slowly other than abrupt start/stopping. The vendor was of no help so it occurred to me that a replacement, better behaved, controller might be the answer. Amazon has a number of such units but it is almost impossible to get any detailed information on them (they typically seem to come with no wiring instructions and even with no lead labeling).

It then occurred to me that a good PicAxe project might be locate an appropriate ESC (Electronic Speed Controller) and drive it with a PicAxe PWM output. There is an old thread on this forum on the topic which mentions ESCs available from ST electronics (the STM 32G431) that looks interesting but it has to be programmed with firmware using an IDE from ST which I don't have and, it appears to not have a motor reverse capability so I dunno if it is suitable. The PDF also mentions only connecting it to a Li battery but I could find no input voltage specification. It does specify 40A max motor current so I guess at 48V that would equate to about 1900W(?). I also saw nothing that would indicate what speed range it would operate at, more specifically, will it drive a motor at v low speeds and ramp smoothly up to top speed??

The PDF is at:

https://www.st.com/content/ccc/resource/technical/document/user_manual/group1/86/3f/45/e0/12/18/47/85/DM00564746/files/DM00564746.pdf/jcr:content/translations/en.DM00564746.pdf

Anyhow, was wondering if anyone has had any recent experience with this type of thing. I would appreciate any suggestions and info on any similar projects the PicAxe community may have undertaken.
 

bhanlon56

New Member
I bought two controllers for a 36V BLDC sensored motor. The application was a direct drive ebike. The first controller (used in drones) uses an unsensored motor. I was going to control it with the pwm output of a 08m2 picaxe. From memory, the controller requires a pwm signal between 1 to 2ms every 20ms. The second controller uses the BLDC as a sensored motor. As you've discovered, the wiring colour codes for the motor and controller don't match up. After lots of searching and trial and error I got the motor to work. I used the second controller as I read that it would have better low speed performance. As yet I haven't used the first controller so cannot compare. Starting at low speed my motor often judders but if I start at 50% speed can slow the motor down to about 20%. I looked at this article
http://www.berryjam.eu/2015/04/driving-bldc-gimbals-at-super-slow-speeds-with-arduino/
but decided its not worth the effort for my application. The other issue I'd have with a direct drive setup is the reduction in torque at low speed. With a 1500W motor you might also have heating issues.
 
Last edited:

lforbes

New Member
Thanks bhanlon, looks like you may be the only one here that has looked into this. Since my OP, I have taken another look at the ST ESC and associated s/w. The s/w to configure the ESC can be downloaded at no charge it turns out but it requires a bunch of detailed electrical and mechanical characteristics for the target motor which I have not a clue about and would have no hope of getting from the vendor. So, I gave up on that possibility.

Then did a bit more googling for motor controllers other than the stuff found on Amazon and came up with Kelly Controls who has quite a wide range of controllers and, good documentation on their web site on the configuration and wiring of their products. So perused it all carefully on the weekend and made a short list of questions to ask their tech support (exactly what product would best suit my purposes etc). Called them today and a recording of a lady with a thick Chinese accent was heard that said only to leave a message which was followed shortly thereafter by an announcement that the voice mail box was full - all in all not encouraging. So, looked at their web site again and found a link to their user forum - hope rekindled!. However, the forum was almost dead with v few posts and even fewer responses to questions and requests for help. :( Notable were posts from poor folks who had worked many hours trying to get their controllers working and had in the end given up. I found BTW a couple of other vendors but they were commercial rather than consumer oriented, with prices to match, so no joy there.

So, I'm kinda a loose ends on it now. I'm now going to attempt to alleviate the sudden start and surge problem by installing a thumb throttle (instead of the existing quarter twist throttle). Hopefully that will counteract the tendency of the twist throttle to open even wider when the rider is pushed backwards by the sudden acceleration (a thumb throttle would act in the opposite direction, (I hope) and that is why they are apparently preferred for ATVs as a safety measure (they are also not as prone to unintended throttle changes when the rider is tossed around by rough terrain).
 

Goeytex

Senior Member
Is the motor controller the original one that came with the Grizzly? Did you get the Grizzley new? If that is the behavior from a new Grizzly then they are selling an unsafe product. Cheap non-programmable controllers can behave in this manner where there is about a 1 second delay .. then BAM !

A thumb throttle may give you some relief but if the controller has a delayed start it may not be the complete cure you are looking for.

Kelly controls has really good controllers, but they are somewhat pricey and if you order one you must be darn sure that it is one of the models specifically for your application. The KEB48200X might be a good choice but don't hold me to that. it depends on the motor speed. Your motor may require one that supports higher RPMs.

Before trying a new controller I would suggest you contact the guys at LunaCycle and see if they might be able to point you in the right direction. It seems to me that the controller used on a Mini-Cyclone (1680 watts) might work on your Grizzly, but maybe not. wont hurt to ask.

You could also post on the ElecticBike forum and see if someone there may have better answer for you.

I put a Bafang 1000 watt motor kit on a Schwinn Trike. Worked great for about 6 months until I burned the internal controller up hauling heavy loads up steep grades at relatively low speeds ( bad for motors and controllers). So I took it apart and removed the internal controller and wired up a cheap external controller from Amazon. In my case it worked just fine after about a day or so of figuring out the wires and connectors and testing it on the bench ( No Manual Provided).

Good Luck
 
Last edited:

lforbes

New Member
Thanks for the good info Goeytex. Yes, I bought it new a short while ago and yes, they are selling an unsafe product. I have discussed it with the vendor and they are sympathetic but unwilling to do anything about it. In fact, their head tech support guy told me they have been asking the manufacturer for 3 years to do something about it but are apparently told nothing can be done. I did receive a thumb throttle yesterday and it's electrical profile (voltage output vs throttle position) is very similar to the OEM twist throttle so not much joy there. It is a little easier to ride however as the tendency to jerk backward on sudden acceleration and thereby open the throttle even more is reduced. It is still very twitchy on startup however as very small changes in throttle opening result in a large speed change. At first I though the motor/controller was incapable of running at low speeds at all but by raising the rear wheels and running it in place, it is possible to run at low speeds if the throttle is modulated very carefully. Exacerbating the situation, as you mention is the delay and furthermore, about one third of the throttle at the low end is deadband whilst the total range of travel is only about 1/4 turn. All that makes for a very jerky, hard to control start-up.

Regarding the Kelley controllers, I did take a close look at the KBS-X and KLS-S (a sinusoidal unit) as they are in the right output range and are configurable. I did email them asking for advice and they suggested the sinusoidal one (I understand it is smoother and quieter in operation). I am a little leery though about buying another controller as it might not be much of an improvement

Anyhow, after measuring the output profiles of the two throttles I have come to the conclusion that a microprocessor interfaced between the throttle and the ATV controller might be the best approach. I was going to use a spare PIcAxe but found it is not now working properly so tried instead an unused Arduino Uno I also had available. The programming is pretty simple - read the throttle O/P voltage via an AI and output the desired voltage to the motor controller via a PWM and R/C filter to smooth it out. In that way the entire range of the throttle can be utilized and, the output can be tailored to something more a keeping with smoother startup and low speed control, I hope. It works fine on the bench and measuring the O/P with a voltmeter but will try it connected to the ATV today.

BTW, I did try the E Bike forum and one other but no responses yet so I am appreciative of your reply (the PicAxe forum in my experience has always been very good in the regard).
 

Goeytex

Senior Member
If I am not mistaken most controllers respond to a throttle voltage from about 0.8V to 4.0V. Where 0.8V just starts the motor and 4.0v is wide open. It should not be too difficult to use a Picaxe between the thumb throttle and the Controller so that the full mechanical range of the throttle provides a voltage from .7v to 4.0V, ( Or whatever your controller uses).

You could use a lookup table with predefined pwm constants to make the thumb control non-linear, effectively creating a "soft start" when the throttle first starts to move say maybe over the first 1/3 of its mechanical range. You will need to test and see what works best.
 

lforbes

New Member
Yes, mine is around that voltage range (actually 1.17 to 4.80). I tried programming the micro to produce the 1.17 right off the bat and set the top voltage to about 3.0 with a linear ramp-up scale. It helped a lot but, if the start voltage is delivered right off the bat, the controller will not shut off on the way back down so it was still necessary to leave some of the startup deadband. I dunno, I may have too large a cap in the R/C filter - will try something smaller. Or, maybe the controller is funny that way(?). As well, the controller still adds the start delay and I suppose there is no way around that(?).

I think you are correct about a non-linear ramp up - I will try that too (it is still a little twitchy & abrupt at low speeds). Anyhow, with the way it is now, top speed is reduced but I don't need that anyway and I can maneuver over rough ground plus have a decent top speed within the one (switch selected) range (stock situation is fast range (where the starts are abrupt & fast) and slow range which is often too slow).

I'll also have to add another scale for reverse as it barely moves now with the forward configuration.

One nice thing BTW is that the controller operates at 5V which can be tapped for the microprocessor.
 

lforbes

New Member
Just to follow up a bit, I have programmed in an exponential speed ramp up (gives a parabolic type of curve rather than a straight line) which helps a lot to smooth out response at low speeds. This is at the expense of sharpened/harder to control response at higher speeds but, combined with lower top speeds, it is much improved over the stock setup. Still not ideal though as it is also difficult to control jerkiness when coasting down from speed and cutting in again at a lower speed which is sometimes quite abrupt.

Anyhow, I'm still tempted to try a different controller and the Flipsky devices look promising as they are supported by the VESC Project and provide FOC (sinusoidal) control, a lot of adjustability (including linear, exponential and polynomial speed control) as well as regen/motor braking. Only hang-up here though is AFAIK, it only takes analog or PPM inputs and my twist throttle has only AI which does not allow for motor reverse. PPM input does allow for reverse but I'm not sure I would want to attempt to program that on the microprocessor (which would otherwise not be required).

One thing I'm wondering though is whether motor reverse could otherwise be accomplished by placing a DPDT switch in a couple of the motor power lines. That would serve to switch between forward and reverse but I'm afraid it might mess up the relationship between power to the coils and the Hall sensors. Has anyone here tried such a thing?
 
Top