mathiasvr / bluejay

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

ESC telemetry error is not 0% #37

Closed sukulent closed 2 years ago

sukulent commented 2 years ago

When testing motors in the motors tab using bidirectional dshot, the error percent isn't 0%. It scales with the throttle reaching 1% around mid throttle.

I would expected 0% error.

Is this a bug, a limitation of the L type ESCs or is this safe to fly?

Configuration:

mathiasvr commented 2 years ago

The L type ESCs have not had much testing and I don't have any myself so it's likely the telemetry timing is not tuned properly. In general I think it's preferable to use dshot 150 for L ESCs.

I could try slightly offsetting the timing if you are interested in testing?

mathiasvr commented 2 years ago

Here are some test hex files, you can try to see if one of them improves the error percentage.

L_Test.zip

If both makes it worse there's probably not much more to do about it.

sukulent commented 2 years ago

Thanks! Testing is no problem.

I read the wiki here and if I am correct I must use dshot 300 when I mix L and H type ESCs

I have flashed the two L type with both test files and here are the results:

The G_L_30_48_v0.14_predelay8.hex is better with no more than 0.1% error The G_L_30_48_v0.14_predelay6.hex is worse with max around 1.5% error

mathiasvr commented 2 years ago

Oh are you using both L and H type ESCs at once? I probably can't recommend that but if it works for you I guess it's fine 😅 Very interesting though, I never thought about this before. Dshot150 is disabled with H ESCs for arbitrary performance reasons, but in your case it might make sense to have a build with dshot150 working.

Thanks a lot for testing! Looks like the timing wasn't synced up with betaflight. Would be great if you could test these builds as well to see if the error can drop further. Also could you check that the error is also still 0 when using dshot150 (just for the L ESCs), thanks!

L_Test2.zip

sukulent commented 2 years ago

This is from older quad I bought used, it has an AIO flight controller with separate ESCs on the arms and for some reason there are two and two different ESCs. My other 5" have all-in-one ESCs and I don't have any spare single ESCs. I have been flying this quad for a while, without the RPM filter, because the JazzMaverick firmware I have used previously doesn't support L type ESCs.

Also, you are sending me the 48kHz version. If I understand correctly, it makes motors smoother and more efficient but at the same time somewhat lowers the torque at low throttle? Is it "worth" it for freestyle?

As for the testing:

On dshot 150 The G_L_30_24_v0.14 from configurator is solid with 0%error The G_L_30_48_v0.14_predelay8.hex is solid with 0% error

On dshot300 G_L_30_48_v0.14_predelay9.hex is solid 0% G_L_30_48_v0.14_predelay10.hex is solid 0% G_L_30_48_v0.14_predelay11.hex got to 1% when no motors were spinning and to ~12% around mid throttle G_L_30_48_v0.14_predelay12.hex got to as much as 80% while no motors were spinning and stayed around 65% when mid throttle

everything I tested to ~50% throttle in the motors tab on two ESCs

mathiasvr commented 2 years ago

Okay thanks for testing again, looks like predelay9 is preferable. I will be sure to have this fixed in next version, thanks again!

Yes on a 5" 24kHz should be fine, I picked PWM for the test files at random. Here is a 24kHz version you can use for now: G_L_30_24_v0.14_predelay9.hex.zip

sukulent commented 2 years ago

Thanks!

If you would want any more testing on L type ESCs, I'll be happy to do it.