News

Encoder support

Hello comrades!

In 2021, we hoped that the situation would stabilize in 2022. What do you think now about the situation in the world? Do you miss Covid? Our hair stood on end in the previous year, and now it's gray. Despite the difficulties, we continue to work hard and are introducing a big update to the firmware and 24F controllers.


Encoder support in 24F controller

The new version 24F with orange phase wires now supports an encoder (rotation angle sensor). Now you can order the Hall sensor version and the Encoder version. Differences in connectors.


Anticipating questions about the compatibility of wiring and sensors, we answer:
Halls > Encoder — if your controller has a connector for Hall sensors, then you can make an adapter for the encoder yourself. But, in this case, you will not be able to move when you turn it on, you will need to push the electric bike with your feet to start.
Encoder > Halls — if your controller has an encoder connector, then you can make an adapter for Hall sensors yourself. Everything will work.

We do not plan to make adapters yet. As for Sur-Ron and Talaria, you can order:
  1. 24F controller with wiring for Sur-Ron with factory motor in Halls. Everything is unchanged here.
  2. 24F controller with Sur-Ron wiring and encoder connector for those who want to replace a standard Sur-Ron motor with the new QS165 with an encoder.
  3. Controller 24F with connector for encoder motors. There is no wiring for Talaria yet, it is in development. But you can connect the throttle and brake handles to our On-board computer.

QS company also prepared for us a special version of the 165 motor with an encoder connector that is compatible with our 24F controller. The price is 500 USD. Motors are in stock, but the lot is limited.

QS165 Nucular edition


Tech specs:
Type IPM MPSM
Rated power 5kW
Maximum power 8kW
Torque 47.5Nm
Weight 7 kg


Serial numbers

The second important update is the serial numbers for controllers manufactured from 01 Jul 2022. Take a photo or write down this number and keep it separate from the Controller. You may need it when requesting repairs or if the Controller is stolen. After updating the firmware to 0.8.7, in some versions of controllers manufactured before 01 Jul 2022, a serial number may also appear. Check after the update.


Firmware 0.8.7

This is probably one of our biggest controller updates. You can download the firmware from this link. List of updates:
  • 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
For a description of the new menu, see our Wiki in the Controller section.

And now more about the most important updates:


Encoder

In the menu Controller > Motor Setup > Position sensor, the Encoder settings section has been added. The parameter values in each of the items will appear after passing through the Auto-setup procedure. The type of sensors is selected in the Sensor type menu item. Now the controller supports two types of sensors - hall sensors and incremental encoder.
All menu items for configuring Hall sensors have been moved to the Hall settings menu section. The Sensor pullup menu item has been removed, this setting is no longer required.


Instant config upload

In the menu item Controller > I/O configuration, each port has a new function CL1-CL5 — instant configuration import by pressing the CAN button (up to five different configurations). For correct import, the function number must match the number in the name of your configuration file. For example, a CL3 function would correspond to a file called ncconf3.cfg. 
See here for a description of how to configure this feature. How to use it, well, you know :-)


The new status flags

To learn more about the results of mockery of controllers, there are new items in the menu section Controller > Status flags:
Control fail — the controller was not able to smoothly turn off the electric motor in time. Values On and Off. 
12V protection — error on the 12V power line. Values On and Off.
Code error — error executing firmware code. Values On and Off. Let us know if this error occurs.
Thread error — processor overload. Values On and Off. The error is not critical, let us know if it occurs.
ADC sample error — software error of the analog-to-digital converter (ADC). Values On and Off.
VBUS sample error — supply voltage measurement error. Values On and Off.


New information in statistics

In the menu section Controller > Statistics, new important data on the operation of your controller has appeared:
Min bat. voltage — minimum battery voltage, in Volts (V).
Max phase curr. — maximum phase current, in Amps (A).
Peak power — maximum controller power, in Watts (W).
Max motor temp. — maximum motor temperature, in degrees Celsius (°C).
Max controller temp. — the maximum temperature of the Controller, in degrees Celsius (°C).


More information about the device

In the menu section Controller > Device Information, there are three new items:
Encoder speed — 26kHz or 580kHz (new Controller version with orange phase wires).
Production date — date of manufacture of the controller.
Serial number — serial number of the Controller (for devices manufactured from 01 Jul 2022). 


Controllers 6F and 12F

There is still a shortage in the microelectronics market, and the rise in the cost of components and processors. In general, unfortunately, we can't produce 6F and 12F this year.  We decided to switch to more modern technologies, redesign both controllers andrelease the batch, we hopefully in 2023.


BMS16S and BMS24S

Development of the BMS16S has been suspended for the time being on the fifth prototype. We plan to start production together with 6F controllers, as this BMS will be a good addition for low power e-scooter batteries. The development of the first BMS24S prototype has been completed, working samples have been made, we are starting tests on the batteries of our Nissan Leaf. As they say, Breaking Bad. BMS24S will have several non-trivial solutions for the BMS market. We will tell you about these ideas after the tests are completed and the BMS24S is ready for sales.


Thanks for your attention! Peace to the world.
Nucular Team