{{ app.location == '' ? "Xiaomi Scooter Motion Control" : app.location.substring(0, 1).toUpperCase() + app.location.substring(1).replace('-', ' ') }}

Except it's Kearfy's fork.

About this fork

Hi there, my name is Micha and I am actively developing software for the xiaomi scooter motion control modules.
The project has originally started by Glenn (repo), I continued on his work based off of the V1.3 fork and started the V3.X releases.

My fork contains many quality of live features including but not limited to:

  • Drives the speed that you kick yourself.
  • Allows you to make kicks while driving.
  • Makes the kicks easier and supports you better the faster you go.

Other options / forks

There are a few mentionably forks. I put them here as I believe that there is not a single best option for every use case. Maybe a different software works better for you than mine, and that is the most important thing in the end.

  • Glenn (original): This is the original project from which many forks have evolved themselves.
  • Job (very stable): Job is the one making most of the conversion kits. This is the software he flashes on to them by default.

Configuration

Here is an overview of the configuration options, what they do and the best value to configure them with. The options only hold for the latest release, but often they will be the same for older versions.

Option Default Description
speedBump 3 Defines how much km/u increasment is detected as a kick.
minimumSpeedIncreasment 6 The least the speed should increase when a kick is made. Only when enforced.
enforceMinimumSpeedIncreasmentFrom 16 When surpassed, the above rule will be enforced.
lowerSpeedBump 0.9875 Ensures that the speedBump will be lowered after certain speeds.
speedBump * speed ^ lowerSpeedBump
forgetSpeed 10 After how much speed has dropped should the target speed be forgotten.
baseThrottle 45 Used in the speed / throttle calculation.
baseThrottle + ((requestedSpeed + additionalSpeed) / maximumSpeed * 188)
additionalSpeed 0 Used in the speed / throttle calculation.
See calculation above.
minimumSpeed 7 What is the minimum speed the vehicle should drive. Generally 2 km/u higher than actual value.
maximumSpeed 27 What is the maximum speed the vehicle should drive. Generally 2 km/u higher than actual value.
startThrottle 5 How much km/u should the vehicle surpass to start throttling.
kicksBeforeIncreasment 1 How many kicks should be made before the vehicle should increase it's speed. Only applied in the driving state.
breakTriggered 47 Sensitivity of the brake handle. Only change if you know what you are doing!
drivingTime 5000 Defines how long one boost should last after a kick has been made.
kickResetTime 2000 In what time span do multiple kicks need to be made before the counter is being reset.
kickDelay 300 How much time must there be between two kicks. Filters out false kicks after a kick has been made.
increasmentTime 2000 How long to wait for another kick before switching back to driving state.
historySize 20 Used to calculate the average speed.
THROTTLE_PIN 10 Arduino pin where throttle is connected to (only pin 9 & 10 is ok to use)

States

Explanation of the multiple states and how the vehicle will act when one is active.

State Description
READY The vehicle is waiting for the initial kick to be made and will switch over to the increasing state.
INCREASING The vehicle is increasing in speed. The driver will need to make just a single kick to increase it's speed. If no kicks have been made in a certain time, the vehicle will switch over to the driving state.
DRIVING The vehicle is driving at a fixed speed. When a driver makes a certain amount of kicks within a certain time, the vehicle will switch over to the increasing state. If no kicks have been made after a certain time, the vehicle will switch over to the driveout state.
BREAKING The vehicle's brake handle has been pulled and exceeds a certain threshold. While this is true the module will lower the throttle to 0% and wait for the brake handle to be released. Once the brake handle has been released and the speed exceeds the averageSpeed + speedBump, the vehicle will throttle the current speed and the vehicle will switch over to the increasing state. In case the speed drops under the start speed it will switch back to the ready state.
DRIVEOUT The vehicle has left the driving state as the driving time has exceeded. If the speed drops a certain amount, the last driven speed will be forgotten and set to 0. If the speed exceeds the averageSpeed + speedBump, the vehicle will throttle the current speed and the vehicle will switch over to the increasing state. In case the speed drops under the start speed it will switch back to the ready state.

Version 3.4.3 Download V3.4.3

A few minor changes have been made, upgrading is not neccesary.

  • Patched issue where total time driving was driveTime + increasmentTime, thus driveTime should now be accurate.

Version 3.4.2 Download V3.4.2

A few minor changes have been made, upgrading is not neccesary.

  • Updated default config options to ideal values. Default values should now be sufficient for all Xiaomi models.
  • Updated kick detection in driveout state as it calculated the speedbump based on actual speed instead of average speed.

Version 3.4.1 Download V3.4.1

A few minor changes have been made, upgrading is not neccesary.

  • Changed default value for lowerSpeedBump to 0.9875 since kicks at higher speeds were impossible.
  • Added forgetSpeed since you could currently drive out from 25km/u to 6km/u, make a kick and go full speed again.
  • Made small changes in the behaviour of the DRIVEOUTSTATE.

Version 3.4 Download V3.4

Skipped 3.3 due to number of issues. Upgrading is very much recommended.

  • Added a option to set a minimum speed for when the minimumSpeedIncreasment will fire at first.
  • Added baseThrottle and additionalSpeed to be able to easily adjust the calculatedSpeed within ThrottleSpeed.
  • Added a kickDelay. This is the minimum time before another kick can be registered again.
  • Switched to timers based on the millis() function. No memory exhaustion anymore!
  • Added a DRIVEOUTSTATE to prevent false kicks after the boost has expired.
  • Probably more changes, cleaned up a lot of stuff.

Version 3.2 Download V3.2

The issues have been resolved. It is now possible to percentually lower the speedBump per km/u speed with the lowerSpeedBump option.

A few recommended values have been provided.

Version 3.1 Download V3.1

This is the first release of V3 (This variation of the firmware).
It is a proof of concept and works unexpectedly well. The two issues that exist in this build are:

  • that the expected speeds are not consistent with the actual speed obtain from the vehicle.
  • and, and issue in the concept, that it's a little bit hard to speed up above 18 ~ 20km/u.

Latest version & instructions

Obviously, I encourage you to download the latest version of the software and to always keep it up to date.

For flashing instructions, I kindly refer you to stepombouw.nl.

Older versions

Disclaimer: The use of older firmware version is strongly discouraged as they often contain bugs and don't act optimal.

Version Release notes Download link
{{version}} View release notes ({{version}}) Download {{version}}
404 page not found