Controller Setup

Controller connection

kHYoJGhm.jpg

First connect phase wires and halls as shown on schematic.
Connect also battery supply and throttle, brake is optional.
At first power up controller will start automatically.
For navigation use middle buttons, to enter or edit parameter - right button, exit or undo change - left button.
After you finish setup do not forget to Save settings! Otherwise old settings will be loaded at next startup.

Auto-setup

Fast setup for throttle, brake and motor.
Select required controller from device-list and go to directory Auto-setup.
If you have connected throttle and analogue brake, you can run Full setup and follow instructions shown on screen. The corresponding lines will indicate when it is necessary to press the throttle or brake.
ATTENTION! When setting up halls, motor rotates in both directions, be careful with the pedals on the bike.
If you have only throttle, you need to turn on every parameter manually step-by-step: Throttle, Motor, Angle correction. When you enable, after apply, hint will be displayed.
Before auto-setup it is recommended to specify correct pole pair number in motor parameters!
If motor heavy and auto-setup does not happen, you can increase Setup current, for example twice.
If motor spins in wrong direction you can change any two phases or in Motor setup change Spin direction.
Motor will spin 5 times, one at motor detection and 4 times at angle correction.

Control modes

Modes setup

In section Controller - Control modes you can save three modes of motor operation and select these with 3-position switch.
If you don't have switch, mode 2 used by default. If your switch connected to display, you need to setup Display buttons.

To configure 2nd mode:

  • Phase 2 - maximum phase current.
  • Battery 2 - maximum battery current.
  • Speed 2 - maximum speed.

Battery n parameter have a boost mode, which allows you to briefly exceed the battery current settings specified in the Battery setup.
Boost is activated when the battery current exceeds the setting in the Battery setup.
Boost is activated for 5 seconds, followed by a minute cooling.
The next boost can be used when the active value of the battery current drops to the average value specified in the battery current settings.

Parameter Speed n determines the speed depending on the battery voltage settings (Battery setup).
This is done so that the speed does not depend on the battery charge.
Parameter Speed n active only for throttle mode Speed, Speed+torque see Throttle control mode setup.
In general, it is recommended to setup the value of the phase current in 1.5-2 times higher than the battery current.
The rest of the presets are configured in the same way.

Reverse setup

It is activated by a separate button, in the settings you must specify Speed reverse and Phase reverse.

Field weakening setup

The function is similar to the 120% mode of Infineon controller.

Setup:

  • For one of modes specify Speed more than 100%, for example Speed 3 = 120%
  • Field weakening - specify weakening current, you can start with 30A

Field weakening is turned on when the maximum speed is reached, the controller adds the weakening current, limited to the specified phase current and the weakening current. If the phase current = 70A, the weakening current is 30A, than it means that in the settings of the phase current there should be at least 100A. If the phase current increases to 80A, then only 20A will remain for weakening, since 80A + 20A = 100A.
Also, controller will limit the rotational speed of the motor so that its effective EMF does not exceed the maximum supply voltage of the controller (not the battery). If the motor started to twitch on the free wheel, then it is necessary to reduce the weakening current.

Braking with speed control

Allows you to slow down when releasing the throttle.
Actual for Direct Drive Motors.

  • Throttle mode = Speed or Speed+torque
  • Allow brake for speed ctrl. = On

Throttle control mode setup

There are 3 possible Throttle mode:

  • Speed - as in Infineon controllers and non-programmable low-cost controllers, characterized by using the maximum current to reach a given speed
  • Torque - throttle controls phase current
  • Speed+torque - combined mode, as Kelly

In the case of Speed+torque, pressing throttle to 50%, when achieved 50% speed, the current consumption will be reduced to hold speed.
The acceleration current will also be proportionally lower.

Current change speed

Three parameters that determine the rate of current change (smoothness). The higher the value, the faster the current will increase in the motor.
For conventional brake levers, it is useful to reduce the parameter - braking for smoother activation of regenerative braking.
If the response to the throttle seems too slow, you need to increase the parameter - acceleration.
The - shutdown parameter determines how quickly the current drops after throttle and brakes are released.

Speed control filter

For the throttle modes Speed and Speed+torque a speed reference filter is applied, for a smoother response to the throttle change.
The filter takes a difference between the previous speed request and the current one, multiplies the error to the power 1,2,3 (linear, quadratic, cubic respectively) and multiplies by the coefficient. The resulting value is used as the cutoff frequency of the low pass filter. The greater the change - the faster the response to it.
Speed filter - selects the filter mode
Filter factor - sets the filtration coefficient

Control

Controller - Control
In this section you can setup control sources for motor, like: throttle, Torque and PAS sensors, cruise control and etc…

Control source

You can connect controls to controller or display. Or even both, in the same time, this is necessary in the case of configurations Torque / PAS sensor + throttle.

  • Auto - all sources will control the controller. Built-in and external, connected via CAN bus (eg display).
  • Embedd - only what is connected directly to the controller.
  • Remote - only control via CAN bus.
  • Disabled - disables any control of the controller.

Throttle and brake setup

Currently, voltage settings for all throttles and brakes are common.
# Throttle - shows the voltage of throttle connected to the controller.
Throttle min, Throttle max - range of the throttle. When exceeding max. value by 5% - protection against a broken throttle will be activated.

# Brake - shows the voltage of brake connected to the controller.
Brake min, Brake max - range of analogue brake.
Invert brake - inverts the voltage value from the built-in brake. It can be useful to turn it on when a brake handle with reverse voltage is connected to the display, but you want to use Auto control source.
The digital brake handle (i.e. button) is connected to the display, see Display buttons setup.

Port configuration

This section is WIP

Cruise control setup

There are several cruise modes, determined by the parameter Cruise.

  • Button - at button press. The response time of the button is determined by the parameter Cruise EN time.
  • Switch - when the switch is turned on, time is not used.
  • Throttle ​​hold - when you hold throttle a certain time in one position. The response time is determined by the parameter Cruise EN time. Accuracy is set by parameter Cruise by throttle. Accuracy is necessary because when driving, throttle moves a little because of shaking. The default is 2%.
  • Allow Throttle ​​hold - similar to the previous one, with the difference that in order to activate cruise, you also need to turn on cruise switch.

If the cruise button is connected to the screen, then you need to configure it in Display buttons.

In the Torque control mode, the cruise works to maintain power, not speed, while going uphill, the speed will drop and increase when going down.

What turns off cruise control:

  • Any brake press, analog or digital
  • Repeated throttle press
  • If a switch is used - when it's disabled.
  • Reverse enable

PAS setup

PAS connected to controller port P1/P2. (one or two-wire)
PAS unlike Torque sensor controls the throttle by frequency and not the rotational force.

Section Controller - Control:
PAS = Disabled\PAS sensor\Torque sensor
PAS connection = 1-wire\2-wire (for encoder mode use 2-w)
Invert PAS - changes the right direction for a 2-wire connection
PAS poles - number of pulses per pedal revolution
PAS min freq. - the minimum pedal speed at which the motor will be activated
PAS max freq. - the maximum pedal speed at which the motor will be activated for 100%
# PAS freq. - shows PAS speed in real time
PAS timeout - the time after which the motor is turned off after stopping the rotation of the pedals
PAS filter - smooths control signal for smoother operation
PAS min out - minimum control level when PAS is running
PAS max out - maximum level of control. By analogy with the "pressed" throttle, PAS sends a signal within the specified limits.

Next settings related to the pressure sensor (Torque sensor)
Pressure scale - Nm/V. You can calibrate by placing a load on the pedal and calculate the torque on the shaft through the lever.
Zero pressure - zero pressure in volts
Torque averaging - period for which is torque value updated. Measured in half turns. If the torque sensor measures only one pedal, then the period must be a multiple of two.
# Torque - shows the current torque at the sensor
# Human watt - shows pedaling power, averaged.
Human watt min - minimal human power for motor activation
Human watt max - maximum level for 100% activation
The pressure sensor also includes frequency configuration and output level configuration as well as the usual PAS.

Motor setup

Motor t°-sensor

Section Controller - Motor setup - Motor t°-sensor
You can select a temperature range in which a smooth power limit will occur (parameter Delta °t) and specify °t max. It is recommended to install temperature sensor so close as possible on the stator windings, while not in contact with the stator iron. If you do not know what kind of sensor is in the motor, you can check all the options and choose the one that most closely to room temperature. Measured temperature is shown below. You can choose from sensors TMP35, TMP36, TMP37, KTY81 (82), KTY83, KTY84, NTC10K (B: 3950), PT1000. To turn off temperature control, select OFF

Clutch

Section Controller - Motor setup - Clutch
Here you can set up a smooth motor start for soft engagement of the clutch or freewheel. Useful for gear motors or mid-drives.
Currently it works well only in the throttle mode Torque, since clutch there is always engaged.

The parameter Mode determines the way of operation:

  • Accelerate - smoothly accelerates the motor until the load appears
  • Accelerate and hold - in addition to the previous one, it applies weak torque to the motor after the throttle is released, this mode allows you to switch speeds at mid-drive systems without using the pedals.

Start time - maximum time for soft start
Start current - is the phase current of the motor at which the load will be detected and the soft start is disabled. This value must be higher than the phase current for specified acceleration of the motor without load.
Detection time - the time during which the load must be present, after which the soft start will be switched off.
Acceleration - value in volts/seconds. The higher the value, the more you need to specify Start current, since the motor will consume more current during acceleration.
Hold 20-80% - two parameters regulating the phase current supplied to the motor in the mode Accelerate and hold. 20% - current at low speeds, 80% - current at about-maximum speed. It is possible to determine the approximate values ​​by the no-load current of the motor.
Hold enable time - after how much time after the throttle has been pressed, torque hold will become available.
Hold time - how long torque will be applied after releasing the throttle.

TIP: Optimal setup for MAC motor: Accelerate, 15А, 50V/s, 200ms.

Manual angle setup

In this section you can manually change hall sensor angle.
Offset for square - additional shift for square wave mode.
Offset total fwd - shift all halls by the specified value for the direct rotation of the motor.
Offset total bkwd - shift all halls by the specified value for the reverse rotation of the motor.
To shift all halls, press enter, enter the angle of shift, press enter again.
The value will reset and the angle of all halls will change to the specified value.
You can change the angle of the hall in the opposite direction, setting a negative value.
Reset angles - clears all hall angles.
Integration threshold - analogue of the halls angles for the sensorless control mode.

Hall table

Here hall index and angles are specified for forward and backward direction.

Motor parameters

Pole pair - used to calculate RPM and speed. For more accurate auto-detection of angles, you need to specify the correct value, you can see in motor information table.
Spin direction - you can change the direction of rotation by default. Or swap two phases.
Integration threshold - analogue of the halls angles for the sensorless control mode.
Control mode - currently the controller has the following motor control modes:

  • Square
  • Sensorless - motor control using BEMF integration, parameter Integration threshold is used. It is rather insensitive to tuning, but more accurate tuning may be required for high speed motors (such as RC). At the moment, the sensorless does not have a start-up algorithm, it works stably only at some speed. Hall setups starts with sensorless mode.
  • Combined - start on the halls, then switch to the sensorless, the threshold is determined by the parameter From hall to s-less (1 rad / ms = 9549 erpm)
  • FOC - field oriented control

Parameter Control mode loaded at start-up and can be saved.
Parameter Control mode now switches the control in real time, it is not saved.

Interpolate halls - smooth change of the hall angle based on speed. Used for FOC mode
Interpolation start - the motor is always started from a discrete angle, if digital halls are used. After the specified speed, the angle starts to change smoothly.
Boost square current - in the sensorless or square mode, applies 100% PWM at the beginning of each windings switch.
Absolute limit - limits voltage supplied to the motor. In most cases, this parameter is not needed.
kV - electric revolutions per volt

Battery

Section Controller - Battery, here you must specify the range of the supply voltage and current.
Full charge (delta) - delta voltage relative to the maximum, at which when the controller is turns on, will reset the watt-hour consumption
Supply min-max V - battery voltage range. Also used for Converter mode. For a lithium ion, it can be considered a minimum = 2.8V*S, a maximum of 4.2V*S. For LiFePO4 minimum 2.5V*S, maximum 3.6V*S.
Charge max A - maximum battery charging current, during regeneration or in Converter mode.
Discharge max A - maximum continuous discharge current of the battery, but in boost mode it can be more, see Throttle control mode setup.

Converter

Section Controller - Converter. Here you can configure charging mode from the power supply through the motor. Charging through the inductor is not currently supported.

Enable - turn on the converter mode, after switching on - pressing the throttle activates charging, brake - deactivates
Auto-Enable - automatic start of charging when the charging PSU is connected to the controller
Battery max V/A - if no value is specified, then battery settings are used
Supply max. - maximum power supply current
Supply drop U - allowable voltage drop on wires or power supply
Below # shows the real time values ​​of voltages and currents.

Other parameter

Setting up the disable button and auto shutdown

In the Controller section below, you can select the Disable button mode - button or switch (toggle). To turn controller off and on with a button, you must hold it for 2 seconds. You can also turn on the parameter Auto shutdown and specify the time after which the controller will turn off if the motor does not spin. In the off state, the controller consumes less than 100 μA, so it is not necessary to disconnect it from the battery. There is a button in the display on the back, so an additional switch is usually not required.

The controller turns on when it is powers-up or the button contacts shorts. In disabled mode, the controller consumes less than 100 μA, so if you reconnect the power without discharging capacitors, the controller may not start. In some controllers there is a low-current input that can be connected to the BMS+ with a weak power stage, port is located on the power board and marked as BMS+, it is necessary to unsolder the jumper (0 ohm resistor).

For multi-motor configurations, it is recommended to specify a button/switch for one controller, and on the others setup Disable button = CAN, then first controller will control the others to turn off.

Software update

Parameter Controller - Update software will start update process. To update, copy the firmware NContr.bin to the root of the microSD card, and plug it into display.

Speed calculation

If you have a hub-motor, then you need to setup motor pole-pair.
For gear motors or mid-drives, it is recommended to install an external speed sensor that is connected to the display.
Further in the section Controller - Additional features you must specify Circle length - circumference of the wheel, if used with a gear motor, it must be divided by the reduction ratio.
Speed calculation - this device will calculate the speed. Useful for multi-motor configurations, you can turn off the speed calculation on some motors.

Additional features

Section Controller - Additional features
Device ID - device number on LEVCAN bus
Master-controller - under dev….
PWM freq - you can choose the frequency of additional PWM output on ports P1 / P2
PWM Pn - chooses mode of operation:

  • Stop-light - activated when the brake is pressed
  • Headlight - activated when the controller enabled
  • t° C motor - activated beyond the two deltas of the motor temperature, as the motor heats up will increase the PWM duty
  • t° C controller - activated from 40°С, maximum value at 80°С temperature of the controller

PWM Pn Min/Max - indicates the output range of the PWM (duty)

Reset

Reset Wh usage - resets the spent watt-hours in the controller
Reset stats - resets trip distance
Reset config - loads default settings but does not save them. If you restart without saving, the old settings will be loaded.
Erase data storage - may be needed for correct firmware upgrade, rollback to default settings, in situations when you bring the controller to incorrect operation

PID regulators

If you do not know what it is and why, it is better not to change it.
Phase - phase current regulator
DCv - voltage regulator on the dc bus
DCi - dc bus current regulator
Speed - speed regulator for throttle modes Speed and Speed+torque
PLL - speed regulator for motor angle interpolation

Additional Information

Section Controller - Debug information shows temperatures, RPM, voltages and currents, as well as regulator values.
Section Controller - Status flags displays errors that may occur during operation.
Section Controller - Device information can show you the version of the firmware and bootloader as well as the maximum parameters for this model of controller.


en:sitemap
en.gif
ru.gif
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License