Laser for mesuring distances... Is it possible with a BS2
Tricky Nekro
Posts: 218
I just wanted to ask this... Is it possible to mesure distances with a BS2.
I'm thinking of multitasking my BS2 to mesure the RCtime of a photoresistor and fire a laser simultaniously.
Firstly, of course, room lighting must be found...
But anyway is it possible and worth trying???
Thanks for your time,
Provas, GREECE
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
I'm thinking of multitasking my BS2 to mesure the RCtime of a photoresistor and fire a laser simultaniously.
Firstly, of course, room lighting must be found...
But anyway is it possible and worth trying???
Thanks for your time,
Provas, GREECE
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
Comments
In your laser setup, how will the bs2 know that the laser was fired? Say you put a prism in and deflected some power back to the stamp to know that it fired, then you want to use a phototransistor to trigger on laser light reflecting back??
The bs2 is a fun and handy device, but I think you have to look at the timing that would be required to measure intervals of light speed.
I honestly can't remember the specs on the bs2, but with light traveling 30million meters per second, in order to measure 30meters (100ft) you're processor speed would have to be able to run an instruction every 1millionth of a second...what's that 1million instructions per second? Someone check my math!! haha
Anyhow, the stamp I think only does about 4000instructions per second.
the stamp will control the laser and will read from the photo-device, it'll even output to an LCD or terminal (via rs232) and will also input a data stream from a laser ranging device.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
299,792,458 m/sec
Even faster yet.
http://www.philohome.com/sensors/lasersensor.htm
If the speed of light is too fast to be measured like that, how do those "laser devices" work?
The laser only gave visual confirmation of where the thing was pointed
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Easiest way to tell is looking at the end where the laser comes out.· Some have a transducer cone there....the other way to tell is the price.·
If the sensor is less than $200(canadian anyhow) it can only be sonic.· I've not seen a laser rangefinder for cheaper!
The laser is pretty well there to see where you're aiming at!
The ones that look around corners don't really look around corners....you position them opposite the corner and, like you said, their laser casts out in a plane beam that hits all areas in it's view!
Some other ones actually are setup in the middle of the room and their beam rotates....others have special diffusers that make the laser point in to a flat beam and spreads it out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Google for "industrial laser distance finder with serial output" and you'll find many such products. These are usually quite expensive, but packaged for commercial use. I've seen them demonstrated at the Sesnors Show in Chicago last year. I think they measured up to 1500 feet +/- 1 foot. I've looked several times for hobby-level accessible sensors and found none. . . guess we need to build one.
Ken Gracey
Parallax, Inc.
A.C. fishing:
I have found this circuitry before posting and I think it's impossible for me to order such a photo IC from greece...
Steve_b:
I'm running on my pocket money so I find it hard to keep on with the price on a PING... It's almost 50$ here in Greece... I'll try to make a module of my own
Chris Savage:
I have a friend what used four photoresistors and some transistor and had built a guided missile lancher... As I know a stamp can be multitasked... it would be like this...
Gosub fire_laser : Gosub mesure_distance
Ken Gracey:
Thanks for the advice... I writing a "report" on applied sensors for my school (I'm in the first grade of senior highschool) featuring a tred-move bot (with a boe) roaming freely in a room using sush sensors (and others of course like tilt sensors, light sensors and so on), but I'm running on a ultra low badget... (about 30$ a week and less)
Any cheap solution will be well accepted...
Thanks again for your time
Provas, GREECE
P.S. I've got to finish this until 11 April so I'm in a hurry
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
Infared is NOT light?????
Infrared distance sensors is what there writen on WAM!!!
Can this help me???
Please advice...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
Triangulation, not time.
The idea would be along the lines like this:
Make a base, say 25 inches long, like a·langth of angle iron, I just picked 25 inches without much thought here.
Next, mark the exact center of the "base", and measure exact distances from the center to the ends. Mount the lasers there.
Again, the more accurate you are here, but better chances of success with a lower error % later on!)
While typing this reply, the idea was to use laser sensors like the one posted above: http://www.philohome.com/sensors/lasersensor.htm
Just some "toe notes" (not foot notes):
..A:Laser 1 has to beable to detect an object, nothing else.
..B:Laser 2 has to beable to detect Laser 1's endpoint, nothing else.
At the exact center of the base, you placee a compass module. Like Parallax's unit...
Now, we are still in the "setup" of this application, so I'll add a motto of mine here: 100% effort in accuracy and craftsmanship here will be pay off 10 times when it comes to coding, calabrating and making it work. So, IMHO, take your time. Measure 10 times, make sure laser 1's emmiter is exactly X inches from laser 2's emmiter.
Make sure the compass mod is exacly 1/2 X from Laser 1's emmiter, and exacly 1/2 x from laser 2's emmiter.
Thats all you really need to do.
Now, all this does is create the "base" of a triangle of which you can measure the the angles on each end, and know the distance between the two angles.
Simple stuff...
Now, either with code or hardware (your budget will make this call), the following must work:
Laser 2 MUST follow the end point of laser 1. This is the key to making the whole project work. Without it working correctly, the error % goes up rapidly!
Laser 1 MUST be able to detect an object. This is the reason for the project. Ok, enough on thoes two criticle points.
Basic operation:
Laser 1 "scanns" (or is pointed via other means) until it's sensor goes high, indicating something has reflected the signal back.
Laser 2 has been constantly "following" laser 1's end point, so therefor needs only a slight "settling" time to ensure a good fix.
Read the compass input
Calculate the offset from the compass heading to where Laser 1 is pointing, it's pointing at an object, and we need that angle relitive to the base.
Calculate the offset from the compass heading to where Laser 2 is pointing, it's pointing at Laser 1's end point, at the same object, and we need that angle as well.
I'll have to get my son to tell me the formula, but that's all you need to know to calculate all three sides of a triangle, thus returning the distance.
Now, IRL (In Real Life):
My son and I used two junk 7 11 laser pointers, two RC servos with protractors.
We took a lot of time to get the "setup" down, hence my statements above, take your time and put as much accuracy in the setup as you can.
We would turn one laser to point at an object, then turn the second one to point at the same object.
He would read the protractors to get the angles, and do the math.
At first, our measurements and calculations were within 2 inches, which was good enough for him, but I persisted we could do better, and seeing how I'm older, I won.
We revamped the protractor and protractor pointer so we could get a better angle measurement, which took all of 50 mins or so.
Now, with our attentions turned to getting the lasers to converge closely (the closer the object the better our calculations were), we improved our accuracy to within
1/16 of an inch. (that's the smallest my 200 ft tape measure goes, but we were within that space..)
All said and told: I haven't done this with a stamp or any other hardware then stated in the above IRL, but it sure as all sounds like the BS2 could do this, do it well, and have a very low error %. IN eval of it all, the error would be directly related to how accurate the servos are (the ones turning the lasers), which is where our biggest error point was. The math is sound, the logic is sound, but the angles need to be as accurate as you can get.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
Post Edited (Kaos Kidd) : 3/27/2006 3:37:51 PM GMT
It's certainly more intensive from a 'setup'/hardware approach....alighnments and such.
Something else that left me wondering...was the beamwidth of the laser. Sure it's fairly tight, but when you get out in distance it spreads. Any detection of the beam would mean you'd detecton the edges as well as the center of the beam...meaning, the edge of the beam would be as "bright" as the center of the beam....so you could be off by that distance (which isn't much when close to the laser source).
Then there's the resolution of any servo/stepper.
A psynchro/servo setup could be used with a small gearbox...but once again you're getting in to a lot of hardware for that approach.
I like the idea....I think a little more 'cheap' hardware and a fair amount of setup time is bettern than $1000 for a laser rangefinder. It's all in the journey right?!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 3/27/2006 4:49:29 PM GMT
Thanks for the help and the whole idea project, I'll try to do this project as soon as I have more time...
(and understand it better, I'll have someone explain it to me, you know my English)
Paul thanks for the clean up !!!
Well I've though of an other trick... Although it would be short to middle range, it would be o.k. for my presentation...
How about mesuring the light that comes but to a photoresistor... First mesure the light of the inviroment then mesure the differences...
It would work in a dark room...
Thanks everyone for your help,
Provas, Greece
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
not sure how a reflection method like that might work!· Some objects reflect light better than others!
Say you have a wall with paper on it versus a wall with high-gloss paint.· One will reflect the light better so give you·a higher reading on your photoresistor.
Keep coming up with the ideas though....don't be discouraged yet!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
I guess it would do sensitive listening for "object", and as the "object" moves, the sound would change.
Then with several sensors, you could detect this sound, and calculate the distance...
Ok, don't laugh, it's only an idea.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
It worked but what totally surprised me was that when I turned off the light of the room it was simply·not working!!!!!!
The resistor couldn't mesure the light of the laser... not even when there was direct contact...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
Heres the setup from AC fishing's link:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 3/28/2006 12:54:15 PM GMT
Any information about this and any other sensor ideas will be well accepted...
Anyway, thanks for the help so far...
Provas, Greece
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
Now you understand that it is alot like the IR type of proximity detector (is there an object there or not, or boolean output), but capable of further distances to detect proximity.
Another alternative would be to use Parallax's Light to frequency converter. For this to work, you would have to find an optical filter (photography would be best, or a gell cell may also work) to filter out all frequencies outside the laser's frequency. Since the sensor output a variable output (by changing frequency), you could get a better idea of the distance by measuring the illumination level. This would require alot more software to get it to work, you would have to do periodic calibrations to find the base level of light in the frequency you are concerned with when the bot is pointing in the direction you want to take the measurement, also the type of material the laser is reflecting off of will greatly affect the measurments.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 3/29/2006 6:01:42 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
If you go with a roll your own solution, most detectors are infrared or visible spectrum, Parallax's light to frequency sensor is an example of the visible type, so are TDK's BCS2015G1 and BCS5030G1. I had mentioned using a color filter on them, this is because you want to eliminate as much of the ambient light as possible. I have done some research on filters, and it turns out colored glass and gel cells (the colored plastic used in stage lighting) look like they do a good job when in fact they dont. The type of filter best suited for blocking all but a very narrow band of frequencies are called dielectric interference bandpass filters. The Optometrics Corporation makes relatively inexpensive filters of this type. They have filters which allow a 10nm wavelength band of light to pass through, and the standard type of filter blocks at least 99.9% of wavelengths outside the band while letting more than 40% of the targeted band through. Many of the el' cheapo lasers are 645 nm wavelength, they have a filter designed for 647nm Krypton lasers that would do the trick, the 12.7 mm diameter filters are $40. They also have broadband filters which allow a 30mm band of wavelengths through and allow more than 55% of the band through, those are 11.8 mm in diameter and cost $45.
Depending on what you really consider to be long range, with a little bit of circuitry you could use a 74F579 counter and gate the·clock input with a 100MHz TTL oscillator, an AND gate,·a S/R Flip flop and the detector output and get real TOF measurements with a resolution of 30 cm and a distance determined by the strength of the laser and sensitivity of the sensor. And before you ask, I wont help with the construction of one, because its more complicated than it sounds. It involves measuring real world propogation delays of both the circuit and sensor, and quite a bit of calibration involved. Something Im not willing to undertake in assisting with in an online forum.
<edit> sorry my calculations for TOF resolution were off by a factor of 10, for a single 100MHz clock period light travels just under 3 meters (not 30 cm), since TOF measurements are round trip this means the resolution would be 1.5 meters. </edit>
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 3/30/2006 6:56:38 PM GMT
Nuts& Volts magazine had an article on measuring the speed of light that has a lot of good information on lasers optics, etc that might be useful in your project. They are measuring time interval of laser pulses by turning the laser on/off electronically and the distance is fixed. You might use the same technique to measure time interval to compute the distance.
It's in the April 2005 issue which happens to be the one they offer as a free sample on their website
http://nutsvolts.texterity.com/nutsvoltssample/
You'll have to register your email address and they'll send you an email with the link
http://nutsvolts.texterity.com/nutsvolts/200504/
in it and you can read the whole issue if you like.
- Andy -
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Thanking you is the less I can do. I'll take the second sollution suggested.
Thank you, Provas, Greece
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
And generally everyone who has repplied to the threat.
As soon as I have something ready I will upload it to the Project Forum!!!
Thank you everyone again for your help
Provas, Greece
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
Another idea for parts. Tear apart a cd-player. There's got to be an old one around your place that doesn't have all the features the new ones have, and nobody's using it. You should be able to use the laser and detector, and maybe the optics and detector circuit.. I don't know enough details about them but you might find a schematic or something on the internet. Basically the laser is continuous and the detector has to pick up rapid on-off changes in light reflected from the tiny dimples on the CD. Trigger a pulse (or modulate with a code like tv remote controls) of the laser and the detector and it's high speed circuit can detect the reflected pulse. Even a code like a square wave from a 555 timer can isolate the received signal from ambient light. Just capacitively couple it.
Now that's got me thinking: Instead of thinking of pulses, think of a continuous waveform, say 1 MHz, in a pair of analog circuits where the sent signal is running parallel to the received signal. There is a phase difference between them. Invert one of them and sum them and adjust levels so the dc average will be zero when they are in phase. If this piece of the sent signal can be delayed by a precisely known adjustable sub-microsecond delay period the amount of delay needed to get zero dc sum is the value needed to calculate distance. QED.
What circuit will delay a signal? Isn't this delay the same as a phase difference. Doesn't a capacitor cause a 90 deg phase shift (lag, and an inductor 90 deg lead)? Can we use a capacitor and adjustable resistor to move the phase of the sent signal to match the received signal, and the Distance is proportional to this adjustment? Where am I wrong here?
- Andy -
Ref: C=3 x 10^10 cm/sec, D=V x T, T=D/V.
D @1uSec = 3x10^10 x 10^-6 = 3x10^4 cm/uS = 300 meters per microsecond.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Current Muppet Terror Level:
·· ·