BDB v4: 4th Time's the Charm

I received BDB v4 (SMD connectors- Expensive!) and v4.1 (Through hole connectors) this week, soldered one up and began testing.

The General Idea

For First Contact?, First Strike v1, and Z Offset v1 I used the same $10 2 channel, 3S brushed motor controller. Looking at the parts, it probably would have surved at 4S but I really wanted to move on to something more interesting, and finally gave in to my desire to put a custom mainboard in my robots.

The dual ESC worked great, cost very little, and sound advise is to keep using things that work great!

Unfortunately, as with many before me, I wanted more, even knowing that this would inevitably lead to my downfall.

I’ve enjoyed working with the ESP8266 a fair bit, and particularly like the Wemos/Lolin D1 board since its low price and integrated usb->serial interface make it much easier to work with than the cheaper ESP-01 and ESP12 form factors.

Goals:

  • IMU to help compensate for my poor driving skills by automatically inverting the controls when I’m upside down
  • Proxy for drive commands so I can write my own channel mixing in C++ rather than try to finangle it on my FS-i6X radio transmitter
  • Some degree of telemetry from the robot (via iBUS or WiFi) conveying IMU, Battery, and maybe weapon power information
  • Cool LEDs, possibly using the IMU and/or the drive commands
  • Low price per unit. Maybe these can be used on lots of bots?
  • Connectors on board that can survive combat to help swap damaged components quickly

Feature breakdown

Devices/features:
2x DRV8871 brushed motor drivers (should handle 3-6S no problem) - $2.75 on Digikey/Mouser
1x LSM6DS3 IMU (for easy inversion and cool effects) - $2 for carrier board+imu on Aliexpress
1x Wemos D1 Mini (ESP8266 carrier board) - $4 on Aliexpress
1x 100kΩ : 10kΩ voltage divider between VCC and 5V tied to A0 for battery level readings

Power connection (in):
1x 5V logic
1x VCC (4-45V depending on use)
1x GND

Ports (in/out):
1x 3p Molex Picoblade for Radio: Power, GND, and RX (tied to RX0 using iBUS or PPM radio input)
1x 3p Molex Picoblade for LEDs (5v, Gnd, and WS2812 LED string serial)
1x 3p Molex Picoblade for Weapon PWM (VCC, GND, and PWM pin)
2x 2p Molex Picoblade for L/R brushed DC drive motors

Headaches

I started with BDB v4 after deciding to give up on the Arduino Nano IoT33 due to its very high cost ($33CAD/unit). The ESP8266 is 1/8th the cost and can do nearly as much with some help.


After sending the boards off to the fab, I went on Digikey to order the missing components.

That’s when I noticed a small problem:

$27.19 for passives and wires? What’s going on?

This is when I noticed that SMD Picoblade connectors were much more expensive than through hole versions.
The pre-crimped wires were also not helping.

Unfortunately, v4 was already sent in, so it was time to spin up v4.1:


Testing and validation

So far, I’ve tested each individual component and process:

  1. Assembly:
    • The large capacitors add a lot to the vertical height (1-2mm) and their footprints overlap the 2p picoblade connectors slightly. I was able to trim the plastic foot a bit to make it work, but they should probably move to the bottom and be thinner
    • The VCC through hole pad touches the micro-usb port grounding shield. I soldered the Wemos D1 mini slightly crooked to leave a gap, and placed some kapton tape over the area to be safe.
    • It took 45 minutes to hand-place the SMD components using a solder paste syringe. Next time I should consider a solder stencil!
  2. ESP8266: Works!
  3. IMU: Works!
  4. 2x Motor driver: Works!
  5. Radio:
    • Required some messing around with uTimerLib, and commenting out the iBusBM library’s TX capability (which my radios don’t support anyway)
    • Works!
  6. FastLED + WS2812 test strip: Works!
  7. Weapon PWM: Works fine to blink an LED. No major risk.
  8. Voltage divider+analog input: Works great!

Lessons learned:

  • Thinner capacitors, possibly on the bottom (through hole)
  • Move power input away from USB port
  • move away from RX/TX to make debugging easier (D8/RX1 for weapon/radio ports would free that up)
  • Add input for a hall effect sensor possibly
  • Move all ports to one side, since the dual sided ports make it hard to fit anywhere but the middle of the bot
  • Break out i2c bus for rangefinders?
  • Watch out if moving to a non-carrier board since the true A0 voltage range is 0-1V not 0-3.3V like the D1 mini