0

I am new to arduino and am confused about how I would go about doing this: I want to attach a device to a small ball, that will move through the air at speed. The purpose of this device would be to determine the speed of this object as it moves through the air. My ball will always move in the same path because it will be shot out of a tennis ball shooter. My initial intuition would be to use an accelerometer to determine the acceleration at quarter second intervals and then multiply those values by a quarter of a second to obtain the change in speed and then add it to the sum of all the previous change in speed values (starting at 0).

Would this work? Is my reasoning correct? Are there any better solutions?

Thank You!

pranchan
  • 3
  • 1
  • some part of the fly path will be without measurable acceleration and deceleration. Mythbusters used a high speed camera – Juraj Jun 03 '18 at 10:16
  • How so? What circumstances would lead to that? – pranchan Jun 03 '18 at 10:19
  • When you get to max speed it will flatten out? What you are proposing is constant integration and is a best-guess scenario. Better is to get the time between two known positions and work it out from there. – Majenko Jun 03 '18 at 10:39
  • But at max speed, I just need to add a 0 change in speed to my speed counter, and that would by default be the max speed right? – pranchan Jun 03 '18 at 10:44
  • The problem is I don't have any two known positions. – pranchan Jun 03 '18 at 10:46
  • How inaccurate should the estimate be? I am fine with a margin of inaccuracy.... – pranchan Jun 03 '18 at 10:47
  • It would drift over time. What distances and speeds are you considering? – Majenko Jun 03 '18 at 10:48
  • Less than a meter and a around 2-3 kmph at best. – pranchan Jun 03 '18 at 10:51
  • 1m at 3kmph would give you 1.2s to get your samples. The more you take the better. Plus you have to factor in spin (and hence centrafugal & centrapetal force). – Majenko Jun 03 '18 at 10:59

1 Answers1

1

You are proposing calculating velocity based on sampled acceleration. Essentially taking the integral of the acceleration. This is the first step in a process call dead reckoning. This is discussed in this arduino.stackexchange.com answer. In that answer there is a link to a web page which implements dead reckoning using an Arduino. You will find this equation on that web page:

velocity(i) = velocity(i-1) + acceleration (i)
st2000
  • 7,343
  • 2
  • 11
  • 19
  • You can probably get off hold if you re-phrase your question to something like: "Measuring the speed of an object using an Arduino". Then using similar wording in the question. – st2000 Jun 04 '18 at 01:00
  • While this is an interesting project - dead reckoning is usually difficult to get right. For this reason I would recommend checking out what might be possible using a color video camera and OpenCV. However, perusing this approach takes you out of the Arduino realm and into (at least) the Raspberry Pi realm. – st2000 Jun 04 '18 at 01:03