0% found this document useful (0 votes)
9 views

pbl

Imu(inertial measurement unit)

Uploaded by

lucabruno955120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

pbl

Imu(inertial measurement unit)

Uploaded by

lucabruno955120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

A

PROJECT BASED LEARNING REPORT


ON
INTERNAL GUIDENCE SYSTEM

In the Partial Fulfillment of FE at Savitribai Phule Pune University

Submitted By

Under the Guidance of


Mr.Amar Hatti

Department of Engineering Sciences

Jaywant Shikshan Prasarak Mandal’s,


Jaywantrao Sawant College of Engineering,Hadapsar, Pune - 28

2023-20 24
INTRODUCTION:-

a) Inertial Guidance System, Inertial Instrument

An inertial navigation system (INS; also inertial guidance system, inertial instrument) is
a navigation device that uses motion sensors (accelerometers), rotation sensors (gyroscopes) and
a computer to continuously calculate by dead reckoning the position, the orientation, and
the velocity (direction and speed of movement) of a moving object without the need for external
references.[1] Often the inertial sensors are supplemented by a barometric altimeter and sometimes
by magnetic sensors (magnetometers) and/or speed measuring devices. INSs are used on mobile
robots[2][3] and on vehicles such as ships, aircraft, submarines, guided missiles,
and spacecraft.[4] Older INS systems generally used an inertial platform as their mounting point to
the vehicle and the terms are sometimes considered synonymous.
Integrals in the time domain implicitly demand a stable and accurate clock for the quantification
of elapsed time.

Inertial navigation is a self-contained navigation technique in which measurements provided by


accelerometers and gyroscopes are used to track the position and orientation of an object relative
to a known starting point, orientation and velocity. Inertial measurement units (IMUs) typically
contain three orthogonal rate-gyroscopes and three orthogonal accelerometers, measuring angular
velocity and linear acceleration respectively. By processing signals from these devices it is
possible to track the position and orientation of a device.

We tried to replicate same technology but completely electronics and on the microcontroller level
computing power with compect designe for beginner understanding.
LITERATURE SURVEY :-

➢ Microcontroller:-
In modern terminology, a microcontroller is similar to, but less sophisticated than, a system
on a chip (SoC). A SoC may include a microcontroller as one of its components, but usually
integrates it with advanced peripherals like a graphics processing unit (GPU), a Wi-Fi module, or
one or more coprocessors.

➢ The Renesas RA4M1 group of microcontrollers :-


The Renesas RA4M1 group of microcontrollers (MCUs) uses the high-performance Arm®
Cortex®-M4 core and offers a segment LCD controller and a capacitive touch sensing unit input
for intensive HMI designs. The RA4M1 MCU is built on a highly efficient low power process and
is supported by an open and flexible ecosystem concept—the Flexible Software Package (FSP),
built on FreeRTOS—and is expandable to use other RTOSes and middleware. The RA4M1 is
suitable for applications where a large amount of capacitive touch channels and a segment LCD
controller are required.

The Renesas RA4M1 group of microcontroller

➢ Inertial Measurement Unit:-


An inertial measurement unit (IMU) is an electronic device that measures and reports a
body's specific force, angular rate, and sometimes the orientation of the body, using a combination
of accelerometers, gyroscopes, and sometimes magnetometers. When the magnetometer is
included, IMUs are referred to as IMMUs.
An inertial measurement unit works by detecting linear acceleration using one or
more accelerometers and rotational rate using one or more gyroscopes. Some also include
a magnetometer which is commonly used as a heading reference. Typical configurations contain
one accelerometer, gyro, and magnetometer per axis for each of the three principal axes: pitch, roll
and yaw.

➢ ALDX345:-
The ADXL345 is a small, thin, ultralow power, 3-axis accelerometer with high resolution
(13-bit) measurement at up to ±16 g. Digital output data is formatted as 16-bit twos complement
and is accessible through either a SPI (3- or 4-wire) or I2C digital interface. The ADXL345 is well
suited for mobile device applications. It measures the static acceleration of gravity in tilt-sensing
applications, as well as dynamic acceleration resulting from motion or shock. Its high resolution
(3.9 mg/LSB) enables measurement of inclination changes less than 1.0°. Several special sensing
functions are provided. Activity and inactivity sensing detect the presence or lack of motion by
comparing the acceleration on any axis with user-set thresholds. Tap sensing detects single and
double taps in any direction. Free-fall sensing detects if the device is falling. These functions can be
mapped individually to either of two interrupt output pins. An integrated memory management
system with a 32-level first in, first out (FIFO) buffer can be used to store data to minimize host
processor activity and lower overall system power consumption.

FEATURES:
► Ultralow power: as low as 23 µA in measurement mode and 0.1 µA in standby mode at VS = 2.5
V (typical)
► Power consumption scales automatically with bandwidth
► User-selectable resolution
► Fixed 10-bit resolution
► Full resolution, where resolution increases with g range, up to 13-bit resolution at ±16 g
(maintaining 4 mg/LSB scale factor in all g ranges)
► Embedded memory management system with FIFO technology minimizes host processor
load
► Single tap/double tap detection
► Activity/inactivity monitoring
► Free-fall detection
► Supply voltage range: 2.0 V to 3.6 V
► I/O voltage range: 1.7 V to VS
► SPI (3- and 4-wire) and I2C digital interfaces
► Flexible interrupt modes mappable to either interrupt pin
► Measurement ranges selectable via serial command
► Bandwidth selectable via serial command
► Wide temperature range (−40°C to +85°C)
► 10,000 g shock survival
► Pb free/RoHS compliant
► Small and thin

➢ I2C COMMUNICATION:-
I2C combines the best features of SPI and UARTs. With I2C, you can connect multiple slaves to
a single master (like SPI) and you can have multiple masters controlling single, or multiple
slaves. This is really useful when you want to have more than one microcontroller logging data
to a single memory card or displaying text to a single LCD.
Like UART communication, I2C only uses two wires to transmit data between devices:
I2C is a serial communication protocol, so data is transferred bit by bit along a single wire (the
SDA line).
Like SPI, I2C is synchronous, so the output of bits is synchronized to the sampling of bits by a
clock signal shared between the master and the slave. The clock signal is always controlled by
the master.

➢ SPI Communication Protocol:-


SPI is a common communication protocol used by many different devices. For example, SD
card reader modules, RFID card reader modules, and 2.4 GHz wireless transmitter/receivers all
use SPI to communicate with microcontrollers.
One unique benefit of SPI is the fact that data can be transferred without interruption. Any
number of bits can be sent or received in a continuous stream. With I2C and UART, data is sent
in packets, limited to a specific number of bits. Start and stop conditions define the beginning
and end of each packet, so the data is interrupted during transmission.
Devices communicating via SPI are in a master-slave relationship. The master is the
controlling device (usually a microcontroller), while the slave (usually a sensor, display, or
memory chip) takes instruction from the master. The simplest configuration of SPI is a single
master, single slave system, but one master can control more than one slave
OBJECTIVE:-
First, we will read the data from the sensor using i2c protocall and then process the data in
microprocesser ,then using the Processing development environment, we will make a 3D
visualization of the accelerometer orientation.
TO TEACK AND ORIENT THE PICH AND PITCH OF THE OBJECT IN 3D SPACE

METHODOLOGY:-
1.Collecting data from IMU:-
we can read the ADXL345 accelerometer data using the Arduino. This sensor uses the I2C
protocol for communication with the Arduino so we need only two wires for connecting it,
plus the two wires for powering it.

2.Processing the data to coordinates:-


The data collected from inertial measurement unit (IMU) is raw data we need to convert it
into useable data.

3.Callibrations:-
Nevertheless, once we read the data, we can simply print it on the serial monitor to check
whether the values are as expected. If not then we add or subtract the offset value back from
the data.

4.Processing the data into 3d visual :-


the Processing development environment we need to receive these values and use them to
rotate the 3D object that we will create.
ACTION PLAN:-
➢ Connections:-

➢ Collecting data from IMU:-( program)


#include <Wire.h>
int AXDL345=0x53;
float X_out,Y_out,Z_out;

void setup() {
Serial.begin(9600);
Wire.begin();
Wire.beginTransmission(AXDL345);
Wire.write(0x2D);
Wire.write(8);
Wire.endTransmission();
delay(100);}

void loop() {
Wire.beginTransmission(AXDL345);
Wire.write(0x32);
Wire.endTransmission(false);
Wire.requestFrom(AXDL345, 6, true);
X_out =(Wire.read()|Wire.read() <<8);
X_out =X_out/256;
Y_out =(Wire.read()|Wire.read() <<8);
Y_out =Y_out/256;
Z_out =(Wire.read()|Wire.read() <<8);
Z_out =Z_out/256;
Serial.print("Xaxis=");
Serial.print(X_out);
Serial.print(" Yaxis=");
Serial.print(Y_out);
Serial.print(" Zaxis=");
Serial.println(Z_out);
delay(500);}

➢ Callibrations:-

// This code goes in the SETUP section


// Off-set Calibration //X-axis
Wire.beginTransmission(ADXL345);
Wire.write(0x1E); // X-axis offset register
Wire.write(1);
Wire.endTransmission();
delay(10); //Y-axis
Wire.beginTransmission(ADXL345);
Wire.write(0x1F); // Y-axis offset register
Wire.write(-2); Wire.endTransmission();
delay(10); //Z-axis
Wire.beginTransmission(ADXL345);
Wire.write(0x20); // Z-axis offset register
Wire.write(-7);
Wire.endTransmission();
delay(10);
If needed we should calibrate the other axis using the same method. And just a quick note
that this calibration is not permanently written to the registers. We need to do write these
values to the registers at each power up of the sensor.
Once we are done with the calibration, we can now finally calculate the Roll and Pitch, or the
rotation around the X-axis and the rotation around the Y axis in degrees, using these two
formulas.

// Calculate Roll and Pitch (rotation around X-axis, rotation around Y-axis)
roll = atan(Y_out / sqrt(pow(X_out, 2) + pow(Z_out, 2))) * 180 / PI;
pitch = atan(-1 * X_out / sqrt(pow(Y_out, 2) + pow(Z_out, 2))) * 180 / PI;

➢ Processing the data into 3d visual :-


In the Processing development environment
import processing.serial.*;
import java.awt.event.KeyEvent;
import java.io.IOException;
Serial myPort; String data="";
float roll, pitch;
void setup() {
size (960, 640, P3D); myPort = new Serial(this, "COM8", 9600); // starts the serial
communication
myPort.bufferUntil('\n’); }

void draw() {
translate(width/2, height/2, 0);
background(33);
textSize(22);
text("Roll: " + int(roll) + " Pitch: " + int(pitch), -100, 265); // Rotate the object
rotateX(radians(roll));
rotateZ(radians(-pitch)); // 3D 0bject
textSize(30);
fill(0, 76, 153);
box (386, 40, 200); // Draw box
textSize(25);
fill(255, 255, 255);
text("www.HowToMechatronics.com", -183, 10, 101);
//delay(10);
//println("ypr:\t" + angleX + "\t" + angleY);
// Print the values to check whether we are getting proper values }
// Read data from the Serial Port
void serialEvent (Serial myPort) {
// reads the data from the Serial Port up to the character '.' and puts it into the String variable
"data".
data = myPort.readStringUntil('\n’); // if you got any bytes other than the linefeed:
if (data != null) { data = trim(data); // split the string at "/"
String items[] = split(data, '/’);
if (items.length > 1) {
//--- Roll,Pitch in degrees
roll = float(items[0]);
pitch = float(items[1]); }
}}

If we run the sketch, the 3D object will appear and it will track the orientation of the
accelerometer sensor. We can notice here that the object is actually a bit shaky and that’s because
the accelerometer captures not just the gravitational force, but also small forces generated by the
movements of our hand. In order to get smoother result, we can use a simple Low-pass filter.
Here I implemented such a filter in the Arduino code, which it takes 94% of the previous state
and adds 6% of the current state or angle.

// Low-pass filter
rollF = 0.94 * rollF + 0.06 * roll;
pitchF = 0.94 * pitchF + 0.06 * pitch;
RESULT AND DISCUSSION

➢ Connectins

➢ Raw data on serial moniter

➢ 3d visual
EXPENDITURE INCURRED

Arduino uno R4 minima ----- 2000Rs.


Lcd display --------------------- 300Rs.
Adxl345 ------------------------- 300Rs.
Mpu6050 ------------------------ 300Rs.
Jumpre wires -------------------
Power supply ------------------
Breadboard -------------------- 450Rs.
GST + delivery charges
TOTAL -------------------------- 3500Rs.

CONCLUSION
We created and understud technology and completely electronics and on the microcontroller level
computing power with compect designe of internal guidance system, which was created for beginner
uses

REFERENCES
• https://r.search.yahoo.com/_ylt=Awr1Sa4GijJmGQQAF1K7HAx.;_ylu=Y29sbwNzZzMEcG
9zAzEEdnRpZAMEc2VjA3Ny/RV=2/RE=1715797767/RO=10/RU=https%3a%2f%2fwww.c
ircuitbasics.com%2fbasics-of-the-spi-communication-
protocol%2f/RK=2/RS=VzzBg.4YumbivVWu10r5tM1XS9s-
• https://www.youtube.com/watch?v=KMhbV1p3MWk&t=466s
• https://howtomechatronics.com/tutorials/arduino/how-to-track-orientation-with-arduino-
and-adxl345-accelerometer/#How_to_Read_ADXL345_Accelerometer_Data_with_Arduino
• https://www.analog.com/media/en/technical-documentation/data-sheets/ADXL345.pdf
• https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-
mcus/ra4m1-32-bit-microcontrollers-48mhz-arm-cortex-m4-and-lcd-controller-and-cap-
touch-hmi#overview
• https://en.wikipedia.org/wiki/Microcontroller
• https://www.youtube.com/watch?v=M9lZ5Qy5S2s&t=1402s
• https://www.youtube.com/watch?v=4BoIE8YQwM8&t=570s

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy