Introduction: Hongmeng Bionic Puppy uses the Hi3861 module as the main control to control 9-channel servos, of which 8 channels are for the movement of the puppy's legs, and 1 channel controls the swing of the tail. The module provides lithium battery power supply and external power supply to choose from. In addition, the circuit has additional functions such as current detection, lithium battery charging and discharging, and buzzer driving. It can move forward, backward, stand, shake hands and other actions.
PCB Hardware Overview
The main ideas of circuit design and the physical diagram of PCB are as follows
Issues to note:
1. In the first version of the circuit, the power supply label of PCA9685 is 3.3V and the actual power supply in the circuit is +3,3V, so a line is flown from 1117 to power the servo chip.
2. In the first version of the circuit, the rx and tx of the CH340 are reversed with the rx and tx of the chip, so two lines are flying.
3. When actually using battery power supply, it is easy to trigger the overcurrent protection of IP5306 due to unstable current when the servo is working. This problem will be further optimized later. If anyone can help, I would be grateful.
PCB hardware—main control part
Chuanzhi Education Hi3861 IoT WiFi module is a system-in-package module based on HiSilicon Hi3861LV100 chip, which can provide
Provides complete Wi-Fi IoT development capabilities. The module uses 3.3v for power supply and communicates with the servo control chip PCA9685 through the IIC interface. All GPIO ports on the PCB are lead out, and 3 user buttons are added. The buzzer driver facilitates subsequent function expansion.
PCA9685 is a 16-channel LED backlight adjustment control chip based on I2C bus control. Each LED output can freely adjust the frequency (40-1000Hz) and duty cycle (0%-100%) of the PWM wave.
For the control of the steering gear, Hi3861 is used to communicate with the steering gear control chip PCA9685 through iic, which can realize 16-channel steering gear control.
PCB Hardware—Power Supply Section
In terms of power supply, it provides two modes of battery power supply and external power supply, which can be selected through a jumper cap.
In battery power supply, an IP5306 chip is used for charge and discharge management, and a DW01 is added for battery protection.
IP5306 is an integrated boost converter and lithium battery charging tube
Multi-function power management SOC with management and battery power indication, providing mobile
Power supplies provide complete power solutions. The high integration and rich functions of IP5306 make it suitable for
Only a few peripheral components are required, and the size of the overall solution is effectively reduced.
Reduce BOM cost.
Since the main control operation requires a voltage of 3.3V, AMS1117 is added to provide a voltage of 3.3V.
At the same time, the INA199 current sampling chip is also used to detect the current of the entire system (due to limited time, I have not written a response program for ADC readout for this function, but the output of the multimeter measured by the INA199 is normal)
PCB Hardware—Program Burning
Hi3861 comes with network programming, which is very convenient to use, but burning firmware and printing serial port information still requires a USB to serial port chip.
In order to facilitate the burning of firmware, the onboard ch340n is used as a USB-to-serial port for communication. This chip does not require an external crystal oscillator and only requires very few resistors and capacitors to achieve communication functions.
Software description
The training camp officially provides program source code and robot dog gait generation tools, so it is very easy to write the program.
In the virtual machine environment, you only need to modify the json code related to the web page to realize various gaits and modifications to the web page.
Physical display
Internal, front and side photos of the mechanical puppy
Program control page
related software
This puppy gait generation software directly generates json format data, which can be used directly by copying it. It is really easy to use! ! !
This software can reversely solve the relationship between the coordinates of the dogleg and the angle of the steering gear.
HiBurn mainly performs firmware burning
SolidWorksModeling
The project uses SolidWorks to model the dog shell. The relevant files are in the attachment. The version used is SolidWorks2016.
In order to save printing consumption, the interior of the entire puppy is very compact, and the entire model is only the size of a palm.
3D Monkey printing cost ~60 yuan