background image

 

 
 

 

REV 1.1.1 (Last Modified May 25, 2023) 

11 | 29    

R E V 1 . 1 . 1

 

 

 

 

 

Communication Definitions and Algorithms 

KDECAN uses different data types in the messages that are sent between the ESCs and the master. The CRC 
algorithm is used to verify that no information is altered within the transmission of the CAN message. The data 
type descriptions and algorithm are provided below for reference. 

 

 

Note: Multiple CAN bus analyzers are available on the market. KDE used the CANalyst 2 during development 
for its features and interface.

 

Data Types 

The following data types used in CAN messages are described below: 
 
HA Hexadecimal ASCII 

[‘0’... ‘9’, ‘A’... ‘F’]

 

U8 Unsigned char [0...0xFF] 
U16 Unsigned short (High byte 

 byte 0, Low byte 

 byte 1

), [0… 0xFFFF]

 

U32 Unsigned int (High byte 

 byte 0, Low byte 

 byte 3), [0... 0xFFFFFFFF] 

U64 Unsigned long (High byte 

 byte 0, Low byte 

 byte 7), [0... 0xFFFFFFFFFFFFFFFF] 

CRC Algorithm 

 
The error management as described in the CAN protocol is handled entirely by hardware using a Transmit 
Error Counter (TEC value, in CAN_ESR register) and a Receive Error Counter (REC value, in the CAN_ESR 
register), which get incremented or decremented according to the error condition. For detailed information 
about TEC and REC management, refer to the CAN standard. 
 
For more information please refer to STM32 AN4187  

Endianness 

 

KDECAN uses Big Endian for multi-byte values. 
Example: 
 
Decimal Value: 1000 
Hex Value in Big Endian: 0x03E8 
(Byte)   

  0 

  1 

  2 

  3 

  4 

  5 

  6 

  7 

(Hex)   

[03] 

[E8] 

[xx] 

[xx] 

[xx] 

[xx] 

[xx] 

[xx] 

 

 

 

Summary of Contents for KDECAN Protocol KDE-UAS125UVC-HE

Page 1: ...itself and reserve all rights not expressly granted to you The terms of this License will govern any software upgrades provided by KDE Direct that replace and or supplement the original KDECAN Protoco...

Page 2: ...NT AND NON INFRINGEMENT OF THIRD PARTY RIGHTS KDE DIRECT DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE KDECAN PROTOCOL SOFTWARE THAT THE FUNCTIONS CONTAINED IN OR SERVICES PERFORMED...

Page 3: ...ndemnify defend and hold KDE DIRECT and its authorized licensors harmless from and against any and all liabilities damages claims fines and expenses including reasonable attorneys fees and costs arisi...

Page 4: ...he ESC responds accordingly This document defines the message structure and protocol necessary to communicate with UVC ESCs through CAN bus Contents KDE Direct LLC License Agreement 1 Overview 4 List...

Page 5: ...bus connection 7 Figure 3 Example CAN bus network 8 Figure 4 KDE Direct Device Manager download link 9 Figure 5 ESC Unique ID Assignment 9 Figure 6 Updated ESC ID 10 Figure 7 ESC ID assignment exampl...

Page 6: ...Frame Format Extended Frame Format CAN 2 0B 29 bit identifier or Standard Frame Format CAN 2 0A 11 bit identifier Endianness Big Endian KDE ESC series UVC ESC minimum firmware version required D46011...

Page 7: ...ease refer to the picture shown below Figure 1 CAN bus port configuration Connect multiple ESCs together following the wire setup shown below To connect additional ESCs simply connect the two closest...

Page 8: ...nternally developed can incorporate the KDECAN protocol Figure 3 Example CAN bus network Note 3 3V CAN transceivers are fully interoperable with 5V CAN transceivers ID Assignment By default each ESC h...

Page 9: ...ssignment Figure 4 KDE Direct Device Manager download link The ESC ID can be set in the KDE Device Manager through the ESC ID CAN selection To set the ESC ID press the FIXED checkbox select the desire...

Page 10: ...sages having nonunique IDs Direction Description CAN Message Frame and Data Master to ESC send Start ESC Enumeration Rotated motors return ESC MCU Frame ID 00 00 01 0A Data 27 10 ESC to Master receive...

Page 11: ...A F U8 Unsigned char 0 0xFF U16 Unsigned short High byte byte 0 Low byte byte 1 0 0xFFFF U32 Unsigned int High byte byte 0 Low byte byte 3 0 0xFFFFFFFF U64 Unsigned long High byte byte 0 Low byte byte...

Page 12: ...its for the source id sender 8 bits for the destination id receiver and 8 bits for the object address which tells the ESC how to respond to the message Figure 8 CAN Bus frame Extended Frame ID Data Pr...

Page 13: ...ed on the received CAN bus message Example Direction Standard Frame ID Data Description Master to ESC Bin 0 00010 00000 Hex 0x040 Query FW and HW obj 0 ESC to Master Bin 1 00010 00000 Hex 0x440 0C 00...

Page 14: ...o 500 Hz 2 ms 3 0 No data ESC s Current 2 Receive ESC Input Current A 10 Hz 100 ms to 500 Hz 2 ms 4 0 No data ESC s RPM 2 Receive ESC eRPM rpm 10 Hz 100 ms to 500 Hz 2 ms 5 0 No data ESC s Temperature...

Page 15: ...SC 00 00 02 00 00 00 00 00 00 00 00 00 Master sends request ESC to Master 00 02 00 00 0C 00 01 00 46 ESC replies with firmware 0x 0C 00 and hardware 01 00 1 Set PWM U16 MASTER TO ESC Extended Frame ID...

Page 16: ...00 00 00 00 00 00 00 00 Requests ESC voltage ESC to Master 00 02 00 02 06 2D 1581 1581 100 15 81 V 3 Get Current U16 MASTER TO ESC Extended Frame ID Priority Source Address Destination Address Object...

Page 17: ...or poles Master to ESC 00 00 02 04 00 00 00 00 00 00 00 00 ESC to Master 00 02 00 04 01 DD 477 477 60 2 22 2 601 rpm 02 61 609 3 321 rpm 02 94 660 3 600 rpm 02 EF 751 4 096 rpm 02 FA 762 4 156 rpm 5 G...

Page 18: ...SC TO MASTER Answer Extended Frame ID Data Priority Source Address Destination Address Object Address Byte0 Byte1 0x00 0x02 0x00 0x06 IT0 IT1 Example Message Transmission Frame ID Data Data Decimal Eq...

Page 19: ...2 4C 76 76 02 61 97 97 02 64 100 100 8 Get All MCU IDs U64 MASTER TO ESC Extended Frame ID Priority Source Address Destination Address Object Address 0x00 0x00 0x01 0x08 ESC TO MASTER Answer Extended...

Page 20: ...57 18 20 33 33 37 ESC to Master 00 02 00 09 02 The ESC responds with 2 its new node address 10 Start ESC Enumeration MASTER to ESC Priority Source Address Destination Address Object Address Byte0 Byte...

Page 21: ...0 00 00 00 00 Broadcast Enum message for 10 000 msec ESC to Master 00 01 00 0b 05 E1 00 95 02 10 1F 00 05 E1 represents 1505 00 95 represents 149 02 10 represents 528 1F represents 31 00 15 05 V 1 49...

Page 22: ...SC 00 00 02 21 00 00 00 00 00 00 00 00 ESC to Master 00 02 00 21 01 Restart the ESC controls and re enable arming and throttle control 34 Get Warning Signals and Errors MASTER to ESC Priority Source A...

Page 23: ...ating bit will be set Stall Protection BIT 0 DEC 1 Over Temperature BIT 1 DEC 2 Overload Protection BIT 2 DEC 4 Over Voltage BIT 3 DEC 8 Low Voltage BIT 4 DEC 16 Voltage Cutoff if enabled BIT 5 DEC 32...

Page 24: ...imal 17 Bit 3 Over Voltage Binary 0010 1000 Decimal 40 Binary 0001 1000 Decimal 24 Binary 0000 1000 Decimal 8 Binary 0000 1100 Decimal 12 Binary 0000 1010 Decimal 10 Binary 0000 1001 Decimal 9 Bit 2 O...

Page 25: ...roller but can also be a CAN Bus analyzer or sniffer What is the MCU ID The microcontroller unit the UVC series ESCs use is a STM32 CPU Each MCU has a unique identifier referred to as the MCU ID How d...

Page 26: ...with different data If they reply with the same data you will only see one message To avoid this set the ESCs to have different CAN IDs through the KDE Device Manager or through ESC Enumeration or cha...

Page 27: ...s by default The ESC must be connected to a power supply or LiPo battery Make sure USB is disconnected Try power cycling disconnect and reconnect LiPo battery The ESC is correctly wired to the device...

Page 28: ...ugh CAN bus arming and full throttle control will work through KDECAN If the throttle control lead white red black wire is connected it will be used as a backup Initial Setup First we recommend updati...

Page 29: ...messages at 5ms 200Hz The motor will start beeping to indicate the number of cells for the LiPo battery voltage connected You can then send CAN messages to spin the motor Frame ID ESC ID2 throttle Dat...

Reviews: