Shop OBEX P1 Docs P2 Docs Learn Events
Measurement sensor? For 2-5 cm +/- 0.5 mm — Parallax Forums

Measurement sensor? For 2-5 cm +/- 0.5 mm

John KauffmanJohn Kauffman Posts: 653
edited 2010-06-17 16:00 in BASIC Stamp
I am trying to use my BasicStamp to measure a short distance.
Distance = 2 to 5 cm (could modify system to accommodate sensor with range of 2 to 10 cm)
Tolerance = optimal would be 0.1 mm, acceptable would be 1 mm
Close terminus = sensor
Far terminus (moving object) = smooth metal, semi-shine
Far terminus rate of change in distance = 0.2mm/sec to 10mm/sec
Measurement frequency (hopefully about 10 Hz or greater, but this is lowest priority as rate of movement of object can be brought to under 0.2mm / sec)

I am also comfortable with SX if that helps.

Options cInsdered to date:
PING: not accurate enough and too small a distance.
BoeBot IR bounce : I am guessing not accurate enough(but not sure of that)

Has anyone used another method to measure <10 cm distances?
Has anyone tried laser bounce or interferometry?
Is there a way to increased accuracy of a light bounce system?

Thanks.

Comments

  • Spiral_72Spiral_72 Posts: 791
    edited 2010-06-11 15:15
    If this helps any, Harbor Freight sells cheap Chinese 6" digital calipers for like $12. There is an output port on the caliper for interfacing to a computer for quality control. I dunno if you could use it, but it's an idea...... If so you could strip the caliper and mount it however you need, run the communication to the BS and have 0.01mm precision.


    I'm not positive how the encoder works on these, but you might be able to saw off the excess length and it still work fine.


    Then with all that said, perhaps you could open the read head and pull directly off the sensor, and MAYBE find the output of the amplifier (if any) to go directly to the Stamp.

    I have contacts for precision linear encoders, but they are typically quote expensive.



    You know, after actually reading your post through..... it sounds like you want a non-contact sensor.... Sorry, I got excited.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.

    Post Edited (Spiral_72) : 6/11/2010 3:25:03 PM GMT
  • John KauffmanJohn Kauffman Posts: 653
    edited 2010-06-11 16:03
    Good thought. I could re-design project to be WITH contact and rate of change very low.
    Do you have experience with mod output to a Basic Stamp?
    THanks.
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2010-06-11 16:03
    John Kauffman,

    An inductive or capacitive sensor is the way to go. Spiral_72's suggestion would take most of the headache out of the equation, but basically if you took a coffee straw with a coil wound to the length you want to measure and slipped a metal wire, slug, etc. inside the straw and measured the change in inductance you'd have a digital caliper. Even with a crude construction I have observed 1/1000th of an inch measurements, but something like this also needs to be calibrated or the numbers returned are meaningless. Harbor Freight's digital caliper would (hopefully) take the calibration out of the equation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Spiral_72Spiral_72 Posts: 791
    edited 2010-06-14 18:57
    I don't personally, but as rumor has it, the calipers output serial data..... which would theoretically work with the BS.

    I don't know what measuring frequency you want, but I've really zipped my cheap-o calipers in and out, they never miss. That leads me to believe the caliper uses either an extremely fast sample rate or an absolute encoder of some kind (as Beau Schwabe pointed out)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.

    Post Edited (Spiral_72) : 6/14/2010 7:03:55 PM GMT
  • IroneIrone Posts: 116
    edited 2010-06-17 10:02
    How Ya Doin'? I am just new to this forum so if I lead you astray, I'm sorry. I have been a machinist for 43 years now and I like numbers. I ordered a BS2 and some sensors mostly just to play with. I read your question about a measurement sensor and had to try to see what the ping could narrow down to. Without much problem it looked like 1 mm could easily be possible but then you said you would like .1 mm better. When I tried to alter the numbers my constant went out of the word range and I had to get myself a beer. I look for excuses like that. How about .5 mm? Its not .1 but better than 1.0 ? My programming skills need a lot of attention but I made up a small program that gives you the distance in .5 mm sections. I'll just bet you that if there is any way my answer can end in .5 or .0 somebody out there will let me know. I started out from the edge of the kitchen table measuring to the refrigerator. It measured 669 mm and stayed steady with my first program. I even moved it and lined it back up with my fingers and it still said 669 mm. Being a machinist I knew that I had .040 inches to play with and my hands arent that shakey yet. For 1 mm my constant was 22597 so I just doubled it and got 45194. My final answer came out to be 1339 which when you divide it by two is 669.5 which made me happy. I do not know what you are going to measure but I hope .020 inches is close enough. Maybe tomorrow I'll take a trip to the shop and get my better calipers and set up a test section just to see how much difference there is over 5 cm.

    Casey

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I fish, therefore I lie!
  • IroneIrone Posts: 116
    edited 2010-06-17 10:24
    How Ya Doin'? Did you notice that I did not include my program on the last post. There is no sence being stupid if you do not prove it regulary.



    ' Smart Sensors and Applications - PingMeasureCm.bs2
    ' Measure distance with Ping))) sensor and display in .5 millimeters.
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    ' Conversion constants for room temperature measurements.
    MmConstant CON 45194
    mmDistance VAR Word
    time VAR Word
    DO
    PULSOUT 15, 5
    PULSIN 15, 1, time
    mmDistance = MmConstant ** time
    DEBUG HOME, DEC mmDistance, " .5mm"
    PAUSE 100
    LOOP

    Casey

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I fish, therefore I lie!
  • John KauffmanJohn Kauffman Posts: 653
    edited 2010-06-17 16:00
    THanks, Irone. I will try that. I have a PING but did not imagine it was hat good. I appreciate the research.
Sign In or Register to comment.