D.A.G.R. - Quadruped Robot

July 9, 2023

Robot Block Party

DAGR and Makech (new quadruped robot) made an appearance at the 2023 Robot Block Party, hosted by Circuit Launch in the SF Bay Area. Here's a quick video of DAGR during the party.

March 28, 2023

Robot First Steps

March 6, 2023

Inverse Kinematic Demo

January 31, 2023

Jumping test-stand

In this episode I explain how I followed a parallel design methodology for this project. I worked simultaneously in the following items:

This episode is a collection of clips that were taken throughout the whole development of the actuators. The updates revolving the actuator design and optimization done with the test-stand were finished around June of 2021. In this blog, there are more details on the other items I worked on during this time. 

October 19, 2021

Finishing the assembly

After many weeks of printing and assembly, I'm finally done with the assembly. The overall mass of the robot came out to around 3.6 kg (without batteries), including the power distribution boards. Since communication is wireless for this robot, there is no extra mass in compute and wiring, other than power. With two 1200mAh 3S batteries the mass is closer to ~4kg. Experimentally, I determined the operational time of the robot by measuring power consumption.

October 2, 2021

Brushless motor comparison

From the jumping HALT testing it was evident the knee actuator was a little under-powered for the application as I struggled to get the expected height from the jumps and the knee motor would over heat after continuous jumping. In this episode of the Quadruped Robot series I explore and compare two different brushless motors and different reduction ratios for the knee actuator. 

June 8, 2021

Inverse Kinematics Model

I've been 3D printing non-stop for the last few weeks and building/ testing each actuator. Currently, I'm half way done with printing, but I'm still messing with the knee actuator (more on that later). At the same time, I've been working on the Inverse Kinematics Model of a single leg, which is almost the same as the model for the whole robot, just without the adequate translation for positioning the Cartesian coordinate system in the axis of symmetry of the robot. The model shown in this post will follow the coordinate system shown in the picture to the left. Visit the Github repository to find a simple C program to calculate the inverse Kinematic model of a single three degree-of-freedom leg. 

A 2D analysis is done for a 2 degree-of freedom leg. Knowing the length of the femur and the tibia is enough to start calculating the model. The first thing to calculate are the angles theta and phi given a leg_length input, which in this case is equivalent to the position in the Z axis. With this part of the model you can control the position of the foot in the Z axis by changing the value of leg_length, remember to multiply the angles calculated by the reduction ratio of your actuator.

To properly control the foot in the X,Z plane, the new_leg_length has to be the input of the first part of the model (instead of the position in Z) and the angle to send to the hip actuator is theta - extra_theta. The angle to send to the knee actuator is simply phi. 

For the X axis the part of the model shown above has to be done and tested. For this next part, there are two inputs: the position of the foot in Z and in X; and there are two outputs: a new_leg_length and a extra_theta. 

May 20, 2021

Active compliance mode

One of the main reasons to have a 9:1 reduction ratio in the actuator is to have a Quasi-Direct-Drive system, which, by working with a brushless motor in position control mode, behaves like a virtual spring-damp system. Another huge benefit of such a system is that it has a high torque transparency and thus, external forces applied to the actuator's output can be easily recognized and measured (once current sensing is working). With this in mind, I've designed a controller that produces active compliance in such a way that it allows a person to position the actuator in space by applying a force to the output of the actuators. I've also called this mode gravity compensation mode because the torque generated by the gravity on the actuator's output is not enough to make it move. This controller is in cascade to my position PD controller, which is also in cascade to the two current PI controllers; the output of this compliance controller is an angular position in radians. The control law is as follows: 


May 5, 2021

Updated BOM of the actuator

I've started with the production of the 12 actuators that will make up the body of the robot and the 3 degree-of-freedom legs. I've moved away from the blue Solutech PETG I was using for the prototypes because it was surprisingly brittle and mechanically comparable to regular PLA, which I don't intend to use because sometimes the motors get hot and PLA deforms easily at low temperatures. I got RED Hatchbox PETG and I'm honestly impressed, the walls feel much sturdier than the blue PETG and even though it's harder to print it has a very nice finish and feel to it. The change from using nuts to the M2.5 inserts has been very great, it's much nicer to assemble/ disassemble the actuator. The inserts are pushed to it's place with a soldering iron; if using inserts, I encourage doing a few test prints before printing a final part because hitting the perfect size bore for these inserts can take a few tries.

April 17, 2021

Re-arranging the actuators

Aside from the obvious color change there are some key differences from the first actuator arrangement (left) and the one I settled with (right). The original arrangement has two shoulder actuators in the center of the robot and one actuator at each front of the robot (there isn't really a front and a back because it's symmetrical), this allows to move the hip actuators closer together and thus move the feet closer, making a more slim robot. However, this comes with some complications and disadvantages: having two motors on the outside of the robot exposes them to harm easier, the actuators on both fronts on the robot adds mass further from the center of mass, the space between the hip actuators, which should serve as a place to store the batteries and power distribution, is small. 

The new arrangement is much closer to the ODRI Solo 12 design. If you're not familiar with ODRI's work and the Solo 12 robot I encourage you check them out. This arrangement keeps the fully symmetrical design and has a few advantages: most of the mass near the center of mass which is ideal, there's more space between the hip actuators for storage, there are no motors exposed, leaves both fronts of the robot open in case I ever decide to try vision and automated navigation. 

April 10, 2021

Base actuator updated dimensions

After several iterations I've come to the final dimensions of the base actuator while prototyping around the actuator that is going to power the knee of the robot. The knee actuator is going to have a 155mm section length, a very nice height under 46mm and a width of around 42.5mm.

This final prototype (right) has a 12% reduction in mass, which is always appreciated. One last change is that I'm no longer using a XT30 connector mounted directly on the Dagor Controller's board, now I'm having the power cables come out of my *universal connector* and using the bullet connectors that come with the motors. This connector is subject to be changed, but it's what I have handy at the moment. 

March 27, 2021

Torque vs. Q-Axis Current

Last time I did a torque test that measured torque vs. supply current and got a non-linear response. This time the current loops are closed, for actual FOC control, and we compare torque with the Q-Axis current (Iq) obtained with the Clarke-park transform. For this test the Dagor Controller inside the actuator is set to torque mode. Spoiler: the response is mostly linear.

The video shows how I did the torque test. I sent to the actuator a current command, with my ESP-NOW wire-less controller, for a brief period of time and registered the force applied to the scale in grams. I later converted the force into torque considering a lever length of 170mm and graphed the results. Given the characterization presented in the equation obtained from the graph it is possible to command the actuator in terms of torque [Nm]. 

Having unlocked current sensing in the actuator it is possible to achieve higher acceleration profiles, AKA a bigger burst of energy. Updating the firmware of the actuators of the testing leg resulted in a new high jump record, coming in at 15 cm, measured from the point highest point when the leg is straight (right before flight), to the highest point in the flight. 

A common technique employed for current measurement in motor control is low-side current sensing. The Dagor Controller was designed with such technique in mind, but it present a challenge by having to sync the analog to digital measurements with the on-time of the low-side FET of each phase (it can be reduced to two phases and estimate the third with Kirchhoff's law). Using the ESP32's MCPWM unit I managed to sync the current readings with the falling edge of the PWM signals, this works because the smart MOSFET driver that Dagor uses only requires three PWM signals and it generates the other corresponding PWM signals (with dead-time insertion) for the low-side FETs. 

Good current readings:

Bad current readings:

March 16, 2021

Actuator torque test

This video shows a torque test done with the Dagor Controller set to voltage control mode. This test shows the non-linear behavior from the power supply current and the torque. 

This non-linear behavior confirms that it is not efficient (or accurate) to command the actuator in terms of torque by measuring the supply current while operating in voltage mode. More so, controlling torque in terms of voltage is a very conservative.

December 29, 2020

Quadruped robot build

This project is going to be accompanied by a YouTube video series.

The idea behind this projects is to design of a low-cost and low-mechanical-complexity quadruped robot as a scalable platform for torque-controlled robotics. 

The project has a few key objectives: