ADXL335 | A library to read the ADXL335 acceleration sensor
kandi X-RAY | ADXL335 Summary
kandi X-RAY | ADXL335 Summary
ADXL335 Interface Library Derek Chafin September 14, 2011 Public Domain Code. An arduino library to read the ADXL335 acceleration sensor from Adafruit.com. The library takes the raw input from the sensor and outputs all three axis in earth gravities. The library is able to detect freefall as well as calculate the hypotenuse of the vector and all three angles; rho, phi, and theta.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ADXL335
ADXL335 Key Features
ADXL335 Examples and Code Snippets
Community Discussions
Trending Discussions on ADXL335
QUESTION
Background : I've connected an ADXL335 accelerometer to pins A0,A1,A2 on the Arduino Uno. During the measurement, the Arduino is connected to the laptop via usb, and accelerometer is powered directly by the 3.3V pin on the Arduino. The intention is to read voltage from the accel and plot the corresponding time and frequency spectrum using Python. The overall process is quite straightforward and I'm actually able to achieve this. A snapshot of a signal I recorded is shown below. Arduino code to read/write from the accelerometer and Python code to read from Arduino and construct the plots are provided at the bottom for reference.
The issue I'm facing is with the actual values read by the Arduino (I think).
Problem: There seems to be some noise picked up by the Arduino during the read/write process. To demonstrate this, I ran two separate data acquisitions with the sensor at rest. Snapshots are provided below. I had used a similar system in 7yrs ago in grad school, using National Instruments DAC and LabView. I did experience some noise back then but that was akin to electrical noise ~60 Hz. This one is quite peculiar and I don't know how to deal with it.
Closing: Could someone please help me understand what noise it is, that I'm seeing? Perhaps knowing what this is called will help me research about it in detail and try to tackle it. Any pointers/references would help as well.
Future Scope: I believe that a stable at-rest signal as the first step will greatly help mitigate the offset in Voltage (DC-component in freq-spectrum) even with a simple average. Also, I need to learn how to increase the sampling rate from the uno.
Programs used:
Arduino code to read/write from the accelerometer
...ANSWER
Answered 2022-Mar-22 at 21:24This is spike noise. You should use a median filter to clean your signal. It is a digital non linear filter which you can implement in your software.
Just a note: I don't know which sample frequency are you using but the higher is the sample frequency, the more is the collected noise. So, limit the sample frequency to 2 x signal bandwidth (Shannon theorem)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ADXL335
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page