Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jviereck/1f52aac5221469000081f43b5f2999c5 to your computer and use it in GitHub Desktop.
Save jviereck/1f52aac5221469000081f43b5f2999c5 to your computer and use it in GitHub Desktop.

Running 6 udrive motors with master board at differnet communication frequencies

Date: Thursday, 28 Nov 2019 Author: Julian Viereck

This is running the example.cpp from the master-board with 6 udrive boards. With the stock firmware configuration, we were not able to achieve a stable communication loop. When switching to 2 retries and lower the SPI communication bus speed from 8 to 6 kHz, a stable (zero error) communication was established.

The exact code (modifications to the firmware and the example.cpp) are on this branch.

With retry 2, 8 kHz communication

Not all udrive boards reported enabled. Therefore, was not able to launch the example.

With retry 1, 6 kHz communication

IMU: 0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
Motor  00 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:-0.115 velocity:+0.000 current:-0.524 
Motor  01 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:-0.129 velocity:+0.000 current:-0.496 
Motor  02 -> enabled:1 ready:1 IDXT:1 Index detected:1 position:-0.418 velocity:+0.000 current:-0.217 
Motor  03 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:-0.266 velocity:+0.003 current:-0.357 
Motor  04 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:-0.242 velocity:+0.000 current:-0.379 
Motor  05 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:-0.169 velocity:+0.000 current:-0.453 
Motor  06 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:-0.017 velocity:+0.002 current:-0.023 
Motor  07 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:-0.001 velocity:-0.000 current:-0.012 
Motor  08 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:-0.128 velocity:+0.000 current:-0.490 
Motor  09 -> enabled:1 ready:1 IDXT:0 Index detected:1 position:-0.101 velocity:+0.000 current:-0.527 
Motor  10 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:+0.000 velocity:+0.000 current:-0.634 
Motor  11 -> enabled:1 ready:1 IDXT:1 Index detected:1 position:-0.389 velocity:+0.000 current:-0.227 
Motor Driver  00 -> Enabled:1 Error:0 
Motor Driver  01 -> Enabled:1 Error:0 
Motor Driver  02 -> Enabled:1 Error:0 
Motor Driver  03 -> Enabled:1 Error:0 
Motor Driver  04 -> Enabled:1 Error:0 
Motor Driver  05 -> Enabled:1 Error:0 
Motor Driver 00, disabled     76/ 25656 (0.296 %), motor 0 disabled     76 (0.296 %), motor 1 disabled     76 (0.296 %)
Motor Driver 01, disabled     92/ 25656 (0.359 %), motor 0 disabled     92 (0.359 %), motor 1 disabled     92 (0.359 %)
Motor Driver 02, disabled     83/ 25656 (0.324 %), motor 0 disabled     83 (0.324 %), motor 1 disabled     83 (0.324 %)
Motor Driver 03, disabled     88/ 25656 (0.343 %), motor 0 disabled     88 (0.343 %), motor 1 disabled     88 (0.343 %)
Motor Driver 04, disabled     78/ 25656 (0.304 %), motor 0 disabled     78 (0.304 %), motor 1 disabled     78 (0.304 %)
Motor Driver 05, disabled     61/ 25656 (0.238 %), motor 0 disabled     61 (0.238 %), motor 1 disabled     61 (0.238 %)

With retry 2, 6 kHz communication

IMU: 0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
Motor  00 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:+0.250 velocity:-0.000 current:+0.403 
Motor  01 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:+0.266 velocity:-0.000 current:+0.386 
Motor  02 -> enabled:1 ready:1 IDXT:1 Index detected:1 position:+0.347 velocity:-0.000 current:+0.295 
Motor  03 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:+0.194 velocity:-0.000 current:+0.444 
Motor  04 -> enabled:1 ready:1 IDXT:0 Index detected:1 position:+0.252 velocity:-0.000 current:+0.407 
Motor  05 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:+0.306 velocity:-0.002 current:+0.335 
Motor  06 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:+0.013 velocity:+0.000 current:-0.004 
Motor  07 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:-0.001 velocity:-0.000 current:-0.059 
Motor  08 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:+0.250 velocity:-0.000 current:+0.384 
Motor  09 -> enabled:1 ready:1 IDXT:1 Index detected:1 position:+0.321 velocity:+0.000 current:+0.320 
Motor  10 -> enabled:1 ready:1 IDXT:0 Index detected:0 position:-0.002 velocity:+0.000 current:+0.639 
Motor  11 -> enabled:1 ready:1 IDXT:1 Index detected:1 position:+0.305 velocity:+0.000 current:+0.342 
Motor Driver  00 -> Enabled:1 Error:0 
Motor Driver  01 -> Enabled:1 Error:0 
Motor Driver  02 -> Enabled:1 Error:0 
Motor Driver  03 -> Enabled:1 Error:0 
Motor Driver  04 -> Enabled:1 Error:0 
Motor Driver  05 -> Enabled:1 Error:0 
Motor Driver 00, disabled      0/ 120634 (0.000 %), motor 0 disabled      0 (0.000 %), motor 1 disabled      0 (0.000 %)
Motor Driver 01, disabled      0/ 120634 (0.000 %), motor 0 disabled      0 (0.000 %), motor 1 disabled      0 (0.000 %)
Motor Driver 02, disabled      0/ 120634 (0.000 %), motor 0 disabled      0 (0.000 %), motor 1 disabled      0 (0.000 %)
Motor Driver 03, disabled      0/ 120634 (0.000 %), motor 0 disabled      0 (0.000 %), motor 1 disabled      0 (0.000 %)
Motor Driver 04, disabled      0/ 120634 (0.000 %), motor 0 disabled      0 (0.000 %), motor 1 disabled      0 (0.000 %)
Motor Driver 05, disabled      0/ 120634 (0.000 %), motor 0 disabled      0 (0.000 %), motor 1 disabled      0 (0.000 %)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment