scooterhacking / scooterhacking-issues-public

GitHub Issues for bug reports and feature requests for Scooterhacking Tools
9 stars 0 forks source link

BUG: Scooter behaves as if the field weakening doesn't work #66

Open SpookieGames opened 4 months ago

SpookieGames commented 4 months ago

Scooterhacking Tool

Firmware (SHFW)

Type of issue

Performance issue

Severity of issue

high (major functionality broken, no workaround)

SHUT Version

2.5

SHFW Version

0.3.7

Scooter model

Xiaomi Pro, Pro2, 1s, essential, 3

Description of the Bug

Scooter behaves as if the field weakening doesn't work. It uses less power than on 0.3.6 (by about 150W) and and the max speed on flat ground is like 33-34 while it was 40+ on the older version. I'd like to try to go back to 0.3.6 so that I can test it out it's not a hardware issue but a software issue.

Steps to Reproduce

  1. Have my scooter
  2. Put in the setting from the guide
  3. Scooter seems to not activate field weakening/not power it right

Expected vs. Actual Behavior

Expected = scooter works fine (same as 0.3.6) Actual behavior = scooter is slower than on the older version

Contact Information

spookiegames

bodydisplaynone commented 4 months ago

Did you try resetting ALL your shfw settings with? It should work after that.

SpookieGames commented 4 months ago

Did you try resetting ALL your shfw settings with? It should work after that.

It was the first thing I did. I'm gonna buy a new ESC and test it out on it.

VPSA132 commented 4 months ago

Hi. I have the same problem. FIELD WEAKENING does not work. After turning on this function, the scooter goes slower than without it. In the application menu I only have the INITIAL CURRENT function. No VARIABLE CURRENT mA/km/h function as in the previous version. Application bug or intentional action? 1713883940714

bodydisplaynone commented 4 months ago

Enable expert view. Reset ALL settings. Then configure everything again.

On Tue, 23 Apr 2024, 4:53 pm VPSA132, @.***> wrote:

Hi. I have the same problem. FIELD WEAKENING does not work. After turning on this function, the scooter goes slower than without it. In the application menu I only have the INITIAL CURRENT function. No VARIABLE CURRENT mA/km/h function as in the previous version. Application bug or intentional action? 1713883940714.jpg (view on web) https://github.com/scooterhacking/scooterhacking-issues-public/assets/167891155/4f44ab4d-a0eb-4463-8719-88352547d2ab

— Reply to this email directly, view it on GitHub https://github.com/scooterhacking/scooterhacking-issues-public/issues/66#issuecomment-2072566423, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFM4KFGPTGKS5FY3LW2CNKLY6ZYVVAVCNFSM6AAAAABGSPDNHKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZSGU3DMNBSGM . You are receiving this because you commented.Message ID: @.*** com>

VPSA132 commented 4 months ago

OK, but where is "expert view" mode?

dee098 commented 4 months ago

config -> top right corner

paulederbaus commented 4 months ago

This bug should be solved by installing the update (3.7.1) - Please try and report back

SpookieGames commented 4 months ago

This bug should be solved by installing the update (3.7.1) - Please try and report back

The scooter still uses 100-150W less energy than before and goes slower on flat ground (about 33-34km/h). Would there be a way to install the old 0.3.6 back so I can test out if it's a hardware issue or a software issue?

VPSA132 commented 4 months ago

"config -> top right corner" - how blind I am !!! Now i can see variable current option. I will be testing 3.7.1 for about 2 hours. I'll let you know.

paulederbaus commented 4 months ago

This bug should be solved by installing the update (3.7.1) - Please try and report back

The scooter still uses 100-150W less energy than before and goes slower on flat ground (about 33-34km/h). Would there be a way to install the old 0.3.6 back so I can test out if it's a hardware issue or a software issue?

My dev kit is a Xiaomi Pro2 and field weakening works a 100%. Please revise your config or reset all settings.

SpookieGames commented 4 months ago

This bug should be solved by installing the update (3.7.1) - Please try and report back

The scooter still uses 100-150W less energy than before and goes slower on flat ground (about 33-34km/h). Would there be a way to install the old 0.3.6 back so I can test out if it's a hardware issue or a software issue?

My dev kit is a Xiaomi Pro2 and field weakening works a 100%. Please revise your config or reset all settings.

I already did that 7 times but still the same result. I will try different ESC tomorrow.

VPSA132 commented 4 months ago

Unfortunately, SHFW version 3.7.0 and 3.7.1 is no longer the same as 3.6.0. With the following settings, it is difficult to reach a speed of 35 km/h on 10" tires. I am lucky that I have an STM32F103 controller, I can upload the good old DRV155 which accelerates me to 37 km/h without field weakening. What is the problem? Is the new SHFW only for the controller v3.1 on GD32F103 MCU? 1713956025216 1713956025201

Nyami11 commented 4 months ago

@VPSA132 Did you tried setting the max fwk current to something higher?

VPSA132 commented 4 months ago

Nyami11 NO. I tried to achieve the same results with identical settings as with SHFW 3.6.0. I will only mention that, If I set field weakening from 25 km/h, from this speed I feel less power and the engine stops making the characteristic sound. It rotates quietly, just like with the factory software in the Mi Electric Scooter 3 model, for example DRV016. DRV016 is a very quiet firmware.

VPSA132 commented 4 months ago

Ok, I checked what I could. Regardless of the Field Weakening settings, whether they are on max or min, the effect is always the same. There is little power and it is difficult to accelerate to 35 km/h. Scooter behaves as if Field Weaking was set to minimum current settings. Any regulation doesn't work. The Variable Current mA/km/h option does not work at all. Please restore on app the verified working SHFW 0.3.6 (3.6.0).

NormalHuman-Anything commented 4 months ago

btw max field current must be higher than max throttle A set or fwk will not have effect that much

NormalHuman-Anything commented 4 months ago

aka crank that field current to 55a and torque to 65a (or if you don't want torque to 55a field to 45a) just make sure throttle max a is under field current max

SpookieGames commented 4 months ago

Ok, I checked what I could. Regardless of the Field Weakening settings, whether they are on max or min, the effect is always the same. There is little power and it is difficult to accelerate to 35 km/h. Scooter behaves as if Field Weaking was set to minimum current settings. Any regulation doesn't work. The Variable Current mA/km/h option does not work at all. Please restore on app the verified working SHFW 0.3.6 (3.6.0).

Are you using a clone board by any chance?

VPSA132 commented 4 months ago

Are you using a clone board by any chance?

I using original V1.4 STM32F103 with STP15810 MOSFETS and reinforced printed traces in the half-bridges.

Yesterday I set the following parameters on Sport mode: 45km/h max speed 26A current Field weakening start speed: 25km/h Initial current of field weakening: 3A Variable current 1000mA/km/h Max torque current 55A Max field current 50A 10" tires

Result: Top speed 35km/h on flat surface. Low power, poor acceleration, you can't drive like that. The uphill speed drops to 21-23 km/h. On DRV155, the uphill (the same uphill of course a the same battery level) speed is 27-29 km/h.

In new version SHFW is another nice function: Motor control frequency. This works but only affects the engine operating frequency before Field Weakeing is activated. It does not change the engine operating frequency after activating Field Weakening. It is hardwired to a value of 12 or higher.

VPSA132 commented 4 months ago

just make sure throttle max a is under field current max

I'll test it today.

SpookieGames commented 4 months ago

just make sure throttle max a is under field current max

I'll test it today.

Let me know the results

VPSA132 commented 4 months ago

Field current set to 55A and torque to 65A - no noticeable differences, same maximum speed. Field current set to 65A and torque to 55A - no noticeable differences, same maximum speed. I need to change ESC to v3.1 and see if anything changes.

SpookieGames commented 4 months ago

Field current set to 55A and torque to 65A - no noticeable differences, same maximum speed. Field current set to 65A and torque to 55A - no noticeable differences, same maximum speed. I need to change ESC to v3.1 and see if anything changes.

Is it an original v3.1 board? If so, could you share a link where to buy it?

VPSA132 commented 4 months ago

At the moment I have the original ESC v1.4 installed. I will replace it with ESC v3.1 soon. Also original. I have several. I bought them with damaged software from a person who works at an authorized service center. ST-LINK, 2 minutes of work and it works :). Every day I work in an electronics service (unauthorized). I repair, among others, Ninebot and Xiaomi. I am aware of all electronic faults. I envy those who haven't updated SHFW3.6.0. I sympathize with those who updated to SHFW3.7.1. :(

SpookieGames commented 4 months ago

At the moment I have the original ESC v1.4 installed. I will replace it with ESC v3.1 soon. Also original. I have several. I bought them with damaged software from a person who works at an authorized service center. ST-LINK, 2 minutes of work and it works :).

Nice 👍

SpookieGames commented 4 months ago

I will try to install an original 2.1 ESC and I hope that works fine

VPSA132 commented 4 months ago

Theoretically, after changing the driver, nothing should change for the better. The half-bridge control circuits and current measurement circuits are the same in v1.4, 2.1 and v3.1. The only differences are the type of microcontroller and different (weaker in version v3.1) transistors in the half-bridges. This has no effect on the operation and power of the engine.

SpookieGames commented 4 months ago

Theoretically, after changing the driver, nothing should change for the better. The half-bridge control circuits and current measurement circuits are the same in v1.4, 2.1 and v3.1. The only differences are the type of microcontroller and different (weaker in version v3.1) transistors in the half-bridges. This has no effect on the operation and power of the engine.

But does the theory actually work in the reality?

VPSA132 commented 4 months ago

Well, if you don't test it experimentally, you won't know. Luckily, I have one ESC with an old version of SHFW (3.6.0). However, there is a problem. The SHU 2.5 application is not compatible with the old SHFW 3.6.0. You need to download the old version of the SHU 2.4.1 application and run it without internet access. Then you can safely change the parameters.

SpookieGames commented 4 months ago

So, I've changed the v3.0 clone ESC I had for an original v2.1 ESC and 3.7.1 works the way it should. I'd even say that the scooter is a lot faster.

lekrsu commented 4 months ago

So, I've changed the v3.0 clone ESC I had for an original v2.1 ESC and 3.7.1 works the way it should. I'd even say that the scooter is a lot faster.

Good that the original hardware works as intended now

SpookieGames commented 4 months ago

So, I've changed the v3.0 clone ESC I had for an original v2.1 ESC and 3.7.1 works the way it should. I'd even say that the scooter is a lot faster.

Good that the original hardware works as intended now

Yeah but that doesn't explain why VPSA is having the same problem with original hardware

VPSA132 commented 4 months ago

Great info! The new SHFW is not suitable for the old ESC v1.4 and clone one. Just replace the ESC and the problem is over. The MCU is probably to blame. The old STM32F103 is the same as the CS32F103 in the clone v3.0 version. There are two kind of STM32F103. C8T6 and CBT6. CBT6 is better.Screenshot_2024-04-26-22-00-18-150_com.duckduckgo.mobile.android.jpg

Can you share yours settings here?

SpookieGames commented 4 months ago

Sports - 25A flat curve Drive - 20A flat curve ECO - 15A flat curve Screenshot_2024-04-26-22-27-16-145_sh cfw utility Screenshot_2024-04-26-22-28-11-506_sh cfw utility

SpookieGames commented 4 months ago

As I have used an original ESC and everything works I am now going to close this issue

nopbxlr commented 4 months ago

Thanks for confirming the issue happens with clone ESCs! However, it also seems to happen to v1.4 ESCs. The issue must be kept open as there seems to be a bug related to hardware differences

Note: could this be a similar bug as seen when running DRV155 on newer ESCs, or DRV22x on older ones?

VPSA132 commented 4 months ago

I confirm. On ESC v2.1 SHU3.7.1 works very well! Appropriate performance and a maximum speed of 40 km/h with good settings are achieved without any problems. 35km/h on an empty battery (25%) :D on flat terrain. You can feel the moment of FIELD WEAKENING turning on if you set the Initial Current to a value other than 0A. Interesting fact - my ESC v2.1 has an STM32F103C8T6 MCU. So it's not the MCU's fault. Now I don't know what is causing the problems with v1.4. v3.1 is waiting for testing but I think it will be ok.

paulederbaus commented 4 months ago

Spoke confirmed that new hotfix works with clone esc. I labelled it with next release and hopefully we can close it then.

paulederbaus commented 2 months ago

Please confirm this is closed with 3.7.2.

SpookieGames commented 2 months ago

Please confirm this is closed with 3.7.2.

Sadly I cannot as I no longer have the clone ESC but it worked fine in the Regular-Base247-v3.7.1_fwk_hotfix_v3 version.