Shop OBEX P1 Docs P2 Docs Learn Events
Ping Distance with Ball Detection — Parallax Forums

Ping Distance with Ball Detection

Matthias09Matthias09 Posts: 47
edited 2009-08-11 03:43 in Accessories
Hey guys,

first of all: great Forum!

I am currently building a ball and beam system for my university, where the ball rolling on the beam is detected by two Ping Sensors, each one at one end of it. Now the sensors have a theoretical range of a 3m (118in), however, with detecting a round object that reflects only very little energy, the distance decreases to about 20cm (8in). Even with two sensors I cannot cover the whole beam which is about 24in long. The sensors don't interfere, as only one is working at one time and they change after the ball bypassed a certain position (at least in theory). So guys, my questions for you:

Is there any way how I can increase the range of both sensors? E.g with:
- attaching them in a different position to the beam (vertical rather than horizontal). Actually tried but without any effect.
- using a more reflective object (ball). Right now I have a rubber ball with smooth surface, about 1.5in diameter.
- using a bigger object (ball)
- increasing the temperature: In my old office it was much warmer than here in my new one and the sensors seem have to cover nearly double the length
- changing the supply cable: Each sensor sits on a 3ft long cable, unshielded. Within the 8in range, the sensors work perfectly accurate and fast though.
- changing the software (see attached)
- considering that the Ping sensors work different in debug mode (4Mhz) than in stand alone mode (50Mhz) (doubt that actually, but who knows?)

If I cannot increase the range of the sensors, what alternative methods do you recommend to detect a 1.5 in dia ball on a 24in long beam?

Thanks guys, very much! smile.gif

Matthias from Germany in the US


CODE

Post Edited (Matthias09) : 8/4/2009 1:02:38 AM GMT

Comments

  • W9GFOW9GFO Posts: 4,010
    edited 2009-08-04 00:59
    If you can mount the sensor about 24" from the beam I would use the Linescan Imaging Sensor. I think it would give the most accurate results with the least bit of futzing.

    Rich H
  • Matthias09Matthias09 Posts: 47
    edited 2009-08-04 01:02
    The beam is moving, turning around it's center. What exactly do you mean with 24" from the beam?
  • W9GFOW9GFO Posts: 4,010
    edited 2009-08-04 01:17
    Matthias09 said...
    The beam is moving, turning around it's center. What exactly do you mean with 24" from the beam?

    The Linescan sensor is a single pixel row camera, it has a field of view approximately equal to it's distance from what it is viewing. If you could mount it on an arm above the beam, so that it moves with the beam, I think it would work. If the beam only rocks a small amount then it probably wouldn't need to be attached to the beam, but it would still need to be on an arm that is fixed in the plane that the beam moves in.

    Rich H
  • Matthias09Matthias09 Posts: 47
    edited 2009-08-05 14:52
    I am not sure, if this is what I would need. There are several Ball and Beam Systems outside, however I have never heard of using a camera for ball detection. Before I persue this hint, anyone any idea if I still can make it with the Ultrasonic sensors (like I described in my initial post)?

    Thanks Guys!
  • LilDiLilDi Posts: 229
    edited 2009-08-05 18:17
    There are several Sharp IR distance sensors that may work for you.
  • Matthias09Matthias09 Posts: 47
    edited 2009-08-05 20:46
    As the sensors are attached to the end of the beam, the minimal distance is very low. I would have to go for the only option, the GP2D120 (4cm minimum distance), but the same one only ranges to 30cm (12"), which at a overall length of the beam of 24", is too critical. Especially in daylight, the ranges of IR sensors can diminish, so actually these are no options for me.
    Nevertheless: thank you LilDi for giving me this hint. I appreciate!

    Matthias
  • SRLMSRLM Posts: 5,045
    edited 2009-08-05 23:41
    Is this what you're doing? I'll assume it is... Personally, I like the linear camera option the best. If you mount it in the center of the beam looking down, and with about half of the beam visible then you'll have a high resolution image of where the ball is in normal operation (assuming that your design is mostly stable). Then, use two of the Sharp IR sensors on either end of the beam. You know which side the ball is on because the ball must have rolled through the camera. So you turn off the IR sensor on that side and measure from the other side. This way, your sensors don't reach the critical minimum distance. Alternatively, you could replace the linear camera with a few IR LEDs and detectors (38KHz is a popular frequency) near the middle, and determine ball direction that way.
  • SeariderSearider Posts: 290
    edited 2009-08-06 02:32
    I had a thought. I was looking at the Wiki references and one showed a picture where the Metal Ball travels on two tightly streatched wires held just above the beam. If you used wire with a constant resistance then the metal ball would short the two wires. You could constantly measure the resistance between the two wires. The lower the resistance, then the closer the ball is to the end that you are measuring from. High resistance means the ball is at the far end. If you found the right kind of wire that was made for this type of aplication, then you could probably get very high presision with nothing more than an A/D converter.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Searider
  • Matthias09Matthias09 Posts: 47
    edited 2009-08-09 22:15
    @ SRLM:
    thank you for the ideas. To keep the system simple I will either use the camera or two sensors, not both together. You talked about IR sensors. The point is that these Sharp IR sensors are not better regarding range than the Ultrasonic ones I have. So I could stick with them. But anyway, adding a third sensor sounds to complex for, and my professors will ask me why I cannot do it with one or two (as there are ways to do it)

    @Searider
    thank you too! I had this resistive wire idea also in my mind, however, after googling, I could not find any appropriate materials to use as well as an idea, how to set up the system. I know basically, that you connect one wire to a power source (e.g. 9V) and the other to the A/D converter. But are there some additional electronics necessary (to filter, amplify, smoothen, ... the signal)? What A/D converter would you recommend?

    @all
    looks like the Ultrasonic sensors are not appropriate for this project, as I received alternative solutions, but not any that suggest improvements of the range (like I stated in my first post)?
  • SeariderSearider Posts: 290
    edited 2009-08-11 03:43
    Matthias09.

    Checkout Resitancewire.com They don't sell online but there website says that they sell small quanities to hobbiest. You might call them and tell them what you are doing.

    Just about any A/D would work. There is even a way to do A/D with only resistors and capacitors and using the Prop.
    You can also check the Parallax store for A/D converters.

    I would think you would hook one wire to a voltage source (a resistor in series would prevent and acidental short circuit. It could be large because you only care about voltage, not current.
    Hook the other end to a resistor that goes to ground
    Measure the voltage where you connect the wire to the ground resistor. You now have three resistors in series with the middle one being variable. You can size the two fixed resistores to scale the input to the proper range for your A/D converter.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Searider
Sign In or Register to comment.