Mini Bipedal Robotic Legs (7.5cm)

by Shashwat Batish in Circuits > Arduino

62 Views, 0 Favorites, 0 Comments

Mini Bipedal Robotic Legs (7.5cm)

Assembly 1 (6).png
Assembly 1 (5).png
leg assembly for mini humanoid robot. n20 geared motors. sg90 servo. wemos d1 mini.

This is Kineo. Built with fully 3d printed parts and held together with hopes and dreams, it is a very small bipedal robot. Being limited by the size of commercial sg90s servo motors (smaller servos being unavailable or expencive) I decided to make my own using n20 geared motor and sg90s circuitry for positional control. This robot has helped me learn more about CAD, designing, troubleshooting and inverse kinematics. The robot is not dynamic. It walks with calculated angles for the servos using inverse kinematics.

The main purpose of this project was for me to learn about walking mechanisms and math required to make a biped robot for future projects.

Supplies

Screenshot 2024-05-18 182745.png
Screenshot 2024-05-18 181729.png
Screenshot 2024-05-18 181717.png
Screenshot 2024-05-18 181351.png

Microcontroller:

  • (1x) wemos D1 mini

Actuators:

  • (6x) n20 geared motor. (600RPM)
  • (6x) sg90s servo motor.

Accessories:

  • Male header pins (provided with wemos d1 mini).
  • Prototyping board.

Parts to be printed:

(do not print with supports)

3D Print the Parts

I have provided all the main parts to be printed in the 'Supplies'.

List of parts to be printed:

  • (1x) pelvis.stl
  • (2x) hip.stl
  • (2x)leg1.stl
  • (2x)leg2.stl
  • (2x)ankle.stl

The parts were printed in the following Cura settings on my ender 3 using PLA:

  • layer height - 0.16mm
  • 100% infill

do not use supports while printing.

Before Asembly

connect the sg90s sevo to an arduino or esp32 and rotate it to 90 degrees. while assembling the leg make sure that direction of the potentiomter disk does not change.

Dissemble Servo Motor

IMG-20240526-WA0014.jpg
IMG-20240526-WA0011.jpg
IMG-20240526-WA0012.jpg
IMG-20240526-WA0013.jpg

use a screwdriver to open up the servo and remove the gears(do not dispose the gear whose rod is connected to the potentiometer as you will need it in step 7). you should see something like image one. press it on a table downwards until the motor detaches as shown in the image. cut the pin on top part of the potentiometer(the yellow thing). finaly desolder the motor and the potentiometer. you would need to do this process 6 times. DO NOT CUT THE WIRES. locate the + sign on the motor and remember the location. that part will be the "positive" output of the driver.

Assemble the Joints - 1

Screenshot 2024-05-21 141002.png
Screenshot 2024-05-21 141018.png

the green part in the image is the potentiometer and the pink part is hip.stl. Make sure that the top part is facing out of the hip or in other words the white disk of the potentiometer should face outwards. you may need to use force to insert the potentiometer. be cautious in this process as you could break the pins.

Assemble the Joints - 2

Screenshot 2024-05-21 141315.png
Screenshot 2024-05-21 141356.png

take the assembly in step 3 and arrange it as shown in the image. take n20 geared motor and use pliers to rotate the shaft of the motor in the desired position. place leg1.stl and n20 motor as shown in the image and insert the motor into the slot. you may need to use force (be careful to not widen the hole in leg1stl. do not move the leg around to check if the motor rotates as it widens the hole)

Assemble the Joints - 3

Screenshot 2024-05-21 141409.png
Screenshot 2024-05-21 141619.png
Screenshot 2024-05-21 142032.png
Screenshot 2024-05-21 142204.png
Screenshot 2024-05-21 142214.png

follow this process 2 more times for a leg. as shown in image 2 position leg2.stl, insert the potentiometer keeping in mind that the white disk part should face outwards. insert the n20 motor after adjusting the shaft with pliers. repeat this same process for ankle as shown in image 3. 1 leg is complete. assemble one more following the above directions making sure that the toes face the right direction as shown in image 4 and 5.

Wiring Up

WhatsApp Image 2024-05-26 at 22.23.31_b28410be.jpg
WhatsApp Image 2024-05-26 at 22.23.31_6dd5269f.jpg

use 3 thin wires to connect the potentiometer with the driver circuit of the sg90s servo motor . make sure that the potentiometer is connect the same way as it was connected before desoldering as shown in image 1. use 2 wires to hook up the motors connect the positive of the motor to the positive of the driver. the final assembly should like like image 2. use tape to secure the signal wires and use hot glue on the copper pad so that the wires dont come off.

this assembly essentially acts as a small servo motor.

Positional Servo

For the position system, notice the small hole right infront of the potentiometer. take the gear which was connected to the potentiometer in the sg90s servo by a rod and insert it in the hole mentioned above until it is inside the potentiometer making sure not the change the direction of the potentiometer disk. using a soldering iron weld the plastic gear part and 3d printed plastic together.

connect the assembled servo motor to an arduino or an esp32 and check if the servo works. if not then try swapping the wires connected to the motor or the potentiometer or both.

Assembly Done

Screenshot 2024-05-21 142214.png

with pelvis.stl, use hot glue to attacth the 2 legs to the 3d printed part. the final assembly should look like this.

Code and Connection

WhatsApp Image 2024-05-26 at 22.51.06_355b0054.jpg

credit to  Technovation for code and inspiration. create a expansion shield for the esp32 as shown in image. you may need to edit code as this is complied for wemos d1 mini.


Servo hipL - left hip

Servo hipR - right hip

Servo kneeL - left knee

Servo kneeR - right knee

Servo ankleL - left ankle

Servo ankleR - right ankle


you may need to change the '+' or '-' sign based on the movement of the leg

 if (leg == 'l'){

    hipL.write(hipLOffset - target1);

    kneeL.write(kneeLOffset + target2);

    ankleL.write(target3);

  }

  else if (leg == 'r'){

    hipR.write(hipROffset - target1);

    kneeR.write(kneeROffset + target2);

    ankleR.write(target3);

  }

}

the moment should looks like the video