Skip to main content
Version: 1.0.0

Motorbike

This is an example of the complete wiring and configuration of a motorbike using a siliXcon SC controller with LYNX firmware.

Features of this motorbike:

  • Use standard siliXcon SC controller with VDS display
  • safety throttle with redundancy input
  • Sensoreless motor control
  • RGB WS LED to show the current map
  • Using SOC from BEST (Battery Estimator) in the controller

motorbike

Wiring

Wiring Enlarge wiring

Configuration

Basic driver settings

The motor phase current iref is set experimentally. Phase current was increased and the motor temperature was observed.

The `ipeak was set about 10% higher.

"/driver/iref" : "290.0" # '[A] reference phase current'
"/driver/ipeak" : "320.0" # '[A] peak phase current (negative to switch direction)'

Set the rotor position estimator to sensorless. More info

"/driver/prest" : "1" # 'preferred rotor position estimation mode'

To get the correct motor speed reading, it is necessary to set motor polepairs.

Also, the rdec value was lovered from default. More info

"/driver/motor/pp" : "8" # '[pairs] pole pair count'
"/driver/limiter/rdec" : "200.0" # '[RPM] speed limiter decrement rate'

Motor settings

All these parameters were automatically identified using the motor identification feature.

"/driver/motor/psi" : "0.007815" # '[Wb] PM flux linkage <0:ACIM> <eps:synRM>'
"/driver/motor/Rt" : "0.007295" # '[Ohm] resistance'
"/driver/motor/Ld" : "1.58330e-5" # '[Henry] D inductance'
"/driver/motor/Lq" : "2.12015e-5" # '[Henry] Q inductance'
"/driver/motor/Da" : "0.004380" # '[1/Amp] aligned inductance derating'
"/driver/motor/Dc" : "0.001217" # '[1/Amp] cross inductance derating'

Battery current and voltage limitation

The battery current and voltage limits are set to protect the battery.

warning

Response time for these currents are dozens of milliseconds. This means, that the battery current can be up to ipeak for a short time.

  • Setup the battery short circuit protection higher than ipeak.
  • Setup the battery overcurrent protection higher than ibpos and ibneg.

The voltage reading on the controller's precision is +-1V, typically +-0.5V.

  • Setup the battery overvoltage protection higher for about 1V than ubmax.
"/driver/limiter/ibpos" : "180.0" # '[A] battery positive current limit <0:disable>'
"/driver/limiter/ibneg" : "-30.0" # '[A] battery negative current limit <0:disable>'
"/driver/limiter/ubmax" : "54.8" # '[V] battery maximum voltage limit <0:disable>'
"/driver/limiter/ubmin" : "40.0" # '[V] battery minimum voltage limit <0:disable>'

Input configuration

GPIO0 and GPIO1 are used for throttle input. Set the inputs as "floating" in common block. GPIO0 is mapped by default to throttle input, only GPIO1 needs to be mapped.

Both GPIO2 and GPIO3 are set up in "pull-up" configuration. IN_reverse value is 18 because the input is digital. i.e. GDIN value 18 is used and not GPIO value 10.
The same is true for IN_seatswitch GDIN value 19.

"/io/IN_acc_2" : "9,0" # 'For dual throttle, GPIO OR DIN ID'
"/io/IN_reverse" : "18,0" # 'DIN ID'
"/io/IN_seatswitch" : "19,0" # 'DIN ID'
"/common/ioconf0" : "0" # '<0:floating> <1:pull-up> <2:pull-down>'
"/common/ioconf1" : "0" # '<0:floating> <1:pull-up> <2:pull-down>'
"/common/ioconf2" : "1" # '<0:floating> <1:pull-up> <2:pull-down>'
"/common/ioconf3" : "1" # '<0:floating> <1:pull-up> <2:pull-down>'

Throttle input configuration

The min and max parameters in both asc and asc2 folders were set, so asc/out and asc2/out are the same on all the throttle range. The dual_err is the maximum error between these two values.

The absmin and absmax are values, that are not present with the functional throttle. These values are used to detect a broken throttle.

The lpf and lpfdn are used to smooth the throttle signal. The lpf is used for rising throttle and lpfdn is used for falling throttle.

"/acc/csc/lpf" : "0.010000" # 'rising lpf/ramp <1:disable>'
"/acc/csc/lpfdn" : "0.008000" # 'falling lpf/ramp <1:disable>, <0:use 'lpf'>'
"/acc/asc/min" : "247" # '[mV,*] min of range'
"/acc/asc/max" : "4510" # '[mV,*] max of range'
"/acc/asc/absmin" : "2" # '[mV,*] lowest valid'
"/acc/asc/absmax" : "5000" # '[mV,*] highest valid'
"/acc/asc_2/min" : "126" # '[mV,*] min of range'
"/acc/asc_2/max" : "2238" # '[mV,*] max of range'
"/acc/asc_2/absmin" : "1" # '[mV,*] lowest valid'
"/acc/asc_2/absmax" : "3500" # '[mV,*] highest valid'
"/acc/dual_err" : "0.100000" # 'max err in dual throttle <-1:throttle endstop switch>'

WS LED configuration

The used WS LED needs to change color order. The dispmode enables 1 WS LED to show the current map.

"/misc/ledopts" : "1" # '|0-2:color order| |4:off while driving| |8:dimm while driving|'
"/misc/dispmode" : "32" # 'display mode <-1:autoset> <0:disabled> 32+ WS LED'

Beeping configuration

Apart from the default configuration, these beepopts settings enable all beeps + "play SOC" on startup.

Also the warntim is set to 60s. This means, that the warning sound will be played with period 60s.

"/misc/beepopts" : "253" # '|1:arm| |2:1st arm| |4:disarm| |8:soc| |16:thr_err| |32:maps| |64:shutdown| |128:lock|'
"/misc/warntim" : "60" # '[s] time to warning sound'

Maps configuration

To get the correct speed reading these two parameters must be set correctly. Otherwise, the speed limitation will not work correctly.

"/odothr" : "724.0" # '[R/km] wheel revolutions per km'
"/gearthr" : "8.0" # '[ER/R] motor revolutions per wheel revolution'

These are the settings for each map. Set this according to your liking.

"/maps/map1/kph" : "15.0" # vartype: pr
"/maps/map1/pwr" : "3000.0" # vartype: pr
"/maps/map1/trqlvl" : "0.5" # vartype: pr
"/maps/map2/kph" : "45.0" # vartype: pr
"/maps/map2/pwr" : "7000.0" # vartype: pr
"/maps/map3/kph" : "60.0" # vartype: pr
"/maps/map3/pwr" : "1.10000e4" # vartype: pr
"/maps/map3/trqlvl" : "1.0" # vartype: pr

These limits settings are used in the VDS display as maximum in bargrafs screens.

"/maps/kphlimit" : "60.0" # 'max speed for maps'
"/maps/pwrlimit" : "1.10000e4" # 'max pwr for maps'

Setting for the reverse map.

"/maps/revmap/kph" : "5.0" # vartype: pr
"/maps/revmap/pwr" : "4000.0" # vartype: pr
"/maps/revmap/trqlvl" : "0.5" # vartype: pr

BEST configuration

These are the settings for the battery estimator. P and S values are the battery pack configuration. U100 value is lowered, so there is bigger margin for showing 100% SOC.

"/best/S" : "13" # '[-] number of cells in series'
"/best/P" : "10" # '[-] number of cells in parallel <0:disable coulomb counting>'
"/best/Rs" : "0.004000" # '[Ohm] pack wiring resistance'
"/best/Cc" : "2600.0" # '[mAh] cell nominal capacity'
"/best/Rc" : "0.080000" # '[Ohm] cell nominal resistance'
"/best/U100" : "4.13000" # '[V] OCV for cell when SOC = 100%'