= I2C bus protocol for BL-Ctrl = This describes the I2C-Protocol for the brushless controller = The I2C-protocol is compatible to BL-Versions 2&3 = == Setpoint == * Setpoint: just write the setpoint (0-255) to the BL-Ctrl * if you use higher resolution (11bit = 2048), just send the lower bits as second byte: * first, the High-Byte = SetPoint / 8; * second, the Low-Byte = SetPoint % 8; // note-> only the lower 3 bits are used * please leave the other bits in the Low-Byte to zero === BL-addresses === . 1 = 0x50 . 2 = 0x52 . 3 = 0x54 . 4... == reading == If you read from the BLs: Read from BL-addresses (0x51, 0x53, 0x55, ...) -> the lower bit means: read now The data comes in this order * current (see below) * state * Temperature in °C * rpm (BL V3 only) * voltage (BL V3 only) Note: only low-byte -> if lower than 60, just add 255 -> '5' would be 25,5V+5 = 26,0V == current == * Value <= 200 Current reading is in 0,1A (123 = 12,3A) * Value > 200 Current reading is in 1A with 20A Offset (234 = 20 + 34 = 54,0A) {{{ unsigned int BL3_Current(unsigned char who) // in 0,1A { if(Motor[who].Current == 255) return(0); // invalid if(Motor[who].Current <= 200) return(Motor[who].Current); else return(200 + 10 * ((unsigned int)Motor[who].Current-200)); } }}} == state == For the state: . 255 = motor running . 254 = motor running and operating in redundant mode . 250 = BL V2 ready for operation (not running) . 248-249 = BL V3 ready for operation (not running) . 50-247 = Motor running, but MaxPWM is limited (overtemperature or overcurrent) . 40 = starting motor . 39 = motor start failed . 1-20 = error in selftest {i} note: the Status is sometimes also called "MaxPWM" in the sourcecodes