Questions tagged [accelerometer]

A component which measures G-force to detect which direction it is moved or tilted in.

Filter by
Sorted by
Tagged with
0
votes
1answer
30 views

Relative position using Accelerometer

I have a simple scenario please: Two Arduino Nano 33 IoT devices started moving randomly from the same exact origin(Point = [X0, Y0, Z0]); Can I use the coordinates queried from each device ...
0
votes
1answer
34 views

Tilt Compensated Compass Using HMC5983 gives inconsistent output

I've been trying to build a tilt compensated compass for an autonomous Arduino car I'm building. I'm having issues with the consistency of my data. This is the code I'm using. #include <Wire.h>...
0
votes
1answer
32 views

ADXL345 gives wiring error in SPI mode

I get the following output from serial monitor when trying to use the ADXL345 with Arduino Uno in SPI mode (I2C mode works fine): CA Ooops, no ADXL345 detected ... Check your wiring! See photos for ...
-1
votes
1answer
22 views

acelermetor count goes down after 1 peak

I am using a Wemos D1 Mini and an mpu 6050 accelerametor. I managed to get the acceleratmetor to work and have 1 value come out of movements. So when a peak it hit (aka, the threshold of 1.00 is hit) ...
0
votes
0answers
69 views

how to link arduino uno and wonderware via modbus?

I am trying to make my Arduino uno and gy-521 accelerometer a modbus tcp server to feed data to a client on my pc. Most likely the HMI I am going to be using is wonder ware. #include <Wire.h> ...
0
votes
0answers
41 views

ADXL 355 accelerometer code

I am doing a project which monitor vibrations using ADXL 355 sensor and Arduino. I have used MPU 9250 sensor before. I am not able to find library or tutorials for calibarating, filter and reading ...
0
votes
0answers
32 views

write from one board's pin to read of another's not working

I have an Intel Tiny Tile boardThis board is based on the Intel Curie, and can be read in Arduino as an Arduino 101. I'm using this board's accelerometer to register the bounce of someone on a ...
-1
votes
2answers
55 views

Is it possible to get values only during vibration/movement from an Accelerometer(ADXL335/MPU6050)?

I'm trying to make a wearable motion sensor using ESP32 board and ADXL335 Accelerometer. Presently when I'm serial printing the output I'm getting the tilt value as well, which have different values ...
0
votes
0answers
15 views

Gimbal arduino program does not compile [duplicate]

/* code */ #include <Wire.h> const int MPU = 0x68; // MPU6050 I2C address float AccX, AccY, AccZ; float GyroX, GyroY, GyroZ; float accAngleX, accAngleY, gyroAngleX, gyroAngleY, gyroAngleZ; float ...
0
votes
1answer
58 views

My gimbal program does not compile

my code: // Get Yaw, Pitch and Roll values #ifdef OUTPUT_READABLE_YAWPITCHROLL mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetGravity(&gravity, &q); mpu.dmpGetYawPitchRoll(...
0
votes
1answer
143 views

How to use H3LIS331DL 3-Axis Linear Accelerometer with arduino to detect Harsh braking of vehicle

I am a newbie here, Recently I was working with H3LIS331DL 3-Axis Linear Accelerometer I²C Mini Module Here is code for the X, Y, Z-axis. #include <movingAvg.h> #include <...
0
votes
2answers
190 views

Adafruit_LSM303 tilt compensated compass

I am having troubles with tilt compensating my compass. I am using the LSM303DLHC accelerometer/compass in combination together with the Adafruit_LSM303_U.h. I was able to get my compass to the ...
0
votes
0answers
110 views

How to manage interrupt from accelerometer BMA220?

I would like to use the interrupt register from the BMA220 accelerometer in order to detect high-g shock. I am using a Mega2560 and the sensor is powered by 3.3 V. I use a voltage divider to convert ...
0
votes
0answers
37 views

MPU-6050 showing all -1s

I am following this tutorial and have an MPU-6050 connected to an Arduino Micro with the following connections VCC - 5V/3.3V GND - GND SDA - A2 SCL - A3 I'm trying to run the short example ...
0
votes
0answers
50 views

Possible race condition using ADXL345, external interrupts and sleep

Setup: I have an Adafruit ADXL345 attached to an Adafruit feather 32u4, via I2C lines and an interrupt line. Goal: The microcontroller should be in a sleep condition when acceleration values are ...
0
votes
0answers
89 views

Arduino Due ADXL345 Interference

I am working with an Arduino Due and the Analog ADXL345 through a module following this tutorial, with the wire.h library at Fast Speed (400kHz), the Accelerometer Sampling at 800Hz (for the Maximum ...
5
votes
1answer
979 views

A proper way to get the roll, pitch and yaw values

TL, DR : What is the method(in terms of sensors and algorithm) to get the roll, pitch angles of an aircraft at any instant. I am planning to build a hobby aircraft. I am so confused about which kind ...
3
votes
3answers
1k views

What is the right way to query an I2C device from an interrupt service routine?

The ADXL345, for example, requires that interrupts are responded to by querying the INT_SOURCE (interrupt source) register. In example code for the SparkFun ADXL345 Arduino Library, there is code that ...
0
votes
0answers
227 views

using two mpu6050 to get more accurate and precise angles

i have been using this gyro for a while, now i am aware of all measures taken, to improve the outcome of this board. my question is: would using two at the same time improve the results? if yes how ...
0
votes
2answers
359 views

Using MPU-6050 without I2C

My target is to use multiple MPU-6050 at once, I searched on the internet and found that they can be hooked up really simply. Just connect in parallel and use I2C-Scanner. Then get those addresses and ...
0
votes
0answers
30 views

Denoising accelerometer data mounted on moving vehicles

Can you suggest a method for denoising accelerometer data mounted on moving vehicles? I have read several suggestions like using Kalman filter, moving average, etc. but I'm not sure which suit best in ...
0
votes
0answers
564 views

SOLVED Accelerometer/gyro MPU6050 is freezing after random time

SOLVED: I "solved" the problem by cycling my Arduino's power and I haven't had an issue since. I would still like to figure out what was going on. I still think it's something in that MPU6050 library ...
0
votes
4answers
296 views

How can I hook up multiple MMA8451 accelerometers, (I2C protocol) using one Arduino Mega?

How can I hook up four (adafruit) MMA8451 accelerometers (using I2C protocol) using one Arduino Mega? What I'm confused about is I only have one SDA and SCL on the Arduino Mega obviously. So how can I ...
0
votes
1answer
1k views

Remove gravity from accelerometer of MPU-6050

I am currently working with MPU-6050. Now I want to minus gravity from my accelerometer's value as we minus the offset. Here is the code: #include <Wire.h> #include <MPU6050.h> //read as ...
0
votes
1answer
126 views

Changing Baud Rate not working

I have copied this code from Github : #include <Wire.h> #include <MPU6050.h> MPU6050 mpu; // Timers unsigned long timer = 0; float timeStep = 0.01; // Pitch, Roll and Yaw values ...
0
votes
2answers
237 views

MPU-6050 with Arduino - postmortem

I'm working with MPU-6050 with Arduino Uno. I copied the code below from Arduino Playground - MPU6050. Code : // MPU-6050 Short Example Sketch // By Arduino User JohnChi // August 17, 2014 ...
1
vote
0answers
176 views

FIltering, FXOS8700, FXAS21002C optimization

I'm working on an inverse pendulum project, and am using an adafruit NXP_FXOS8700_FXAS21002 along with an Arduino due, and an esp8266 (two separate projects, same code however). I'm using a Magdwick ...
0
votes
1answer
256 views

Find vehicle movement by IMU and GPS

I'm using MPU9250 which has both accelerometer and gyroscope in a vehicle. What I want is to just know that if the vehicle is currently moving or not. I searched and find out that I can't get velocity ...
0
votes
2answers
621 views

Analog vs Digital Accelerometers - pro's and con's? [closed]

For my project i need to measure accelerations up to 16g. My options are either digital accelerometers such as the MPU6050 or MPU9250 or an analog accelerometer such as the ADXL326. What are any ...
0
votes
1answer
683 views

How to read the raw data from GY-85 module?

This module has 3 sensors. Gyroscope, Accelerometer and Magnetometer. I think I'm reading the raw data in the wrong way. For example, for the magnetometer HMC5883L, I'm using this code which I ...
2
votes
1answer
692 views

How can I simulate an accelerometer?

I am new to Arduino. I want to simulate a circuit which uses an accelerometer ADXL335 and a DC motor. If any deviation observed in the accelerometer readings, I want the motor to rotate. Is there any ...
2
votes
1answer
202 views

How do I connect an accelerometer (GY-521) to a SparkFun Thing Dev (ESP8266)?

All of the wiring diagrams I've found for wiring up a GY-521 accelerometer to an Arduino have looked something like this: I've read in several places that it needs to be connected to A4 and A5. I ...
0
votes
1answer
214 views

Trying to use Tap Detection solution using ADXL345 with Arduino

I am using ADXL345 sensor connecting with Arduino via I2C interface, I am able to test the data at tri-axial axis but as there are some other features also, which I am going to try with Tap detection ...
2
votes
1answer
400 views

Arduino Mega and gyroscope erroneous values

I have Arduino mega2560 and MPU6050. I connected to Vcc pin of the gyro to +5V on the mega, the SDA to SDA pin, SDL to SDL pin, AD0 and GND to 2 GND pins. I used this code: #include<Wire.h> ...
0
votes
1answer
276 views

ADXL345 Data Rate seems to depend more upon Baud rate than the actual Data Rate that I set

I have an Arduino UNO that is connected to an ADXL345. The problem is I need to collect data at 50Hz at least. The ADXL345 according to its Data sheet can go up to 3200Hz without any problem. I am ...
0
votes
0answers
318 views

Sending accelerometer data using BLE to a Cordova phone app

I'm working on a simple project, that involves an Arduino sending accelerometer data to a Cordova-based phone app using BLE. I've got my Arduino wired up correctly, I think - I can see the data in ...
2
votes
1answer
3k views

What is corrrect the way to find roll, pitch, yaw?

I have an MPU9250. I have calculated accelerometer, gyroscope, magnetometer. But I want to know how to caclulate roll yaw pitch. I have searched on Google. I found many answer roll = (atan2(-...
0
votes
1answer
112 views

Limiting Data Output Frequency from ADXL345

I have a working ADXL345 connected to an Arduino UNO, I need to limit the rate at which the ADXL345 takes in readings. I am using the SparkFun library for this sensor. I have read about the delay ...
0
votes
1answer
479 views

Measuring the speed of an object moving fast through air [closed]

I am new to arduino and am confused about how I would go about doing this: I want to attach a device to a small ball, that will move through the air at speed. The purpose of this device would be to ...
0
votes
2answers
845 views

Data transfer to and from Arduino to Raspberry Pi

I am trying to transmit MPU6050 accelerometer data + data from 3 potentiometers from Arduino to Raspberry Pi. I do post processing here (on Raspberry Pi) and then transfer the data back to Arduino to ...
0
votes
0answers
71 views

Controlling motors via accelerometer not working

I want to control the 2 servos(pan tilt) using accelerometer data value from android app. Im using nodeMCU v3, 2 servos(pan tilt) and smartphone. Connection: servos(pan tilt) is connected to 5 v ...
0
votes
1answer
186 views

Problem connecting Android app to Arduino [closed]

Sorry for doing this, I really don't know where to post beacuse this is both Android Studio code and Arduino code so I've posted to both sites. I want to create a project of using controlling pan-...
0
votes
1answer
161 views

Passing reference to hardware between methods in custom class

I'm a C++ / Arduino newbie, trying to build a custom library for the first time. I created a unit called CDSensors.cpp, which has two methods, SetupSensor and ReadSensors. The sensor is a SparkFun ...
1
vote
1answer
559 views

Configuring Accelerometer on BNO055 sensor

I'm using the BNO055 9DOF Adafruit sensor to measure the acceleration/orientation. How can I change the configuration of the accelerometer from 4G (default) to 16G? What I already know: The ...
1
vote
1answer
72 views

Strange behavior on bitwise operation

i am trying to write a simple program that writes the outputs of an accelerometer (which comes down to 3 analog inputs) onto an SD-Card. I got the hole thing working fine (sending the values as ...
1
vote
1answer
304 views

Powering an Arduino Uno using 2 (or as few as possible) AAA batteries

[Background] I'm constructing a water bottle rocket which is going to use apogee detection and a mechanism for the parachute release. Connected to the Uno will be an accelerometer and a servo, now ...
-1
votes
1answer
325 views

Fastest reading through i2c

I have an ADXL345 accelerometer and I read it with an arduino through I2C. I want to get readings at a frequency higher than 500Hz. According to the documentation this should be easily achievable, ...
1
vote
1answer
376 views

Does the position in which you mount an IMU matter?

Forgive me, I'm sure this is a total noob question, but I have never seen it actually addressed in any example or demo. When using something like a MinIMU-9 board (https://www.pololu.com/product/...
-1
votes
1answer
5k views

'import' does not name type ERROR

I am working with a group of people on an arduino controlled BB8 robot. We are using an IMU unit (accelerometer+gyroscope). I found a processing example for the IMU unit we are using. The code is ...
-1
votes
1answer
546 views

Determine an earthquake intensity/magnitude level using ADXL345 and Arduino

I want to create a project using Arduino that monitor the Earthquake. I used an ADXL345 Accelerometer to detect if there is an earthquake. I used the Adafruit ADXL345 example to determine a ...