qoistoochee128

【Training Camp】A skateboard leg

 
Overview
Product introduction: Developed based on the OpenHarmony open source Hongmeng system. The chip used is hi3861, which supports 16-channel servo control, GPIO, ADC, PWM and other operations.
 
Materials required: 7.4v lithium battery*1, sg90 steering gear*2, inner diameter 4mm, outer diameter 11mm, thickness 4mm rubber-coated bearing*4, M2*6 flat head screws*17, M2*6 self-tapping screws*4 (for reinforcement connection to the bearing)

Calf structure: constructed using 3D printed parts and connected using screws of the same specifications to reduce purchase costs

describe

For the first time drawing board, make it simple.

Appearance design

Even if you only have one leg, keep going! So I made him a skateboard.
In order for it to run, I couldn't drag the line, and at the same time, the control board didn't take up too much space, so I installed the board under the skateboard. Originally, I used M2.5*4 screws, but found that the installation was not firm, so I changed them to M2*6 screws, which protruded from the surface of the skateboard, but the screw specifications were still unified .
The small hole on the mounting shaft is used to expand the shaft diameter and prevent the bearing from slipping.
image.png
image.png


Legs based on human body bionic design

Reference picture (
image.png


The installation method can be seen in the picture below. The connecting rod with the steering gear has small teeth to prevent slipping.
image.pngimage.png

Physical map

PCB
IMG20220718233941.jpg


3D printing
image.png

The installation is complete
image.png

image.png
image.pngimage.png

The servo on the left in the perspective of the picture below requires some effort to install. In fact, I originally wanted to use a direct insertion method to step on the skateboard with one foot and use the other foot to slide forward. However, considering the center of gravity, it was changed to this, resulting in the current position of the power interface being a bit awkward.
image.png

The two servos can be fixed with cable ties to reduce shaking. I put rubber patches on the soles to prevent my feet from slipping.
image.png

Precautions

7.4vPlease pay attention to the positive and negative poles of the power supply.
There is a problem with the reset button, do not solder it. You can use tweezers to short-circuit or use a two-pin button.

No one should do it, right?

Burning and Settings

Use the serial port cable to connect GND-GND, 3V3-3V3 ​, RXD-RXD, TXD-TXD to the computer
Open HiBurn.exe and press the image below to burn
image.png
After burning is completed, press reset again to see the device prompt information.
Connect to Hi3861's wifi, open 192.168.10.1, and click "dog control" in the application function below
image.png
image.png
Click "Installation Mode" (5V power supply is required to control the servo, disconnect the serial port and use 7.4v battery power supply, pay attention to the positive and negative poles of the power supply), and install as shown below
image.png

Software description

Load the genkipi plug-in in pycharm , and you can use pycharm to develop and control the legs through wifi or serial port. The example is as follows

# Control the angle of the two servos
dog.legAngle(0,(90,90))


from genki import dog


# Use json control
# count: number of loops
# Each array has 9 values. Each of the first 8 values ​​represents the two servo angles of one leg. I only have one leg here, so I only need the first two angle values; the last one represents the time required for the servo to complete rotation.
if __name__ == '__main__':
dog.exec(
'{"type": 3, "count": 20, "list": ['
'[90, 90, 0, 0, 0, 0, 0, 0, 80], '
'[51, 60, 0, 0, 0, 0, 0, 0, 30], '
'[45, 55, 0, 0, 0, 0, 0, 0, 30], '
'[38, 50, 0, 0, 0, 0, 0, 0, 30], '
'[24, 40, 0, 0, 0, 0, 0, 0, 30], '
'[11, 30, 0, 0, 0, 0, 0, 0, 30],'
'[0, 15, 0, 0, 0, 0, 0, 0, 30],'
'[7, 40, 0, 0, 0, 0, 0, 0, 30] ]}'
)

The SDA pins and SCL pins of this project are GPIO13 and GPIO14 respectively. If you need to modify the bottom layer, please modify it in the main function.

IoTIoSetFunc(IOT_IO_NAME_13, IOT_IO_FUNC_13_I2C0_SDA);
IoTIoSetFunc(IOT_IO_NAME_14, IOT_IO_FUNC_14_I2C0_SCL);

For more details on the underlying source code, please see: https://gitee.com/genkipi/ohosdog/


参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-14 22:41:19

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号