Shop OBEX P1 Docs P2 Docs Learn Events
The "Lassiter" inexpensive (LIDAR) Distance Detection & Ranging - Propeller/WiiMote — Parallax Forums

The "Lassiter" inexpensive (LIDAR) Distance Detection & Ranging - Propeller/WiiMote

GarethGareth Posts: 278
edited 2011-04-08 07:20 in Robotics
The "Lassiter" Propeller based Lazer guidance/distancing Gadget Begins.

LIDAR (Light Detection And Ranging) is an optical remote sensing idea that can measure the distance to, or other properties of a target by illuminating the target with light - in my case laser light.

..... By using a simple parallax propeller system and hacking the IR camera out of the Wiimote and controlling it directly via I2C - its possible to measure distance very accurately on almost any surface.
The system seems to work better than InfraRed/Ultrasonic sensors.

Update 20110301 :- Chassis at the Ready
Having built the Lassiter i wanted to make it mobile so that it could go for a spin..........(with a spin)

lassiter_037.jpg
Sooo....... Wots He Got
  1. Parallax Propeller chip 8 core multitasking risc processor
  2. Hacked WiiMote - camera removed and i2c interrogated to extract 4 blobs of light with XY coords
  3. Lassiter enabled LIDAR system - inc. 5mw Laser (please wear eye protection when using lasers)
  4. Colour Display screen - used for displaying data .....in graphical form
  5. Compass module .... so data can be logged with direction tags
  6. 2xPwm L293D motor drivers
  7. Omni wheels
  8. Optical Wheel Encoders
lassiter_041.jpg

and compass to tag directional information
lassiter_044.jpg


1st Video shows system working and detecting all kinds of surfaces and sized objects and walls.

lassiter_034.jpg
The above screen show the result of a simple scan, the screen acts as visual stora memory (the buffer for the screen holds the actual scan data), which will be used later for navigation.(ie find doorway to drive through).

lassiter_025.jpg

2nd Video show the Sensitivity and Range possibilities.

lassiter_002_0.jpg
What you see here is my first successful setup :-
  1. Propeller easyProp board
  2. Hacked Wiimote camera mounted on servo
  3. 6 holes along the white Depron you can see a Laser
  4. Behind you see the lassiters composite video screen
The laser faces forward, hits the object and bounces back to the Wii Camera.
lassiter_008.jpglassiter_007.jpg

When and object is placed in front of the laser the reflected laser light hits the Wiimote, the closer the object the more to the right the dot on the display goes.
Why does this happen :- in a nut shell the laser and Wii-camera are set at an angle to converge with each other.
lassiter_010a.jpg
I was bogged down with converting a number to a string (as my memory was almost topped out with the wiimote/graphics/tv objs) so :-a drastically reduced "Numbers.obj" won the day for me and i could display variables to screen.

Even in this state its possible to measure distance (so far 2meters max)

The accuracy in this simple form is 0.5 mm ...... uncalibrated ......

The system will be used in my latest Robot as a navigation/distancing Probe.

3rd Video shows the basic system (before the numbers.obj)

4th Video shows the first "proof of concept" using InfraRed Leds

5th Video shows the Hacking process and removal of the IR camera from the Wii-Mote .
1024 x 768 - 106K
640 x 480 - 53K
640 x 480 - 50K
500 x 375 - 56K
500 x 375 - 41K
«1

Comments

  • GarethGareth Posts: 278
    edited 2011-02-20 04:33
    Updated :- System is now workable and pretty accurate.
    lassiter_034.jpg
    lassiter_025.jpg

    So far it can be used to a distance of 3meters using a 5mw laser.
    500 x 375 - 32K
    500 x 375 - 39K
  • ThricThric Posts: 109
    edited 2011-02-22 15:04
    Wow thats really neat, I've been looking around for a project like this and its pretty amazing on the accuracy you got.

    I'm trying to do a similar project, haven't started yet, and was wondering if you could you post the code that you used. Was there also a special reason on the angle/distance between the laser and the camera? Did you also test your setup outside? I'd assume it wouldn't work as well as theres allot of interference but maybe if you put a filter over the camera you could reduce the interference and thus get a better reading.
  • ercoerco Posts: 20,256
    edited 2011-02-26 10:03
    Gareth: Bravo! Great job! Very nice concept, execution and demo! I hope you get the polar coordinate display working soon, those graphics will be very self-explanatory.
  • GarethGareth Posts: 278
    edited 2011-02-27 11:22
    Thric wrote: »
    Wow thats really neat, I've been looking around for a project like this and its pretty amazing on the accuracy you got.

    I'm trying to do a similar project, haven't started yet, and was wondering if you could you post the code that you used. Was there also a special reason on the angle/distance between the laser and the camera? Did you also test your setup outside? I'd assume it wouldn't work as well as theres allot of interference but maybe if you put a filter over the camera you could reduce the interference and thus get a better reading.

    Code-ing is still pretty changeable so i will hold on posting till i am a bit further down the line, to give you an idea these are the OBJ files i use
    they have to be drastically reduced especially the graphics.obj to save space for program.
    tv : "tv"
    gr : "Graphics"
    wii : "wiicamera"
    num : "Numbers"
    HM55B : "HM55B Compass Module Asm"
    Calibrate : "HM55B Compass Calibration"

    The Wii-mote has an InfraRed filter as standard ...... this you have to remove for the Wii camera too see a stronger Lazer/laser reflected signal -- ambient light can be a problem - but as you see in the videos it is still pretty stable - A laser filter that should help.
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-02-28 03:44
    Excellent project! Where is the post with schematic diagrams?
  • GarethGareth Posts: 278
    edited 2011-02-28 07:34
    Humanoido wrote: »
    Excellent project! Where is the post with schematic diagrams?
    The schematic is still in me brain cortex and not on paper at the moment
    this project is still pretty "hot off the press"
    To help you with a few details .......

    The wiicamera.obj gives a simple schematic of the camera connections
    Qouting from Wiimote camera object v1.0
    Graham Stabler 17th November 2009

    How to wire up the wiimote camera:* Remove camera from wiimote carefully using hot air of solder wick.

    * Pin out when viewed from the underside is:
    How to wire up the wiimote camera:

    * Remove camera from wiimote carefully using hot air of solder wick.

    * Pin out when viewed from the underside is:
    .......... ____________
    ______|____________|_______
    | .......................................... |
    | ............7 ..... 5.... 3 ..... 1.... |
    | ....... 8..... 6..... 4..... 2......... |
    |........................................... |
    |_________________________|

    1: Vcc (3.3V)
    2: GND
    3: GND
    4: Not connected
    5: SCL (Clock of I2C bus)
    6: SDA (Data line of I2C bus)
    7: CLK (Requires a 25Mhz clock, supplied by propeller!)
    8: !Reset (Active low reset pulled high by propeller but you could use a resistor).

    Connections:
    Wire Vcc and GND to the supply of propeller
    Wire SCL to a propeller IO pin of your choice, note SDA pin must be one pin higher.
    Wire SDA to the pin one higher than SCL (so if SCL is P0, SDA must be P1)
    Add a 10k(approx) pull up from SDA line to Vcc (3.3v)
    Wire CLK to a propeller IO pin of your choice
    Wire Reset to a propeller IO pin of your choice (or use a pull up resisitor and capacitor)

    All you need to do then is add a forward pointing Laser at an angle to the Wiimote camera.

    Hope this helps - i have no diagrams of the system yet as its still very new to me too.
    The above set up is enough to get things rolling .

    Currently i am trying to add 2 PWM motor controllers but program space to low.
  • GarethGareth Posts: 278
    edited 2011-02-28 07:45
    erco wrote: »
    Gareth: Bravo! Great job! Very nice concept, execution and demo! I hope you get the polar coordinate display working soon, those graphics will be very self-explanatory.
    Yes Polar coordinates needs some form of floating point OBJ .... already my program space is topped out ...
    .. I have worked with polar coords before with a gadget i made here "LoMoR" however memory was no issue then..(but processing power was)
  • GarethGareth Posts: 278
    edited 2011-03-02 01:37
    Update 20110301 :- Chassis at the Ready
    lassiter_039.jpg


    Having built the Lassiter i wanted to make it mobile so that it could go for a spin..........(with a spin)
    500 x 375 - 76K
  • KaosKiddKaosKidd Posts: 296
    edited 2011-03-16 10:38
    wrote:
    WOW!
    This is awesome!
    I so want to get into this as soon as I'm done with the few other projects I've got going on...
    I see you shared your wii object... most many THANK YOU's to you for that...

    ^5's and keep on it!

    KK
  • Ray0665Ray0665 Posts: 231
    edited 2011-03-17 08:32
    Great project, the accuracy is fantastic.
    Do you know if the CMUcam can detect the laser spot so that it could be used instead of the WiiCam?
    I was thinking of getting the CMUcam3 for another project and am wondering if it would work here?
  • GarethGareth Posts: 278
    edited 2011-03-17 13:20
    KaosKidd wrote: »
    WOW!
    This is awesome!
    I so want to get into this as soon as I'm done with the few other projects I've got going on...
    I see you shared your wii object... most many THANK YOU's to you for that...

    ^5's and keep on it!

    KK

    :-) ...... the object actually has been around for a while and was written by Graham Stabler 17th November 2009
    Its been a fascinating project for me - i am awaiting a RBBB prop board to slimline things down a bit though.
  • GarethGareth Posts: 278
    edited 2011-03-17 13:27
    Ray0665 wrote: »
    Great project, the accuracy is fantastic.
    Do you know if the CMUcam can detect the laser spot so that it could be used instead of the WiiCam?
    I was thinking of getting the CMUcam3 for another project and am wondering if it would work here?

    My guess (and that is really a guess) is that it would work , try a normal video camera and check the brightness of a spot reflected off a wall, as far as i know the CMUcam3 checks for the brightest spots etc .. Dont forget that ambient light does have to to taken into consideration when using the reflected laser technique.

    The accuracy is very good when the angle of the laser to the camera is wide (amazing at short distance) for long distance the angle needs to be narrow (then you lose accuracy).
    I have mounted a laser to a servo with a fixed camera beside it - this way its possible to change the angle of the laser 2 camera.
  • APStech-AttilaAPStech-Attila Posts: 38
    edited 2011-03-18 08:26
    Hi!

    This is a brilliant idea! Never thought long-range metering could be affordable in a home-made system.

    Just an idea for improvement:

    If you would place inexpensive linear lens (generates a static line from the point beam) and put the laser above the CAM, then you would see the whole 2D panorama in a single frame.

    The "red" line above the center is closer to the camera, than dots below the center.

    Will try to make photographs for illustration tomorrow if you are interested
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-03-18 10:07
    This is some awesome stuff. Please keep us up to date!
  • GarethGareth Posts: 278
    edited 2011-03-18 10:58
    Hi!

    This is a brilliant idea! Never thought long-range metering could be affordable in a home-made system.

    Just an idea for improvement:

    If you would place inexpensive linear lens (generates a static line from the point beam) and put the laser above the CAM, then you would see the whole 2D panorama in a single frame.

    The "red" line above the center is closer to the camera, than dots below the center.

    Will try to make photographs for illustration tomorrow if you are interested

    Thanks for your Idea :-
    Yes i think i follow what you mean (bit like the way of creating 3D images with a line laser), correct me if i am in the wrong ball-park.

    Yes i am more than interested if you could post a picture to clarify .........that would be super.
  • tdeyletdeyle Posts: 85
    edited 2011-03-18 22:41
    I believe APSTech is referring to something like this: http://www.seattlerobotics.org/encoder/200110/vision.htm
  • NikosGNikosG Posts: 705
    edited 2011-03-20 12:57
    Hi,
    I don’t know if this is the laser mentioned above but
    I found one of these diffractive optics filters attached to a multi-function laser tape measure. This small filter converts a single coherent beam from any common laser light into a diffracted beam with an angular field.
    attachment.php?attachmentid=79457&d=1300650881
    769 x 521 - 65K
  • GarethGareth Posts: 278
    edited 2011-03-20 14:39
    Thanks for the pics Nikos.G.
    Ahaaa ...Now its clear...........For this type of Line laser, a normal camera would have to be used (any normal web cam objs out there ?)...
    The Wii-camera can only decode the XY positions of points of light. (the wii camera would only pick out the 4 brightest points along the above mentioned laser line ...)
  • APStech-AttilaAPStech-Attila Posts: 38
    edited 2011-03-21 01:31
    tdeyle wrote: »
    I believe APSTech is referring to something like this: http://www.seattlerobotics.org/encoder/200110/vision.htm

    Hi!
    Thank you tdeyle! I was talking abut the method in the link you posted!

    And NikosG created the photos I was thinking of :)

    It would be possible to build a cost-effecitve ranging system that could work parallel with Ping)))

    Kind regards,
    Attila
  • KaosKiddKaosKidd Posts: 296
    edited 2011-03-22 11:21
    tdeyle wrote: »
    I believe APSTech is referring to something like this: http://www.seattlerobotics.org/encoder/200110/vision.htm

    WOW... very interesting read...
    KK
  • KaosKiddKaosKidd Posts: 296
    edited 2011-03-22 11:37
    Gareth wrote: »
    {...}
    The accuracy is very good when the angle of the laser to the camera is wide (amazing at short distance) for long distance the angle needs to be narrow (then you lose accuracy).
    I have mounted a laser to a servo with a fixed camera beside it - this way its possible to change the angle of the laser 2 camera.

    Sort of like how EYE's work? Maybe a second servo with some gear-down gears to mount the laser on? then the system could "adjust" it's focal point.

    I kind of guess you are taking the distance from the camera and the angle of the laser to calculate the distance. Is that about right?
  • GarethGareth Posts: 278
    edited 2011-03-23 13:37
    I have tried this already.......servos are not so repeatable and the further away the less you can control the angle.......
  • AImanAIman Posts: 531
    edited 2011-03-24 06:31
    Have you been able to increase the distance?

    My attempts at buiding a laser range finder have been hampered by getting distance. I can get a laser to spot on something and have it picked up but accurate distance measuring has been my problem, particularly at higher speed.

    Something that was brought up to me in a thread about using CD lasers. When working underwater two lasers are used. It helps with a number of problems, increase accuracy etc.

    Heres my thread and others referenced various links.

    http://forums.parallax.com/showthread.php?127505-Laser-Rang-Finder&highlight=laser
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2011-03-31 06:42
    Wow, someone is actually using my object!!!

    This is something I always planned to do, I was contemplating using multiple lasers, possibly strobe them for identification purposes.

    I also had a go at the virtual white board thing, my tip is to use a surface mount IR led facing up at the camera, it is very accurate and they are no directional so are always picked up well.

    Graham
  • GarethGareth Posts: 278
    edited 2011-03-31 08:11
    Wow, someone is actually using my object!!!

    This is something I always planned to do, I was contemplating using multiple lasers, possibly strobe them for identification purposes.

    I also had a go at the virtual white board thing, my tip is to use a surface mount IR led facing up at the camera, it is very accurate and they are no directional so are always picked up well.

    Graham

    I have to say this is one of the most useful objs around .....(totally bomb proof and so easy to use.....amazing) there are so many things you can do with the information and the whiteboard and lassiter are only just the start ..........over at letsmakerobots interest is picking up fast too.

    My next plans are to use the whiteboard as a button/switch/slider designer for analoge/digital type inputs ....ie draw your buttons with an IR pen (roughly) and the prop will neaten and redraw ......(-: as a cost effective virtual control panel -- what can i say :-)

    Re:-Surface mount .........it takes a while to realize that the led does not need to point actually at the surface (old habits) - I have just bought a 3Watt IR surface mount for my Beamer whiteboard, so more fun/serious work in the planning....


    Thanks a million for making it available to the obj data bank.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2011-04-01 01:19
    I'm glad it is working so well for you, I spent quite a lot of time making the object so it's good to see it being used by others. I made a big list of possible applications but only tried a few. Using two cameras is a great way to get stereo of course and I was considering making a motion capture system, running at 200hz which I think is the camera max you could track quite a few points at 30fps, I think it is something like 30. Basically you scan through them at 200hz.

    A 3W IR LED is somewhat dangerous, your pupils will not close because you can't see it. I used tiny 0805 leds but make them face the camera, just needs a slightly different pen design to normal.

    Graham
  • marcwolfmarcwolf Posts: 38
    edited 2011-04-04 18:37
    I understand that you can ask the camera to detect only 'blobs' of a particular size
    Have you had any success with that and using blobs of different sizes

    Take Care
    Dave
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2011-04-05 01:48
    When you initialize the camera you send some parameters:

    wii.initcam(5,@level2)

    In the demos included in the object you can see various examples of the parameters as well as a custom parameters section, if you do

    wii.initcam(5,@custom_settings)

    You use these settings which are labelled to show what each number does. There is a parameter for min and max blob size though I have to say I have never experimented with them. It would be useful to set min blob size higher if you expect reflections from shiny objects.

    Graham
  • GarethGareth Posts: 278
    edited 2011-04-08 03:12
    Yes, its easy to forget that even unseen HighPower IR can tire the eyes ...this is something to be wary about if used pointing towards mesmerized viewers.

    Just to confirm i get easily 30 dots/second which will be v.good for tracking. (for another project on waiting list)
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2011-04-08 03:19
    I think you could in theory get 26 dots 30 times a second roughly. That is assuming you switch the LEDs in groups of 4 and make sure that the 4 can be distinguished between (well separated). That would let you cover a person in leds :)

    Graham
Sign In or Register to comment.