Electronics - makerforgetech/modular-biped GitHub Wiki

Overview

The project attempts to modularise the various electronic elements to allow each to be modified or upgraded depending on your specific requirements.

Electronic modules diagram

Broadly speaking, the project requires the following components. I have included some example amazon listings, but please shop around for the best price or availability, or buy local if you can.

  • A power source and switch. I use a USB-C PD that allows the selection of input voltage. As I also have 3 18650 batteries connected, my switch allows me to select between the two power sources.
  • Two buck converters (DC-DC) to step down the voltage to 5V for the Pi and for the arduino / servos. Separate buck converters are used to allow the Pi to be disconnected and powered independently, and to minimise any interference between the two systems.
  • An Arduino Pro Mini with custom PCB to control the servos.
    • 9 SG5010 servos for the legs
    • 2 TowerPro MG92B servos for the neck and head + an additional servo for the ear.
    • An MPU6050 accelerometer / gyroscope (optional- used to balance the robot)
    • 2 resistors for the voltage divider. (optional - only used for the battery monitor, see below)
    • A Raspberry Pi with custom PCB to control the related components.
    • A camera module. Mine uses a wide angle lens (used for vision input)
    • A buzzer (used for audio output)
    • A neopixel LED ring for the eye
    • A logic level converter to allow the Pi to communicate with the Arduino and neopixels.
    • A microwave sensor to detect movement. (RCWL-0516)
    • A coral TPU accelerator for the Pi. (optional but recommended for Pi 3).
    • A MEMS I2S microphones (SPH0645)
    • SK6812 neopixels for the head PCB

PCBs

See the Arduino page for details on the Arduino PCB pinout. See the Raspberry Pi page for details on the Raspberry Pi PCB pinout.

The PCBs can be ordered and printed by uploading the gerber files to an appropriate PCB printing service.

See this discussion for more information on the head PCB: https://github.com/makerforgetech/modular-biped/discussions/64

Battery Monitor

The battery monitor is a simple voltage divider that allows the Arduino to monitor the battery voltage. This is useful to prevent the batteries from being over-discharged. The voltage divider is connected to the Arduino's analog input and the battery voltage is calculated.

WARNING: The values chosen of the resistors should ensure the output to the Arduino is no more than 5v to A0 when batteries are fully charged (or USB-C voltage set).

Note: this is optional as the software for this is not currently in use.

Headers and connections

All generic headers use a standard spacing (2.54MM). This is compatible with Dupont or JST XH connectors as well as many others.

I recommend using JST connectors where swapping the polarity would damage components (everywhere except the servos).

Wire gauge (thickness)

To prevent insufficient current supply or damage to components, ensure that the wire gauge is sufficient for the current draw. The following table is a rough guide:

Max Current (A) Wire gauge (AWG)
3 18
4 16
5 14
6 12

Using different components

The project is designed to be modular and allow for the use of different components. The following are some examples of how this can be achieved.

Using a different microcontroller

The Arduino Pro Mini can be replaced with any other microcontroller that supports the required number of PWM outputs. The PCB can be modified to support this by changing the pinout and adding the required components.

Using a different SoC

The Raspberry Pi can be replaced with any other SoC that supports the required number of GPIO pins. The PCB can be modified to support this by changing the pinout and adding the required components.

Using different servos or other components

Refer to the stall torque of the servos specified above to determine if the replacement servos would be appropriate. This will depend on the overall weight of your robot and the angular torque required for each joint. Other components can be substituted as needed, but ensure that the pinout is a match and the voltage and current requirements are met.

Contributing to the project

If you have a modification to the PCBs or guide that you would like to share with the community, please submit a pull request or post a discussion for review. We'd love to see any changes or improvements you have made!