1364
Kommentar:
|
← Revision 7 vom 01.02.2019 12:05 ⇥
1791
|
Gelöschter Text ist auf diese Art markiert. | Hinzugefügter Text ist auf diese Art markiert. |
Zeile 5: | Zeile 5: |
Zeile 8: | Zeile 7: |
* if you use higher resolution (11bit = 2048), just send the lower bits as second byte: | * if you use higher resolution (11bit = 2048), just send the lower bits as second byte: |
Zeile 20: | Zeile 19: |
Zeile 26: | Zeile 24: |
* current | * current (see below) |
Zeile 28: | Zeile 27: |
* Temperature | * Temperature in °C |
Zeile 32: | Zeile 31: |
== 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)); } }}} |
|
Zeile 34: | Zeile 45: |
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:
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
note: the Status is sometimes also called "MaxPWM" in the sourcecodes