Unterschiede zwischen den Revisionen 5 und 6
Revision 5 vom 22.01.2016 11:43
Größe: 1450
Autor: HolgerB
Kommentar:
Revision 6 vom 10.10.2018 09:01
Größe: 1364
Autor: IngoBusker
Kommentar:
Gelöschter Text ist auf diese Art markiert. Hinzugefügter Text ist auf diese Art markiert.
Zeile 44: Zeile 44:

= arduino sample =

http://forum.mikrokopter.de/topic-post547735.html#post547735

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
  • state
  • Temperature
  • 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

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