How To Configure Motor

Updated 2023/07/20: Added link to SuperFlux Reference - Motor Setup Values
Updated 2024/02/23: Added recommended steps for swapping motor into an existing board.
Updated 2024/02/23: Added a note about detection of a higher Motor L value

A Cheat Sheet / Guide to config a motor in VESCtool 6. This guide discusses motor values to be adjusted, it does not replace basic understanding of settings. This guide shows desktop VESC Tool, but APP version is similar

This is a written version of Dado’s Motor Config video with additional information, I recomend you watch it at least once. https://www.youtube.com/watch?v=PupK5ertpEg

!!Always back up MTR and APP Config to maintain a base if you need to go back!!


Pre-Reqs for swapping a motor into and existing/functioning board:

  • Re-enable “Motor Cfg > FOC > Offsets > Run calibration at boot”
  • Disable Float Package at “Float Cfg > Specs > Disable Float Package”
  • Power cycle the board to let calibration re-run
  • Follow motor config steps shown below. Yes, you need to do all the steps.
  • Feel free to disable calibration again after a successful motor configuration and the board is working well if you want a faster boot up time.

1. Welcome & Wizards - Set up Motor FOC
Load Default Parameters = No
EUC

(Hypercore MTR)
Large Outrunner
Max Power Loss = 400W
Open Loop ERPD = 700
Sensorless ERPM = 2000
Motor Poles = 30

(SuperFlux & Cannon Core MTR)
Large Outrunner
Max Power Loss = 700W
Open Loop ERPD = 1500
Sensorless ERPM = 1500
Motor Poles = 30

Motor Selection = Yes
Battery Type = LIIION 3_0_4_2
Battery Cells = Stock XR (64V) =15, TORque Pack (80V) = 19, CBCSO (84V)= 20
Battery Capacity = StockXR, TORque Pack, CBCSO or Custom?
Battery Settings = OK

Direct Drive = Checked
Wheel Diameter = 280 (for speed calculation)
Motor Poles = 30

Run Detection (Allow wheel to free spin)
Correct Results Range. Consider re-running Motor Wizard if you get number drastically different than below when configuring HyperCore Motor. For Common SuperFlux Values see SuperFlux Reference - Motor Setup Values

  • Motor Inductance (L)/Motor L may sometimes detect up around 230.

2. MOTOR SETTING - GENERAL (LEFT MENU):

GENERAL TAB:
Invert Motor Direction = Only if motor runs in reverse

CURRENT TAB:
Motor Current Max = 150A
Motor Current Max Brake = 150A
Absolute Max Current = 225A+
Battery Current Max = 30A
50-60A for Molicel P24A
45A for
Battery Current Max Regen = -30A (you can use 50-60A for Molicel 2p packs, like TORque pack)

VOLTAGE TAB: (Dependent on Battery)
Battery Voltage Cutoff Start = 2.3V per Cell (46V for 20s battery)
Battery Voltage Cutoff End = 2.0V per Cell (40V for 20s battery)

TEMPERATURE TAB: (Activates Pushback for Overtemps) should be set correctly by default
MOSFET Temp Cutoff Start = 75C
MOSFET Temp Cutoff End = 80C
Motor Temp Cutoff Start = 80C
Motor Temp Cutoff End = 90C


3. MOTOR SETTINGS - FOC (LEFT MENU)

These settings should be set by Wizard, but some may need to be adjusted for “crunch”.

GENERAL TAB:(Crunch)
Motor Resistance (R) = up to 1.3x the detected value (87 - 105 for Hypercore)
Observer Gain= ½ wizard value (0.6 - 0.9)

**HALL SENSORS TAB:(Crunch)
Sensorless ERPMv = 2000
Hall Inerpolation ERPM = 200/250

FIELD WEAKENING TAB: (Default should be fine, but can adjust to personal preference)
Max Start= 30A - 50A
Duty Start= 50% (some prefer 60%+)
Ramp Time= 500
Q Axis= 2% (don’t touch!)


Motor “Crunch”
Follow this guide to troubleshoot. Reminder to make one change at a time. Motor crunch troubleshooting

Common Causes in this Order:

  1. Observer gain (FOC-General) = HALF of wizard value
  2. Sensorless ERPM (FOC-Hall Sensors) = 2000
  3. Sensor Interpolation ERPM (FOC-Hall Sensors) = 200
  4. Zero Vector Frequency (FOC-Advanced) = Increase up to 30 max
  5. Motor Resistance (FOC-General) = increase to 1.2x detected value, e.g. for Hypercore: 105
  6. Matching KI- KI factor to match their now higher Motor Resistance value.
  7. (Last resort) switching to the original (ORTEGA) observer. Select that in FOC-Advanced and start over. Ortega Lambda-Comp is also a great option to try out.

Backup and save Motor Config when successful.
*Comment if you see any errors or something needs to be addedu

8 Likes

I noticed a few items that might be worth updating to more sensible defaults or at least be updated to provide a newcomer with more details. I generally take the approach that these tutorials should cater mostly to those who know very little about this stuff and then they should be able to adjust the values as they begin to understand the settings better.

To be fair I still consider myself to know very little :slight_smile: and I might be wrong in my suggestions/questions, but I will outline them below just in case they are valid.

I have been able to go ahead and set “Sensorless ERPM = 2000” here in this section. I do notice it is updated later in the guide so it is ok, but might be worth just adding a note that it gets updated later or that they can try it with “2000” from the start. I think @surfdado said in a video that on older FW/Tool versions he had better luck running the config with different values, but don’t quote me on that.

I believe “Battery Type” should be set to “BATTERY_TYPE_LIION_3_0__4_2” in most cases

Could this be updated to reflect that “Battery Current Max/Max Regen” will need to match the user’s battery specs? I could see it being confusing for someone and them possibly pulling more amps than their batteries are designed for. I think a more safe value to default to would be “30A”, but then adjust based on your battery pack/cell ratings?

Is this is a bit high for Motor Temp Cutoffs? I feel like I’ve most commonly seen “Motor Temp Cutoff Start = 80C” and “Motor Temp Cutoff End = 90C”. My only concern here would be damaging the motor, but I must admit I don’t know for certain at what temp the motor would actually sustain damage.

On this one it’s more of a question… I have no clue on the correct setting here… but all of mine are set to “NTC 10K at 25C”. Is mine set wrong? if so I need to get that fixed, but I’m probably going to ask around elsewhere as well to get confirmation as I’m unsure.

2 Likes

Thanks! settings have been corrected in original post. I’m not sure about “Motor Temp Sensor Type = NTC100K@25C”. I’m going off of Dado’s video.

What you have (NTC10K) is default and it doesn’t appear to make any difference? Maybe Dado will chime in on this.

1 Like

What does loading a motor config do for you versus just running the wizard?

I don’t see a issue using a good motor Config if it works, just change the values to match your battery. Every motor is a little different so I feel it’s best to run the Wizard.

I did have a difficult motor that had problems with the wizard. Installing a good motor Config and then running the wizard seemed to help although I can’t confirm it actually made a difference. Maybe someone else can chime in

1 Like

Ok. I’m building a onewheel from scratch with a ubox 100 + superflux so do not have a motor config to start from. Sounds like, as I would assume, the output of the motor wizard is a motor config, i.e. loading a motor config is superfluous in my case?

Yes… you are building a MTR Config from scratch so you don’t need to back up or flash a XML… following the guidelines from The wizard should work, but the superflux numbers maybe a little different.

2 Likes

Uploading a superflux motor detection results as they differ considerably.

1 Like

Has anyone else noticed that since FW 6 the ‘Motor L’ value seems to be reading higher during motor setups? I feel like it used to be closer to 200 and on most of the setups I’ve done with FW6 it’s just about always above 215…

1 Like

My Best Basig Superflux Motor Setup

Large Outrunner
Max Power Loss = 700W
Open Loop ERPD = 1500
Sensorless ERPM = 1500
Motor Poles = 30

You dont have any listed acceptable ranges for the superflux, only the hypercore. But if I were unaware I may assume the two would provide similar results (idk they’re onewheel motors buh)

Here is what I got with mine. You can use it as I assume its a good detection.
image

Where did these values come from? I configured a SuperFlux and Cannon core fine without setting these… Is anyone able to explain why these are needed and how it was determined?

That Power Loss is default, Open Loop ERPM doesn’t apply to us (it just needs to be set at or below Sensorless ERPM), and 1500 Sensorless ERPM is what Tony recommended, though we generally recommend 2000. 1500 is fine though if it works well, there’s been negative side effects observed with this on Hypercore but the other motors may handle it fine. But I would recommend at least lowering it to 2000 from the default 4000

1 Like

I am seeing L values of 229 when I run the motor wizard was concerned when optimal values were 198 but saw that Dado has values of 226 in his video So I assume I am ok.

2 Likes

Thanks for this guide!!! Quick comment/question about Samsung 50s cells…

I googled “Battery Current Max for Samsung 50s” and found “45A Maximum Continuous with 80C temperature cutoff” so I went ahead and entered 45A/-45A for these values. Since this is a common battery type, should we include this in addition to Molicel?