23 D‐Ov2Evo: Hardware Setup - bjoerngiesler/BBDroids GitHub Wiki

Servo Setup

The Dynamixels come out of the box configured for 57600bps communication speed, and all have ID 1. We need to switch them to 1Mbps (1,000,000bps) and give them individual IDs. The IDs are counted from the body up:

  • Neck servo: ID 1
  • Head pitch servo: ID 2
  • Head heading servo: ID 3
  • Head roll servo: ID 4

There's a utility firmware to do these modifications. You can find it under Arduino/Utilities/DynamixelTest in the software distribution. Here's how to do the modification:

  1. Compile and flash DynamixelTest onto your Mkr Wifi.
  2. Stick the Dynamixel Shield on top of the Mkr Wifi.
  3. Make sure the Dynamixel Shield is jumpered to "VIN" and that you supply the right amount of power to the servo you are connecting - 12V for the neck servo, 5V for the three others.
  4. Connect the servos individually to the Dynamixel Shield. You can do this with the body assembled for the neck servo. Do not connect multiple servos in a row until you have all configured separately. When you connect the servos, or switch on power, you should see the LED on the servo light up red for 1s, then switch off. If it does not light up, you are not supplying power. If it blinks, you are supplying too much power.
  5. Open a serial connection to the Mkr Wifi and enter help. This gives you a synopsis of commands you can use.
  6. Enter init 57600. This will scan the bus at 57600bps, find the connected servo (likely at ID 1) and output some statistics. Make sure the error flag is zero!
  7. Set the ID for the servo with set_id <OLDID> <NEWID> (so for an unmodified servo that you want to be the head heading servo, set_id 1 3).
  8. Set the baud rate for the servo with set_baud <ID> 1000000 (that's six zeros for 1Mbaud).
  9. Enter init 1000000. This closes the connection and reopens it at 1Mbaud. It should find the servo at the new ID.
  10. Move the servo to its 180° position with move <ID> 180. It's a good idea to mark this position on the servo body and the servo rotor with white paint.
  11. Repeat for the other servos.
⚠️ **GitHub.com Fallback** ⚠️