Thread Tools
Dec 15, 2019, 06:27 AM
Registered User
Thread OP
Discussion

Ardupilot/INAV Mavlink OSD for the DJI HD FPV system


I'm moving the discussion here to not spam the DJI thread too much.

Requires an Arduino Nano or another microcontroller such as Bluepill STM32 with some minor modifications to the hardcoded serial ports.

Link to the github code and hex precompiled files: https://github.com/d3ngit/djihdfpv_mavlink_to_msp_V2

The user uk_mookie made a nice newbie friendly tutorial on how to compile and upload the code to the Arduino Nano https://github.com/ukmook/qUark/tree...ht-electronics


Confirmed it also works with INAV by setting the telemetry output as Mavlink. If you're having problems detecting arming set mavlink speed to 38400 or 19200 and modify the baud speed in the code before compiling/uploading to the Nano.
Name: iNav.png
Views: 167
Size: 83.0 KB
Description:
Last edited by d3nys; May 28, 2020 at 02:36 PM.
Sign up now
to remove ads between posts
Dec 15, 2019, 07:49 AM
Registered User
acicuecalo's Avatar
Perfect!
We will be here with you!
Dec 15, 2019, 08:54 AM
Registered User
Thread OP
Update:

removed the sending of heartbeat messages. Now it boots faster and works even better. Thanks to JoshW24 for pointing it out.
Dec 15, 2019, 11:06 AM
aka JoshW, damightyj
JoshW24's Avatar
Quote:
Originally Posted by d3nys
Update:

removed the sending of heartbeat messages. Now it boots faster and works even better. Thanks to JoshW24 for pointing it out.
Awesome!! I have a mod I am trying too and if it works, Ill submit a PR. Very excited about your work on this, and also shared it with Tridge. Thanks again!!
Dec 16, 2019, 10:45 AM
Registered User
Thread OP
Update: I fixed the code so it's easier to compile for other microcontrollers with only hardware serial ports.
Dec 17, 2019, 01:58 AM
Registered User
congrats for this nice idea of doing a protocol converter.
Perhaps some ideas and optimisations could be find in zs6buj Mavlink to Frsky converter https://github.com/zs6buj/MavlinkToPassthru .

He also have wrote a super nice tuto on how to use bluepill (2$) aka stm32Fx https://www.rcgroups.com/forums/show...2%96-by-zs6buj
Dec 17, 2019, 03:20 AM
Registered User
Thread OP
It's easy to compile for other microcontrollers that are available in the arduino IDE now. Just change SERIAL_TYPE 1 and press upload. If you want different ports instead of the defaults rename Serial2, Serial3 to whatever you want.
Dec 17, 2019, 09:48 AM
Fixed Wing Pilot
malarcky's Avatar
Did you find a solution for the cell voltage? Also, what I need to set the mah calibration factor to use the value from the FC, so no correction?
Dec 17, 2019, 10:00 AM
Registered User
Thread OP
I'll update the code in a few hours for the avg voltage. You have to calibrate the mAh reading yourself because mavlink doesn't transmit that data. Set the factor to 1.0, drain 1000mA, charge back the battery, if it charged 1200mAh type 1.2 as calibration factor.
Dec 17, 2019, 10:43 AM
Fixed Wing Pilot
malarcky's Avatar
Thanks! But can I use the actual value from my fc from where I get the right readings?
Dec 17, 2019, 11:04 AM
Registered User
Thread OP
You can't find the value anywhere, you have to calculate it. Does the current display correctly? I didn't ask before. The mAh reading gets calculated in realtime by multiplying Amps * time, so you have to calibrate and find the right value for your controller by charging the battery back and find the difference, like I said before.

I'll explain once again. Set the factor to 1.0. Full charge the battery, go fly, remember what value you see in the goggles after the flight, charge the battery back, divide the charged mAh with the goggles reading you have from before. Type the calculated value it in the mah calibration field.
Dec 17, 2019, 11:43 AM
Fixed Wing Pilot
malarcky's Avatar
I already have the mah current sensor calibrated in my INAV settings of my FC, correct readings showing in my taranis and analog OSD. So I need to do it again then only for the DJI OSD?
Dec 17, 2019, 11:46 AM
Registered User
Thread OP
Quote:
Originally Posted by malarcky
I already have the mah current sensor calibrated in my INAV settings of my FC, correct readings showing in my taranis and analog OSD. So I need to do it again then only for the DJI OSD?
Yes.
Dec 17, 2019, 11:52 AM
Registered User
Thread OP
Update: fixed the average voltage per cell reading, blink sats number when no 3D fix.
Dec 17, 2019, 03:18 PM
Fixed Wing Pilot
malarcky's Avatar
Just updated, cell reading OK, gps sats blinking OK, just need to calibrate mah reading and ready to go!


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion MINIM OSD MWOSD - software for Ardupilot / iNAV / Betaflight / KISS / GPS OSD / PX4 Shikra FPV Equipment 358 Nov 19, 2021 10:07 AM
Help! [Solved ] APM 2.8 MAVLink-OSD stuck on Waiting for MavLink or Not upadating newnoodle FPV Equipment 3 Jun 27, 2021 03:58 PM
Discussion Long Range HD FPV + Telemetry for APM/Pixhawk/MAVLink POVPilot FPV Equipment 1 Jan 25, 2015 03:18 PM
Discussion ArduPilot's best friend! Remzibi OSD(Poor Man's OSD) + GPS for FPV iseekk Multirotor Drone Talk 2 Apr 06, 2012 11:17 AM