CAN Bus Communication: Difference between revisions

From STorM32-BGC Wiki
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
== DJI CAN Bus ==
== DJI CAN Bus ==


The STorM32 gimbal controller can be connected to the CAN bus of a DJI flight controller. This enables the STorM32-Link feature.  
The STorM32 gimbal controller can be connected to the CAN bus of a DJI flight controller, which enables STorM32-Link.


Currently only the DJI Naza M2 is supported.
Currently only the DJI Naza M2 is supported.

Revision as of 16:40, 15 January 2018

The information on this page refers to firmware v2.35e and higher.

The STorM32 gimbal controller allows communication via the CAN bus, and has support for DJI CAN bus and UAVCAN protocols.

DJI CAN Bus

The STorM32 gimbal controller can be connected to the CAN bus of a DJI flight controller, which enables STorM32-Link.

Currently only the DJI Naza M2 is supported.

Configuration

In the GUI, the DJI CAN bus related parameters are located in the [GUI:Interfaces Tool] window, which is accessible via the [GUI:Tools] menu.

Uavcan Configuration:
Set to “dji naza” to activate the CAN bus communication with a DJI Naza M2. The STorM32 board needs to be reset for a change to become effective.

STorM32Link Configuration:
Set to any value different from “off” to activate the STorM32-Link features.

When the CAN bus is configured to “dji naza”, the STorM32-Link will become PRESENT and OK, as indicated in the respective areas in the [GUI:Dashboard] tab and the [GUI:DataDisplay]. The parameter STorM32Link Configuration determines if and which STorM32-Link features are functional.

DJI CAN Bus Messages

The STorM32 listens to the 0x090-1002 (OSD data) and 0x108-1009 (input/output) messages. In order to enable the emission of the OSD data message, the STorM32 emits 0x108-1007 (OSD heartbeat) messages at 1 Hz.

For the details on the messages, see pavelsky's rcgroups thread DJI NAZA/Phantom/A2 CAN bus communication protocol - NazaCanDecoder Arduino library.

STorM32-Link Features

The DJI CAN bus STorM32-Link provides 3 features:

  • Control of the STorM32 functions by the radio transmitter. This feature has the same effect as if the receiver would be connected to the STorM32 controller at its inputs, except that such a physical connection is not required since the information is read off from the DJI CAN bus. For this to work the parameter Virtual Channel Configuration in the [GUI:Setup] tab must be set to “serial”.
  • Yaw drift compensation. This feature suppresses any yaw drift of the camera IMU. This allows one e.g. to put the yaw axis into “hold” mode for extended periods of time, and yet the camera will not drift away (the accuracy depends on the accuracy of the DJI flight controller's yaw angle).
  • Horizon drift compensation. This feature suppresses any horizon tilts in high-g maneuvers. A demo video is available on the firmware author's youtube channel. For this to work the parameter STorM32Link Configuration must be set to “v1”.

UAVCAN

See Uavcan.