This was my Mechatronics Final Year Project at the Faculty of Mechanical Engineering in Skopje. It objective was to develop a device that will enable interaction of real arm movements with 3D computer models. I integrated three different fields in one device, t.e. mechanical, electrical and computer engineering:
- Solidworks to design the 3D model that represent the movements of the arm.
- Arduino Mega 2560 card for connecting the real world with the computer.
- MATLAB / Simulink to program the control of the 3D model
In the next video you can see a presentation of the project. This is its content:
- An Introduction. Here I briefly talk about the Mechatronics as a field of study which enabled me to develop this kind of a device.
- The Arduino Mega 2560. Some basic features of this Arduino Board which I used in this project.
- 3D Models in Simulink Environment. How to transfer 3D Model from Solidworks to Matlab / Simulink using the SimMechanics Link.
- Development of the device. Here I talko about the components that I used to build the device and how they work, as well as the Simulink Model, the program that is running on the Arduino Board and enables the interaction between the real world and the computer
Building the device
Parts used in this project
- Arduino Mega 2560
- 3-Axis Accelerometer
- Linear Potentiometer x5
The accelerometer is used for tracking the orientation of the arm. As the arm moves, the values from the X, Y and Z axis from the accelerometer change and are being read in the Analog Inputs of the Arduino Board. According to them the 3D Model moves as well.
The potentiometers are used for tracking the position of the fingers. I attached a spring (pen spring) to each of the potentiometer. The spring holds the potentiometer slider at a certain position and as the fingers move the slider is being pulled and the resistance of the potentiometer is change. That values are being read in the Analog Inputs of the Arduino Board and according to them the 3D Model’s fingers moves as well.
I used a plastic cover from a calculator as a base on which i attached the five potentiometrs. On top of them I put the Breadboard on which i secured the Arduino Board and the Accelerometer using a tape. On the picture below you can see the final appearance of the device.
Circuit schematic of the device
The 3D Model
The 3D Model is a representation of a human arm. First, I modeled it using Solidworks and then I transferred it into Matlab / Simulink using the SimMechanicsLink from Matworks.
Download the 3D Model here:
The MATLAB / Simulink Model
Before building the Simulink model, first I had to install the Arduino IO Package which consists the Simulink library for communication with the Arduino board. Also using the Arduino IDE i had to upload the code to the Arduino board that comes with the package to enable the Simulink library. Here I would highly recommend my Tutorial for Matlab and Arduino IO Package so that you can understand the working principle and see the code.
I organized my Simulink model into six subsystems:
- Arduino analog inputs blocks for the values from the accelerometer and the potentiometers
- Correction of the analog reads according to my needs
- PID control for getting smoother movements
- Joint Actuators blocks for driving the joints of the 3D model
- The 3D Model which was automatically generated using the SimMechanicsLink
- Joint sensor block for tracking the position the 3D model
You can Download the Simulink Model here:
Check my Extension of this Project.
I reprogrammed the Arduino Glove to work as a Game Controller.
We highly recommend EasyEDA for circuit design and low cost PCB order