21 D‐Ov2Evo: Power and Main PCBs Build Instructions - bjoerngiesler/BBDroids GitHub Wiki

Preface

  • NEVER work on your droid's electronics while it is switched on or the batteries (or shore power) are plugged in.
  • ALWAYS check everything conceivable for polarity and shorts.

Power PCB

Parts & Build

This is a fairly easy build. You need (top to bottom in the picture, colors subject to change):

  • One connector pair (male / female, green in the picture) for the main input
  • Two 2-pin JST male connectors (white) for the motor cooling fans
  • Four XT30 female connectors (yellow) for everything that needs battery power
  • One fuse holder and 10A fuse
  • Two standoffs and screws for the IMU
  • One 9-pin female pin header connector, also for the IMU.

Solder all components onto the board, taking care of polarity:

  • The screw-down connector is agnostic to polarity at solder time, but be careful connecting + to the right hand side and - to the left hand side, marked by the V_IN symbols underneath the logo. It is not agnostic to mounting position - solder it so that the flathead screws to screw down the wires point towards the fuse holder.
  • The JST connectors for the cooling fans have an opening that should point to the left in the picture.
  • The XT30 connectors go in with the blocky end to the bottom, towards the "+" sign marked next to the bottom left connector in the picture.

Test

Once everything is soldered, and before you apply power, insert the fuse and test the board with your multimeter following the guides in the following picture.

Everything marked with a blue dot should be connected:

  • All top poles (rounded shape) of the XT30 connectors
  • The two top poles of the fan connectors
  • The left pole of the screw down connector
  • The 3rd pin from the left of the 9-pin IMU connector.

Everything marked with a red dot should be connected:

  • All bottom poles (blocky shape) of the XT30 connectors
  • The right pole of the screw down connector

Make sure there is no short between any two points marked in red and blue respectively.

Once you've made sure you have no shorts, and everything is connected properly, apply power (anything between 12V and 16V) to the screw-down connector. Power should come from a bench supply for testing, and should be limited to <1A. If you don't have a bench supply, testing with a battery is OK too, but be careful!

There are no LEDs on the board, so use your multimeter to measure. Every XT30 connector should have exactly the voltage you put in. The 12V fan connectors at the top should have less than what you put in, but without load it can be more than the 12V specified. On my test board, I'm measuring 14.5V when I input 16V, and exactly 12V when I input exactly 12V.

Mount in droid

Insert the board into the printed Top Frame with the two "wings" (in the picture on top) pointing towards the hole for the on/off switch on the droid's right side. Use the standoffs at the bottom of the board (left & right next to the female pin header) to fasten the board. The holes left for the standoffs should be self-tapping but you can tap them for M2.5 if you like. Use the two provided M2 mounting screws to fasten the board's "wings" left and right next to the hole for the power switch.

Main PCB

This is a straightforward one to build, but because it carries all of the expensive and fragile components it is recommended to take your time with testing.

The main board gets components on the top and on the bottom. Let's start with the top components, adding them one by one:

  • The XT30 power connector for the servo board. Take care of polarity here! Connector's blocky end is +.
  • The dual 14pin female headers for the Arduino MKR Wifi 1010.
  • The dual 10pin female headers (2mm pitch) for the XBee.
  • The dual 8pin female headers for the DFPlayer mini.
  • The 4pin male headers and 5pin male header for the amp connections.

Please make sure you don't have any shorts anywhere, especially not between the two pins of the 12V connector, and that the polarity of the connector is correct.

Time for a first test. Please use a bench supply if you have one, set it to 12V and low current (300mA or so), and connect it directly to the top 12V connector. The picture shows the MKR Wifi already in place, but it's actually a good idea to test without the MKR Wifi first. The board has two red LEDs marked "12V" and "5V", these should both turn on.

Once you've made sure this works, it's time to populate the lower side of the board. Add the lower XT30 connector, again making sure you've got the polarity right, and the 3pin/4pin motor connector combinations. Every line of 7 holes for the pin headers gets a 4pin connector towards the board edge, and a 3-pin connector towards the board center. There is a small line printed on the board showing the separation.

The orientation of the pin headers is not that important; here I've used the colors of the cables to guide me. The 4-pin cable I used has red and black as pin 1 and pin 2, and if you review the electronics reference, you find that pin 1 of the connector is VCC and pin 2 is GND going to the motor encoders, so that connector was turned to match those cable colors. The 3-pin connector has ENable, PWM_A and PWM_B, and I wanted PWM_A and PWM_B red and black respectively, so that connector was turned to match those cable colors. This resulted in the rotated connectors you see here.

Please do not be confused by the different wire colors. The motor has 6 colored wires (4 for the encoder, 2 for the actual motor), and we supply one 4-wire and one 3-wire extension cable to go into the board. The colors of the extension wire do not match the color of the motor cables. The important thing is that the connections end up being correct from the pins on the board to the colored wires on the motor. The picture shows the appropriate colored wires you should connect the extensions to.

Mount in Droid

  • Add the Arduino (USB port on the edge of the board), the Dynamical shield (Dynamixel connectors over the USB port), the XBee (diagonal part aligned with the two diagonal lines on the board) and the MP3 player (SD card slot pointing outward). * Add an XT30 connector to the input side of a 12V BEC and connect it to the upward pointing XT30 connector on the main board. The other side goes into the screw terminals of the Dynamixel shield.
  • Make sure the jumper on top of the Dynamixel shield is set to "VIN".
  • Make sure the small switch next to the XBee is switched to the side pointing towards the diagonal end of the XBee.
  • Add an antenna to the XBee.
  • Connect the Power and Main Boards with an XT30 power cable (male-male) and an I2C cable. Note that all the I2C outlets are interconnected, so it doesn't matter where you plug it in - there are two sockets on the main board and a total of four on the power board and IMU.
  • Mount the board in the droid.

Initial Software Test

Initially, do not power the droid with batteries, only hook it up to your computer using the USB port on the MKR Wifi 1010, and open a serial console. Type status. You should see an output like

System status:
console (Console interaction facility): started, operational
runloop (Main runloop): started, operational
wifi (Wifi comm module (uninitialized)): started, operational
xbee (Communication via XBee 802.5.14): started, operational
servos (Dynamixel subsystem): stopped
d-o (D-O Main System): stopped, batt: 0.29V -0.30mA, servos not started, motors: L Err 0, R Err 0, IMU OK

This shows you that the subsystems console, runloop, wifi and xbee are started and operational, while servos and d-o are not. We don't expect them to, because servos depends on battery power (currently off) and d-o depends on battery power and servos.

If you see console, runloop or wifi not being operational, please be in touch; these only depend on the MKR Wifi itself and the software, if they are not working something is likely amiss with either software or Arduino.

The important things to look out for at this time are the status of the xbee and d-o subsystems.

  • If xbee is not started and operational, please see "XBee Subsystem Troubleshooting" below.
  • The d-o line should show a section on batt with a voltage and current rating, and it should show a line saying IMU OK. If you see batt: not available or IMU Error, please see "I2C Components Troubleshooting" below.

XBee Subsystem Troubleshooting

xbee should report as being started. If it is not, make sure that the small switch on the mainboard next to the XBee board is switched towards the diagonal side of the XBee. Enter xbee start. You should see something like this --

> xbee start
Starting xbee...auto-detecting BPS... 115200...Entering AT mode.
Successfully entered AT Mode
Success.
Found XBee at address: 13A200:421CB95F (0x13a200:421cb95f) Firmware version: 200D
MM response: 3
MM=3 response: OK
RR response: 0
Sending "ATCH=19"
Sending "ATID=3332"
Sending "ATMY=1000"
Sending "ATNIGeneric D-O"
Sending "ATNT=64"
Sending "ATWR"
Sending "ATAP=2"
Sending "ATCN"
OK

>

If you instead see something like this:


> xbee start
Starting xbee...auto-detecting BPS... 115200...Entering AT mode.
no response to +++
9600...Entering AT mode.
no response to +++
57600...Entering AT mode.
no response to +++
19200...Entering AT mode.
no response to +++
28800...Entering AT mode.
no response to +++
38400...Entering AT mode.
no response to +++
76800...Entering AT mode.
no response to +++
failed.
HW dependency missing

>

this means that it's trying to unsuccessfully find the XBee at different baud rates. Please remove power and USB from the droid and use a multimeter to make sure these connections are working, and there are no shorts.

If you are sure everything is connected correctly and has power, and the switch is correct, try xbee start again. If it's still not working, please be in touch.

I2C Components Troubleshooting

If the battery meter and IMU do not respond, please double check that the I2C cable is OK and plugged in correctly. Check whether the IMU board LED is on. If it is, then at least power is going through I2C. Please enter scan_i2c, the output should look like this:

> scan_i2c
Found device at 0x40
Found device at 0x60
Found device at 0x6a
Found device at 0x6b

> 
⚠️ **GitHub.com Fallback** ⚠️