Home About Contact Using Minim OSD in NAZA

So if you dont wanna break your bank for an iOSD module for you DJI Naza , here are some simple (yet DIY complicated) stuffs to follow.
NOTE: TRY AT YOUR OWN RISK (VERY LOW RISK IF YOU FOLLOW THE INSTRUCTIONS PRECISELY WITHOUT ERRORS OR SYNC FAILURE. YET, I AM NOT RESPONSIBLE FOR A FRIED NAZA, THERMONUCLEAR WAR OR YOU NEIGHBORS DEAD CAT
DIY project that shall make it possible to connect DJI Naza-M (v1, v1 Lite, v2) with MinimOSD using either:
  • Arduino board (Pro Mini, 16Mhz, 5V) and serial connection (works with DJI Naza-M v1, v1 Lite and v2)
  • Teensy 3.1 board + TeensyDuino (tested with version 1.20) + CAN transciever and CAN connection (works with DJI Naza-M v1 and v2 with PMU, does not work with v1 Lite).
I did not test in flight, all the tests were done on the ground.
It converts data from Naza GPS/FC data into Mavlink and provides the following information via the MAVLink GPS_RAW_INT, ATTITUDE, VFR_HUD, SYS_STATUS and RC_CHANNELS_RAW messages:
  • latitude
  • longitude
  • altitude (barometric for CAN adapter and from GPS for serial adapter)
  • speed over ground
  • number of satellites
  • GPS fix
  • compass heading (not tilt compensated with serial adapter) or course over groud (selectable)
  • pitch and roll (for artificial horizon)
  • VSI - Vertical Speed Indicator (barometric for CAN adapter and from GPS for serial adapter)
  • battery level/percentage (CAN adapter only)
  • RC channel values (CAN adapter only)
  • flight mode: MANUAL = ACRO, ATTI = STAB, GPS = POSI, failsafe = RETL (CAN adapter only)
In addition to that HEARTBEAT is also sent periodically.
Connection diagrams and Arduino sketches are attached.



For serial adapter you need the following libraries to compile this sketch: - NazaDecoder (v20141130 or newer) - AltSoftSerial (needed because adapter communicates at 115200 baud with Naza GPS and at 57600 baud with the OSD)







For CAN adapter you need the following libraries to compile this sketch: - NazaCanDecoder (v20140921 or newer) - FlexCAN library (included in Teensyduino since v1.20 - see https://www.rcgroups.com/forums/show...&postcount=481, you can also download it separately from here)
There are follwoing configuration options in the sketch:
  • Selecting serial or CAN adater (default is serial). You need to uncomment/comment out proper #includes. For serial adapter use: Code:
// Select the adapter type you are using (either serial or CAN) by commenting/uncommenting the right includes below
// These two lines below shall be commented out when using the CAN adapter and uncommented when using serial adapter
#include "NazaDecoderLib.h"
#include "AltSoftSerial.h"
// These two lines below shall be commented out when using the serial adapter CAN adapter and uncommented when using CAN adapter
//#include "NazaCanDecoderLib.h"
//#include "FlexCAN.h"
For CAN adapter use:
Code:
// Select the adapter type you are using (either serial or CAN) by commenting/uncommenting the right includes below
// These two lines below shall be commented out when using the CAN adapter and uncommented when using serial adapter
//#include "NazaDecoderLib.h"
//#include "AltSoftSerial.h"
// These two lines below shall be commented out when using the serial adapter CAN adapter and uncommented when using CAN adapter
#include "NazaCanDecoderLib.h"
#include "FlexCAN.h"
Selecting heading source. Default is GPS, uncomment the #define line to use compass (note it is not tilt compensated for serial adapter)
Code:
// By default the course over ground from GPS will be used. Uncomment the line below to use magnetometer heading instead (not recommended when using Serial adapter as it will not be tilt compensated).
//#define USE_COMPASS_HEADING
Number of bettery cells needed for correct battery percentage calculation (3 by default). Set the number matching your battery in the following #define
Code:
// Number of battery cells (only needed for CAN adapter to show proper battery percentage)
#define BATTERY_CELL_NUM 3
Make sure that the Arduino board is disconnected from the Flight Controller/GPS for programming.
Note that you can also connect it to QGroundControl to have telemetry. The connection can be done directly or remotely (e.g. via XBee or 3DR radios).
This is not a ready to use product so don't expect any support. It is a DIY project and you need to have some understanding of electronics and Arduino (please don't ask me how it works or how to upload the sketch, there are many tutorials available online).
It is still in development stage so there may be errors. Use at your own risk, try to not fry your Naza

Comments

Popular posts from this blog

0.96 OLED Display With Arduino & Getting Text From Serial Monitor...

Arduino & 4x4 Matrix keypad