Servers by jDrones

ArduPilot onboard OSD using an external SPI OSD breakout board


(basti) #1


Using the ArduPilot onboard OSD is possible on board types that have an external SPI port accessible, including Pixhawk. All it requires is a MAX7456 type OSD SPI breakout board like this:
http://www.hobbytronics.co.uk/max7456-osd-breakout
and a few lines added in the respective board’s hwdef.

All OSD code processing is done onboard your flightcontroller. There’s no firmware processing for the OSD board required as it only carries the video chip circuitry. OSD settings handling is done via parameters just like with onboard OSD type hardware.

I have added OSD hardware to a revomini board using the SPI pins accessible on OPLink port:

@Rolf has done this on a pixhawk (fmuv3):

required changes to hwdef are:

  • adding the respective CS pin define
  • adding the OSD to the SPI device table
  • setting the OSD active and making the build system add the required font binaries:

see onboard OSD type flight controllers’ hwdefs for reference.

there might be other solutions coming up to support external backends to ArduPilot OSD on hardware without video overlay chipsets. this one imho is fairly easy to do on current code base and adds a noticeable amount of convenience and functionality compared to using 328p type standalone OSD hardware.

cheers, basti.


(James Pattison) #2

Basti I think you just saved a uart for a lot of people!
I didn’t know those breakouts existed!
@tridge this might be a reasonable default for external spi buses (or a good enough excuse to parametise spi)…


(Sergey) #3

Are the LOS and RESET wires required to be connected too?


(basti) #4

no, besides 5V and GND it needs the SPI pins only (CS, SCK, MOSI, MISO).


(Rolf) #5

Here is the wiring Pixhawk <-> Hobbytroic-Breakout
( https://www.hobbytronics.co.uk/max7456-osd-breakout )

Rolf


(Hugues) #6

Where here the extra code required to run in the autopilot for this to work ?


(basti) #7

in respective board’s hwdef

  1. define the CS pin on the external SPI port. on fmuv3 for example:
    PE4 OSD_CS CS

  2. add osd to SPI device table. on fmuv3 external SPI is SPI4. set ID, mode and speed:
    SPIDEV osd SPI4 DEVID1 OSD_CS MODE0 10*MHZ 10*MHZ

  3. add defines to set OSD active and include font binaries
    define OSD_ENABLED ENABLED
    ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin

cheers, basti