You are browsing as a guest. Sign up (or log in) to start making projects!

Lil dog bot

Hardware
  • 8 Devlogs
  • 39 Total hours

Dogbot: A quadruped robot (aimed to be) able to walk and dance using a remote control.

Open comments for this post

8h 22m 17s logged

I have added more to the inverse kinematics of my robot dog. Targeting the bottom left leg, I:

  • Created the functions Calc_femur, Calc_tibia, and Calc_hip to individually calculate the designated angles for each part based on the variables x, y, and z.
    • The code had already implemented the math from my Desmos demonstrations in the previous devlogs, but this allowed for a more organized system.
  • Created a void move_to_position function that collected outputs from Calc_femur, Calc_tibia, and Calc_hip, using them to run the servos in turn.
  • Used an array system to realize the pins of the servos (on the PCA9685) and their respective max and min PWM (based on calibration)

What’s great is that the femur is working as intended! In comparing its position to the position on the Desmos graph, the calculations are accurate.

On the other hand, I’m still struggling to properly calculate the angle for the servo moving the tibia. The issue is that I have to take into account the angle offset (the angle the servo is turning is not the same as the resulting angle between the femur and tibia) and the fact that the rotating femur influences the angle of the tibia.

Another thing I have to fix is the discrepancy between the math for the hip servo and the output. Yet another issue to handle (TT-TT)

But it’s a learning process that I’m happy to take part in :)

0
0
7
Open comments for this post

3h 34m 58s logged

Things I have done:
-Reduced friction in the linkages
-Prevented interference with calibration

I have been working on improving the design of the robot dog’s legs. So far I’ve only screwed the legs onto the servos, so that if I put my hands in the way, I could easily displace, or offset, the legs, and the legs would no longer be calibrated. Although I’ve figured out the PWM signals that calibrate the servos (for now), this seemed to be an issue for the foreseeable future. Terrain with rocks, for example, could easily mess up the angles of the legs and screw the inverse kinematics :P.
Another issue I had was with the mechanical design was with the mechanism that connected the top servo with the linkage moving the tibia. There was nothing separating the plate from the top of the servo, so that the friction made it hard to move the plate independently.
So! Back to Onshape I went, haha.
I made sure to create a dedicated slot for the plate, and split the femur so that I could screw the face over the plate. This allows the plate to move freely side by side, but not up and down.
Then I made a dedicated hole in the back of the femur for the servo horn, because the manufactured horns perfectly meshed with the servos…meaning a moving horn wouldn’t be offset by something like my hand. Now there was a way to connect the horn to the femur.
There were also little things like:
->the femur’s rotation being blocked by the other servo, so I designed it to be slightly taller
->adjusting the heights of the connecting linkages as a result of changing the design
Overall, the new design was used for two of the robot’s legs. For some reason the old design worked perfectly for the other two, but I’m not complaining! :)

0
0
15
Open comments for this post

4h 33m 59s logged

Successfully transferred my inverse kinematics calculations from paper and Desmos to code (supposedly). All these days, and I hadn’t actually double checked my work or finished coding the IK. On one occasion, I had coded something of a framework, but later had it accidentally deleted when trying to connect the project to Github (because I’m an idiot :P). So today I focused on one of the robot’s legs––the bottom left––because the IK is different for each leg. By using Serial.print to compare the values in the code to the values in Desmos (based on an input x, y, z), I was able to fix the bugs in my equations, since the equations from Desmos slightly differed from the code. I also added a map function to convert the angles into PWM. It will be a while before I actually test this on the servos, because I need to find a way to recharge my batteries, but I’m excited to use this code! :)

0
0
2
Open comments for this post

2h 2m 53s logged

Fixed the mess that was my board management (is that how you call it?) by finally adding screws and a stricter fit to the design. Previously I tried adding a spring-like hold on both sides of the…uh…electronics holders?…but they were too loose, easily slid, and simply fell off whenever I nudged the bot a little (left). For the 9v battery holder (with the nano and breadboard on top), I added screws to the sides (I had planned this when I started designing before the summer, couldn’t figure it out, and had useless screw holes at the sides for a while), whereas the buck converter and the pca9685 holder was given a tighter tolerance (given that there were no screw holes in the bot body designed by the past me). Now they no longer fall off when testing the legs, making my life a lot easier (right)! :D!!!

0
0
1
Open comments for this post

5h 38m 43s logged

I finished the inverse kinematics for my robot dog! While I already calculated angles for the femur and tibia (upper/lower linkages of the leg) based on (x,y), I had yet to calculate the hip angle based on a given (z,y) yet. The hip angle allows for the dog to move its leg outwards and inwards from the body, like your shoulder enabling your arm to swing left and right. However, there was now the challenge of maintaining a right angle between linkages 1 and 2! Instead of using the law of cosines, I just used the standard soh/cah/toa for right triangles, and tested my calculations in Desmos (here: https://www.desmos.com/calculator/hifeumrqwd).

0
0
3
Open comments for this post

11h 51m 23s logged

Finally figured out Platformio! Apparently I had to include upload_port = COM3 and upload_speed = 115200 in the Platformio.ini file, and then type the code I wanted to upload into main.cpp…oops (took a long time for me to figure that out…)! That was my fault. I made progress with the robot dog, though––I had to manually figure out which PWM signals signified 0-180 degrees for each servo. This process included unscrewing the servos, testing minimum and maximum PWM values, then screwing them back in. But I’m very happy with the result, and I can start implementing the inverse kinematics!

0
0
3
Open comments for this post

2h 49m 57s logged

Today I tried using Platformio for the first time, but there were a lot of pit stops along the way. Couldn’t understand why the port wasn’t connecting, and the servo suddenly stopped working! Still trying to fix the issue with the port…but figured out that the motor thought now was a good time for a disconnected gear (ᵕ—ᴗ—)
On the bright side, made progress with Desmos and step trajectory interpolation through a parabola and some handy math equations (here’s the link! :D https://www.desmos.com/calculator/vxmkw9d4zw). Frustrating day but had fun trying new things! :)

0
0
2
Open comments for this post

33m 59s logged

Calculated inverse kinematics for my robot dog. I used Desmos to double-check my calculations, but it was hard to understand the trigonometry and how it worked. After an ungodly amount of time spent watching Khan Academy videos and studying other graphs, I finally simulated the robot dog’s limb movement in Desmos (Here’s the link if you’re interested :D -> https://www.desmos.com/calculator/ey6wzovfjc)! Days spent on a graphing calculator and 33 minutes coding XD

0
0
1

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…