In the sixth week of the course, I started prototyping ideas for the mechanics of the walking device. I originally started with four Nema17 Stepper Motors connected to an ESP32. I attached the motors to a 5V power source and wrote code for all four motors to run simultaneously. Watching the motors run, I quickly became skeptical about whether the motors would be able to create enough torque to move my design. After attaching 3D-printed braces onto the stepper motors, I realized my hypothesis was correct. The stepper motors were only strong enough to rotate the braces a total of 30 degrees, which is much narrower than my required range of motion of 0 to 180 degrees. Even after the addition of a 3D-printed gearbox, the steppers physically could not create the required torque. Eventually, I had to completely scrap this design and start anew.
After starting over, I researched simple mechanics and other motor types. I came up with the idea of utilizing two, side-by-side servo motors for each leg to control both hip and knee functions in a separate, synchronized fashion to properly emulate ambulation. After calculating the desired femur: tibia length ratio, I 3D modeled the separate mechanical pieces for the design using Fusion 360. Between designing and printing, the 3D modeling process took around 4 days to complete, but it was well worth it! When the 3D-printing was complete, I assembled the separate pieces using screws of different lengths. Next, I attached the servo motors with gears into the square cut-outs on the base. After, I secured the motors by screwing them down, I decided my prototype needed a frame to stand up. In a cabinet in the lab, I located several metal extrusions and brackets, and I pieced them together creating a sturdy base. Once all the pieces were assembled correctly, I was very pleased with the outcome, and I then proceeded to calibrate the hip and knee’s functional angles.
Download my Robotic Legs f3d file!
To begin the calibration process, I took video and pictures of my friend walking, with her permission, to understand the basic angles in each step. While looking though the images, I was able to narrow down each step into four main parts: the leg lift, the placing of the foot, the push forward against the ground, and the lift for the next step. I then narrowed my images down to four pictures, each representing a single part of the desired motion. Digitally drawing on the photos allowed me to easily measure the angles of both hip and knee joints as seen in the example photo below.
After determining the average angle in each step, I applied the measurements to my 3D-printed legs, carefully moving the hip and knee joints to replicate the human walk. Again, I recorded each angle’s measurement and adjusted the angles as needed.
Once I had measured, and remeasured, each position, I wrote a code in Arduino that could move servo motors 1, 2, 3, and 4 simultaneously, creating the walking motion. Thankfully, before running the code I realized that I would have to run each motor separately because corresponding motors were facing opposite directions. Therefore, if the left knee joint was at 0 degrees, the right knee would be at 180 degrees, or if the left hip was at 120 degrees, the right hip would be 60 degrees. After writing the angles of each into my code, I added in Delay functions to slow the motion down. This allowed me to check to see if the legs were hitting each position correctly.
Running the code allowed me to see that instead of the legs taking one step at a time, both legs were moving together, creating a sort of jumping movement. I quickly realized my mistake and staggered the positions for each leg in my code. Now, when the left leg was at position 1, the right would be at position 3, and if the left was at position 2, the right was at position 4 and vice versa. The legs would cycle through each position, then loop back to the top, starting the motion over.
#include
Servo servo1;
Servo servo2;
Servo servo3;
Servo servo4;
void setup() {
servo1.attach(3);
servo2.attach(5);
servo3.attach(6);
servo4.attach(10);
}
void loop() {
//step 1
servo1.write(0);
servo2.write(90);
servo3.write(145);
servo4.write(125);
delay(300);
//step2
servo1.write(0);
servo2.write(50);
servo3.write(145);
servo4.write(85);
delay(300);
//step3
servo1.write(40);
servo2.write(35);
servo3.write(75);
servo4.write(180);
delay(300);
servo1.write(90);
servo2.write(35);
servo3.write(120);
servo4.write(180);
delay(300);
}
Here is a video of my wearable walking robot prototype.
I plan to keep working on this prototype for many years to come. Ideally, this design will become available to all, whether they need it to aid in mobility, or possibly as a full prosthetic. In the meantime, while I pursue these advances, a patent is pending.