VIII. Appendix - CZ
References
Bit-Boy, and Instructables. “3D Printed Walking Robot (Klann Linkage).” Instructables, Instructables, 11 Oct. 2017, www.instructables.com/3D-Printed-Walking-Robot-Klann-Linkage/.
“Klann Linkage.” Wikipedia, Wikimedia Foundation, 10 Feb. 2021, en.wikipedia.org/wiki/Klann_linkage.
Last Minute Engineers. “In-Depth: Interface L298N DC Motor Driver Module with Arduino.” Last Minute Engineers, Last Minute Engineers, 18 Dec. 2020, lastminuteengineers.com/l298n-dc-stepper-driver-arduino-tutorial/.
“Planar Mechanism Kinematic Simulator.” PMKS: Planar Mechanism Kinematic Simulator by DesignEngrLab, designengrlab.github.io/PMKS/.
BOM
Component | QTY | Approximate Total Cost |
|---|---|---|
24x30" 1/4" thick wood | 1 | $5.73 |
M3 Plastic Washers | 250 | $11.43 |
M8 Plastic Washers | 50 | $8.98 |
M3 30mm Bolts | 50 | $10.51 |
M3 Bolts (Assorted Length) | 50 | $9.69 |
M3 Lock Nuts | 100 | $3.82 |
12V DC Motor | 2 | $23.18 |
L298N DC Motor Driver | 1 | $9.82 |
Arduino Uno | 1 | $13.92 |
12V Battery Pack | 1 | $21.98 |
Power Switch | 1 | $0.75 |
Wires (Assorted) | 1 | $5.89 |
Total Cost | $125.70 | |
Code
Arduino
// Motor A connections void setup() { void loop() { // This function lets you control spinning direction of motors // Turn on motor A & B |
MATLAB
%Calculate all leg lengths %coordinates scale = 10; %scale factor for all leg lengths. 1 = no scaling %lengths triangle_outer = scale*Leg_length(rocker1,rocker2) %angles
%calculate leg length function [length] = Leg_length(pos1,pos2) %calculate the length of a leg given two xy coordinates
%calculate angles for leg function [angle] = Leg_length(pos1,pos2,pos3) |
%Robot Position, Velocity, and Acceleration calculations % Constants omega2 = -10 %rpm theta1 = 16.61*(pi/180); %triangle_lower_angle (radians) for i = 1:length(theta2) %Secondary 5-bar analysis figure(1) figure(2) figure(2) figure(3)
%four bar position function function [theta1,theta2,theta3,theta4] = fourbarpos(a,b,c,d,theta1,theta2,psi) % - psi is open, + psi is cross chain K1 = d/a; A = cos(theta2)-K1-K2*cos(theta2)+K3; end |