Architecture
The electrical system consists of 4 main parts: the controller, the sensors, the motors, and the power supply. The electrical system was intentionally designed to be modular and use as many off-the-shelf components as possible. The controller, sensors, and motors are all self contained units that can readily be removed and swapped as necessary.
Motors
As detailed in the mechanical section, the motor that is being used is the ROBOTIS AX-12A. Each motor has two identical parallel connected ports with three pins each: a power pin (VDD), a ground pin (GND), and a single data pin. Furthermore, the motors are controlled via a custom UART protocol, and have internal multiplexing to merge TX and RX functionality onto a single pin.
Controller, Sensors and Power Supply
Our controller of choice is the Raspberry Pi, as it is sufficiently powerful for our system and features a vast ecosystem of ready made accessories and software libraries. The sensors for our robot consist of a BNO055 absolute orientation sensor, as well as a set of contact switches affixed to the ends of the legs, for the purposes of climbing and navigating rough terrain. The robot will be powered by a simple 3 cell LiPo battery.
Custom Perf Board
Prior to use of a USB to serial adapter, a custom perf board was designed to control the motors. This, along with a separate Arduino Mega, was required to overcome the motor interfacing challenges between the Raspberry Pi and motors. However, once the USB to serial adapter was integrated, we were able to control the motors directly from the Raspberry Pi, obviating the need for this perf board as well as external buffers and additional circuitry, saving on hardware and simplifying the electrical setup.
Final Circuitry Setup
Below is our final electrical setup for the robot, mainly where the motors are now directly controlled only through the Raspberry Pi, since implementation of the USB to serial adapter. The setup features a regulator and adapter at each end of the Raspberry Pi, respectively, and powered by a 3S LiPo battery. This circuitry is connected to the 18 motors which control the legs and overall movement of the robot. With this setup, we eliminate the need for an Arduino Mega and a buffer in our design, saving on hardware.