mathiasvr / bluejay

:bird: Digital ESC firmware for controlling brushless motors in multirotors
GNU General Public License v3.0
478 stars 48 forks source link

Support for single rotor helicopters #28

Closed pkaig closed 2 years ago

pkaig commented 3 years ago

Hi. I'm using Bluejay for configuring the main and tail rotors (betaflight passthrough) on my helicopter running Heliflight-3D. I would like to be able to write a different setup to each motor and disable damped light mode for the main motor. Can these options be added please?

mathiasvr commented 3 years ago

Hi there!

I'll try to see if I can add an option to disable "damped light" soon. Let me know if you want some "test" files in the meantime.

For multirotors it probably makes the most sense to have this option affect all ESCs, so I'm not sure it should be a setting for each individual ESC - maybe there is a better way to support helicopters? Maybe there should be a mode in the configurator to allow having different settings for individual ESCs. Are there any settings that it makes sense to share between motors in a helicopter?

pkaig commented 3 years ago

Thank you very much Mathius. That would be great. Yes I would love to try out your test files please. I did read some comments in the project file that suggested this was being worked on.

The reason for the ability to download separately is because the main and tail motors are different so that can operate with vastly different settings such as timing and starting torques etc (the main can often be geared too). Damped light works well on the tail; however, on the main it causes the tail to whip around when you disarm or throttle hold. If this happens in flight (become disoriented) the tail rotation generally causes extra damage.

mathiasvr commented 3 years ago

Ah okay, that makes sense!

@stylesuxx How complicated do you think it would be to have a mode/option where all settings are set individually in the configurator?

mathiasvr commented 3 years ago

Here are some test hex files without braking/damping: v0.13_nobrake.zip. I only compiled the most common ones, so let me know if you need one that's missing.

stylesuxx commented 3 years ago

Technically I could add an option to treat every setting as an individual setting in the configurator. But I am wondering how much of a fringe case this is - if it is just @pkaig who would be using this feature I am not sure if it is worth the hassle, or if it is easier for him to just de-solder the ESC signal wires and flash separately like that.

@pkaig I don't know the helicopter community, is this something more people would be interested in?

pkaig commented 3 years ago

@mathiasvr. Thank you very much for the files. I will give them a go.

@stylesuxx. The added difficulty I have is I am using an AIO board. My hack to get around this is to download the tail config to both, then open in betaflight CLI and remove the resource for the tail motor. Reconnect Bluejay and flash the main motor config, reconnect betaflight and add the tail motor resource. It does work but isn't ideal. I guess looking at the current Bluejay Configurator there is an option to download the firmware individually on each ESC with a (flash all) at the bottom to do all. But there is only a single write setup. I'm not sure why you would want to load different firmwares and not setups. My hope was that it wouldn't be a big task to add a button on each ESC tab.

As for how many would use it... I would 😃. I'm not sure how many others. I would assume a few. Previous blheli versions had this ability and BLheli_32 does as well. Not sure why it was removed from _S.

Thank you both for your efforts on this project. It's a great bit of software!

stylesuxx commented 3 years ago

@pkaig I see - an AIO makes it more complicated, that is true. I added your request as a feature request in the esc-configurator repo. I am not sure yet which version I will implement. If you have any preferences or other ideas, feel free to discuss them there.

Unfortunately this will be a bigger change so I can not promise a quick implementation.

pkaig commented 3 years ago

@stylesuxx mate that sounds fantastic. I really appreciate you even considering the addition. I understand completely. Good things take time 👍

stylesuxx commented 3 years ago

@pkaig could you have a look here => https://50e6a41ca189.ngrok.io/ in the settings you can now select "Disable common settings" - this will allow you to change all settings for every ESC individually, let me know if this is what you were looking for.

pkaig commented 3 years ago

@stylesuxx that's fantastic. Just connected and changed the starting parameters for the tail motor only. It seems to work great. That makes it so easy thank you very much.

stylesuxx commented 3 years ago

Cool, thanks for giving it a spin. This means I can add it to https://esc-configurator.com

pkaig commented 3 years ago

@stylesuxx great news. I will give this a go on my other helis when I get home. Again thank you.

@mathiasvr . Hi Mathias. I gave the noBrake firmwares a go but it still seems to be doing the damped-light. I took a video https://youtu.be/ZyLMujPY0YQ. Just reading a bit of your code in the 'push' section and I'm not sure if the damped-light is still enabled by default or if I am doing something else incorrectly. I have loaded the 92kHz version (if that matters). Cheers.

mathiasvr commented 3 years ago

@pkaig Braking/damping should be disabled by default (and not yet changeable). Did you also disable brake on stop?

pkaig commented 3 years ago

@mathiasvr..... Ummmm. It was a id10t error.... I'm very much embarrassed to say I flashed the noBrake to the TAIL 🙃. That's what I get for rushing to give it a go before I head off to work.

Anyway it works fantastic. I'm very excited to get this working on all my heli's now. I appreciate your efforts.

mathiasvr commented 3 years ago

@pkaig Ah I see, great to hear! 😄

mathiasvr commented 3 years ago

Hi @pkaig, I have been working on simplifying how motors are stopped and is leaning towards a method that doesn't try to brake motors unless using the "brake on stop" feature. This might benefit helicopters as well since it appears your issue was mostly the braking when stopping the main rotor. I have prepared some test files here with the normal "damped light" braking enabled but without the braking on motor stop. This should give a better motor response when throttling down etc. but I don't know if it generally benefits helicopters compared to no braking at all.

If you can try it at some point it would be great to hear your opinion on how this works compared to the no braking version. Thanks!

v0.14_no_stop_brake.zip

pkaig commented 3 years ago

Hi Mathias, Thank you very much. I will give it a go.

pkaig commented 2 years ago

Sorry for my very late reply Mathius.

The damped light does make a big difference and with this enabled the heli does still spin rapidly. I have taken some videos. Your original v0.13 no damped light/no brake on stop: https://youtu.be/EsAWMqxvM7M (this is great BTW) The new no brake on stop V0.14: https://youtu.be/drHNzsOl2N0

The new version with damped light still enable spins much faster on throttle hold.

pkaig commented 2 years ago

Sorry. Don't know what I clicked to close it.

mathiasvr commented 2 years ago

Thank you @pkaig, the videos are very helpful! I see the stop still has too much braking for the helicopter landing. I'm surprised it has this much effect since the braking is very brief, but that's good to know.

Out of interest how is flight performance of the helicopter when flying damped light? I think there should be a noticeable difference when varying throttle? Do you think this is something that could be useful for helicopters or is no damping generally preferred?

I'm curious if I should look into removing the braking effect when stopping completely to allow helicopters to still fly damped light without the landing problem, however not sure if this is useful.

In any case I plan to include a braking strength setting that allows disabling damped light in v0.15.

pkaig commented 2 years ago

I haven't flown it yet with your v0.14 but I will in the morning. Both of my helis running Bluejay have been broken and waiting for parts. One is ready to go now.

Just thought I would Post a comparison between the standard V0.13 and your V0.13 nobrake (no damped light). It's really a huge difference.

V0.13: https://youtu.be/ahWzhT5Bn28 No Brake https://youtu.be/a2GtaOZoZYo

pkaig commented 2 years ago

The no damped light only on stop may be worthwhile. The heli is running a fixed throttle with a Govenor to maintain headspeed regardless of pitch. I'm guessing damped light could help with rapid downward transitions that unload the head.

Happy to do some testing.

mathiasvr commented 2 years ago

Now v0.15 is finally released. Setting the new setting Max Braking Strength to 0 will effectively disable complementary PWM (damped light).

pkaig commented 2 years ago

Thank you both @mathiasvr and @stylesuxx. v0.15 is now running on my E180 helicopter with GHF420 AIO board (and shortly to all my others). Tail motor has Max_Braking_Strength as default and the Main motor is set to 0. It works fantastic. Really great stuff.