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
1 vote
0 answers
54 views

Sampling rate too slow

I have an Arduino Nano connected to an Adafruit H3LIS331 accelerometer. The sampling is initiated by a button press, which sets a delay to prepare for the measurement, and then the sampling begins. ...
Avihai Tsinober's user avatar
3 votes
2 answers
97 views

Difficulties acquiring angle values from MPU6050

I'm attempting to acquire angle values from an MPU6050 IMU sensor using an ESP32-DevKitM-1 microcontroller. My setup contains the ESP32 board, the MPU6050 board, and an SD card reader to save the ...
Runsva's user avatar
  • 173
-1 votes
2 answers
78 views

Do I connect multiple I2C units to the microcontroler in series or parallel?

I have a project (still planning) with three I2C sensors: GPS, 3-axis gyro+accelerometer, and OLED. Do I connect SDA/SCL in series, or do I connect them in parallel?
Marifin -'s user avatar
1 vote
0 answers
22 views

Sparkfun canbus shield with LSM6DS33 dual SPI problem

Hello fellow arduino users! I have a question regarding using the Sparkfun Canbus shield in conjunction with the LSM6DS33 sensor on a dual SPI configuration. I have managed to get theese two to ...
Paul Boutsiadis's user avatar
1 vote
0 answers
196 views

Arduino Nano 33 BLE power consumption optimization

I am working on building a sensor using Arduino Nano 33 BLE that will measure temperature using two thermistors and angle changes. The measured values will be transmitted over Bluetooth to a ...
Arseniy Tretyak's user avatar
1 vote
0 answers
111 views

LIS3DH not working with arduino

I am new to LIS3DH and tried to interface it with Arduino Uno. I have made the circuit as follows- LIS3DH : Arduino Uno SCL : SCL (GPIO18) SDA : SDA (GPIO19) 3.3v : 3....
ABD's user avatar
  • 111
2 votes
0 answers
177 views

AsyncMqttclient publish affects accelerometer readings

Using M5StickC ESP32 with built-in MPU6886 accelerometer to read vibrations. In the loop() section the code gets 10 readings per second and if the readings exceed a threshold, it starts publishing the ...
febalci's user avatar
  • 21
0 votes
0 answers
133 views

Arduino Nano 33 BLE Sense's BMI270 accelerometer rev 2

I'm trying to figure out how to use interrupts to get BMI270 acceleration data at high rate, but can't find any info on it. Already spent a few hours looking for some sample code and found nothing. ...
Pedro Ferreira's user avatar
2 votes
0 answers
82 views

STK8231 accelerometer, getting two axis (x & y data) but not z, also in 0-255

Here is the datasheet I followed: https://lcsc.com/product-detail/Motion-Sensors-Accelerometers_SENSORTEK-STK8321_C966924.html We are trying the following code: #include <Wire.h> int ...
narendok's user avatar
3 votes
1 answer
498 views

Help with reading data from ADXL373 Accelerometer (I2C)

I am using ADXL373Z accelerometer with Arduino Uno for a project. When I run the code, I am getting incorrect values which are probably not even acceleration data. I am thinking it might be a wiring ...
Maxxie's user avatar
  • 31
1 vote
1 answer
183 views

Quaternion values from Arduino 9-axis motion shield seem very wrong

I am currently usinga BNO055 sensor fitted on the Arduino Nine-axis motion shield to measure ocean wave heights and periods. To do this, I'd like to use the quaternions provided, however I have a ...
Kajitrim's user avatar
2 votes
1 answer
346 views

How to process 20-bit sensor data

I have an acceleration sensor (ADXL355) that returns 20-bit data in three bytes, formatted as 2s complement : acc3 (bits 19-12) in byte register 3 (mapped to bits 7-0) acc2 (bits 11-4) in byte ...
Vassilis Papanikolaou's user avatar
0 votes
1 answer
283 views

Does anyone have code that successfully calculates velocity from an accelerometer

I'm trying to calculate the speed of a rocket for my project. I've been given the task of calculating this with an adxl3xxx accelerometer sensor. I'm not sure how to go about this as an accelerometer ...
Sam21's user avatar
  • 11
1 vote
1 answer
1k views

How to calibrate an accelerometer?

I'm confused about a few points on how to best calibrate an accelerometer, whose data will be used in an orientation sensor fusion algorithm. As a summary, the most common approaches I've seen take ...
Zhelyazko Grudov's user avatar
1 vote
2 answers
512 views

Stabilize data from four gyros/accelerometer [closed]

I am currently working on a university project. My aim is to get a rough estimate of the posture of a person's back. For this I have built a system that collects the data from 4 MPU6050 at a central ...
Trojan's user avatar
  • 123
1 vote
2 answers
429 views

PID control doesn't work. After computing the values, the values just become equal to 0

So, I have a working code of the stabilizer project using 2 servo motors, mpu6050, Arduino Uno. However, I want to add PID part for tuning the servo motors movement. I followed the example PID library ...
Akhat Mussabayev's user avatar
2 votes
0 answers
231 views

Extract Static Acceleration from MPU6050 using Formula

I am trying to implement a research paper for my project and there is a formula which I am failing to interpret: According to the research paper, we extract the static acceleration component for each ...
Noman Aziz's user avatar
1 vote
1 answer
347 views

Accelerometer value meaning

I'm currently using the MPU-6050 accelerometer to receive the acceleration and angular velocity data. I'm trying to process the data for my experiment but I can't understand the exact meaning of it. I ...
John Cho's user avatar
2 votes
2 answers
119 views

arduino acclerometer with servo motor

I'm currently working on project to operate three motors while sending accelerometer value to computer via bluetooth module. I want the motor operation and value transmission to work seperatly. But ...
John Cho's user avatar
1 vote
1 answer
144 views

Trying to use I2C accelerometer and SPI OLED

I'm trying to stream the data coming from my I2C MMA8452Q accelerometer to an Adafruit-based SSD1351 OLED RGB display that uses SPI via an Arduino UNO. When I run example code for the accelerometer I ...
Tom W's user avatar
  • 11
0 votes
1 answer
536 views

Seeking to write a ton of information to an SD card as close to live as possible

So I've recently started a project where I am using an accelerometer, along with a SD card breakout board. I've been able to get information to write properly to the SD card with no issues whatsoever. ...
Colby Johnson's user avatar
2 votes
3 answers
182 views

I develop an earthquake detector but when it detects a movement, the alarm doesn't stop from ringing

This is the code that I used. Actually, I use to code: for Arduino sofware and processing IDE software. Arduino Source Code/Program: #include<LiquidCrystal.h> // lcd Header LiquidCrystal lcd(7,6,...
Christian Marasigan's user avatar
-1 votes
1 answer
85 views

Is my BMA421 locked up?

I have been trying to set up the BMA421 motion sensor in a nrf52 based smart watch, using the datasheet for the BMA423, which has the same interface. I had got the sensor working well with the ...
Mark Williams's user avatar
0 votes
1 answer
788 views

Accelerometer Orientation (LIS3DH)

Newbie here! I’m trying to make a pocket level using an LIS3DH but I don’t know how to “reset” all the axis to start reading from a certain orientation since my LIS3dh won’t be mounted flat and will ...
CarmexLover13's user avatar
3 votes
1 answer
868 views

Can I use an accelerometer to measure the velocity of a car in a curve?

I am making an application that is used to measure the velocity, it has an accelerometer that measures the component acceleration in the XYZ-axis. When the car is moving just straight the measurement ...
Geisterfahrer's user avatar
1 vote
2 answers
38 views

Can UNO log more PCB 353b33 accelerometer data points compared to TDS3014B oscilloscope?

I'm currently recording data points from an analog accelerometer(PCB 353b33) using a TDS3014B oscilloscope which has Record Length of 10,000 points at a Sample Rate 1.25 Ga/s. I'm want to record more ...
MajorMajorMajorMajor's user avatar
1 vote
0 answers
252 views

Trying to use a gyro sensor and having issues

My setup is Arduino Mega. I have a gyro sensor that I'm trying to use to measure the acceleration or G force in X axis (forward movement). So far I'm trying to figure a way to use the value of Acc or ...
Andy Morgen's user avatar
2 votes
2 answers
2k views

Most precise way to measure linear distance travelled by a wheel

Suppose a bot with wheels is traveling in a a straight line, and we want to measure this linear distance traversed by it as accurately as possible. One of the ways is to use an optical encoder to ...
karnyrocks's user avatar
-1 votes
2 answers
3k views

Arduino Nano 33 IoT LSM6DS3: get gyro angle in degrees

I have an Arduino Nano 33 IoT and I want to get the angle of it using the built-in gyro but I can't seem to find any example code that does this. The default gyro and accelerometer example code doesn'...
DragonflyRobotics's user avatar
2 votes
0 answers
56 views

Does anyone know code for a filter that bypasses small vibrational movements in my accelerometer input data

So basically I have a DC motor that is self stabilizing a platform using an accelerometer as its input. When i hit the table, everything freaks out and the platform moves rapidly back and forth for a ...
Thunder Dornhofer's user avatar
2 votes
1 answer
170 views

My motor driver gets stuck in either high or low with a certain speed super randomly. Motor output stops going based on accelerometer input

Running a DC motor(6.5A max input), motor driver (MD10C 7Amp peak output), and arduino Mega. Basically, I am creating a stabilized object based on the accelerometer's input. It works great but all of ...
Thunder Dornhofer's user avatar
1 vote
0 answers
44 views

connect gy512 is not visible by i2c bus

I am a newbie. Please help to make gy512 visible on i2c interface. i did sda - a4 scl - a5 vcc - 5v gnd - gnd I have used i2c sticker scatch and use PC monitor.
Alexander Ushakov's user avatar
0 votes
0 answers
179 views

I am using an accelerometer as an input and a stepper motor as an output and it will have these weird delays after about 30 sec

I have a stepper motor (kysan 1124090) turning CW and CCW based on the y direction of my accelerometer(MU6090). I am using an Arduino uno. It works great but after about 30 seconds there will be these ...
Thunder Dornhofer's user avatar
0 votes
1 answer
337 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 ...
Mike's user avatar
  • 113
0 votes
1 answer
421 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>...
AfiJaabb's user avatar
  • 219
0 votes
1 answer
601 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 ...
daniel's user avatar
  • 185
-1 votes
1 answer
34 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) ...
Hi tE's user avatar
  • 21
2 votes
1 answer
2k views

ADXL355 accelerometer code

I am doing a project which monitors vibrations using an ADXL355 sensor and an Arduino. I have used the MPU-9250 sensor before. I am not able to find a library or tutorials for calibrating, filtering, ...
Arduiproj's user avatar
-1 votes
2 answers
92 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 ...
aadi_k's user avatar
  • 1
0 votes
1 answer
78 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(...
Dabber's user avatar
  • 1
-1 votes
1 answer
753 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 <...
Rajbir's user avatar
  • 17
1 vote
2 answers
1k 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 ...
Roel's user avatar
  • 49
1 vote
0 answers
328 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 ...
JamesONeil's user avatar
1 vote
0 answers
69 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 ...
user942937's user avatar
0 votes
0 answers
218 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 ...
Brethlosze's user avatar
6 votes
1 answer
4k 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 ...
muyustan's user avatar
  • 175
3 votes
3 answers
3k 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 ...
James Brusey's user avatar
1 vote
0 answers
699 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 ...
Allaw Hussein's user avatar
0 votes
2 answers
1k 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 ...
Maifee Ul Asad's user avatar
1 vote
0 answers
3k 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 ...
ardoknow's user avatar