Refer to the teaching case to assemble the mechanical structure, weld the PCB, and burn the program to realize a four-legged moving dog.
1 Hongmeng Dog
1.1 Component selection
1.1.1 Functional requirements
- Brain control
- Multi-channel steering gear control
PWM
- Power supply
1.1.2 Components
- Hi3861
The product number of the corresponding module in Lichuang Mall:
C2923578- PCA9685
The product number of the corresponding component in Lichuang Mall:
C9220616-channel PWM control
I2C protocol
- LDO Linear Regulator
The product number of the corresponding component in Lichuang Mall:
1.2 Schematic design
1.2.1 Functional relationship between components
- control
- The main control communicates with PCA9685
I2C protocol
- GPIO10 of the main control chip Hi3861 is used as the SDA pin of I2C, and GPIO09 is used as the SCL pin of I2C.
- PCA9685 has I2C SDA and SCL pins respectively.
- powered by
- Component power requirements
3.3V
- Main control chip power supply
- PCA9685 chip power supply
- Servo power requirements
MG90S servo: voltage 5V, drive current 200mA*16=3.2A
7.4V-->5V-->3.3V
- Burning problem
The main control uses serial port programming, GPIO03 is the TXD pin, and GPIO04 is the TXD pin.
1.2.2 Miscellaneous considerations
1.3 PCB layout
Every time you make changes to the PCB, you need to relay the copper.
1.4 Summary
1.4.1 Design stage
- Find core needs
- Complete the minimum verification board
- Choose reasonable components
1.4.2 Wiring stage
- Determine the shape and size of the development board
- Component partition classification arrangement
- Rough wiring
- Fine wiring
- Copper laying, DRC treatment
1 Python development environment setup
1.1 Pycharm installation
Jump to the version selection page and select "Other versions", as shown below:
Jump to the specific version selection interface and select "PyCharm Community Edition" under "PyCharm Community Edition", as shown below:
Wait for the download to complete, as shown in the figure:
Select "Show in folder", as shown in the figure
Right-click the mouse and select "Run as administrator", as shown in the figure
Installation wizard, select "Next", as shown in the figure
Select the installation path. Here I choose the default path "C:Program FilesJetBrainsPyCharm Community Edition 2021.3.3", as shown in the figure
Select "Next", as shown in the figure:
I check everything here and click "Next", as shown below:
Click "Install", as shown below:
Installing, as shown below:
Select "Reboot now", restart, and click "Finish", as shown below:
Double-click the desktop shortcut "PyCharm Community Edition 2021.3.3" to start the Pycharm software, as shown below:
Check the box to agree to the agreement and click "Continue", as shown below:
Do not send usage data to Jetbrains, as shown below:
Start the interface, as shown below:
1.2 genkipi plug-in installation
Select "Plugins" as shown below:
Select "Install plugin from disk" under settings, as shown below:
Select the compressed package "genkipi-python-1.1.1.zip", as shown below:
Click "Accept", as shown below:
Click "Restart IDE" to restart Pycharm, as shown below:
Apply the changes as shown below:
1.3 New construction
Select "New Project" under "Projects" to create a new project, as shown below:
Create a new project name, Python interpreter, just choose any one, as shown below:
Click "Create", as shown below:
Click "Close", as shown below:
Installing, as shown below:
Online installation failed, as shown below: