[Foreword] As a graduate student, logically speaking, you should not focus on other things. But I think no matter how busy you are, you should spend some time doing the things you love. In fact, I love electronics as much as ever. This summer training camp was full of twists and turns for me. Because of the tight schedule, I basically only had about an hour to complete the work every day. During this period, we experienced unexpected situations such as 3D printing failure, program burning failure, chip scrapping, etc. But in the end, I still made a work that is eye-catching. Through the actual practice of this training camp, I learned a lot in circuit design and system development. I would like to thank Lichuang, Chuanzhi Education, Mo Gong, Xiao Gong, Orange Sister and other great leaders.
【text】
1.Project Introduction
This project uses the HI3861 module and PCA9685 to drive 8-channel servos to realize a movable mechanical dog. It performs digital signal processing on music based on librosa, obtains the music beat, and controls the dog to rhythm with the music.
2. Hardware system
Using the HI3861 module as the control core, the 3861 drives the PCA9685 through the IIC protocol to generate 16 PWM waves, thereby driving the steering gear.
The power supply section uses LM1084S to regulate the voltage to 5V to provide power for the servo, and uses AMS1117 to generate a 3.7v voltage to power other chips in the circuit.
A DIP switch is used to pull up the address chip selection pin to realize the address chip selection of the PCA9685.
Physical map
3.Software system
a. Gouzi’s control logic is mainly based on Chuanzhi’s official BIN firmware.
b. Use librosa in pycharm to perform digital signal processing on music, find the rhythm area according to changes in energy intensity, track the beat in the rhythm area, and determine the stuck time.
c. Calculate the deflection angles of each servo in different postures through the DogLeg-v1.4 and DogActionGenerater software officially provided by Chuanzhi, and generate a JSON file for controlling the dog's movement.
d. Create a new thread to play music, filter the stuck time and send a post request through requests. The request link is as follows:
4.3D model
5. Related resource links:
6. Station B demo video: