How to Use Accelerometers on the Arduino - Ultimate Guide to the Arduino #42

preview_player
Показать описание
Accelerometers detect the magnitude and direction of acceleration. We can use them to measure acceleration or to turn on a device by tapping. In this video we will learn how to get the raw data from an accelerometer and print it to the serial monitor, then we will convert the raw data into a meters per second squared acceleration value.

This is tutorial #42 in the Ultimate Guide to the Arduino, a complete video course on the Arduino microcontroller with 45 lessons that are designed to teach anyone how to master the Arduino at any skill level. Visit our YouTube channel page to watch the entire series!

Get the 3-in-1 Arduino Smart Car and IOT Learning Kit from SunFounder here:

Or get the kit from Amazon:

Get an ADXL345 accelerometer from SunFounder here:

Visit the webpage for this video tutorial on Circuit Basics for wiring diagrams and example code:

And be sure to check out the Circuit Basics blog and social media for more articles and tutorials on the Raspberry Pi, Arduino and other DIY electronic projects!
Рекомендации по теме
Комментарии
Автор

Well narrated. Thanks a lot to the author of this video.

epannirselvam
Автор

Excellent video and explanations. This really helped be get my project setup quickly.

jeffsimmons
Автор

Thanks for making this. It should be very useful for my project.

I'll be using an ADXL375 which is a +/-200g accelerometer for testing impacts. Impact impulses only last 10ms (milliseconds) so I don't think the delay would be needed. I need microsecond accuracy to see the impulse curve and not miss the peak g's.

Great stuff though.

martinfoster
Автор

got a question:

at 13:36 we can see that the sensitivity scale factors for x, y and z are 3.5, 3.9 and 4.3 respectively.

Yet, at 14:51, in your code example you use the same sensitivity scale factor for all 3 axis. This factor is 3.9 and is the sensitivity factor for y according to the spec sheet at 13:36

You did the same for the 4g case, 8g and 16g too.

Is there a reason why you only used 1 sensitivity scale factor, and why you chose to use the y axis scale factor?

for 2 g i was expecting this:

Xout = Xread * 3.5
Yout = Yread * 3.9
Zout = Zread * 4.3

thanks in advance

RageForSeven
Автор

I'm thinking for this to be useful you'd need to also calculate a 3D vector from a series of readings, then you'd know it was heading in a particular direction?
There's probably some mathematical filtering that's commonly used that lets you interpret real world readings, but I don't know where to start looking. Like I'd like to detect a vibration within a certain frequency range but FFT seems ott?

____________________________.x
Автор

Hey there i made earthquake detector with the same, can you suggest how can I convert vibration in x y z axis to intensity, so as to make final output in terms of intensity to link it with ritcher scale

yashnarvariya
Автор

Is there a way to measure constant speed? How fast and for how long?

YigalBZ
Автор

Hello great video and nice explanation, may I ask you about the g, are you referring g as gram or gravity ? Thank you

antoineagius
Автор

Do you know how to implement the project in FPGA, obviously, de10 standard? Thank you so much.

ngocmanprocoder
Автор

Lost with all the random sequences of unexplained letters.

johnx
join shbcf.ru