Shop OBEX P1 Docs P2 Docs Learn Events
Stamp controlled Laser Pointer — Parallax Forums

Stamp controlled Laser Pointer

Beau SchwabeBeau Schwabe Posts: 6,566
edited 2008-04-07 12:12 in Robotics
This is a project I started over the long weekend where a laser pointer is attached to two servo's in such a way that you
can control the X and Y location of the laser dot via a computer program.· Currently the test software is written for
QuickBasic which talks to a Stamp through the BS2 programming connector.· Eventually I will make a nice Visual Basic GUI.
·
The concept of tying a laser to two servos in this manor is to help me sort through my "wall" of parts bins.· The laser pointer
is located on an opposite wall about 9ft from the target (parts bins).· The idea, is that if I'm looking for a specific part I can
"search" for it with an attached computer and the laser pointer will point to the bin containing that part, providing I have told
the computer what is physically in that bin.· Other software options would be to sort, look for duplicates, show "empty bins",etc.
At 9ft away, I have about a centimeter resolution covering a wall span of 8ft wide by 5ft tall.



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

IC Layout Engineer
Parallax, Inc.

Post Edited (Beau Schwabe (Parallax)) : 9/6/2005 10:59:31 PM GMT
1537 x 885 - 115K
1800 x 1200 - 397K
1800 x 1200 - 402K
«1

Comments

  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-09-06 23:14
    Nice Beau,

    Now just add the emic to it : "Beau, I've found your part."

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke

    Parallax Tech Support
    rclarke@parallax.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-07 00:03
    Beau,

    ·· Hadn't you mentioned this project some time ago when someone mentioned a similar system using XYZ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2005-09-07 01:23
    Chris,

    Yes, but it wasn't really formulated into something solid until last weekend. Before, I used something similar
    with a super bright white LED and a few lenses from an old camera..... The laser works much better.

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

    IC Layout Engineer
    Parallax, Inc.
  • steve_bsteve_b Posts: 1,563
    edited 2005-09-07 12:11
    I was looking at doing something similar...well, in the sense of using a laser and some servo's.
    I wanted to build a laser scribbler!
    Mount a couple of mirrors on each of the servo's (at 45deg angles??) and then have the stamp spell things on the wall....OR, what I was really after was using some red/green lasers and a smoke machine to make a tunnel effect!

    Didn't get anywhere with it!! lol The hand laser pointers aren't really designed for continuous duty and I hadn't ventured much past the hardware design phase (I'm not so strong a programmer!)

    Very neat though!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    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."
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2005-09-07 14:33
    steve_b said...
    ...I wanted to build a laser scribbler!
    With servo's·they wouldn't be fast enough to sustain your persistence of vision.· Your best bet
    is to go with precision high speed rotating mirrors.· Another solution would be to attach a rare
    earth magnet to the back of a small (1cm square) mirror in addition to a "shirt pin" to be used
    as the axel.· From here use a single or dual (differential) coil configuration to drive the mirrors.
    Similar to an analog voltage meter only the coil(s) are stationary.



    steve_b said...
    Mount a couple of mirrors on each of the servo's (at 45deg angles??)
    You can get away with using only one mirror if you have one servo directly·driving the other servo.
    This is exactly what I did with the laser pointer in this design.··In the previous design I had the same
    servo configuration only I used a mirror in place of the laser pointer.· For the light source, I used a
    super bright white LED with a few lenses I borrowed from an old analog camera.· My focal distance
    varied by about 1ft for a projection·distance of 9ft-10ft depending on the position.· I optimized the
    pointer point for about 9.5ft and it worked out ok.·


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

    IC Layout Engineer
    Parallax, Inc.
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-09-07 14:42
    The best way to get the effect is exactly what Beau said: rotating mirrors-

    The way some of those 'disco' lasers work is by mounting mirrors directly to speakers- the vibration of the speaker moves the mirror (which can be moved more slowly, to produce interesting light effects)-

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke

    Parallax Tech Support
    rclarke@parallax.com
  • Gary D.Gary D. Posts: 37
    edited 2005-09-14 16:13
    This Reminds me of my project involving Laser pointer, X and Y servos, and Computer joystick.... i had so much fun with that.... When you pressed the fire button on the Joystick the laser would pulse 4 times rapidly to see where you shot... after a month i was pretty accurate with the thing, using my dog as the target.

    Good Job Beau !

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are 10 kinds of people....

    Those who know binary and those who Don't.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2005-09-14 20:12
    Thanks Gary D.

    Instead of a Joystick, here is a small Visual Basic test routine that uses the Mouse.
    Turn the Laser "on" by pressing and holding the left mouse button.
    The code in the BS2 is the same as above.

    BTW) The dog as well as the cats, go nuts when trying to chase the laser dotsmilewinkgrin.gif





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

    IC Layout Engineer
    Parallax, Inc.
  • LoopLoop Posts: 2
    edited 2006-03-07 22:47
    I use a green lazer to at star parties to point out start, constillations, ect. Could something like this project be used to do the same thing. I realize that it might be incredible complex to acurately point out the location of something in the sky particularly something moving, but I know a couple of 100 amature astronomers that would kill for a lazer that could be used to point out astronmical phenominon. I know that the computer guided scopes use a servo system that is calibrated by setting the start poiint on polarus, and using GPS systems. Sound really complex, but god would it be useful.

    Gord
  • steve_bsteve_b Posts: 1,563
    edited 2006-03-08 13:47
    How does someone see the green laser if there's a clear sky?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    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."
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2006-03-08 16:01
    I probably have the math wrong, but the divergence that you would experience using servos will be terrible!!

    Currently at 9ft away, the BEST resolution that I can get is about 1cm.

    Assuming your laser will go 1 mile (5280ft), using my current setup, the divergence would be 344,178cm 586.7cm at 1 mile away from the laser.

    divergence = ({distance in feet} / 9ft)^2

    divergence = (5280ft / 9ft)^2

    divergence = 586.7^2

    divergence = 344178cm = 11291ft = 2.1miles


    Edit: formulas above are wrong, they should read...



    divergence = {distance in feet} / 9ft

    divergence = 5280ft / 9ft

    divergence = 586.7cm

    divergence =·586.7cm = 231in = 19.25ft



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

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 5/4/2007 10:06:09 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-08 21:32
    steve_b said...
    How does someone see the green laser if there's a clear sky?

    Some green lasers are extremely powerful, able to etch patterns in clouds by evaporating water droplets. As such there is quite a bit of dust and other particulate matter supsended in the atmosphere to reflect a portion of the beam back to the observer. If you have ever seen a high power laser display such as the one at Stone Mountain outside Atlanta you'd clearly see the beams in the air.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • steve_bsteve_b Posts: 1,563
    edited 2006-03-09 15:37
    But if there's clouds, you can't see the stars (dependant on the cloud thickness of course).

    It just seems funny that you need a clear sky to see clouds and yet you need enough particulate to be able to fire a laser up for guidance....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    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."
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-09 16:02
    Sorry my reference about clouds was just a mention of how powerful green lasers can be, Even on a perfectly crystal clear night there is enough dust in the air to reflect a fraction of the beam making it visible. Ordinarily the sky looks clear because the dust is not illuminated. If you ever drive along a rural highway and see a glow on the horizon indicating a city or other human presence, that glow is the same effect, particulate matter diffusing ground illumination.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-26 13:54
    This is called Hijacking a thread.· You should post a new thread in the appropriate forum for what you're trying to do.· The Projects Forum is for finished projects and is not the place to enlist help on your projects.· Thank you for your understanding.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • wperkowperko Posts: 66
    edited 2006-04-26 14:26
    Hi, Sorry, my mistake ... I started a new thread on this here:

    http://forums.parallax.com/forums/default.aspx?f=15&m=122754


    I hope I got this right ...
  • AmaralAmaral Posts: 176
    edited 2006-05-29 02:43
    Beau Schwabe , I know that is everyone interested in the laser and the points that it can point but something thal calls my attention on your project was in the picture of the breadBoard. Seems like you are powering your BS2 by the Vin AND the Vcc , I didn't know it was safe , and another thing is in the comm part ( Sout , Sin , ATN , Vss ) there is NO Capacitors , do that works well without thouse ??

    Thanks in Advance


    Amaral
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2006-05-29 04:47
    Amaral,

    "...Seems like you are powering your BS2 by the Vin AND the Vcc..."
    I am powering the project by Vin(pin24) and Vdd(pin23) ... I am paralleling the on-board 5V regulator with an external one.

    "...another thing is in the comm part ( Sout , Sin , ATN , Vss ) there is NO Capacitors , do that works well without thouse ??..."
    I am controlling the DTR pin directly in software to enable the Stamp. Otherwise, the Stamp will be in a perpetual reset mode.

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

    IC Layout Engineer
    Parallax, Inc.
  • bellmanbellman Posts: 1
    edited 2007-05-04 08:53
    Beau Schwabe (Parallax) said...
    I probably have the math wrong, but the divergence that you would experience using servos will be terrible!!

    Currently at 9ft away, the BEST resolution that I can get is about 1cm.

    Assuming your laser will go 1 mile (5280ft), using my current setup, the divergence would be 344,178cm at 1 mile away from the laser.


    divergence = ({distance in feet} / 9ft)^2

    divergence = (5280ft / 9ft)^2

    divergence = 586.7^2

    divergence = 344178cm = 11291ft = 2.1miles

    You have it all wrong. I have a 75mW Viper from www.dragonlasers.com that has a divergence of <1.2mRad.

    That means that every meter the beam will spread by roughly 1mm.

    1 kilometer would give you a spread of 1000*1mm or 1 meter.

    A 75mW beam would still be visible with a spread of 5 meters so you'd be looking at a range of at least 5 kilometers.
  • DgswanerDgswaner Posts: 795
    edited 2007-05-04 15:47
    Nice Project! I'm going to have to try it over the weekend! I just wish I was organized enough to know what I had in which bin. Perhaps a object recognition system could be your next project, as to solve this problem for me. [noparse]:)[/noparse] I'm thinking I'll make the laser repeat a path around my living room, this will keep my dog occupied for hours.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2007-05-04 15:49
    bellman,

    I think we are referring to two different things. Your reference is to the divergence of the actual laser beam.
    I am referencing the mechanical divergence caused by the limitations of the servo. At 9ft away with the particular
    servo that I am using "1 servo tick" equates to the laser point on the wall moving by 1 cm.

    Using the "Inverse Square Law" and normalizing it to 9ft = 1cm I came up with the formula below.

    divergence = ({distance in feet} / 9ft)^2

    At 9ft, the divergence would be 1cm
    At 18ft, the divergence would be 4cm
    At 4.5ft, the divergence would be .25cm

    Expanding on this to 1 mile...

    At 5280ft, the difference would be 344178cm or 2.1miles


    Edit

    Thinking about this further, the formula that I have is wrong.... I was making it more complex than it needed to be.

    Using the "Inverse Square Law" is the wrong formula in this case.· If the "mechanical divergence" is 1cm at 9ft away, then at 18ft away it should be 2cm.

    divergence = {distance in feet} / 9ft

    expanding this out to 1 mile, the mechanical divergence would be 586.7cm· or about 19.25 feet ... in other words at 1 mile away, you could pinpoint something
    within 19.25 feet based on the mechanical resolution of a standard hobby servo.




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

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 5/4/2007 9:59:30 PM GMT
  • curious1curious1 Posts: 104
    edited 2007-05-09 12:30
    Hello Mr. Schwabe,

    ·I want to control·2 servos and a laser pointer·with a mouse and a BS2. Not connected to the PC.·Could this be easily done.··Would there·be·a schematic for the mouse wiring and a·code example·available ?

    Thanks, RC
    Beau Schwabe (Parallax) said...

    Thanks Gary D.

    Instead of a Joystick, here is a small Visual Basic test routine that uses the Mouse.
    Turn the Laser "on" by pressing and holding the left mouse button.
    The code in the BS2 is the same as above.

    BTW) The dog as well as the cats, go nuts when trying to chase the laser dotsmilewinkgrin.gif





    Post Edited (curious1) : 5/9/2007 2:21:19 PM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2007-05-09 15:32
    curious1,

    Here is a program for the BS2 to emulate a standard serial Mouse...

    http://webpages.charter.net/schwabelove/BasicStamp/MouStamp/

    ...It should not be difficult to turn this around so that it can "read" a serial mouse.
    Once you are able to read a mouse, then you can either send out the appropriate commands to control the servo's.

    Note: because of the overhead of reading a mouse vs. sending the servo pulse, this may require two stamps.
    Alternatively you could explore the possibility of using a single Propeller IC. There are drivers in place that can already
    read a mouse as well as control a servo.

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

    IC Layout Engineer
    Parallax, Inc.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-09 15:51
    Another option would be to use a PSC to offload servo refreshing from the BASIC Stamp. Simple SERIN followed by SEROUT. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • curious1curious1 Posts: 104
    edited 2007-05-09 15:58
    Thanks for the reply,
    I'm new to Basic and am just beginning to get comfortable with the BS2. The Mouse would not be practical for me at this point.
    I will work with switches and a joy stick for now.
    I will copy this info. to my workbook.
    So much to learn....
    Thanks again, RC
  • curious1curious1 Posts: 104
    edited 2007-05-09 16:07
    Chris,
    We must have submitted simultaneously. Could you expand slightly on your suggestion ?
    I have the info. on SERIN and SEROUT in the manual .
    PSC ???
    Offload Servo Refreshing ???
    Thank you,
    RC
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-09 19:05
    Since you won’t be using the mouse my original suggestion is almost a moot point anyway. You can disregard that and focus on the example code we have for servos in the “What’s A Microcontroller?” manual as well as the “Robotics with the BOE-Bot” manual. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • DanzmanDanzman Posts: 3
    edited 2007-06-05 20:19
    Being lazy hanging our outdoor Christmas lights, I was toying with the idea of shooting laser into crystal reflectors or even those mylar reflective tinsels. With the laser, directed by hi-speed mirrors, I can "fire" up the tinsels around my house. It will also save me $$ of electric bill.

    What do you think?
  • D FaustD Faust Posts: 608
    edited 2007-06-06 00:45
    Danzman,
    That sounds like a neat idea, but you would have to be careful with rain or snow.· Depending on the shape of your house you might only need one servo and just have it scan across the reflecting stuff
    .· I bet it woul dlook much cooler with two lazers rather that one.· You could use red and green!!rolleyes.gifroll.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    D Faust
  • Newbie007Newbie007 Posts: 1
    edited 2007-07-02 06:18
    Writing up programs to control servos, aligning mirrors, correct speeds is so troublesome.

    You can get a simple but great display using a mirror mounted on with an angle on a pc fan. This video on youtube http://www.youtube.com/watch?v=YEMcgkAPCMU·uses a lab laser from http://www.dragonlasers.com·Can also be done with laser pointers but you have the duty cycle problem.

    Oh yeah, if you do go into program writing, Pangolin is the best hop.gif
Sign In or Register to comment.