1.Project Introduction
本项目中,履足式复合机器人拥有两种行进模式:四足行进模式、履带行进模式,应对不同场景及地形时能够切换形态。四足形态下整体总共拥有8个自由度DOF,单腿各具备2个自由度DOF,足端结构融入了履带机构,各履带机构配备1个直流电机驱动。
该机器人主控板的MCU模组为ESP32-WROVER-E,能够实现针对总线舵机+PWM舵机+直流电机的控制,同时包括其他硬件资源:六轴加速度传感器、OLED屏幕接口、RGB灯珠、蜂鸣器等。
履带车形态在平坦或稍崎岖的地貌上能够保持较高的行进速度,降低了四足爬行的功率消耗;四足形态用于跨越障碍,灵活应对各类复杂地形环境,解决了履带结构应对高度落差较大地形难以翻越的痛点,即实现了仿生四足与履带式结构双优势结合的腿履协同。
Change log at the bottom
bilibili video link: https://www.bilibili.com/video/bv1aU4y197CP
Initial draft:

Original idea source - the "Titan" heavy tank in "Call of Duty 11: Advanced Warfare":

2. Electronic control hardware functions
2.1 Main control board:
2.1.1 Motor drive:
- 6-way serial bus servo interface: PH2.0-3P, 74HC126D
- 4-way DC motor driver: TB6612FNG
2.1.2 Indicating device:
- 1 six-axis acceleration sensor: MPU6050
- 1 dial encoder: MITSUMI
- 1 ordinary miniature passive buzzer: DET402-G
- 1 ordinary light-emitting LED: 0603
- 1 0.96-inch 4-pin OLED screen interface: HDR-1*4P-F
- 3 ordinary RGB lamp beads: WS2812B-2020
2.1.3 Expansion interface:
- 2-way expansion IIC interface: PH2.0-4P
- 1-way WS2812B lamp bead interface: HDR-M-2.54-3P
2.2 Expansion board:
- 16-channel PWM servo driver: PCA9685
3. Brief description of model selection
3.1 Motor selection:
- Serial bus servo selection: Model: HTS-35H, rated voltage: 9.0~12.6V, serial communication baud rate 115200, rated torque: 35kg.cm/3.5Nm. Communication needs to convert UART full-duplex to half-duplex, which is implemented using 74HC126D according to the communication protocol manual and schematic diagram provided by the Huaner steering gear merchant;


- PWM steering gear selection [Economic Plan]: Model: MG996R, rated torque: 13kg.cm/1.3Nm. There should be no problem with a common large servo when used with an expansion board. Pay attention to the power supply voltage at the arrow. (Pay attention to the power supply connection. The main control board and expansion board can be connected to the power supply through copper pillars)




- DC motor selection: Model: JGA25-370-1260, rated voltage: 12.0V, reduction ratio: 1:103, no-load speed: 60 rpm. In the main control V1.0 version, the TB6612FNG driver is used [due to price issues, it is planned to be replaced by RZ7899/DRV8833 in the future];


3.2 Other options:
- Six-axis acceleration sensor: MPU6050. Usually, the definition in the source code supports the use of DMP to obtain quaternions, and then solve the pitch and roll angles (the yaw angle is too floating), and the QFN package may not be easy to solder.

- Chip power supply: 3.3V and 5V power supply are both implemented by LDO, namely SCJT1117-3.3 and SCJT1117-5.0. (Due to the large pressure difference, it is recommended to attach a heat sink)

- Power supply selection: A 3S polymer model aircraft motor with a discharge rate of 35C is used. However, considering safety issues, it has been tested that 3 18650 power lithium batteries with a discharge rate of 10C can also drive the
model aircraft battery: (dangerous, but powerful)

18650 power lithium battery:

4. Physical pictures
Main control board:

16-channel PWM servo---expansion board:

Combination chart:

5.Mechanical structure design
所述机器人整体总重量(加电源)经称量可达3.0kg。
目前大部分结构零件以FDM式3D打印技术制造,采用PLA材质,故主要参数推荐:0.15mm层高,70%填充。部分需要少量支撑零件,如履带外壳——主壳、提手、躯体前侧板等
Design Features:
- Tracked
- Two degrees of freedom series legs
- Quadrupedal form: 8 degrees of freedom
- Fulfillment mode: 4 motor drive
- Reserved two-degree-of-freedom gimbal
- 3D printed structure


6. Control system software design
VSCode+PlatformIO平台开发,目前机器人主控系统主要包括2部分:底层驱动,运动控制。

6.1 Low-level driver content:
- Serial bus servo communication
- DC motor drive
- Six-axis acceleration sensor communication
- OLED screen driver
- Dial encoder reading
- WS2812B-RGB lamp bead driver
- buzzer driver
- WiFi communication configuration
6.2 Motion control content:
- Single leg correct solution FK
- Single leg inverse solution IK
- Inverse solution of posture
- Calculation of trochoid trajectory of foot end
- Trot gait pattern
- Walk gait pattern
- *VMC algorithm--pseudo closed loop (to be tested)
6.3 Code file description:
lib:
- Adafruit_NeoPixel: WS2812B lamp bead driver control (a little bug, the first lamp bead is not controlled, to be changed)
- Adafruit_PWM_Servo_Driver_Library: PCA9685 communication and driver library
- MPU6050: Acceleration sensor
- U8g2: used for 0.96-inch OLED screen driver
src/Drive:
- Hiwonde.h/.cpp: Serial bus servo communication library
- ServoDrive.h/.cpp: PWM servo drive control library (PCA9685)
- IOs.h/.cpp: GPIO pin configuration and control library
- IMU.h/.cpp: MPU6050 acceleration sensor communication library
- DCMotorDrive.h/.cpp: DC motor drive control library
src/Dynamics:
- FKIK.h/.cpp: Single-leg forward and inverse solution library
- MotionControl.h/.cpp: Robot motion and attitude control library
7.Remote control App design
注意:需要开启定位、通知权限
Design Features:
- Developed based on Android
- Use WIFI as wireless communication mode
- Using TCP as the transport layer protocol

8. Physical prototype


(Camera will be used later)

Easter egg:

Change log
2022.6.3——
Create an update log: After graduation and getting ready to go home, pack things first and pause development...
2022.6.16————
- Modified structure section shopping list
- Main control Version 2.0 version verified successfully

change:
- Motor driver replacement: TB6612FNG —> RZ7899. Optimized the problem of soaring price of TB6612FNG chip and the problem of uncontrolled rotation of the crawler at startup;
- The main control is replaced by ESP32-PICO-D4. Compared with ESP32-WROVER, the cost is reduced, the pin resources are more, the layout space is optimized, and the overall performance is not much different. The disadvantage is that it is not easy to weld;
- Deleted the DET402G buzzer;
- The MITSUMI wheel encoder has been deleted;
- Added one more WS2812B-2020 lamp bead;
- An extra serial port has been introduced, and it is planned to be connected to an external satellite positioning module; (I want to ask why 3 serial port interfaces have been introduced instead of merging 2 of them into 1 to save pin resources. Sorry, I just thought of it...
- An extra IIC 2.54 - 4P pin header interface is introduced;
- For the M3 copper pillar hole where the main control board and the expansion board can communicate with each other for power supply, Schottky diodes are added to adjust the interconnection and conduction direction;
2022.7.20————
- One motor was damaged during debugging and had to be returned to the factory for repair.
- Upload the step file of the robot's final assembly