• Hello ES! We could use some help to get us past the finish line on building the new knowledgebase for the forum.
    Can you donate? Please see our fundraising page. Thank you!

72V 8kW Rockrider with MXUS 3K Turbo and VESC Controller

Well, I started in maybe 2016, with electric skateboards. The VESC type controller is the only one I have ever used, and my experience is good. I only used Flipsky controllers because they were the most affordable.

The controller I got back in 2016 for my electric skateboard is the FLIPSKY Dual FSESC 4.20 Plus, and it's still on the board, working. I have heard some bad stuff about Flipsky's build quality, and last year I actually had to fix something on this VESC. It has a built-in antispark switch, which, after using it for more than 5 years, has given up. It was stuck in the ON position, and after some troubleshooting, I found out that one of the MOSFETs was blown. Since nothing else was damaged, I checked the MOSFET type and ordered new ones for a few euros. Replaced them with a hot air station, and now everything works. For 5 years, everything worked perfectly, so I'd say it's definitely worth it.

The one I have for the bike is the FLIPSKY 75200 Pro V2.0, which has a 150A rating at 75V. I was not sure if this was battery current or phase current, so I sent them an email to check. They said it's the motor current, which I though is a bit low. So, I totally ignored the warning and bumped it up to 250A phase, and after an hour of riding, the controller doesn't even hit 40C, so I bet you could push it even more. I'm currently running 8000W peaks and the controller handles it fine...

For a 12kW, 17kW peak, you would definitely need something more powerful. I don't know what voltage you are running, but the 75200 would definitely be too weak. Maybe check out the Flipsky FSESC 110300 or something even more powerful.

With these controllers, there is also a big learning curve because you have to tune them to get the most power you can. There are also not many good display options, but the Flipsky TFT works fine for me. The Bluetooth app is super handy, and there's a ton of data you can monitor in the real-time data app.
I believe spintend makes a Vesc style controller rated up to 250 amps and is is significantly cheaper than the equivalent fardriver option so I may take the plunge and see how well it holds up
 
I
I had a ND72680 in my 180kg heavy scooter, the Fardriver can output up to 680A phase current and over 300A line current, not only for a few seconds. The heat sink looks a bit small for longtime use of all that power. I added a temperature controlled fan in my scooter. Driving 60km with 100kph on the motorway I never saw more the 60C in the app without the fan. Only on hottest summer days driving in the city with a lot stop and go I made it to turn on the fan, which kicks in when the heat sink gets over 55C.
I think you will not be able to overheat it on an MTB with 1/3 the weight and 1/3 of the battery.

The new ND961000, I have, uses the same heatsink size. Probably they reduced losses.
I have used fardrivers before but they are almost at double the price of a Vesc so I may try out the Vesc and I can always upgrade to a fardriver if necessary
 
Last summer, I built my very first ebike, and there were a ton of things to learn and consider, so I decided to make a detailed post about the build to hopefully help and inspire people who are getting started.
Wow, nice build!

If you want to get the cell voltage telemetry into VESC, I have a project that does just that:
 
Wow, nice build!

If you want to get the cell voltage telemetry into VESC, I have a project that does just that:
Okay, this is so cool. I've been searching for something like this, actually... How precise do you find the SOC monitors in VESC and inside the JBD app? My issue is that I have a 12V buck converter that is connected to the battery, after BMS, of course, but it pulls very tiny current, and over a week or two, it does drop the voltage of the battery a little bit, but this loss of capacity is never recorded on the JBS BMS because the current is too low to be picked up.

The buck stays on because it also needs a soft start circuit with a big resistor in series to prevent sparks, so switching it is not really easy. I made two sets of connectors, one for power and another for precharge. I always connect the precharge first, which has a ceramic resistor in series to lower the current to the capacitors. After a few seconds, I plug in the other line for power. One of my buck converters blew up before I started doing this.
 
Update:

I got the 5T motor. I tried to tune it for a week, but it's just too weak. Anything over 100 phase amps and it loses sync.
I couldn't test the temperatures yet because it's still cold out. The average efficiency seems the same. With 100 phase amps, I'm getting incredible torque at start, but as soon as the wheel starts spinning, the power drops massively, and if I keep full throttle, the motors start making weird noises, going out of sync, I presume.

Here are my current settings:

Motor Type: FOC
Sensor Port Mode: Hall Sensors

Motor Current Max: 100A
Motor Current Max Brake: -100A
Absolute Maximum Current: 250A
Slow ABS Current Limit: False
Battery Current Max: 100A
Battery Current Max Regen: -20A
Battery Voltage Cutoff Start: 63V
Battery Voltage Cutoff End: 60V
Battery Voltage Regen Cutoff Start: 80V
Battery Voltage Regen Cuttof End: 84V

--- ERPM SETTINGS ---
5T Kv: 7.15
5T Pole Pars: 23 (46 magnets)
RPM @84V: 7.15Kv * 84V = 600.6 RPM
Max ERPM: 600.6 * 23 = 13813 ERPM

Max ERPM: 20000 (increased to 20k, field weakening buffer zone?)
Max ERPM Reverse: -10000
ERPM Limit Start: 80%

I did FOC measurements multiple times, always got similar values:
R: 76.68 mohm
L: 214.40 uH
Lq-Ld: 63.91 uH
Motor Flux Linkage: 28.677 mWb
KP: 0.4288
KI: 157.36
Observer Gain: 1.22

Saturation Compensation Factor: 20%
Temp Comp: True

Phase Filters: Enabled
Zero Vector Frequency: 30 kHz
Observer Type: Ortega Original (I tried cutting observer gain in half, which helped a lot)
MTPA: I didn't mess with (edit: MTPA was set to IQ Measured)
 
Last edited:
Maybe I can provide some tips, my setup had similar issues although I eventually fixed most of them with a lot of tuning and experimentation. I have a Leaf and 75200 Pro V2, 72V currently set to 200A but took a lot of faff to get there. It is still slightly unstable at mid RPM but only thing that seems to cause is a slight vibration and doesn't trip the conservative overcurrent limit. It still has some weird issue where it won't run at max duty cycle when it should be at mid-RPM. I wish I knew how much of the tuning issue was down to the noisy low quality hardware or some VESC issue but don't want to put on a nicer VESC to find out.

That lots of torque at start is because it's presumably run on hall sensors there. Then that lack of power could be the same issue I had (still sorta have) where it has issues at mid-RPM and that is where that noise is the current controller becoming unstable which I also still have but it's just that little vibration I mentioned that most wouldn't notice but I do because I spent so much time tuning it.

Update the VESC firmware if you haven't.

Of course same tuning advice as always, set the absolute max current at like 10-20% above your set current during tuning and never ever use slow ABS current. Turn up the current at like 10A increments until it's unstable at which point it will probably trip the overcurrent, try a setting and see if it's more stable, etc. Also do not turn on MTPA with a hub motor, that was the fate of the first controller for this bike although hard to say how much was the even lower quality hardware.

Some things that helped a lot were lowering the ZVF quite a lot, there was some balance if I recall where I tried various values. Currently I have it at 16khz and I know like below 25Khz the stability starts to really improve due to less noise. There is a limit based on ERPM but hub motors don't spin very fast so we can lower it quite a lot.

I have all sensors combined current sample which maybe that reduces the noise on these controllers a bit. Same with V0 and V7 interpolated (not V0 and V7, no phase shunts so that doesn't work but due to flipsky being shitty they just copied firmware that thinks it does have it)

I had the best luck with MXLEMMING_LAMBDA_COMP and observer gain at 1 (the observer gain only effects the Lambda comp part)

The other thing I had to mess around with a lot if the time constant and PI gain but unfortunlatly I don't remember all of it, I know I had to manaully edit the P and I gains to get it to both be stable and still push the duty cycle. I think this was maybe noise related where the noise meant the current controller had a hard time doing it's job so gains too high and it would OC but too low and it just wouldn't raise the duty cycle high enough at mid-RPM to even get to the set current. First just lowering the time constant and recalculating is a good place to start, like 600-800us.

Of course do these one at a time and test although I did order them in a reasonable order to try them.
 
Maybe I can provide some tips, my setup had similar issues although I eventually fixed most of them with a lot of tuning and experimentation. I have a Leaf and 75200 Pro V2, 72V currently set to 200A but took a lot of faff to get there. It is still slightly unstable at mid RPM but only thing that seems to cause is a slight vibration and doesn't trip the conservative overcurrent limit. It still has some weird issue where it won't run at max duty cycle when it should be at mid-RPM. I wish I knew how much of the tuning issue was down to the noisy low quality hardware or some VESC issue but don't want to put on a nicer VESC to find out.

That lots of torque at start is because it's presumably run on hall sensors there. Then that lack of power could be the same issue I had (still sorta have) where it has issues at mid-RPM and that is where that noise is the current controller becoming unstable which I also still have but it's just that little vibration I mentioned that most wouldn't notice but I do because I spent so much time tuning it.

Update the VESC firmware if you haven't.

Of course same tuning advice as always, set the absolute max current at like 10-20% above your set current during tuning and never ever use slow ABS current. Turn up the current at like 10A increments until it's unstable at which point it will probably trip the overcurrent, try a setting and see if it's more stable, etc. Also do not turn on MTPA with a hub motor, that was the fate of the first controller for this bike although hard to say how much was the even lower quality hardware.

Some things that helped a lot were lowering the ZVF quite a lot, there was some balance if I recall where I tried various values. Currently I have it at 16khz and I know like below 25Khz the stability starts to really improve due to less noise. There is a limit based on ERPM but hub motors don't spin very fast so we can lower it quite a lot.

I have all sensors combined current sample which maybe that reduces the noise on these controllers a bit. Same with V0 and V7 interpolated (not V0 and V7, no phase shunts so that doesn't work but due to flipsky being shitty they just copied firmware that thinks it does have it)

I had the best luck with MXLEMMING_LAMBDA_COMP and observer gain at 1 (the observer gain only effects the Lambda comp part)

The other thing I had to mess around with a lot if the time constant and PI gain but unfortunlatly I don't remember all of it, I know I had to manaully edit the P and I gains to get it to both be stable and still push the duty cycle. I think this was maybe noise related where the noise meant the current controller had a hard time doing it's job so gains too high and it would OC but too low and it just wouldn't raise the duty cycle high enough at mid-RPM to even get to the set current. First just lowering the time constant and recalculating is a good place to start, like 600-800us.

Of course do these one at a time and test although I did order them in a reasonable order to try them.
Oh thank you so much for this post!

Yes, I have the same 75200 Pro V2 at 72V. On the 3T motor, I also noticed some vibrations in mid RPM when pushing higher amps, the whole bike frame would resonate but it was working really well so I wasn't bothered about it.

About the VESC firmware, every time I connect to the controller with the VESC TOOL, I get a message that my controller has old, but mostly compatible firmware. I didn't want to mess with it because I was scared of bricking it. I checked the update page and the update which showed up was version 6.06. I'll give it a try for sure if the new firmware has fixes that would help in my situation.

I'll try the current settings as you explained. About MTPA, it is active currently, set as IQ Measured. I will try disabling it.

I will also try lower ZVF. I read a bunch of posts and people usually recommended higher frequency, but I guess that applies to one-wheels more than ebikes.

For the observer, I'll try LAMBDA COMP, by gain set at 1, do you mean 1 x recommended_value or just 1.00?

I did the FOC measurements at 400us, 600us, 700us and 1000us but always got similar results. My motor resistance was always around 80 mohm, but I remember one time it read over 100.

Should I do the FOC measurements with or without phase filters? Does this controller even have the needed hardware?
 
Yes, I have the same 75200 Pro V2 at 72V. On the 3T motor, I also noticed some vibrations in mid RPM when pushing higher amps, the whole bike frame would resonate but it was working really well so I wasn't bothered about it.
That vibration is the PI current controller, the bit of the firmware that tries to keep the phase current at the set value failing to do so, so the current oscillates wildly. This is of course not good but with the max current set at 250A as long as it didn't go over that the controller won't fault out, but those violent current swings are what can cause controllers to fail.

About the VESC firmware, every time I connect to the controller with the VESC TOOL, I get a message that my controller has old, but mostly compatible firmware. I didn't want to mess with it because I was scared of bricking it. I checked the update page and the update which showed up was version 6.06. I'll give it a try for sure if the new firmware has fixes that would help in my situation.
Updating should be just a few clicks, I don't know that it will fix the issues, it didn't fix mine entirely but it does have some improvements so may make things better.

I'll try the current settings as you explained. About MTPA, it is active currently, set as IQ Measured. I will try disabling it.
MTPA is for a different type of motor, hence it doesn't work and can cause bad issues.

I will also try lower ZVF. I read a bunch of posts and people usually recommended higher frequency, but I guess that applies to one-wheels more than ebikes.
There is probably sweet spots for various combinations of hardware, the reason lowering it seems to help, I think, is it reduces the noise, which these controllers are poorly designed so have a lot of noise which makes it hard for the current controller, among other things to do their job. If lowering it makes it worse try increasing it. There is a sane range I think around 15-40.

For the observer, I'll try LAMBDA COMP, by gain set at 1, do you mean 1 x recommended_value or just 1.00?
I have it at 1.0 but it doesn't do anything Mxlemming observer, the Ortega observer it's real important. With the Lambda comp of either it does do something since it effects the lambda comp part which is just added on to the others. Just trying the different observers to see which works best can help.

The key about trying things is having the current limits set correctly. So if you set the absolute max at around 10% higher than your set current when the current starts to become even slightly unstable, 10% unstable to be exact it will trigger a fault. This fault will shut things down before they get out of hand and you can adjust some settings until it doesn't fault. That is also why you want to start with a low current and raise it 10A or so at a time until it faults so then if a setting improves things you'll know because it was just at the limit. Then you can increase the current a little and repeat.

I did the FOC measurements at 400us, 600us, 700us and 1000us but always got similar results. My motor resistance was always around 80 mohm, but I remember one time it read over 100.
The time constant only calculates the P I and maybe observer gain from the test results. If the results are the same that's good, means they are probably reasonably accurate. If you change the time constant though you'll see the P and I values change. The P and I values are what controls the current controller to keep the current stable and where you ask it to be.

Should I do the FOC measurements with or without phase filters? Does this controller even have the needed hardware?
With, I think the V2 Pro does. I don't think they are actually very useful to use here though as I think they only operate at lower ERPM and the issues we are having are a mid-RPM.
 
That vibration is the PI current controller, the bit of the firmware that tries to keep the phase current at the set value failing to do so, so the current oscillates wildly. This is of course not good but with the max current set at 250A as long as it didn't go over that the controller won't fault out, but those violent current swings are what can cause controllers to fail.


Updating should be just a few clicks, I don't know that it will fix the issues, it didn't fix mine entirely but it does have some improvements so may make things better.


MTPA is for a different type of motor, hence it doesn't work and can cause bad issues.


There is probably sweet spots for various combinations of hardware, the reason lowering it seems to help, I think, is it reduces the noise, which these controllers are poorly designed so have a lot of noise which makes it hard for the current controller, among other things to do their job. If lowering it makes it worse try increasing it. There is a sane range I think around 15-40.


I have it at 1.0 but it doesn't do anything Mxlemming observer, the Ortega observer it's real important. With the Lambda comp of either it does do something since it effects the lambda comp part which is just added on to the others. Just trying the different observers to see which works best can help.

The key about trying things is having the current limits set correctly. So if you set the absolute max at around 10% higher than your set current when the current starts to become even slightly unstable, 10% unstable to be exact it will trigger a fault. This fault will shut things down before they get out of hand and you can adjust some settings until it doesn't fault. That is also why you want to start with a low current and raise it 10A or so at a time until it faults so then if a setting improves things you'll know because it was just at the limit. Then you can increase the current a little and repeat.


The time constant only calculates the P I and maybe observer gain from the test results. If the results are the same that's good, means they are probably reasonably accurate. If you change the time constant though you'll see the P and I values change. The P and I values are what controls the current controller to keep the current stable and where you ask it to be.


With, I think the V2 Pro does. I don't think they are actually very useful to use here though as I think they only operate at lower ERPM and the issues we are having are a mid-RPM.
Thank you so much for taking your time to explain everything… I find it quite hard to find detailed information about what all of these settings actually do
 
I did some more tuning. Got it to 100 phase amps without desync on full throttle, but it vibrates really badly in mid rpm. Also, I tried to spin the motor one time while holding it in the air, and when I gave it throttle, it desynced and started making "machine gun" noises. So my parameters are definitely not right. I noticed that saturation compensation helped a lot. I'm at around 40% currently.

Increasing the time constant while measuring FOC parameters increases the resistance. Both resistance and inductance change depending on the time constant value. I was measuring FOC parameters with phase filters ON.

At 800us, my resistance was around 80mohm, at 2500us it was >120mohm.
 
Also, I'm quite limited with top speed, with field weakening, I'm getting maybe 60kmh, but it takes ages to get from 50 to 60. I knew this could be a problem, but I was expecting crazy torque and was fine with lower top speed. If I don't get the 5T tuned correctly soon, I might switch back to the 3T, since it was way more stable and had stronger torque.
 
Resistance and inductance shouldn't change with time constant changes, probably it's just not reading them very reliably.

The lack of top end power could just be the higher turn motor, you can't cheat physics but it could also be the same issue I had where it wouldn't run the duty cycle high enough. If you watch the real time data during a pull the current should go to your set point, stay there as the RPM increases and duty cycle increases until the duty cycle gets to around 90% or somewhere around there and then the current will start falling. May not be able to see this very well unloaded as it will happen too quickly. The issue I had was duty cycle would never get that high, only to like 60% or something and current would start to fall, improved it with a lot of frocking around with the PI controller but it seems there was enough noise that the PI controller just wasn't responding well. I think VESC should be able to handle this better but it's hard to blame Benjamin for not optimizing for crappy hardware and issues he may have never experienced while developing on varied but all reasonable quality hardware.
 
I updated the VESC! My VESC shipped with a 6.02 75_300_R2 target. I updated it to 6.05 FSESC_75_200_ALU, did the setup again, and I'm at 160 phase amps!

But the motor vibrates like crazy in mid rpm, and my handlebars are shaking. It doesn't desync anymore, though.
When I give it throttle from a stop, it's smooth until it hits mid RPM, then it starts to vibrate, and after that period, it stops vibrating and becomes smooth. I think it's not electrical noise from high currents because after the vibrations stop, I can still see high phase amps in the real-time data display.
 
I updated the VESC! My VESC shipped with a 6.02 75_300_R2 target. I updated it to 6.05 FSESC_75_200_ALU, did the setup again, and I'm at 160 phase amps!

But the motor vibrates like crazy in mid rpm, and my handlebars are shaking. It doesn't desync anymore, though.
When I give it throttle from a stop, it's smooth until it hits mid RPM, then it starts to vibrate, and after that period, it stops vibrating and becomes smooth. I think it's not electrical noise from high currents because after the vibrations stop, I can still see high phase amps in the real-time data display.
you can try and add more hall sensor samples, start with 5 and experiment with it. By default it's using just 1 sample, worth a try.
 
I got rid of the vibrations! 190 phase amps no problem! Can't keep the front wheel down :LOL:

Finally, some good news, I'm gonna post all of the settings to help anyone with similar issues.
MXUS 3K Turbo 5T + VESC FSESC 75200 Pro V2.

First of all, I upgraded the firmware. The VESC shipped with firmware 6.02 and the target version 75_300_R2, which I think is incorrect. I manually downloaded and flashed a new firmware from the VESC firmware archive. I updated to version 6.05 and hardware version FSESC_75_200_ALU. I'm not sure if this is 100% correct, but everything works fine for me. This actually made a huge difference in the stability of the motor.

First is the FOC calibration. I asked the manufacturer for the exact resistance and inductance of this motor, and they said it's 72.91mΩ and 222.37µH.

I did the measurements with a 4000us time constant. My resistance is: 78.1 mΩ, and inductance 195.75 µH. Ld - Lq: 40.80 µH, Flux Linkage 35.193 mWb. Current KP 0.1958, Current KI 78.13, Observer Gain: 0.80.

Openloop ERPM: 300, Saturation Compensation Mode: Factor, with 30%. Sensored ERPM Start 1000, Sensorless ERPM 2000, Hall Interpolation ERPM: 500.

Phase filters are disabled because this hardware version does not support them. Zero Vector Frequency: 15.0 kHz (lowering this stopped the vibrations in mid rpm). Control Sample Mode: V0 Only, Current Sample Mode: Longest Zero Time, Current Controller Decoupling: Disabled, Observer Type: Mxlemming Lambda, MTPA: Disabled, Speed Tracker Position Source: Corrected Position.

I just went for a short ride with the battery at 80V, and the front wheel is lifting super easily. The vibrations in mid rpm are gone since I lowered the Zero Vector Frequency. The downside is that now I can hear the motor, but it's not a big deal for me. I pushed it to 190 phase amps and decided it's enough for now. I will definitely try to push it even higher later. I got 8.5kW peak with these settings with 100 battery amps on a 20S pack.
 
How precise do you find the SOC monitors in VESC and inside the JBD app?
I don't use SOC on either one.
Also, I completely bypass the BMS for charge and discharge.

Individual cell group voltage telemetry is enough for me.

I got rid of the vibrations! 190 phase amps no problem! Can't keep the front wheel down
Great to hear!
This is a good example of what it takes to get a controller and motor tuned.
 
Back
Top