Pages: [1]   Go Down
Author Topic: from displacement to velocity  (Read 295 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

HI Everyone

I am new about Arduino and I have a problem about a project.

I am using a Ping acoustic sensor to measure displacements. My program was taken by the example associated to the sensor.
What I would like to do, it is to pass fromdisplacement to velocity and then make the FFT of the signal.
I know I can pass from displacement to velocity through the derivative but I don't have any idea how to do it in Arduino or how to sample the signal.
Any help or idea?

Thanks

matomato




Logged

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1023
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need the time. Velocity is displacement over time. What is the timing between pulses.      ( Curr Disp - Prev Disp ) / delta time.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24305
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
then make the FFT of the signal.
An FFT of which signal?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Westbrook, CT
Offline Offline
Full Member
***
Karma: 2
Posts: 139
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Give us some more example of your work if you have any. Such as some code and circuit configuration.
Logged

Arduino Uno R3
Mac OSX Lion


Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

thanks for the answers and sorry if i disappered for a bit.

This is the code written for the project. The data are acquired using a rugged arduino and it uses an acoustic sensor HC SR04.

At the moment the software reads the displacements on the serial monitor and it makes an average of the acquired signal.  I would like to use this signal which represents the displacement to derive the velocity and make the FFT.

Thanks for the help.

matomato


* Measure_distance.ino (1.08 KB - downloaded 1 times.)
Logged

Offline Offline
God Member
*****
Karma: 10
Posts: 646
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

While velocity is mathematically the first derivative of displacement vs. time you don't need any calculus to do this.  You just need to divide displacement by time.
Logged

Pages: [1]   Go Up
Jump to: