当前位置:网站首页>Biped robot controlled by Arduino

Biped robot controlled by Arduino

2022-07-07 17:19:00 acktomas

Arduino Controlled biped robot

 Insert picture description here
Look at the original

I've always been interested in robots , Especially those robots that try to imitate human behavior . This interest prompted me to try to design and develop a robot biped that can imitate human walking and running . In this Instructable in , I will show you the design and assembly of robot biped .

The main goal of building this project is to make the system as robust as possible , So when trying various walking and running gait , I don't have to worry about hardware failures often . This enables me to push the hardware to the limit . The second goal is to use off the shelf hobby parts and 3D Print enable Biped The cost is relatively low , Make room for further upgrades and extensions . The combination of these two goals provides a solid foundation for the implementation of various experiments , So that people can develop according to more specific requirements Biped.

Continue to create your own Arduino The control of the Robotic Biped , If you like this project , Please be there. “ Arduino competition ” Cast a vote .

The first 1 Step : design process

 Insert picture description here
 Insert picture description here
 Insert picture description here

The human leg is in Autodesk Free to use Fusion 360 3d Designed in modeling software . I first introduce the servo motor into the design , And built outriggers around them . I designed a bracket for the servo motor , It provides a second pivot point radially opposite to the axis of the servo motor . The double shafts at both ends of the motor provide structural stability for the design , And eliminates any inclination that may occur when the leg is under some load . The connecting rod is designed to fix the bearing , The bracket uses bolts to fix the shaft . Once the connecting rod is installed on the shaft with the nut , The bearing will provide a smooth and firm pivot point on the other side of the servo motor shaft .

Design Biped Another goal of is to make the model as compact as possible , To maximize the torque provided by the servo motor . The size of the connecting rod is designed to achieve a wide range of motion , At the same time, minimize the total length . Making them too short will cause the bracket to collide , Thus reducing the range of motion , Making them too long will exert unnecessary torque on the actuator . Last , I designed the installation Arduino And other electronic components of the robot body .

** Be careful :** These components are included in one of the following steps .

The first 2 Step :Arduino The role of

 Insert picture description here

The project uses Arduino Uno.Arduino Be responsible for calculating the motion path of various gait tested , And instruct the actuator to move to a precise angle at a precise speed , To produce a smooth walking movement . Because of its versatility ,Arduino It is a great choice for development projects . It provides a pile IO Pin , Serial 、I2C and SPI Such as the interface , Used to communicate with other microcontrollers and sensors .Arduino It also provides a good platform for rapid prototyping and testing , It also provides developers with space for improvement and scalability . In this project , A further version will include an inertial measurement unit for motion processing , For example, fall detection and dynamic motion in uneven terrain , And a distance measurement sensor for avoiding obstacles .

The project uses Arduino IDE.(Arduino It also provides a Web Of IDE)

** Be careful :** The robot program can be downloaded from one of the following steps .

The first 3 Step : Materials required

 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here

This is to make your own Arduino A list of all components and parts required for the driven biped robot . All components should be universally available and easy to find .

Electronic products, :

  • Arduino Uno x 1

  • Towerpro MG995 Servo motor x 6

  • Perfboard( And Arduino Similar in size )

  • Male and female pins Male and Female header pins( Each kind is about 20 individual )

  • Jumper Jumper Wires (10 Pieces of )

  • MPU6050 IMU( Optional )

  • ultrasonic sensor Ultrasonic sensor( Optional )

Hardware :

  • Sliding plate bearing Skateboard Bearing(8x19x7mm)

  • M4 Nuts and bolts M4 nuts and bolts

  • 3D Printer materials 3D printer filament

barring Arduino and 3D The printer , The total cost of the project is 20 dollar .

The first 4 Step :3D Print parts

 Insert picture description here
 Insert picture description here

The parts required for this project must be custom designed , Therefore use 3D The printer prints them out . Printed matter adopts 40% Filling quantity 、2 Perimeter 、0.4 Mm nozzle and 0.1 Mm floor height ,PLA The color you choose . You can find the complete parts list and the... For printing your own version below STL.

** Be careful :** So let's start here , These parts will be referenced with the names in the list .

  • Pedal servo support foot servo holder)x 1
  • Foot servo support mirror foot servo holder mirror)x 1
  • Knee servo bracket knee servo holder)x 1
  • Knee servo bracket mirror knee servo holder mirror)x 1
  • Pedal servo support foot servo holder)x 1
  • Foot servo support mirror foot servo holder mirror)x 1
  • Bearing connecting rod bearing link)x 2
  • Servo horn link servo horn link)x 2
  • Anklet foot link)x 2
  • Bridge bridge)x 1
  • Electronic support electronics mount)x 1
  • Electronic gasket electronics spacer)x 8( Optional )
  • Servo horn space servo horn space )x 12( Optional )

All in all 14 Parts , Excluding gaskets . The total printing time is about 20 Hours .

The attachment

The first 5 Step : Prepare servo support

 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here

After printing all parts , You can start setting up the servo system and servo bracket . First push the bearing into the knee servo bracket . Cooperation should be fit , But I suggest grinding the inner surface of the hole slightly , Instead of squeezing the bearing , Otherwise, parts may be damaged . And then M4 The bolt passes through the hole and is tightened with a nut . Next , Grasp the foot link and connect the circular servo horn to it with the screws provided . Connect the foot link to the knee servo bracket using the screws that will be used to connect the servo motor . Make sure that the motor is aligned , Place the shaft on the same side as the bolt you previously connected . Finally, use the remaining nuts and bolts to fix the servo .

Do the same thing for hip servo bracket and foot servo bracket . With this , You should have three servo motors and their corresponding brackets .

** Be careful :** I provide instructions for building one leg , The other is just a mirror .

The first 6 Step : Make link fragments

 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here

After assembling the bracket , Start making links . To make bearing connecting rod , Gently grind the inner surface of the bearing hole again , Then push the bearing into the holes on both sides . Make sure to push the bearing , Until one side is flush . To build servo horn link , Please grasp the two circular servo horns and the screws provided . Put the horn on 3D Print and align the holes , And then by starting from 3D The connecting screws on the print side screw the horn to 3D On the print . I recommend using for these screws 3D Print servo horn gasket . After setting up the link , You can start assembling the legs .

The first 7 Step : Assembly leg

 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here

After assembling the connecting rod and bracket , You can combine them to build the robot's legs . First , Use the servo horn link to connect the hip servo support and knee servo support .** Be careful :** Don't screw the horn on the steering gear first , Because there is a setting stage later , If the horn is screwed to the servo motor, it will be very inconvenient .

On the other side , Use the nut to install the bearing connecting rod onto the protruding bolt . Last , Connect the foot servo bracket by inserting the protruding bolt into the bearing on the knee servo bracket . And fix the servo shaft on the servo horn connected to the other knee servo bracket . This can be a tricky task , I would recommend the second hand .

Repeat these steps for the other leg . Use the pictures attached to each step as a reference .

The first 8 Step : customized PCB And wiring

 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here

This is an optional step . In order to make the wiring cleaner , I decided to use perforated plates and connector pins to make custom PCB.PCB Contains ports for direct connection to the servo motor cable . Besides , I also left extra ports , In case I want to expand and add other sensors , For example, inertial measurement unit or ultrasonic distance sensor . It also contains a port , Used for external power supply required for power supply of servo motor . Jumper connection is used in Arduino Of USB Switch between and external power supply . Use screws and 3D Print shims will Arduino and PCB Mount to either side of the electronic equipment bracket .

** Be careful :** Make sure you pass USB take Arduino Unplug the jumper before connecting to the computer . Failure to do so may damage Arduino.

If you decide not to use PCB Instead, use a bread board , Here is the servo connection :

  • Left hip Left Hip >> Pin 9
  • Right hip Right Hip >> Pin 8
  • Left knee Left Knee >> Pin 7
  • Right knee Right Knee >> Pin 6
  • His left foot Left Foot >> Pin 5
  • Right foot Right Foot >> Pin 4

If you do decide to use PCB The port on the makes from right to left IMU Port up , send PCB Follow the same sequence as above . And use the conventional male to female jumper, and use the above pin number to PCB Connect to Arduino. When you decide whether to USB When running it under power supply , Please ensure that the ground pin is also connected and create the same ground potential and Vin Pin .

The first 9 Step : Assemble the body

 Insert picture description here
 Insert picture description here

 Insert picture description here

After assembling the two legs and the electronic equipment , Put them together to build the robot body . Connect the two legs together with a bridge . Use the same mounting holes on the hip servo bracket and the nuts and bolts that fix the servo motor . Last , Connect the electronic bracket to the bridge . Align the bridge with the hole on the electronic support , And use M4 Make joints with nuts and bolts .

Please refer to the attached image for help . thus , You have completed the hardware construction of the robot . Next , Let's enter the software , Make robots lifelike .

The first 10 Step : Initial settings

 Insert picture description here
 Insert picture description here
 Insert picture description here

What I noticed when building this project is , The servo motor and horn do not need to be fully aligned to maintain relative parallelism . This is why it is necessary to adjust each servo motor manually “ Center position ” To align with the legs . To achieve this , Remove the servo horn from each server and run initial_setup.ino The sketch . Once the motors are stabilized in their central position , Reconnect the horn , Straighten your legs completely , The feet are completely parallel to the ground . If that's the case , You are lucky. . If it doesn't open Constant .h Find the file on the adjacent tab and modify the servo offset value ( The first 1-6 That's ok ), Until the legs are perfectly aligned and the feet are flat . Play with these values , You will understand what is necessary in your situation .

Once the constant is set , Please write down these values , Because they will be needed later .

Please refer to the picture for help .

The attachment

Initial settings .rar

download

The first 11 Step : Knowledge of kinematics

 Insert picture description here
 Insert picture description here
 Insert picture description here

In order to make the biped perform useful actions , Such as running and walking , It is necessary to program various gait in the form of motion path . The motion path is the end effector ( In this case, feet ) Along its path . There are two ways to do this :

  1. One way is to use brute force Way to feed the joint angle of various motors . This method can be time-consuming 、 dull , And because judgment is purely visual , Therefore, it is also full of mistakes . contrary , There is a smarter way to achieve the desired results .
  2. The second method revolves around the coordinates of the feed end effector rather than all joint angles . That's what's called Inverse kinematics . The user enters coordinates and adjusts the joint angle to position the end effector at the specified coordinates . This method can be regarded as a black box , Input coordinates and output joint angle . For those interested in how to develop the trigonometric equation of this black box, you can see the above figure . For those who are not interested , Equations have been programmed and can be used pos Function to use , This function will x、z As input and output, three angles corresponding to the motor .

The program containing these functions can be found in the next step .

The first 12 Step : Yes Arduino Programming

 Yes Arduino Programming

 Yes Arduino Programming

In the face of Arduino Before programming , The document needs to be slightly modified . Remember the constant I asked you to write down ? Change the same constant to you in constants.h The value set in the file .

Be careful : If you use this Instructable Design provided in , There is no need to change anything . If some of you have made your own designs , You will have to change more values and offsets . constant l1 Measure the distance between the hip pivot and the knee pivot . constant l2 Measure the distance between knee pivot and ankle pivot . therefore , If you design your own model , Please measure these lengths and modify the constants . The last two constants are for gait .stepClearance Constant measures the height of the foot raised forward when taking a step , and stepHeight constant Measure the height of your feet from the ground to your hips when you step .

After modifying all constants according to your needs , You can upload the main program . The main program simply initializes the robot to a walking posture and begins to take a step forward . These functions can be modified according to your needs , To explore various gait 、 Speed and step , See which works best .

The attachment

The first 13 Step : final result : Experiment time

 Insert picture description here
 Insert picture description here
 Insert picture description here
 Insert picture description here

Biped It can be taken without overturning 10 To 2 Cm long stride . While maintaining gait balance , You can also change the speed . such Biped And Arduino Combined with the powerful functions of , It provides a powerful platform to experiment with various other gait and other goals , For example, jumping or balancing when playing football . I suggest you try changing the motion path of your legs to create your gait , And understand how various gait affects the performance of the robot . Can be IMU And distance sensors are added to the system to increase its function , Force sensors can be added to the legs to conduct dynamic motion experiments on uneven surfaces .

I hope you like this Instructable, And enough to inspire you to build your own inspiration . If you like this project , Please be there. “ Arduino competition ” China cast a vote to support it .

原网站

版权声明
本文为[acktomas]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071459161389.html