Question requirements
A robot dog based on Hongmeng.
Question analysis
1 SolidWorks structural design
Use SolidWorks to model and assemble the robot dog.
2 Robot dog gait analysis
Gait is the way a dog walks or runs, including but not limited to walking, strolling, trotting, running, turning left, turning right, and squatting.
3 Inverse solution of dog-leg coordinates
The dog leg is a five-link mechanical structure, and the angle of the leg is calculated through mathematical calculations.
4 Jialichuang EDA hardware design
The control board hardware includes the brain of the robot dog (microprocessor MCU), which controls the limbs of the robot dog (servo drive), and the hardware design is carried out through Jialichuang EDA.
5 Installation of robot dog
Put the battery, servo, control board and body together.
6 Servo control and gait programming
Burn the firmware provided by the training camp into it and debug the code.
1. SolidWorks robot dog mechanism design
I have learned this during software engineering training, so I am not unfamiliar with it. Follow the teacher's step-by-step instructions in the video and you can quickly draw the model.
Here I will roughly summarize the modeling process:
1. The first step is to select the drawing datum plane---main view, side view or top view. Sometimes due to problems with part structure or processing methods, it is necessary to establish an auxiliary datum plane.
2. The second step is to create a sketch. There are basic drawing commands such as straight lines, circles/arcs, curves, and polygons. The auxiliary commands include chamfer/round corners, array/mirror, characters, etc. Make the contour lines required for forming according to the part structure.
3. In the third step, you can use modeling feature functions such as stretching, scanning, lofting, and rotation to establish a preliminary solid outline. During this process, you may also use some necessary auxiliary functions such as chamfering/rounding, array/mirror, Shell/draft angle.
2. Jialichuang EDA main control board design
I mainly divide the main control board design into four aspects, namely schematic design, PCB layout, PCB wiring, wiring optimization and silk screen placement.
1: Create a new schematic file.
2: Place components. Select components according to needs. The component selection here is based on the open source models of the training camp. The main control is HI3861, and the driver chip is PCA9685. Select components from the Lichuang component library, place them at the appropriate location on the drawing, define and set the component's name and package, and adjust the component's position on the working plane based on the electrical connection relationship between the components. Make adjustments and modifications to make the schematic beautiful and understandable.
3: Schematic wiring. Refer to the DataSheet of the selected main control chip and driver chip for wiring. Connect the components on the working plane with electrically meaningful wires and symbols to form a complete circuit schematic diagram.
4: Electrical rule check of schematic diagram. After completing the schematic wiring, you need to set the project compilation options to compile the current project, and use the error check report provided by Jialichuang EDA to modify the schematic.
In PCB design, layout is an important link. The quality of the layout results will directly affect the wiring effect, so it can be considered that reasonable layout is the first step to successful PCB design . Here I briefly share some experience.
1. Under the premise of ensuring the electrical performance, the components should be placed on the grid and arranged parallel or vertically to each other in order to be neat and beautiful. Under normal circumstances, components are not allowed to overlap; the arrangement of components should be compact, and the components should be arranged on the entire layout. Evenly distributed and consistent density.
2. Arrange the positions of each functional circuit unit according to the flow of the circuit, so that the layout facilitates signal circulation and keeps the signals in the same direction as possible.
3. Take the core components of each functional unit as the center and lay out around them. Components should be arranged evenly, integrally, and compactly on the PCB, and the leads and connections between components should be minimized and shortened.
Wiring is the most important and time-consuming process in the entire PCB design, which directly affects the performance of the PCB board. As a qualified and excellent PCB design engineer, in addition to routing the wires, they must also meet their electrical performance and make the wires neat and beautiful, which requires engineers to master some wiring skills.
Three levels of PCB wiring:
(1) The first is routing, which is the most basic requirement in PCB design.
(2) The second step is to satisfy the electrical performance. This is to adjust the wiring after wiring to achieve the best electrical performance.
(3) The next step is aesthetics. If the wiring is passed through, there will be no impact on the performance of the electrical appliances. The next step is to pursue aesthetics.
PCB wiring principles:
(1) The key lines should be as short and thick as possible, and add protective ground on both sides.
(2) Any signal line should not form a loop. If it is unavoidable, the loop should be as small as possible; the signal line should have as few vias as possible.
(3) When transmitting sensitive signals and noise field band signals through flat cables, use the "ground wire-signal-ground wire" method to lead them out
(4) The oscillator case should be grounded, and the clock line should be as short as possible and cannot be lead everywhere. Under the clock oscillation circuit and the special high-speed logic circuit part, the ground area should be increased instead of other signal lines to make the surrounding electric field approach zero.
(5) Use 45-degree polygonal wiring as much as possible, and do not use 90-degree polygonal lines to reduce the radiation of high-frequency signals; (double arcs should also be used for lines with high requirements)
(6) After the schematic wiring is completed, the wiring should be optimized; at the same time, after the preliminary network inspection and DRC inspection are correct, the unwired area should be filled with ground wires, and a large area of copper layer should be used as ground wire, and the ground wire should be placed on the printed board. Connect all unused areas to the ground and use them as ground wires.
(7) Under normal circumstances, the power wire and ground wire should be routed first to ensure the electrical performance of the circuit board. Within the scope of conditions permitting, try to widen the width of the power supply and ground wires.
- Wiring optimization and silk screen placement
The silk screen layer is the text layer, which is the top layer in the PCB and is generally used for annotations. The correct principle of character layout on the silk screen layer is: "no ambiguity, every opportunity is used, beautiful and elegant", which facilitates circuit welding and maintenance.
3. Welding and inspection
Welding: I used two welding methods here, one is welding with an electric soldering iron and solder wire; the other is welding with solder paste and a desoldering station.
- Soldering iron and solder wire soldering
Mainly used for welding direct plug-in components. Rough steps: prepare for welding, heat the weldment, feed the welding wire, remove the welding wire, and remove the soldering iron. After welding is completed, check whether the solder joints meet the standards to prevent virtual welding and other situations.
- Soldering with solder paste and desoldering station
Mainly used for welding chip components. Be careful to apply an appropriate amount of solder paste on the pad. I applied too much and some of the pins of PCA9685 and HI3861 were connected together. I later used a soldering iron to solve the problem.
examine
This step is very important! ! ! Repeat important things three times! ! ! Use a multimeter to test the pins of the soldered board according to the schematic diagram to measure whether the board is normal. After the test is correct, turn on the power and touch the board with your hands to see if it is abnormally hot. If so, turn off the power in time and check again.
4. Assembly
No need to say much here, just build blocks, be happy! Directly pictured.
5. Burn firmware
For the serial port download used here, please note that TX and RX are connected in reverse, and the main control and downloader must share the same ground.
Physical display
Station B demo video