EFeru / hoverboard-firmware-hack-FOC

With Field Oriented Control (FOC)
GNU General Public License v3.0
1.12k stars 932 forks source link

Very slow wheels speed after restart in Hovercar mode #372

Open mmaruys opened 1 year ago

mmaruys commented 1 year ago

Variant

HOVERCAR

Control type

FOC

Control mode

Torque

Description

Hi everyone,

For some days I'm trying to solve a problem on my project about wheels going very very slow after firmware update, calibration of the acceleration lever and motherboard restart in Hovercar mode.

I want to use the Hovercar mode, torque mode, right wheel reversed.

So I make the firmware update, on the first start of the mainboard I make the auto calibration and everything works fine but if I restart the board then the wheels are rotating very very slow, like not enough power, like the calibration settings are not the same anymore.

If I reinstall again the firmware, make the first calibration, is ok, but again if I restart it does not work.

VERY IMPORTANT: in ADC mode this problem does not occur, speed is OK after restart. Only in Hovarcar mde I have this problem.

I use this kind of acceleration lever: https://piesetrotinete.ro/wp-content/uploads/2021/10/Maneta-Acceleratie-trotineta-electrice-jpg.webp

Any ideas on how to solve it? or why the speed is becoming very slow after restart in Hovercar mode?

Candas1 commented 1 year ago

Hi,

Disable multi-mode

EFeru commented 1 year ago

Candas, what do you say should we disable multi mode by default?

Candas1 commented 1 year ago

Hi Emanuel,

Yes I think it makes sense, it can still be documented for people that need it.

mmaruys commented 1 year ago

@Candas1 it works, you’re right, thank you very much! it’s super now. I saw that piece of code and thinking about it for later but never tought that the very slow rotation could be the first mode at such low power. At least if you ask me it could be a good idea to be disabled by default. All the best!

IerwinDE commented 1 year ago

It seems I've ran into the same issue as OP and assume its for the same reason of Multi-mode beeing default after calibration. However I have not found out how to disable that mode yet.

I will dig deeper through the documentation and update here as I think the answere should definetly be here

EDIT: Found it in the commit comments and it is so easy I am ashamed I did not figure it out. Anyway, if someone else comes here with the same issue:

Candas1 commented 1 year ago

adding leading // will comment out this line, thus disabling multimode

mmaruys commented 1 year ago

Hi again, built an electric scooter to move around and works great guys! thanks again for all your study and back engineering. I have one more thing would like to solve about the squizzing sound the motors make when accelerating at maximum, saw somewhere could be connected to current limitation? what do you think?

Candas1 commented 1 year ago

That's probably the current chopping. You can try increasing i_dc_max https://github.com/EFeru/hoverboard-firmware-hack-FOC/wiki/Setup-current-and-speed-limits#zap-current-limit

Candas1 commented 1 year ago

Please let me know if it works, I'll update this in the wiki

mmaruys commented 1 year ago

I'll try today. Was thinking to increase I_MOT_MAX from 15->20 and I_DC_MAX 17->24 and see how it reacts. Also, what are the recommended maximum limits for these 2 parameters and how can I spot I am in the risk zone? too much heat on the mosfets radiator or on the motors? I guess it's connected with the maximum handle of the mosfets, right? I have a big battery 10s9p (2000mAh cells) and 2 hoverboard battery BMS put in parallel to handle more current, I hope I will not fry the motherboard :))

Candas1 commented 1 year ago

The maximum I tried was 25 and 27 I think. Yeah It depends on mosfets, and I am not sure how accurate the current measurement is so I wouldn't go higher than that.

mmaruys commented 1 year ago

Please let me know if it works, I'll update this in the wiki

it’s the same, no change (with I_MOT_MAX from 15->20 and I_DC_MAX 17->24)

Candas1 commented 1 year ago

Can you erase before flashing, in case some of those values are stored in eeprom

mmaruys commented 1 year ago

yes, I always erase

Candas1 commented 1 year ago

Are you using foc or sinusoidal?

mmaruys commented 1 year ago

FOC

image

Candas1 commented 1 year ago

Can you share a good quality picture of you mainboard?

mmaruys commented 1 year ago

it's the same sound for 2 different mainboards with the same firmware, I have two projects started, as I will be off town for the weekend I will make pictures when come back.

mmaruys commented 1 year ago

Managed to get the pictures today. ![Uploading F1BCD621-7DAD-466A-BA8B-1F3A14E13717.jpeg…]()

mmaruys commented 1 year ago

F3B3771A-C486-4EF5-9411-6687D136F973

mmaruys commented 1 year ago

8CC5A037-8392-4D24-BE2C-639F1D712076 B21FE599-7B80-46E7-B9B1-0C549050AFE7 39EC629C-7D97-4484-8F6A-E8CF04A421C9 9771DBD4-B59F-47D1-9197-8026DFE1FF5D

Candas1 commented 1 year ago

Ok I thought you could have different shunt resistors but it looks like 2 X R007 as usual