1
\$\begingroup\$

I'm currently working on a project where a sliding metal box is mounted on a metal pole. The box moves up and down. At the top of the metal box is a small processing unit that needs to know the distance between it's position and the ground. I'm currently investigating placing an IR or ultrasonic distance sensor and simply measuring the distance to the ground that way.

Since i'm just a software guy that has never learned electronics properly, I was wondering if there is some alternative way to measure the distance to the ground, maybe making use of the conductivity between the sliding box and the pole. Is it possible to use some kind of cheap device mounted at the bottom of the pole and the appropriate sensor on the box for this purpose? Or should I just stick with the IR or ultrasound?

Some more info:

  • I can't run a wire between the 2 devices to make a closed circuit. Or make any drastic changes to the pole (no magnetic or optical encoders).
  • The device on the bottom and the appropriate sensor should be about 20 dollars (or less)
  • I need to measure distances ranging from 10cm to 2m with a resolution of about 0.5cm

enter image description here

\$\endgroup\$
3
  • 1
    \$\begingroup\$ What moves the box up and down ? \$\endgroup\$
    – Marla
    Commented Dec 8, 2015 at 15:00
  • \$\begingroup\$ A cable attached to a motor, but unfortunately I can't do anything with the motor or the cable. \$\endgroup\$
    – Henk
    Commented Dec 8, 2015 at 15:54
  • 1
    \$\begingroup\$ Because of your design constraints I'm thinking if a rubber wheel + encoder pressed firmly against the pole would work for you. You would obviously have to deal with added positional error due to slippage. And that error will accumulate over time unless you have a known "index" position that you can detect. \$\endgroup\$
    – 0x6d64
    Commented Dec 8, 2015 at 20:24

3 Answers 3

1
\$\begingroup\$

Consider using a string pot. http://www.celesco.com/faq/cet.htm

Otherwise, to stick with your original idea, you could possibly use a transponder based ultrasound system. You would have an ultrasound transceiver on the box, and a transponder on the ground. Periodically, the transceiver would send out an ultrasound burst. The transponder on the ground would detect and reply. The round trip time is proportional to the distance. If you need extreme accuracy, you would want to somehow adjust for temperature. The speed of sound is affected by temperature (and pretty much only by temperature).

Good luck!

\$\endgroup\$
0
\$\begingroup\$

What is "the ground"? If it's a flat, hard surface like concrete or asphalt then you're probably going to be okay with a reflective measurement (IR or ultrasound), but if it's a soft/grassy surface you'll probably have considerably more trouble.

Is this indoor or outdoor? Typically an IR rangefinder just shines an IR light and measures intensity of reflection, which can change if the sun is adding to that intensity (measured intensity and thus range varies by time of day), and the intensity can also change with changes in ground reflectivity (water, frost, snow, dust, etc.)

Is this pole accessible on a regular basis? I would consider using a laser rangefinder with a reflective target on the ground unless the surface is something manmade.

\$\endgroup\$
4
  • \$\begingroup\$ Well the ground is variable, which is one of the problems i'm expecting to have with IR and ultrasound. I know that one of the places this device needs to be installed at has a dark carpet (so possible screwing up both IR and ultrasound). Another issue i'm expecting to have with both IR and ultrasound is the beam angle, with the beam angles for sensors i'm finding online there is a possibility that different objects come in range at different heights of the box, thereby making the sensor more difficult to calibrate successfully. \$\endgroup\$
    – Henk
    Commented Dec 8, 2015 at 16:27
  • \$\begingroup\$ Ideally i would use a laser to measure the smallest point possible, but unfortunately that is out of the budget. The device will be used indoors, but there are windows so i'm not sure whether the IR light from the sun will penetrate those. \$\endgroup\$
    – Henk
    Commented Dec 8, 2015 at 16:27
  • \$\begingroup\$ @Rens - "that is out of the budget" - What is the budget? All of the questions I've asked - indoor/outdoor, "ground" definition, lighting, cost, etc. are all design criteria and should be included in your question. \$\endgroup\$
    – Chuck
    Commented Dec 8, 2015 at 16:53
  • \$\begingroup\$ Sorry if I wasn't clear. As I tried to make clear in my question: about 20 dollars for the distance detection part. \$\endgroup\$
    – Henk
    Commented Dec 8, 2015 at 16:58
0
\$\begingroup\$

You could use a spring-return tape measure with the end anchored to the ground and the case mounted inside the box, then use a couple of reflective LED-phototransistor pairs as a quadrature encoder to count black lines on the tape. Finally, send that quadrature data to a quadrature decoder, and you'll be able to get the box's distance from the ground from it.

\$\endgroup\$
3
  • \$\begingroup\$ Variation on the idea: Anchor the end to the motor that moves the metal box (see comment by @Rens) and run the tape measure parallel to the existing cable. \$\endgroup\$
    – 0x6d64
    Commented Dec 8, 2015 at 20:29
  • \$\begingroup\$ How would that help? \$\endgroup\$
    – EM Fields
    Commented Dec 8, 2015 at 20:46
  • \$\begingroup\$ This is basically re-inventing the string pot. \$\endgroup\$
    – user57037
    Commented Dec 9, 2015 at 3:46

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.