Bi-directional dshot support

Is Bluejay not currently supported in Ardupilot?

What is bluejay?

More characters

As I understand it - another ESC firmware for BL_Heli S ESCs that adds things like bdshot - more recently maintained than BlHeli M, as far as I can tell. GitHub - mathiasvr/bluejay: Digital ESC firmware for controlling brushless motors in multirotors
It was what @Giorgio_Rinolfi mentioned earlier, and you had suggested he use BL Heli M.

The RPM feedback is a standard of sorts so it may well work - feel free to try it :slight_smile:

Bluejay works fine with Ardupilot. The latest release, 0.15, adds adjustable braking force so you can disable/lessen braking for use on fixed wing aircraft or helis.
Easiest way to flash is via ESC-Configurator which runs directly in your browser:

@andyp1per @CrashTestPilot Thank you both - that’s great news!

Yes, Bluejay works. Also with bidir-dshot.
You should increase PWM frequency to 48 or even 96 kHz. Avoids braking and leads to longer flight times and smoother flights.

Had only a problem with dshot 600 and an old omnibus F4. For dshot 150 everything works smoothly. Maybe an issue specific for old 4in1 esc used - i did not investigate further.

Hi

on a quad with the omnibusf4pro-bdshot firmware, only 2 motors are working correctly with bdshot and sending rpm values. The 2 others are either not working at all or turn at their maximum without sending any rpm value.
I tried almost every possible configuration with BDMASK, BHL Mask, different Dshot, etc etc without any success.

So I started to play with the hwdef.dat file and once I undef PA1, everything is perfectly working, motors and rpm values.

undef PB0 PB1 PA3 PB4 PA1

PB0 TIM3_CH3  TIM3 PWM(1) GPIO(50)
PB1 TIM3_CH4  TIM3 PWM(2) GPIO(51) BIDIR
PA3 TIM2_CH4  TIM2 PWM(3) GPIO(52) BIDIR

I tried that because PA1 is also on TIM2 and I read here that DMA is shared with 2 outputs.
I am now wondering if this modification is ok and if it’s related to something wrong in the hwdef.dat file or in my setup.
I also noticed that on some other board, DMA_NOSHARE is used.
I did not try yet with DMA_NOSHARE TIM2*.

I am changing stuff without really understand what could be the effect and side effect, so if someone could give me some advice that would be great !

Thanks

The problem is the buzzer, I don’t know why I never spotted this before - the buzzer timer cannot be shared with the PWM channels. Try undef PB4 and see if that works?

Oh wait its already undef’d. What happens if you put NODMA after the UART4 definitions?

ok so in the omnibusf4pro hwdef.dat file :

# UART4 TX available as an alternative config on PA0 (RSSI pad) with BRD_ALT_CONFIG=2
PA0 UART4_TX UART4 NODMA  ALT(2)

# full UART4 also available as alt config on PA0 (RSSI pad) and PA1 (PWM output chan 5) with BRD_ALT_CONFIG=3 & 4
PA0 UART4_TX UART4 NODMA ALT(3) 
PA1 UART4_RX UART4 NODMA ALT(3) 
PA0 UART4_TX UART4 NODMA ALT(4) 
PA1 UART4_RX UART4 NODMA ALT(4) 

and I leave unchanged the hwdef.dat omnibusf4pro-bdshot file :

undef PB0 PB1 PA3 PB4

PB0 TIM3_CH3  TIM3 PWM(1) GPIO(50)
PB1 TIM3_CH4  TIM3 PWM(2) GPIO(51) BIDIR
PA3 TIM2_CH4  TIM2 PWM(3) GPIO(52) BIDIR

Will give a try and let you know.

Yes, try that - I’m not exactly sure why its not working or why changing PA1 would make a difference

Thanks Andy for your help.
Adding NODMA does not make any change, only motors 1 and 2 are functional. Motors 3 & 4 are not spinning not even beeping after the FC initialization.
Keeping undef PA1 in the bdshot hwdef.dat file for a test flight.

If I get a chance I will try at the weekend - I have one of those boards

Hello, I can test the same, give me the link please

Ok I understand the problem now. PA1 is PWM5 which shares a timer with PWM3&4 which are using bi-dir dshot. We don’t currently support anything over 4 motors, so PWM 5 has to be disabled by undefing PA1 - your fix is correct.

ok cool thanks a lot for watching this !
I did a flight test, everything was ok and motors rpm telemetry as well.

2 Likes

hello, please share the bdshot firmware on f765-wing

I think we concluded this wasn’t a great fit. Are you using this on a copter or plane?

on a copter, I already read, here a person wrote about an omnibus, but you can assemble it just for checking, I need to get engine speed for the filter.

The problem on the Wing is that there are so many peripherals that DMA channels are in short supply. Also most people use these on planes. Its certainly possible, but you would have to give up some things to make it work.