Difference between revisions of "High Speed Motor Control"
RyanDeeter (talk | contribs) |
RyanDeeter (talk | contribs) |
||
| Line 12: | Line 12: | ||
Commanding the arm is much easier for a user to do in x- and y- coordinates than in motor angles or encoder counts. Therefore, equations were required that would translate x- and y- coordinates into angles from horizontal and then into encoder counts. Equations to express the reverse (encoder counts to angles to x- and y- coordinates) were also needed to evaluate the accuracy of the execution with respect to the command path. |
Commanding the arm is much easier for a user to do in x- and y- coordinates than in motor angles or encoder counts. Therefore, equations were required that would translate x- and y- coordinates into angles from horizontal and then into encoder counts. Equations to express the reverse (encoder counts to angles to x- and y- coordinates) were also needed to evaluate the accuracy of the execution with respect to the command path. |
||
*<math> x = L \cos (\theta_1)\ + \cos (\theta_1+\theta_2)</math> |
|||
<math> x = L \cos (\theta_1)\ + \cos (\theta_1+\theta_2)</math> |
|||
| ⚫ | |||
<math> y = L \sin(\theta_1)\ + \sin(\theta_1+\theta_2)</math> |
|||
| ⚫ | |||
<math> \theta_2 = cos^{-1} \left(\frac{x^2+y^2-L^2-(2L)^2}{2L^2} \right)</math> |
|||
Note: In the code, <math>\theta_2 \, </math> is written out explicitly in the equation for <math>\theta_1 \, </math>, but was defined as above for ease of reading. |
Note: In the code, <math>\theta_2 \, </math> is written out explicitly in the equation for <math>\theta_1 \, </math>, but was defined as above for ease of reading. |
||
===Basket Design=== |
===Basket Design=== |
||
===Materials and Construction=== |
===Materials and Construction=== |
||
Revision as of 13:53, 9 March 2010
Overview
The project suggested was to design a system for high speed motor control using the PIC 32. To demonstrate the motor control, a two degree of freedom (2DOF) robot arm was designed to throw and catch one ball with itself.
Team Members
- Sam Bobb (Electrical Engineering senior)
- Daniel Cornew (Mechanical Engineering junior)
- Ryan Deeter (Mechanical Engineering junior)
Mechanical Design
Theory of Parallelogram Design
Equations of Motion
Commanding the arm is much easier for a user to do in x- and y- coordinates than in motor angles or encoder counts. Therefore, equations were required that would translate x- and y- coordinates into angles from horizontal and then into encoder counts. Equations to express the reverse (encoder counts to angles to x- and y- coordinates) were also needed to evaluate the accuracy of the execution with respect to the command path.
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x = L \cos (\theta_1)\ + \cos (\theta_1+\theta_2)}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y = L \sin(\theta_1)\ + \sin(\theta_1+\theta_2)}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \theta_1 = \frac{-(2 L \sin(\theta_2)) x + (L + 2 L \cos(\theta_2)) y} {(2 L \sin(\theta_2)) y + (L + 2 L \cos(\theta_2)) x}}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \theta_2 = cos^{-1} \left(\frac{x^2+y^2-L^2-(2L)^2}{2L^2} \right)}
Note: In the code, Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \theta_2 \, }
is written out explicitly in the equation for Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \theta_1 \, }
, but was defined as above for ease of reading.
Basket Design
Materials and Construction
Electrical Design
Overview
Circuit Diagram
Components
GUI
Usage
Programming
Code
Overview
PIC C Code
MATLAB Code
Results
It was awesome.