I am using an arduino uno, a gy-521 mpu 6050 and the Jeff Rowberg library. While the code is perfect the results are less than desirable. I am using the RealAccel option but when I move the accelerometer to the right the data is first correctly positive numbers increasing because of the rightward movement. But once I stop moving the device there are negative values appearing. For the most part there is an equal value for both positive and negative values, meaning if I moved the accelerometer the equivalent of '100' in the positive direction once I stopped moving there would also be multiple other negative values adding up to about a '-100'value. I assume this is because for every action there is an opposite and equal reaction but if not I would like to know why this happens and even if this is there case there must be a way around this, right ? I previously solved this by multiple if statements basically saying if any of the last 7 numbers were positive(because of noise) then the next x number of numbers would be zero but I would like to hear any other ideas or solutions for this problem.Thank you.
mpu 6050 accelerometer value gives positive and negative values for one movement?
1.8k Views Asked by AaronBettle At
1
There are 1 best solutions below
Related Questions in ARDUINO
- arduino find text in webpage
- Arduino serial works fine with Debian but hangs with Raspbian
- Need help getting value from html slider on yun to arduino value
- Arduino RPM Detection
- How do you do forward declarations in arduino code?
- ESP8266 and Arduino Interfacing
- Async HTTP Request and Arduino
- Arduino NearBus NearbusEther_v16.h: No such file or directory
- Arduino data type confusion. Have string, need const char?
- Connecting a USB serial device to the Arduino directly
- C++ how do i show ledstatus as on or off in the Client?
- Arduino RFID (Wiegand) Continuous reading
- Android Phone not sending data over TCP/ip
- nRF24 - data received but not whole message
- Trouble interfacing/communicating between Arduino Block and Intel Edison
Related Questions in ACCELEROMETER
- Android accelerometer detect device lying still
- How can I use the Accelerometer for detecting jump in LibGDX?
- Get an accelerometer's device id(or monitor an accelerometer in the backbround) on WinRT
- How to get accurate speed from accelerometer on iOS?
- Android Sensor.TYPE_LINEAR_ACCELERATION reporting wrong values on Galaxy S5
- Windows Phone: how to manage shake events?
- how to use accelerometer sensor to detect and match two toy cars' collision
- iOS orientation estimation and heading error
- How to know if Android device is Flat on table
- How to save previous barometer value to compare it with current Fall Detection Android
- Swift Accelerometer keeps crashing with ScrollView
- iPhone Accelerometer forward,back,left,right
- To detect a fall
- Technique to measure distance from android app (between 0-60 mts)
- Accelerometer stops working/listening
Related Questions in GYROSCOPE
- Can I change the view of a 360 YouTube video with the gyroscope in the browser?
- What method is implemented for drift compensation in the gyroscope?
- connect to Gyro sensor
- receive data with s.recv()
- Technique to measure distance from android app (between 0-60 mts)
- Methods of gesture 1D recognition using smartphone gyroscope sensors
- Multi-Sensor Android Logging
- Unity google cardboard drift
- how to get time if some condition met like gyroscope reading
- DeviceOrientationEvent: how to deal with crazy gamma when beta approaches/hits 90deg?
- Angular acceleration affect on accelerometer
- Detecting iPhone movement on a flat surface
- Using the Android gyroscope in Unity3d, how can I set the initial camera rotation to the initial mobile device rotation?
- How to implement lowpass filter to reduce noise in gyroscope values?
- Detect user activity (running, cycling, driving) using Android
Related Questions in I2C
- Using camera shutter to trigger MPU6050 on raspberry pi
- Xilinx AXI-IIC Slave Protocol description
- Python bus = smbus.SMBus(1) equivalent in C++?
- Erroneous i2c response from LSM303D to Netduino Plus
- Linux I2C-Dev IOCTL-Call produces wrong message
- Embedded software program block, I2C?
- I2C & SPI driver
- Listening to i2c input changes with python
- Getting the info from MCP23017 with Python
- Python - HowTo unittest i2c device wrapper class
- Linux - Is it necessary to register (instantiate) i2c devices before using them?
- Issue on using both I2C and Serial simultaniously in raspberry pi 2
- what is better using while loop or if statement when checking status codes of atmega 32?
- Register address not sent using I2C in TM4C123GH6PM board
- I2C communication in raspberry pi using python
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If you accelerate an object in one direction, the object will never slow down or stop. It will keep going in that direction forever. The only way to slow down or stop is to have negative acceleration. You're right about the negatives equaling positives in your case - it's because you're starting at velocity zero and ending at velocity zero.
I think you're actually trying to calculate velocity in that direction, which will start at 0, go above 0, and then return to 0. To get that number, sum (accerations * (time difference)) from time=0 to whatever time you need the velocity. This is called a Riemann sum of accelerations.
For further reading, look for 'kinematics in one dimension'.