Servers by jDrones

Arducam OSD options - no rangefinder option?

it‘s been years without active development on long deprecated 328p-type OSD hardware.
there is ardupilot onboard OSD now, as for now it runs on boards with onboard 7456-type video chipsets only.
as a matter of fact, i have a local branch with a RNGFD panel added:
if you have respective hardware available, you might build a fw from this branch.
however i’m not sure how much value that panel really adds. it‘s nice to see RNGFD readings on landing approach, but what you really want to know is how target alt is handled, and you‘ll likely want to check that in your flight logs.

It’s not for a drone, it’s for a rover and distances to objective or obstructions are essential. They need to be displayed on operators goggles.

ok, sry for being plane-heliocentric here :wink:
do you use multiple rangefinders on that rover?

No just the one 12m range LIDAR at the front. It’s capable of turning tank style on the spot even though it’s wheeled and it’s not been a problem so far negotiating obstacles except for distance in confined areas. The camera is a wide angle, low light unit, IR capable also and the vision is good, it will have pan, tilt and level too, when I’ve finalized the mount design, but the wide angle lens distorts the image and it’s hard to judge any accurate distance with it. The 1m minimum avoidance distance is too far for anything but RTH on open ground. Control is Cube black on a Pixhawk 2.1 mount and uses Here2 GPS on CAN. It’s not practical to be looking at a laptop, even though I have full telemetry onboard and can remotely configure it etc. It’s intended use is as a remotely moveable (if needed) game/surveillance system in agricultural and forestry areas mainly at night, last thing you need is the light off a laptop screen and all the leds are enclosed or switched off :wink:

all i can offer is a rangefinder panel for the current ardupilot onboard OSD, but that likely isn’t particularly helpful with regard to your hardware choice.

if you’re familiar with arduino, adding that panel to your osd code will likely be your best bet,

I’m not very familiar with arduino or any other type of coding to be honest, I can modify well documented code, recompile and load it as firmware but that’s about my limit. I’m a hardware guy by trade.

Been doing a bit of digging around with MWOSD - it appears to be an arduino program and I found this in the config.h file

/******************** Mavlink distance sensor settings *********************/
//#define MAVSENSORGPSACTIVE 5 // When enabled, displays sensor distance instead of GPS altitude. Default = 5m. Requires stream configured on MAV FC
//#define MAVSENSOR173 // When enabled, uses RANGEFINDER - MAVLINK #173 command for the distance. Requires MAVSENSORGPSACTIVE enabled
//#define MAVSENSOR132 // When enabled, uses INFO_DISTANCE - MAVLINK #132 command for the distance. Requires MAVSENSORGPSACTIVE enabled

I’ve ordered a spare Holybro MicroOSD to play with. Just need to figure out which arduino chip it uses - I think :rofl:

1 Like

wow, excellent find! i got a load of old standalone osd hardware collecting dust, might give that a try.
most likely it’s the usual 328p on the holybro board.

Looks like there’s been quite a bit done on it here
Last update seems to be have been as recent as June this year. :grinning:

here you go:

this wasn’t exactly trivial though. the mavlink rangefinder option has been added 2 yrs ago and obviously isn’t supported on current relase version anymore.

what i did was:
git checkout 2bf8277d32f432b86c9916a8a35724c1c9ec2077

set the required defines (hardware type, protocol etc) and, most importantly, uncomment:
#define MAVSENSOR173

code builds fine on current arduino.

for setup you’ll need to use GUI version 1.8, it’s in the respective git repo if you checkout the above hash. it’s pretty picky about using the matching GUI.
you’ll want to set the GPS altitude panel active (it isn’t by default). it will display rangefinder distance while GPS alt is below what you’ve set MAVSENSORGPSACTIVE to.

in you’r special rover usecase you might want to det this to a very high value as you want to keep displaying RNGF no matter what altitude.

cheers, basti.

Thanks for that - I’ll have a look when the spare arrives. I may have some questions :sweat_smile: For instance, I dont understand the git checkout bit? Where do I put that?

that‘s telling git what exact code version to clone. i can well post the firmware file however so you can skip the software part :wink:

Brilliant - you’ve been a great help. Part should be here Tuesday, I’ll let you know how it goes. Thanks again :smiley:

Well I spent about six hours trying every conceivable permutation to install MWOSD with no luck. Tried the firmware you sent. According to a Vid on Youtube it’s an Arduino Pro 5V 16Mhz with ATMega 328. Ardupilot OSD will connect and write firmware no problem, MWOSD or Arduino IDE fail and cant write to it? The little red com Led stops flickering with both but on Ardupilot it stays active and flashes brightly when writing. It uses DTR and I suspect that’s where the error lies? Here’s the error from Arduino.

avrdude: Version 6.3-20190619
Copyright © 2000-2005 Brian Dean,
Copyright © 2007-2014 Joerg Wunsch

     System wide configuration file is "C:\Users\steve\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

     Using Port                    : COM6
     Using Programmer              : arduino
     Overriding Baud Rate          : 57600
     AVR Part                      : ATmega328P
     Chip Erase delay              : 9000 us
     PAGEL                         : PD7
     BS2                           : PC2
     RESET disposition             : dedicated
     RETRY pulse                   : SCK
     serial program mode           : yes
     parallel program mode         : yes
     Timeout                       : 200
     StabDelay                     : 100
     CmdexeDelay                   : 25
     SyncLoops                     : 32
     ByteDelay                     : 0
     PollIndex                     : 3
     PollValue                     : 0x53
     Memory Detail                 :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
       lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : Arduino
     Description     : Arduino
     Hardware Version: 2
     Firmware Version: 1.16
     Vtarget         : 0.0 V
     Varef           : 0.0 V
     Oscillator      : Off
     SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file “C:\Users\steve\AppData\Local\Temp\arduino_build_930234/MW_OSD.ino.hex”
avrdude: writing flash (27440 bytes):

Writing | ################################################## | 100% 10.31s

avrdude: 27440 bytes of flash written
avrdude: verifying flash memory against C:\Users\steve\AppData\Local\Temp\arduino_build_930234/MW_OSD.ino.hex:
avrdude: load data flash data from input file C:\Users\steve\AppData\Local\Temp\arduino_build_930234/MW_OSD.ino.hex:
avrdude: input file C:\Users\steve\AppData\Local\Temp\arduino_build_930234/MW_OSD.ino.hex contains 27440 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 11.60s

avrdude: verifying …
avrdude: verification error, first mismatch at byte 0x0002
0x0e != 0x4d
avrdude: verification error; content mismatch

avrdude done. Thank you.

the selected serial port
does not exist or your board is not connected

i’m using arduine IDE 1.8.13 with the following upload options:

FTDI with DTR connected. for me MWOSD actually was the first code EVER in roughly a decade that compiled and flashed without any issues at first try without additional settings, fixes or reading required.

however, you most likely don’t even need to bother with compiling if you use the MWOSD configurator to flash your board:
try this MWOSD GUI, it’s fw-version dependent:

open MWOSD configurator
select the com port you’ve got your FTDI and OSD conected to and check baudrate is set to 57600
press “flash” button
press “load HEX fw from disk” and select the fw file i sent
press “flash FW”
red and green progress bars should fill as expected
close “flash” splash screen
go back to configurator and press “connect”
check if “read” works and returns appropriate info about fw and hardware version

if so, proceed with uploading the desired font file and adjusting your screen settings, that should be self explanatory.

if not, please drop a link to what exact holybro OSD hardware version you’ve got.

cheers, basti

Hi basti - With MWOSD GUI V1.8 - no, exactly same behaviour I’ve seen on V1.9.1. It appears it’s working but fails on connect after it thinks it’s flashed it with “Waiting for OSD”. Hardware is Holybro Micro OSD V2. It has an AT7456E and an ATMEL 328P on it. I’ve ordered another FTDI usb adapter in case that’s the problem.

Sorry - here’s a link

ok, thanks. if your FTDI works with arducam OSD, but not with MWOSD, i’d assume it’s not a faulty item. it might be i picked a wrong hardware define in the firmware file i supplied, maybe check if your OSD works on current standard MWOSD type firmware? from what i see your hardware type should be minimosd or micro minim osd, the latter supporting additional onboard ADCs for non-FC batt and RSSI monitoring. general 328p and max7456 adressing should work on both subtypes however.

No - doesn’t work on standard MWOSD firmware. Arduino IDE can’t talk to it either yet Ardupilot OSD can. I’ve tried minimosd, micro minimosd and a couple of the other choices.

There are two LED’s on the OSD. A green power led and a red comms led. When it’s connected the red led is flickering as it communicates. As soon as I select Flash - it goes out, It shouldn’t. It should flicker brightly as it’s being written to. I’ve tried from my surface pro as well as desktop PC and behaviour is same. The leds on the FTDI adapter flicker when sending flash firmware but not the OSD.

It looks like it’s simply not MWOSD compatible :frowning:

I’ve emailed holybro support to see if they can explain why it wont work, but I remember from years ago that some devices need to be in boot mode to change firmware, or have to be booting up as the flash is started. There are some pads on the reverse of the pcb that maybe can do that, but the documentation doesn’t mention them.

Servers by jDrones