User Tools

Site Tools


Motion Analysis of Lego Pieces

Author: Joo Won Lee Email:
Date: Last modified on <6/3/2021>
Keywords: <Tutorial, how to, lego, Solidworks, motion analysis>

This tutorial will be focusing on how to animate Lego Solidwork parts and calculate & display angle for various cases.

Motivation and Audience

The motivation of this tutorial is to teach how to animate Solidworks parts via motion study function. Solidworks comes with a powerful tool called motion analysis. The motion analysis tool allows to simulate real life interactions such as collisions, gravity and friction. The tutorial will teach how to analyze simple rotational movement of two bars via this tool.

Parts List and Sources

* One needs all of the following programs installed on their computer: SolidWorks (preferably post 2020 version with PREMIUM).

Before the tutorial can begin, one must download the following item from google drive.

File Name Google Drive Link Note
Isogawa Solidworks Parts Ask author or lab member for password

The Only lego pieces will be used for this tutorial.

How to Setup

You need two lego bar peices connected by an axle

Set up the pieces as the following video.

They must be able to freely rotate about an axle.

How to Add Reference Angles

Rotate the piece to make an angle.
Click “Smart Dimension” on the Sketch tab.
Click “Reference dimension” on the menu.
Click two pieces where you want to see the angles between.
Click Okay when done.

Constant Rotation without Gravity

Click motion study tab on the bottom
Add motor to the piece you want to rotate. (Must apply to the circular section of the piece).
Recommend slow RPM (~10 RPM) for more accurate analysis and avoid aliasing.
Click the drop down menu on the bottom left to “Motion Analysis” tab.
Click Results & Plots
Click “Other quantities” from from category drop down menu.
Select “projection angles”
Select the axis where you need to analyze. For the video, notice that the Y plane is perpendicular to the pieces, thus it Y axis was chosen.
Select two pieces that you want to measure the angle between.
Click okay, and calculate.
To view the plot, click results and click “show plots”

The following graph represents angle vs time of constant motion.
Since Solidworks works from -180 degrees to 180 degrees, there is a jump -180 to 180, when it completes 1/2 of the rotation.

Nonconstant Rotation without Gravity

Create a new motion study by right clicking on the bottom. (If it is the first motion study, just click the motion study tab.
Select motor and select data points.
Input your desired acceleration and speed numbers in the chart.
Move to motion analysis tab
Make a projected angled graph.
Click calculate.

Unlike constant rotation, the projected angles will have accelerating/decelerating curvatures.

How to Add Gravity in Motion Analysis

Create a new motion study profile. (Right click motion study tab at the bottom)
Click gravity icon.

Define direction and acceleration of the gravity.

Click okay.

Gravity is only calculated in the motion analysis section of motion study.

Rotation with Gravity without Friction

Gravity without friction can cause problem.
The way Solidworks motion analysis calculates acceleration and momentum will cause error.
This might be because the bar is accelerating too fast for the computer to properly calculate some of the movement values.
Due to this calculation error, the bar may accelerate enough from free fall to rotate all the way around.

Thus, it is not really useful to view data beyond certain point with normal gravity's acceleration (9.82 m/s^2)

One way to remedy this issue is to reduce gravity's acceleration by 100.
This looks like it fixes the issues as calculations become more precise for the computer to handle.

The 1/100 gravity will produce a perfect sine wave.

Rotation with Gravity with Friction

Unlike acceleration without friction, once you add friction to the calculation, the normal gravity's calculation will not cause error.

One must add friction in the assembly area before motion analysis can be done.
Click the part where the both bar and pin surfaces meet and add friction to it.
Add a friction (u value).

The graph will show a decaying oscillation.


Using motion analysis tool in the Solidworks, one will be able to analyze the angle displacement of various objects.
Motion analysis tool is a powerful tool that can be used for analyzing or simulating motion for different purposes.
As a personal example, I used motion analysis to calculate the power consumption and torque required to purchase the right motor.
The simulation can be a very helpful tool for any future projects.

Trying to calculate the maximum torque required to rotate the bin and see how much power is needed.

Final Words

This tutorial went over the following tasks:
-How to use motion analysis
-How to add reference angles
-How to add gravity
-How to view angle displacement on a graph
-How to add friction

For questions, clarifications, etc, Email:

lego_motion_analysis_tutorial.txt · Last modified: 2024/04/22 22:44 by johnlee