Updated Self Balancing Report (F16mte28)
Updated Self Balancing Report (F16mte28)
Updated Self Balancing Report (F16mte28)
&
TECHNOLOGY, JAMSHORO
CERTIFICATE
This is to certify that Mr. S/O
bearing Roll no. has carried
out all practical work of the in Semester,
Year of his B.E Mechatronic Engineering degree program during
the session .
BY
NAME ROLL NO
ATHAR HUSSAIN (GL) F16MTE28
MOHAMMAD ALI F16MTE05
PRITHVI RAJ F16MTE12
MOHAMMAD BILAL F16MTE14
SUBJECT
MECHATRONICS SYSTEM
DESIGN
SUBMITTED TO
YOUSUF JAMAL
Introduction
Hand saw
It is tool generally used for cutting wood and plastics we have used
this saw.
Screwdriver
Sandpaper
Triangular file
Computer
Arduino uno
Jumper wires
Jumper wires are simply wires that have connector pins at each
end, allowing them to be used to connect two points to each
other without soldering.
9v battery
Acrylic sheet
It's any type of plastic that contains derivatives of acrylic acid, but
PMMA is by far the most common type of plastic.
Arduino software (version 1.8.5)
The Arduino Integrated Development Environment (IDE) is a cross-
platform application that is written in functions from C and C++. It
runs on Windows, macOS, and Linux. It is used to write and
upload programs to Arduino compatible boards, but also, with the
help of third-party cores, other vendor development boards.
We have used the open-source Arduino IDE software for writing
and uploading the program into the Arduino Nano board. The
environment is written in Java and based on Processing and other
open-source software.
METHODOLOGY & Working Principle
// set our DMP Ready flag so the main loop() function knows it's okay to
use it
dmpReady = true;
//setup PID
pid.SetMode(AUTOMATIC);
pid.SetSampleTime(10);
pid.SetOutputLimits(-255,
255);
}
else
{
// ERROR!
// 1 = initial memory load failed
// 2 = DMP configuration updates failed
// (if it's going to break, usually the code will be 1)
Serial.print(F("DMP Initialization failed (code "));
Serial.print(devStatus);
Serial.println(F(")"));
}
}
void loop()
{
// if programming failed, don't try to do anything
if (!dmpReady) return;
}
// reset interrupt flag and get INT_STATUS byte
mpuInterrupt = false;
mpuIntStatus = mpu.getIntStatus();
// check for overflow (this should never happen unless our code is too
inefficient)
if ((mpuIntStatus & 0x10) || fifoCount == 1024)
{
// reset so we can continue cleanly
mpu.resetFIFO();
Serial.println(F("FIFO overflow!"));
// otherwise, check for DMP data ready interrupt (this should happen
frequently)
}
else if (mpuIntStatus & 0x02)
{
// wait for correct available data length, should be a VERY short wait
while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount();
RESULTS