Firmware

Do not downgrade firmware that was installed by the manufacturer! You may get a brick

Each device has its own firmware and is updated separately from different menus. It does not matter in what order you update the firmware of the devices. If you have older firmware, you can install the latest firmware at once, without having to install the firmware one by one.

If you already have firmware version v0.75B and higher installed in the On-board computer, then the order in which devices are updated does not matter, since in firmware v0.75B the ability to force the update of the controller and other devices connected to the CAN bus through the menu of the On-board computer was added. You can read more about Forced update of devices in this section.

If your On-board computer has firmware v0.60B or lower and Controller v.7.18 and lower, first, need to update all devices but display. Because menu protocol is new and old devices will not be visible in the menu. After the update is finished hold the left button few seconds to exit the updated device menu. If the button does not work you may need to reset the power supply or replug CAN cable in the On-board computer. After everything is updated — update the On-board computer. Make a controller reset (load defaults) after the update. We recommend running motor detects again on controllers. Detection of throttle/brake connected to display should be done in the On-board computer menu.

Copy files to the root directory of the microSD card with FAT32 filesystem (how to format microSD to FAT32 on Windows and Mac you can read here), insert into On-board computer (contacts on top) and run the update process.

Instruction of update of firmware:

1. Description of the On-Board Computer update menu.

2. Description of the Controller update menu.

3. Description of the uLight update menu.

To check the current firmware version, go to the Device Information menu, each device has a separate menu.

1. Information about the firmware version of the On-Board Computer.

2. Information about the firmware version of the Controller.

3. Information about the firmware version of the uLight.

The list of actual firmware to be downloaded:

8 April 2024

uLight v0.6.8 

Unzip before update!

Added brake 'Brk' to button inputs for functions.

Removed reverse when CAN buttons active.

2 Feb 2024

uLight v0.6.6 

LEVCAN updated.

Added to functions 4 configurable signals with button input.

Added configurable logic: AND, NOT, OR, XOR, as another button type.

22 Dec 2023

uLight v0.6.5 

Small update:

Added brake button selection for only light indication without actual braking.

30 September 2023

Recommended to update display first! Export configurations before update and import after to save your settings.

Controller v0.8.13 

 

Added reset handlers

Added quick battery voltage setup

Fixed dc-dc mode for P24F

Added LR detect indication

Throttle/brake error replaced with 'not connected'

Added temperature sensor detect logic when sensor disabled

Added access level selection

Added boost mode duration

Fixed active braking stutter

Adjusted square control duty cycle

Display v0.82B   

Added access level menu support

Fixed some freezes

Fixed displayed mode with multiple motors

21 July 2023

Controller v0.8.12 

 

Added MPPT solar logic

Added throttle lock when brake pressed

Fixed FOC 'square' noise

The added neutral mode by timer

The button now turns off without the need to release it

Active braking fix when not enabled (stutter fix too?)

Added motor gear ratio

Speed kp changed the default to 0.1

Added separate throttle mode power+torque

Fixed storage erase when both banks are full

Increased ampere offset at startup for plate

Added power indication in the Converter menu

Small parameter text fixes

Added continuous logging mode

Temperature calculation moved to a separate file

Current calibration now only saved when the test finished

Added error when current calibration out of range

Battery min charge current can be set to 0 now

Added NTC10k3500

Added file flush when log rate slow

Added ADC sample timetable

Logger settings offset calculated automatically

FOC ADC current sample for P24F changed from ADC3 to ADC1+2

Remove low speed for changing HZ mode

Added cruise-ready flag

Added throttle lock when brake pressed

Added low ripple PWM mode (for FOC)

DMA removed, because of triple buffering (noise fix)

Added throttle-locked flag

SVM sector selection moved to a separate function

Added lock flags index by function name

Increased default throttle response

Advanced modes now have default throttle = torque

1 July 2023

uLight v0.6.4 

 

Added export/import

Added kty84 tsensor

Added hazard switch logic, works when everything is off

Added brake strobe effect

Added data that can be requested over LEVCAN

7 May 2023

Controller v0.8.11 

 

v0.8.10:

Added Adaptive throttle mode (by default with 6%)

Added Power throttle mode

Added PAS scaling with buttons

Added Torque sensor minimal pressure for insta-start

Forwarded hall error to display flag

Changed hall error detection logic

DC-DC now shows current on each phase

Added TF21904M potential driver fix

PhaseResponse added phase selection

Updated flag names for sensor errors

Added phase currents and voltages for LR detect

Added PAS voltage filter

Added PAS voltage selection (throttle or vpas)

Added new inputs (I1-I13)

Inputs renamed

Added checks to HWPort HAL

Added t-sensor resistance compensation

Added DAC current protection temperature correction, needs optimization

Added 5V for FW

VBUS calculation moved to RAM

Added FreeRTOS-gcc workaround

R detection now uses 50% pwm as offset

New timer sync method for upcounter mode (R detect)

Motor LR auto detect enabled

Added AN brake input 'switch' detect by dV

Added MTPA enable detect when inductance is 30% bigger

Added hall input filter

Added hall step forward filter with min step time

Added fallthrough directives

Added parameters size check as warning

Fixed inputs array position

Motor LR moved to the last detection position

Added local port input filter

Added Enable Throttle function (opposite to Disable Throttle)

Added Hall sensor minimal step time

Added wait code for R detect

Fixed voltage error on R detect

Fixed negative flux linkage

Disabled MTPA, FW, and other options for hall calibration

Added Adaptive throttle to adv. modes

Control structure optimized

FOC FW improved, should not stuck

Vq limit removed, now it is by default

Added (by default) MTPA mode by real Q current

Small FOC optimizations

Added TIM1 as a variable to linker script

Hall code moved to upcounter while FOC in down-counter (buzz fix #1)

DMA is now in circular mode, it needs less code with same effect.

Added noise suppression in vq vd to decrease sector change (buzz fix #2)

Storage updated, improved reliability, and now with version system

Fixed invisible fault flag in logger

Updated logger defaults

v0.8.11:

Small optimizations

Logger FOC parameters replaced to filtered values in fast mode

Data Storage unit-test updated

Fixed a few bugs in Data Storage

LEVCAN updated with recent bugfixes

Added additional tests for Data Storage

Startup junk removed

Logger fixed hang-on display disconnect

Logger cache moved to SRAM2

FOC pids rolled back to v0.8.9

Speed max increased to 200%

Display v0.80B 

 

Changed voltage drop saving

Fixes in LEVCAN

Fixes in flash saving

Fixed RPM in info lines

v0.80B: Data Storage updated with latest fixes

8 Febrary 2023

Controller v0.8.9 

You will need to run new motor detection after update!

This update fixes issues with the reverse function of the previous release and also some problems with recently made controllers. There are known issues with starting under high currents that will be investigated later.

 

Added interrupt setup logic.

Added High V ripple flag for plate controller.

Added middle DAC offset from raw ampere calibration.

Fixed EXTI-PR register reset in the main logger.

Fixed Neutral for the master controller.

DAC offset updated for the plate.

Fixed square wave plate reverse.

Fixed reverse sensorless startup logic.

Added hall idle parameter.

Hall angle fixed, now transition with offset, when not interpolated — no offset.

Added fix in HW config for TF21904 drivers (shipped after Dec 2022 till Feb 2023).

Added fault flag to the logger.

FOC has removed the extra current at the start.

FOC angle now has no offsets.

FOC sectors moved to match the square wave.

FOC added an additional dead time gap.

Added load defaults by section.

14 October 2022

Display v0.75B 

Export configuration before the update, update the Display, and then import your config!

Added menu for forced device update.

 

Added passwords for devices menu and main menu.

Configurable max visible speed in statistics.

Fixed some SD card issues, and added exFAT support (not for display update).

Added phase current bar min/max setting.

Added menu for forced device update.

Fixed brake voltage inversion.

Fixed Wh calculator for high power.

Removed info line scroll in info line theme.

Phase current now showed as Ap.

26 September 2022

Controller v0.8.8 

Export configuration before the update, update controller, load default settings, and then import your config!

 

Added motor angle to logger

Fixed errors in combined transition logic

Fixed clutch negative current spike

Added FOC vq limit parameter for QS165 motor

Fixed reverse operation for vq limit

Current calibration fix for shunt

Levcan got an update on ParseParameterValue

Fixed PWM minimum time for TF driver (FOC)

DAC constant updated with calibrated value

Position sensor temporary fix for FOC when not interpolated

Added remote throttle timeout (locked screen full throttle bug)

Many small fixes for assembly testing

8 August 2022

Controller v0.8.7 

 

Fixed sensor logic for square wave

Fixed adc issues but still should be improved

ADC logic changed to more future-proof

Added configuration import with button

Added import lock when motor spinning

Moved PLLs to separate file

Fixed current spike on brake press (filter abs duty)

Removed 'hall invalid' logic from interpolation start

Improved speed control for reverse from forward movement

Position sensor logic separated

USB code deleted

Stop PWM on debug added to pwm hal

SQ have sensorless interpolation

Interpolation logic improved

Deleted global PositionSensor variables

Fixed speed reference NaN

Added diagnostic mode to state machine switch

Fixed few diagnostic issues

Live hall angle update in menu

Added NaN checks for hall

Adjusted detected angle for first step

BEMF now have one extra step to skip spike, in case if it falls slowly

Detection sensor state fixed, caused motor to stall

Added frequency startup logic for sensorless square wave (yay!)

Frequency control used for sensorless startup now, default changed to 2

Added encoder position sensor

Pullup control removed

Added encoder menu

Added encoder detection

Updated position sensor logic, detection routed through it

Added hall detect quick fail

Swapped hall inputs to match timer index

Speed calculation changed

Rads calculation moved to Position sensor file

ERPS counter upgraded with direction filter

Encoder angle calibration added

RCPWM disable-exit added

Added pwm port assignment to encoder

Torq sensor exit added

ADC ports reassigned

Few parameters live update fixed

Added encoder info to device info menu

Added E suffix for Encoder

OV and UV flags separated

Test bench code moved to separate file

Includes optimised everywhere

Square wave current offset disabled on next step now

FW added better enable logic, to help avoid extreme brake power on FW

Added few FOC optimisations

Added FOC vq limit before vd-vq vector limit, to let vd do field weakening more (unlimited vq caused worse FW perfomance and sometimes it was stuck)

SQ added DC current dead time compensation

Added out of control detection logic

Added serial number

Added calibration constants

Added calibration logic when checking hardware

Added FreeRTOS stack monitor

Optimised testing procedure for faster test

Updated critical task enter routines

Fixed field weakening integral kick if foc is forced shutdown

Changed PWM Freq to constant

Position sensor menu updated

Over-Field weakening flag logic fixed

Fixed PAS menu parameter update

Moved foc square-boost to sector switch logic

Added PLL low speed smoother logic

6 April 2022

uLight v0.6.3 

Fixed T1/T2 settings menu.

Now possible to disable the turn signal blinking by setting 0 sec.

23 March 2022

Controller v0.8.6 

 

Field Weakening PID updated.

Added FW limit based on motor temp limit.

Decreased allowed FW vector size to 80%.

Config defaults decreased.

Added locks 10 seconds on temperature exceeding.

Small menu changes and export fixes.

20 January 2022

Critical update for new controllers and hotfix for controllers 6F/12F and old 24F. Export config before the update, load defaults after the update, and import your config.

Important!

If your On-board computer has firmware v0.60B or lower and Controller v.7.18 and lower, first, need to update all devices but display. Because menu protocol is new and old devices will not be visible in the menu. After the update is finished hold the left button few seconds to exit the updated device menu. If the button does not work you may need to reset the power supply or replug CAN cable in the On-board computer. After everything is updated — update the On-board computer. Make a controller reset (load defaults) after the update. We recommend running motor detects again on controllers. Detection of throttle/brake connected to display should be done in the On-board computer menu.

Controller v0.8.5 

 

Save system updated, added unit tests.

Added clutch shutdown when brake pressed.

Added option to enable MTPA.

USB for computers disabled by default, will be removed in the future Fixed P1 P2 PWM mode.

Lifetime temperature now calculates only when motor powered.

Added hall pullup disable option.

Various save system fixes.

Fixed NaN for resistance detection.

Fixed import of 1st parameter in every section.


Hotfix for 6F/12F and old 24F.

18 October 2021

First, need to update all devices but display. Because menu protocol is new and old devices will not be visible in the menu. After the update is finished hold the left button few seconds to exit the updated device menu. If the button does not work you may need to reset the power supply or replug CAN cable in the On-board computer. After everything is updated — update the On-board computer. Make a controller reset (load defaults) after the update. We recommend running motor detects again on controllers. Detection of throttle/brake connected to display should be done in the On-board computer menu.

Display v0.71B 

Menu redesigned.

All display settings moved to separate menu.

Added port input state in port settings.

Added port functions: disable backlight, lock screen.

Added separate hotkeys while charging.

Added option to use hotkeys with a short click.

Added throttle/brake settings which are connected to display.

Added global odometer setting.

Global stats reset will not reset odometer now.

Added parameters import/export.

Added icons on the main screen (brake, brake limit, turtle mode, motor/controller fault, battery fault).

With new controllers update speed is 6 times faster now.

Logger speed should work faster too.

Added text scroll in the menu.

Logo updated.

Added more informative messages for resets with a password request.

Added parameters that could be requested from display on CAN bus.\\</WRAP> === v0.71

Fixed some parameter editing.

Updated import/export.

Odometer now can be imported, value is not decimal now.

Fixed button blinking while typing a password.

Fixed charge screen, button blinking fixed.

Fixed info-lines names.

Fixed header for password message.

Controller v0.8.2 

 

Added glitchy USB to controller (needs a USB cable connected to PWM port).

Completely new LEVCAN parameters protocol with more possibilities.

Added trip statistics menu to controller:

-Wh regen/used/total.

-Ah regen/used/total.

-Estimated motor efficiency realtime and average.

-Calculated motor torque (on shaft).

Temperature measurement now calculates t-sensor resistance.

Improved kV detection.

Fixed 'bug' with long brake response on slow current change speed for acceleration limit.

Defaults for all ports now OFF.

Added brake button % (percentage of brake phase current for button-brake).

Added brake on released throttle (brake phase current).

Motor inductance and resistance detection for MTPA.

MTPA logic (works good only with IPM motors).

Fixed FOC FW to be triggered at stop when braking.

Added more control CAN commands.

Added more parameters that could be requested from controller on CAN bus.

Added more logger parameters.

Added hall filter settings to debug stuttering.

Added prefix selection for controller name.

=== v0.8.2

Added log header option.

Added translation for some messages (RU).

Added error messages for throttle/brake detection.

uLight v0.6.1  

 

New LEVCAN parameters protocol.

Fixed PWM IO settings, now they do work.

Added temperature sensor thresholds, they work as virtual button for functions.

Added ability to send button inputs to CAN bus.

Main program source code published on GitHub:

https://github.com/Nucular-tech/uLight

31 August 2020

Use configuration export before update, reset defaults after update and import configuration.

Display v0.60B 

 

Fixed throttle drop.

Small menu fixes.

LEVCAN updated.

Button setup simplified, by default all set to CAN mode.

Added exFAT support (but display still can be updated only from FAT32).

Added charge screen.

Added fast statistics type selection.

Added wider event window.

Mph stats fixed.

Controller v0.7.18  

 

Experimental logger added.

Fixed many charger glitches, however still have few.

Added soft start to charger and more safe phase detect.

Completely reworked field weakening, now should not have any hard braking after release.

Added minimum speed reference for speed PID.

Added RC PWM control on P1 port (throttle/brake).

Added more logger parameters.

Few important FOC control fixes, DC current should be calculated better under field weakening.

Fixed one weird ultra-rare bug in square mode.

LEVCAN operates on queues now, log time 2x faster when display updated.

Decreased DCi Ki default from 500 to 200.

Slightly decreased FW start point.

Added full debug info export.

Added logger mode selection and tuned logger start.

Removed first line from log for easy datazap upload.

Throttle / brake curves added (8 point configuration) with presets.

PAS extra scale added for additional modes.

Soft acceleration for cruise added, more shutdown triggers.

Cruise logic updated - phase current limited by selected mode, not throttle position.

Minimum cruise speed - limits cruise activation.

Cruise increment/decrement - control cruise speed with buttons ( port = CR+/CR-)

Cruise restore - recovery last saved cruise speed with button, activated only above min cruise speed. (port = CRr)

Power limit added to modes and battery configuration. 0 = power limit disabled.

Small menu fixes.

CAN inputs increased to 16.

Parameters export / import fixes.

12V shutdown fix.

18 March 2020

Display v0.59B 

HOTFIX for display speed sensor

11 March 2020

Display v0.58B 

 

Fixed 0V throttle issue.

Fixed charge statistics reset.

Added kmh/mph switch.

Added more parameters to info. lines on main screen.

Added hotkey mode for compatibility with controller speed functions.

Fixed contrast setting.

Added driving range, calculated from WH usage.

A lot of tiny fixes.

Controller v0.7.12 

 

Torque PAS fixes

Fixed configuration import for advanced modes

Added configuration selector from 1 to 9

Import will show first line of configuration, you can put a comment here

Fixed N mode

Fixed motor wiggle at charger mode

Added more debug information

21 Nov 2019

HOTFIX, fixed NaN error for analog inputs.

Controller v0.7.9 

20 Nov 2019

Export configuration (or make screenshots), after controller update do “Erase data storage” and reboot. Configuration will not be imported fully, some values will need to enter manually.

Display v0.57B 

 

CAN buttons setup

Inverted inputs setup

Statistics reworked

Added filters for analog inputs

Controller v0.7.8 

 

Big menu update

Control logic completely reworked for future compatibility with BMS

New default values for PIDs

DC-DC low voltage difference charge fixed

Inverted brake input added

Specific setup for 3 positional speed switch added (can work now as 1-2-3)

Button/switch select for usual speed select input

Save CRC calculation fixed

New speed mode - neutral

Speed increment and decrement added

Added t-sensor NTC 10k B:3380

Reboot command added

Fixed field weakening over 126%

Fixed VBUS measuring, now it is at PWM frequency, significantly improved overvoltage protection

Added median VBUS filter

Added averaging of N-X ADC samples filter for throttle and brake

Fixed brake glitches

Current measuring fixes for better measuring on 6F board

When enable button configured controller will not turn-on anymore when power applied

Autodetect improved, more informative, short-circuit detect added and timeout fixed

Added lock-at-turn-on, will lock throttle untill password on-screen is entered

Voltage on phases detect added, will lock controls

UVLO added

Added “Advanced modes” menu with more specific options per mode

Personal throttle protection lock for CAN source or local

Motor temperature limit for charger (DC-DC)