1
\$\begingroup\$

I have small box (10cm x 10cm ) and I need to measure speed of ball (r=2cm) getting inside. image

I assume there are at least two possible ways.

  1. Put a sensor inside the box in point A and second one deeper in point B then measure at what time ball was in point A and what time in point B and calculate the speed.
  2. Use some sensor on the back of the box and use Doppler effect which will measure speed of reflected wave, but I assume that this method doesn't fit here simply because the ball could destroy this sensor.

And advice? Like what sensors I could use, some gates?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Well, 1. is pretty much how a chronograph works. You might be able to replicate that functionality. \$\endgroup\$
    – Hexum064
    Commented Oct 22, 2015 at 18:53
  • \$\begingroup\$ Is the ball opaque, i.e. not a table tennis ball? Is this just a ball thrown by hand? How big is a 'small ball'? Can you determine the size of the box and its internal finish, r is that outside your control? What technology are you aiming to use? Will it be a microcontroller + sensors, or all hardware? You might read the help center. \$\endgroup\$
    – gbulmer
    Commented Oct 22, 2015 at 18:54

1 Answer 1

4
\$\begingroup\$

A problem like this depends mostly on the material of the ball. There are a number of sensors you could use depending on the type.

Off the shelf method:There are ultrasonic range finders which could tell you how far away the ball is at any given time, but if its made of something that can distort sound waves this might limit your accuracy, plus using a sonic device would mandate that your ball is going significantly slower than the speed of sound. These ultrasonic range finders can be found at many electronics stores and sites as they are often integrated with arduino projects.

As for your method of using 2 sensors, it could work, but your accuracy is going to be limited by a lot of factors, and if the ball doesn't travel just right, you could miss the sensors all together. Still, if you wanted to do this I would recommend getting 2 infrared diodes, and 2 infrared receiver diodes.you can put the reciever on one side of the box and the and transmitter on the other, then do the same in the back. you should be able to detect the ball via a drop in the voltage generated by the receiver diode when the ball passes through it.

A nearly off the shelf but high accuracy method:Use an IR diode pointed outward from the box and then use an IR receiver diode also pointed outward from the box to measure the intensity of the IR light reflected back form the ball as it moves into range. This method has the advantage that you have a lot more data points since you can determine the intensity of the reflected light as the ball comes in and calculate the speed from that. you can emit the light at a particular frequency to remove background IR contamination which yields much better results, you may run into problems though if your ball is very hot or is a very good absorber of infra red light. This method would require an IR transmitting diode and an IR receiving diode. commonly available at electronics stores.

Whichever method you use you will probably need a microcontroller to emit your waveform from the diodes, measure the incoming waveform from the diodes and compute the speed.

Here is an image of the basic setup. Notice you can add a small shelf beneath the diodes so that it is just a slit that is too small for the ball to hit it. enter image description here

Also note that the exact intensity of the light reflected back will depend on the material at some distance r one material may reflect back IR with intensity A and another with intensity 2A, however the since you are computing speed, you are only interested in the change in intensities so as long as there is enough IR reflection to detect the material should not matter too much.

Edit: This is a one dimensional sensor, meaning it will only tell you 1 dimension of the velocity. Since you want to measure the speed of a ball that is in the box then, you have to ask yourself "What do I mean by the speed of the ball?" An actual ball thrown in to a box is going to come in at some non-perpendicular angle to the sensor, and will have some acceleration vector which acts to change its velocity. Not to mention drag forces. So there are a couple things to notice here. In this idealized animation of the ball entering the box, the black line shows the velocity vector that the sensor actually measures. As you can see, the closer the ball gets to the sensor, the more the velocity in the direction of the sensor is going to be diminished. When the ball sufficiently far away from the sensor, the velocity vector is sufficiently indistinguishable from a straight line. enter image description here Now with that understanding, there are a couple ways you can correct for this error if it gets to be outside of your tolerance. You can move the LEDs further back, maybe even outside the box altogether and just leave a slit in the back of the box where the light can penetrate. This method of correction allows you to make the difference between the total velocity and the measured velocity as small as you need for the application.

A purely numerical method to correct for this would be to collect your intensity samples for the entire window in which the ball entered the box and drop the samples at the beginning (when it was too far away) and the samples at the end(when it was too close) You will have fewer data points with this method, but it will still be fairly accurate.

The most accurate way however would be to use 4 transmit/receive diode pairs inside the box (i.e. 1 on top, 1 in the back, and 1 on each side) You could then obtain the relative position of the ball in 3 dimensions using a technique called trilateration This method obviously has some more computational overhead, than the others, but should still be practical to implement on a single microcontroller. You would need to use different carrier frequencies for each diode pair though to distinguish it from the others.

\$\endgroup\$
7
  • \$\begingroup\$ I guess you mean sth like that i.imgur.com/CAaMYxW.png ? \$\endgroup\$
    – kosnkov
    Commented Oct 22, 2015 at 20:57
  • 1
    \$\begingroup\$ yeah that is the general idea, but you probably don't need a modulator/demodulator since even the slowest microcontrollers these days should be fast enough to bitbang the waveform. I'll add a picture in a moment to show it in this context though \$\endgroup\$
    – user51404
    Commented Oct 22, 2015 at 20:59
  • \$\begingroup\$ I will try it and let you know the result, any guess what lenght of wave I should emit ? like how offten turn on and off the diode in that case ? \$\endgroup\$
    – kosnkov
    Commented Oct 22, 2015 at 22:26
  • 1
    \$\begingroup\$ I think the higher frequency you can use the better, because you can create shorter burst at higher frequencies which means more data points. the real limit is the number of samples per second that the adc on your microcontroller can read. I would avoid the 30-40kHz though since that is what most tv remotes use and you could get false data if some one is using a remote in the area \$\endgroup\$
    – user51404
    Commented Oct 22, 2015 at 22:46
  • \$\begingroup\$ I believe there will be huge difference with calculating speed when ball comes through the center and when it comes to the edge of the box i.imgur.com/ByMs3fB.png \$\endgroup\$
    – kosnkov
    Commented Oct 26, 2015 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.