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). This is not a ready to use product so don't expect any support. The connection can be done directly or remotely (e.g. Note that you can also connect it to QGroundControl to have telemetry. #define BATTERY_CELL_NUM 3 Make sure that the Arduino board is disconnected from the Flight Controller/GPS for programming. Number of battery cells (only needed for CAN adapter to show proper battery percentage) Set the number matching your battery in the following #define #define USE_COMPASS_HEADING Number of bettery cells needed for correct battery percentage calculation (3 by default). Uncomment the line below to use magnetometer heading instead (not recommended when using Serial adapter as it will not be tilt compensated). By default the course over ground from GPS will be used. Default is GPS, uncomment the #define line to use compass (note it is not tilt compensated for serial adapter) #include "FlexCAN.h"Selecting heading source. Select the adapter type you are using (either serial or CAN) by commenting/uncommenting the right includes below #include "FlexCAN.h" For CAN adapter use: These two lines below shall be commented out when using the serial adapter CAN adapter and uncommented when using CAN adapter These two lines below shall be commented out when using the CAN adapter and uncommented when using serial adapter You need to uncomment/comment out proper #includes.Ĭode:// Select the adapter type you are using (either serial or CAN) by commenting/uncommenting the right includes below Selecting serial or CAN adater (default is serial). There are follwoing configuration options in the sketch: FlexCAN library (included in Teensyduino since v1.20 - see, you can also download it separately from here) Connection diagrams and Arduino sketches are attached.įor 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)įor CAN adapter you need the following libraries to compile this sketch: - NazaCanDecoder (v20140921 or newer) 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: latitudelongitudealtitude (barometric for CAN adapter and from GPS for serial adapter)speed over groundnumber of satellitesGPS fixcompass 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. I did not test in flight, all the tests were done on the ground. 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).
0 Comments
Leave a Reply. |