# C-Legged Hexapod Robot Design Guidelines Based on Energy Analysis
## 3 Model Experimental Validation  
### Set-Up  
To validate the kinematic and energy model developed in the previous section, it was necessary to design a test bench that matched the model assumptions. This meant to restrict the degrees of freedom of the system to only translation motion in the X- and Y-direction. To do so, the following test bench has been designed in SolidWorks and manufactured using a 3D printer. The test bench consists of two sets of rail pairs that allow motion in the X- and Y-direction and limit the motion and rotation in the remaining degrees of freedom. To facilitate movement in the X- and Y-direction, IGUS bearings have been fitted in the sliding parts. The motor used throughout the set of experiments is the JGY-371 motor with the specifications seen in Table 1:  
Due to the motor's worm gearbox, the minimum distance between the shaft and the edge of the gearbox is 16 mm. This means that the system's hip will never be at a height lower than 16 mm above the ground, thus the value of \(l_{c}\) is 16 mm. The motor driver used is the MDD10A which controls the motor speed, which has been set either to 30 rpm in the open loop or to 30 rpm with the PID close loop control. To validate the kinematic model, two distance sensors were used. On the one hand, the distance sensor used to measure the height (y) was an ultrasonic sensor (hc-sr04), placed in the vertical slider, shown in Figure 12. On the other hand, to measure the displacement in the X-axis, a ToF sensor (cj vl53l0 xv2) was placed in between the horizontal rails, and it measures the distance between the slider and the rail's end. The position of this sensor can be seen in Figure 12. Both sensors are connected to an Arduino Uno, which sends the data back to MATLAB via serial communication. \begin{table}
\begin{tabular}{c c} \hline \hline \multicolumn{2}{c}{**Motor Specifications**} \\ \hline Max rpms & 40 \\ Nominal Torque & 5.6 kg\(\cdot\)cm \\ Max Torque & 24 kg\(\cdot\)cm \\ Gear Ratio & 150 \\ Encoder Counts & 16 Counts/rev prior gear reduction \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Motor specifications. Figure 12: Test bench Computer Aided Design (CAD) render (**left**), and photograph of the test-bench’s sliding mechanism and vertical distance sensor (**right**). The legs diameter used for the kinematic model experiment are r = 20 mm for the space trajectory validation and r = 15 mm, trajectory vs. time validation. The leg has been designed to fulfill the conditions imposed during the development of the model. As it can be seen from Figure 13, the motor shaft and the legs end form a semicircle, and to avoid sliding, the legs contact surface has been made rugged. Furthermore, the leg's end has been designed as thin as possible to ensure the system pivots around one unique point when the values of \(\theta\) belong to the interval \(\ \left[0,\frac{\pi}{2}\right]\). To validate the energy model, the leg radius was set to be r = 15 mm (the same as the one used in the kinematic model validation). The INA219 sensor was used to measure the power consumption of the system. This sensor communicates via I2C to the Arduino Uno, which itself sends the data to a MATLAB script in the computer via serial. It is important to note that the energy model developed predicts the power consumption of the motor, due to the GPE and KE energy changes. This means that if the power consumption is measured directly when the system is moving, then the energy consumption associated with other sources, such as internal frictions, resistances, inertias, etc., will be included in those measurements. To obtain the consumption associated strictly with GPE and KE variations, the following procedure was done. Firstly, the power consumption of the motor at a constant \(\omega\) with no load (i.e., leg rotating elevated from the ground), was measured.