shfw-walkthrough/README.md

146 lines
7.4 KiB
Markdown
Raw Normal View History

2023-09-23 15:05:30 +02:00
# shfw-walkthrough
## Quick SHFW Configuration Walkthrough
### Project Description
2023-09-25 09:51:52 +02:00
SHFW is a custom firmware available for flashing via the Scooterhacking Utility app. Configuring it might be challenging for new users. This guide aims to provide a quick and easy way to apply the important basics. The understanding aspect of all this can be overwhelming, but it will come as a side effect of your own testing and thinking as we can't do that for you.
2023-09-23 15:05:30 +02:00
### Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Ninebot G30](#ninebot-g30)
2023-09-28 09:18:19 +02:00
- [Xiaomi Pro 2, 3](#xiaomi-pro-2-3)
- [Xiaomi Essential, Lite, 1S](#xiaomi-essential-lite-1s)
2023-09-26 12:47:12 +02:00
- [Field Weakening Calculations and Logic](#field-weakening-calculations-and-logic)
2023-09-23 15:05:30 +02:00
### Installation
To install SHFW, follow these steps:
1. Download the flashing app from [https://utility.cfw.sh/](https://utility.cfw.sh/).
2. Supported Scooter Models:
- **Ninebot G30**: You can flash this firmware if the DRV version is at 1.7.0 or below. For DRV versions above 1.7.0, you'll need an ST-link. Refer to [https://joeybabcock.me/wiki/STLink_Ninebot_Max_ESC](https://joeybabcock.me/wiki/STLink_Ninebot_Max_ESC) for more information.
2023-09-23 15:05:30 +02:00
- **Xiaomi Scooters**: If the BLE version is at or above 1.5.7, you'll need an ST-link. There are online guides available for this process.
2023-09-23 15:05:30 +02:00
3. Flash Procedure:
- Ensure you have the correct scooter model.
- Open the utility app, connect to the scooter.
- Press "Load Custom" and select SHFW.
- For G30, it's recommended to select the 187 DRV base.
2023-09-24 21:33:08 +02:00
- If you have the new G30 motor then select the new motor option under the system config tab as well.
2023-09-23 15:05:30 +02:00
### Usage
Please be aware that the information provided below is intended for practical use, but it should be used with caution.
2023-09-23 15:05:30 +02:00
#### [Ninebot G30](#ninebot-g30)
To achieve the top speed for Ninebot G30, follow these configurations:
2023-09-24 21:31:45 +02:00
1. Set sport DPC curve to 30A with a flat curve (0.0 linear).
2023-09-23 15:05:30 +02:00
- Configure the other modes as desired, preferably lower than sport for logical reasons.
- Set the brake to 40A with a flat curve.
2. Go to the field weakening tab and:
- Enable field weakening for sport mode.
2023-09-26 12:41:42 +02:00
- Configure as follows: 20 km/h, 0A, 1500.
2023-09-23 15:05:30 +02:00
2023-09-23 19:39:34 +02:00
3. Default tire size for G30 models are 10", but set 9.3" to get the dash speed to match GPS speed.
2023-09-28 09:18:19 +02:00
#### [Xiaomi Pro 2, 3](#xiaomi-pro-2-3)
2023-09-23 15:05:30 +02:00
2023-09-25 13:33:36 +02:00
For Xiaomi Pro 2 and mi3, use the following configurations:
2023-09-23 15:05:30 +02:00
2023-09-24 21:31:45 +02:00
1. Sport mode, DPC, 27A, flat curve (0.0 linear).
2023-09-23 15:05:30 +02:00
2. Go to the field weakening tab and:
- Enable field weakening for sport mode.
- Configure as follows: 20 km/h, 0A, 1300.
2023-09-28 09:18:19 +02:00
#### [Xiaomi Essential, Lite, 1S](#xiaomi-essential-lite-1s)
2023-09-23 15:05:30 +02:00
2023-10-03 17:03:40 +02:00
For Xiaomi Essential Lite, use these configurations:
2023-09-23 15:05:30 +02:00
2023-10-03 17:03:40 +02:00
1. Sport mode, DPC, 16A, flat curve (0.0 linear).
2023-09-23 15:05:30 +02:00
2. Go to the field weakening tab and:
- Enable field weakening for sport mode.
2023-09-24 21:31:45 +02:00
- Configure as follows: 13 km/h, 0A, 1000.
2023-09-23 15:05:30 +02:00
The rest of the configurations are up to you. Feel free to explore and set up profiles according to your preferences. Your imagination is the limit.
### Field Weakening Calculations and Logic
#### What is Field Weakening?
2023-09-23 15:05:30 +02:00
Field weakening is a technique commonly used with 3-phase electric motors to achieve higher speeds in electric vehicles like scooters. It allows the motor to operate beyond its rated voltage and rpm, which can result in increased top speed. However, implementing field weakening comes with trade-offs, including increased battery usage, higher motor temperatures, and potential additional expenses.
2023-09-23 15:05:30 +02:00
#### Field Weakening Flux Calculation
2023-09-23 15:54:05 +02:00
2023-09-24 13:39:36 +02:00
The calculation for field weakening flux is as follows:
field weakening flux = initial + ("current speed" - "field weakening start speed") * (variable / 1000)
- `initial`: The initial value of the field weakening flux.
- `"current speed"`: The current speed of the scooter.
- `"field weakening start speed"`: The speed at which field weakening should start.
- `variable`: A parameter that influences the rate of flux increase.
#### Recommended Field Weakening Settings
2023-09-24 21:33:08 +02:00
As per my experience and testing, it's recommended to keep the initial value at 0 and adjust the other parameters to achieve around 30-35A of requested flux. This range is believed to provide the best riding experience while balancing performance and safety.
The calculations and principles discussed in this section have been applied to configure the examples for the scooter models listed in this guide. These settings can vary depending on the specific scooter model and user preferences.
2023-09-23 15:54:05 +02:00
2023-09-28 12:42:50 +02:00
#### Upcoming Features
2023-09-28 13:55:56 +02:00
*To clarify, none of these features mentioned below are in any way guaranteed to be kept in the final release or guaranteed to be kept working the way described below.*
2023-09-28 12:42:50 +02:00
- **Brake Boost**
- Brake boost is designed to significantly enhance e-brake performance, delivering powerful and responsive braking capabilities. However, it's essential to exercise caution when utilizing this feature. Excessive use of brake boost can lead to wheel lock-up, which, in turn, can have a detrimental impact on overall braking distance and stability. This situation is particularly concerning for riders who need to maintain control during emergency braking scenarios. Furthermore, forward-wheel-drive (FWD) scooter users, such as Xiaomi riders, should be especially mindful when applying brake boost. Incorrect usage of this setting can potentially result in the scooter's front wheel lifting, leading to a front flip if not managed properly. Striking a balance between increased braking power and maintaining safe and controlled braking performance is paramount.
- **Acceleration Boost**
- Acceleration boost provides additional torque in low RPM scenarios, significantly enhancing the scooter's overall performance and acceleration. This feature delivers an exhilarating and responsive riding experience. Users are encouraged to experiment with this setting to determine the level of acceleration that best aligns with their preferences. However, it's crucial to exercise caution, particularly in situations where traction and control are critical.
- **Further Customization**
- *Field Weakening*
- Flux Til Start: This setting provides a static amount of flux up until the field weakening activation speed. It can offer additional acceleration speed at the expense of slight vibration and increased battery usage.
- The option to dynamically trade flux current to torque current has also been added. Mostly meant for those that want flux for acceleration purposes instead of maxing out top speed.
- *Phase Limits*
- Phase limits are customizable for torque and flux. The default settings are 65A for torque and 30A for flux.
2023-09-23 15:05:30 +02:00
2023-09-26 12:47:12 +02:00
#### ADC modding info (upcoming)
2023-09-25 20:33:54 +02:00
130k original 10s->12s (13s not really safe but works)
2023-09-25 20:34:34 +02:00
2023-09-25 20:33:54 +02:00
160k 13s
2023-09-26 12:47:12 +02:00
2023-09-25 20:33:54 +02:00
200k 15s
2023-09-25 20:34:34 +02:00
2023-09-25 20:33:54 +02:00
240k 16-17s
2023-09-25 20:34:34 +02:00
2023-09-25 20:33:54 +02:00
270k 20s
2023-09-23 15:05:30 +02:00
### License
This project is licensed under the [MIT License](LICENSE).
2023-09-24 11:55:14 +02:00
Please review the [LICENSE](LICENSE) file for detailed terms and conditions.
2023-09-23 15:05:30 +02:00
**Note**: The MIT License is applied to this project. While it allows for wide use and modification, it comes with no warranties or guarantees. The project contributors and maintainers are not responsible for any issues, damages, or liabilities that may arise from the use of this software.
2023-09-23 15:05:30 +02:00
### Author Information
2023-09-25 13:33:36 +02:00
This guide has been written by **lekrsu**, who can be reached on Discord with the tag `lekrsu` and on Telegram with the username `lekrsu`. You're welcome to send a pull request if you feel like the information needs correction.