Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rpm mode #108

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Rpm mode #108

wants to merge 12 commits into from

Conversation

negre
Copy link

@negre negre commented Jun 7, 2023

Hi,

I have worked on rpm mode with the AM32 firmware. It would be nice if you integrate the changes on your code.
The main modifications are :

  • Improvement of the closed loop rpm mode

    • add a feed-forward term based on the input voltage and the motor Kv, that greatly improves the response time and reduce oscillations.
    • correction of the "doPidCalculations" function (numeric precision error due to the "float" type)
  • Change the eeprom memory layout to add rpm mode activation and pid tuning

    • this is no more compatible with "Esc_Config_Tool" nor "esc-configurator" but I have forked the "esc-configurator" here : https://github.com/gipsa-lab-uav/esc-configurator
    • The new memory terms are
      eeprom[48] : RPM mode if val !=0
      eeprom[49] : min RPM / 1000
      eeprom[50] : max RPM / 1000
      eeprom[51] : PID.Kp
      eeprom[52] : PID.Ki
      eeprom[53] : PID.Kd
      eeprom[54] : PID.integral_limit / 100000
  • Add an option to configure the serial telemetry pin in OpenDrain

  • Add some targets (HGLRC35_F051 for hglrc T-Rex 35A, and HKMICRO_F051 for ReadyToSky 35A LED)

I have successfully tested the firmware with HGLRC esc T-Rex 35A, HGLRC 4en1 Zeus 45A and ReadyToSky 35A)

@AlkaMotors
Copy link
Owner

I like parts of this, the drive by rpm mode was going to be an eeprom addition in the future and i have added those changes to my config too but I used different memory offsets. I would not be able to merge this as is. Do you use discord? I would like to discuss this more with you possibly. There are many things that i would like to incorporate from your pr but there are a few things to consider when increasing the settings area.

@negre
Copy link
Author

negre commented Jul 10, 2023

OK that's nice if you can include the rpm mode tuning in the esc configuration tools.
I've just joined the discord server if you wanna talk about the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants