GitHub - CarlKCarlK/excel-3d-robot-arm · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
CarlKCarlK
excel-3d-robot-arm
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>7 Commits<br>7 Commits
media
media
.gitignore
.gitignore
LICENSE-APACHE
LICENSE-APACHE
LICENSE-MIT
LICENSE-MIT
NOTICE
NOTICE
README.md
README.md
VERSION
VERSION
excel_3d_robot_arm.xlsx
excel_3d_robot_arm.xlsx
useful.md
useful.md
View all files
Repository files navigation
Excel 2D & 3D Robot Arms
A playable Excel workbook that models 2D and 3D robot arms with ordinary spreadsheet formulas.
Caption: Screen recorded demo
Contents
Download
Usage (2D)
Why Excel?
Parts of the 2D Spreadsheet
Generalizing to a 3D Robot
A Little Bit of Background
Related Work
License
Download
Download the workbook: excel_3d_robot_arm.xlsx.
The workbook uses Excel formulas, charts, form controls, and Solver. It is designed for desktop Excel on Windows or Mac.
Usage (2D)
Use the 3 sliders or the red numbers to reduce the distance from the robot's hand to the target.
Use Excel's built-in Solver Add-in and the robot can find the target itself.
Why Excel?
Excel makes everything visible. Each row is one arm segment, and each formula shows exactly how the next position and orientation are computed. Nothing is hidden in code, a graphics engine, or a robotics library.
Parts of the 2D Spreadsheet
Model : A series of rows with almost identical formulas, model each segment of the robot arm. Orientation of a segment is single heading number. The formulas use +, *, sin, cos, and if.
Control : Three red cells, with values 0 to 100, control the robot arm by changing three inputs to the model. Optionally, three Excel slider controls change these values.
Target : A "target #" cell seeds the pseudo-random position of the target.
Distance : A section of the spreadsheet calculates the distance from hand to the target.
Plot : A standard x-y plot displays the robot arm and the target.
Solver : Excel's Solver Add-in can (often) find the three input values that minimize the target distance.
Generalizing to a 3D Robot
Open the spreadsheet and move to the 2nd tab.
We model the Armatron, a 6 degree-of-freedom toy once distributed by Radio Shack.
TOMY Armatron 3.jpg by Morn, CC BY-SA 3.0
Here is how the 3D tab compares to the 2D tab:
Model : Still just a series of rows, each controlling one segment. The rows now process 3 ways to turn (yaw, pitch, roll) instead of one. Orientation of a segment is now a 3x3 orientation matrix, represented by 9 numbers. For convenience, the formulas now also use switch and sumproduct. (Let me know if there is interest in an explanation of the math in the row.)
Control : As before, but now with 6 red control numbers up from 3.
Target : Adds a pseudo-random height.
Distance : Takes into account height.
Plot : Uses 3 standard plots to show views from three sides. (There is a way to do full 3D graphics in Excel, but I didn't do it here.)
Solver : Excel's Solver is great at finding the six values that minimize the target distance.
A Little Bit of Background
The spreadsheets model robot arms via turtle graphics: a series of moves and relative turns. You can use the rows to do any 2D or 3D turtle-style drawing.
The field of robotics calls finding the position and orientation of segments forward kinematics. It is equivalent to 3D turtle-style drawing.
What Excel Solver does—finding the control values that move the hand to a desired position—is called inverse kinematics.
Related Work
This project grew out of earlier Excel experiments with graphics and simulation:
Excel Fun: Understand 3D Graphics — To Grasp Something, Make a Spreadsheet
Build a One Instruction Set Computer (OISC) on a Spreadsheet — Excel Fun: Let’s see how a spreadsheet can simulate a whole computer at the instruction set level
I may write up the 2D and 3D robot-arm spreadsheet in more detail later, especially the connection between...