Accelerometer and PIC connection

Thread Starter

clarelluffyjjang

Joined Jun 8, 2017
35
hi i am new to PIC and Accelerometer. i bought this ADXL335 3 axis accelerometer, but i read through the datasheet i dont understand how to use it. i want to know what kind of output i will get and how to use it? i read an article online that there will be 3 values which is X_OUT,Y_OUT and Z_OUT and i should use the datasheet formula to calculate the acceleration. i am using this acceleration to measure a speed of a runner and distance run by the runner. how should i connect it to my PIC18F45K22? i read through the datasheet there is no typical connection to it. can someone give me a hints to start off my project?
 

be80be

Joined Jul 5, 2008
2,072
Well the datasheet tells you that at rest the output is .1 and full swing 2.8 volts so yes you read it with 3 adc pins as the drawing shows.
I dont see nothing digital in the data sheet.
Im not good at the video stuff but this shows it output


Mines like this one
 
Last edited:

LesJones

Joined Jan 8, 2017
4,174
I have just read the data sheet and agree with be80be (Post #4) I think you will have a bigger problem doing the single integration for speed and double integration for distance.

Les.
 

Sensacell

Joined Jun 19, 2012
3,432
Consider your big picture goal a bit more carefully- I think you will have extreme difficulty measuring a runners speed and distance using this technique.

Without some absolute reference, the measurements will drift to the point of being useless.
 

BR-549

Joined Sep 22, 2013
4,928
On flat land, timed photographs from a hover drone might be easier for personal/individual use. It kinda depends on how relative the speed value is to you. For instance......a + elevation distance will slow speed and/or increase energy output for the same level distance. Is this for training or just measurement.

For an absolute speed.....nothing beats a measured path and a triggered clock. Many triggers along the measured path will give you accurate intermediate results.

Have the runner wear an identifying trigger that logs a planer boundary along the measured path.
 

Thread Starter

clarelluffyjjang

Joined Jun 8, 2017
35
On flat land, timed photographs from a hover drone might be easier for personal/individual use. It kinda depends on how relative the speed value is to you. For instance......a + elevation distance will slow speed and/or increase energy output for the same level distance. Is this for training or just measurement.

For an absolute speed.....nothing beats a measured path and a triggered clock. Many triggers along the measured path will give you accurate intermediate results.

Have the runner wear an identifying trigger that logs a planer boundary along the measured path.
hiii i want a sensor that can measure distance travlled and speed. i am doing a project that can measure the runner's speed along the 400m run then feedback to it whether is it running at his/her targeted speed. do you know any sensor that can measure speed or distance for 400m long?
 

Thread Starter

clarelluffyjjang

Joined Jun 8, 2017
35
Not that hard this is for a avr but you would hook the same way on a pic poll 3 adc pins and ack on the data
[/QUO
Yep gps. This is more inline with is your screen upside down.
hiii i want a sensor that can measure distance travlled and speed. i am doing a project that can measure the runner's speed along the 400m run then feedback to it whether is it running at his/her targeted speed. do you know any sensor that can measure speed or distance for 400m long?
TE]
 

Thread Starter

clarelluffyjjang

Joined Jun 8, 2017
35
Consider your big picture goal a bit more carefully- I think you will have extreme difficulty measuring a runners speed and distance using this technique.

Without some absolute reference, the measurements will drift to the point of being useless.
hiii i want a sensor that can measure distance travlled and speed. i am doing a project that can measure the runner's speed along the 400m run then feedback to it whether is it running at his/her targeted speed. do you know any sensor that can measure speed or distance for 400m long?
 

Thread Starter

clarelluffyjjang

Joined Jun 8, 2017
35
I have just read the data sheet and agree with be80be (Post #4) I think you will have a bigger problem doing the single integration for speed and double integration for distance.

Les.
hiii i want a sensor that can measure distance travlled and speed. i am doing a project that can measure the runner's speed along the 400m run then feedback to it whether is it running at his/her targeted speed. do you know any sensor that can measure speed or distance for 400m long?
 

Thread Starter

clarelluffyjjang

Joined Jun 8, 2017
35
Well the datasheet tells you that at rest the output is .1 and full swing 2.8 volts so yes you read it with 3 adc pins as the drawing shows.
I dont see nothing digital in the data sheet.
Im not good at the video stuff but this shows it output


Mines like this one
hiii i want a sensor that can measure distance travlled and speed. i am doing a project that can measure the runner's speed along the 400m run then feedback to it whether is it running at his/her targeted speed. do you know any sensor that can measure speed or distance for 400m long?
 

philba

Joined Aug 17, 2017
959
You seem to have a multiple posting problem.

I'll echo the above point - integration of acceleration to get speed and distance is a hard problem to solve. I suggest you get a simple GPS and use that. However, for short distances, you will need a GPS with a fairly high sample rate (10 herz, I think). I'm not sure the GPS accuracy would be enough for good measurement of short bursts (like a 400m run). What is your maximum acceptable error? I would think GPS could do no better than about 5%

Another approach is to build a pedometer to detect steps and then estimate speed based on stride length and timing. You'd need to tune it to the runner's stride.
 
Top