Handheld XV-11 LIDAR with STM32F429

Поделиться
HTML-код
  • Опубликовано: 15 сен 2024
  • With the Neato XV-11 LIDAR Laser Range scanner connected to the STM32F429 DISCOVERY board we've made a handheld and wireless laser scanner for measuring distances.
    The 360-degree distance measurements is both shown on the LCD display and wirelessly (Bluetooth) sent to a PC for display using MATLAB.
    Furthermore the Touch display can be used to select two points and measure the distance between them, therefor using the handheld system to measure a room quite accurately.
    Please find more information about the sensor, the project and the source code at our blog:
    blog.tkjelectro...

Комментарии • 115

  • @SharifSourour
    @SharifSourour 9 лет назад +2

    I got the STM32F7 discovery board! It's neat what to see even the M4 chip can do. Now to imagine the M7 is about double the performance is quite exciting.

  • @Joop_Brokking
    @Joop_Brokking 8 лет назад +3

    Very nice project! I was looking around for ideas on how to implement Lidar on my multicopter for 3d mapping. Thumbs up for this awesome project.

  • @SharifSourour
    @SharifSourour 9 лет назад +1

    Very impressive software by the way, you did a good job getting it working!

  • @maxmusterman3371
    @maxmusterman3371 7 лет назад +3

    I think this is the closest thing to a minimap I have ever seen. so awesome

  • @ovalwingnut
    @ovalwingnut 6 лет назад

    Very FUTURISTIC. Am I saying this from 2018 ;) Really dazzling. GR8T job. Cheers!

  • @mindthomas
    @mindthomas  9 лет назад +8

    The rotational speed of the LIDAR is around 300 RPM.

    • @huwalleva8948
      @huwalleva8948 8 лет назад

      what company is this made from?

    • @mindthomas
      @mindthomas  8 лет назад +1

      It is a spare part for the XV-11 robot vacuum cleaner made by Neato.

    • @huwalleva8948
      @huwalleva8948 8 лет назад

      HA I HAVE DONE LIKE THIS last year. but my bluetooth will lost package.

  • @yaghiyahbrenner8902
    @yaghiyahbrenner8902 10 лет назад

    Fantastic demo, all the best with your future research.

  • @fichmant
    @fichmant 8 лет назад

    wow I might build one, until I will find a job :) awesome work!!

  • @chelseavancouver2888
    @chelseavancouver2888 7 лет назад

    Awesome!!! Really cool project!

  • @bakupcpu
    @bakupcpu 10 лет назад

    Wow!!! This is awesome! I need one now :) Thanks for sharing!

  • @ViljamsVidauskis
    @ViljamsVidauskis 7 лет назад

    Cool. Reminds me this green handheld motion tracking radar from movie Aliens!!

  • @tokyowarfare6729
    @tokyowarfare6729 9 лет назад

    This looks awesome!. good job.

  • @ltlt6117
    @ltlt6117 2 года назад

    hi touching the pins can be dangerous for Electro static discharge reason?

  • @yusufkaaninan1279
    @yusufkaaninan1279 7 лет назад +1

    How did you communicate with matlab?

  • @james2396
    @james2396 9 лет назад

    that is soooo cool!!

  • @ClearNinjaFox
    @ClearNinjaFox 8 лет назад

    can this be done with a regular laser pointer with a motor like what you have there??

  • @bubububungsmith2623
    @bubububungsmith2623 6 лет назад

    so cool!

  • @androidnewable
    @androidnewable 9 лет назад

    hi bro did u use the yellow electrical wire for Tx --> Rx and u put the RX on the pin pC11 ?? and what about the two red and the two black wires where did u put them ????

  • @pkw321
    @pkw321 7 лет назад

    Is it possible for you to share the coding that you used for mapping?? I would really appreciate it
    Thank you

  • @YuanweiLao
    @YuanweiLao 9 лет назад

    nice job, what's the frequency of the lidar rotation? thanks

  • @parkermacdowell4970
    @parkermacdowell4970 8 лет назад

    Just a suggestion but if you some how connected to LIDAR scanner directly to a smart phone which should have much better RAM and processing power than the setup you have now

    • @mindthomas
      @mindthomas  8 лет назад

      Depends on the application. If you have a specific application that requires heavy processing of the LiDAR data such as point cloud algorithms or SLAM then you might be better of using a better processor or smartphone.

    • @parkermacdowell4970
      @parkermacdowell4970 8 лет назад

      Would it speed up the image of the normal room or no?

    • @mindthomas
      @mindthomas  8 лет назад

      No, it will not. The refresh rate of the image is not due to the processor performance.
      The LiDAR sensor itself only provide angular measurements at a rate of 5 Hz, so the picture can only be updated at this rate.

  • @popotubeyou
    @popotubeyou 9 лет назад

    I got a quiet simple question, Where did you found the STM32.tcl or the Support Package for the STM32F429I discovery board ?
    Thanks by advance.

    • @mindthomas
      @mindthomas  9 лет назад

      +popotubeyou We didn't use any tcl or Support Package for the board. I used the HAL library from ST including the LCD driver.
      For easy generation (similar to using or generating a Board Support Package) I recommend you to have a look at the STM32CubeMX generator software from ST.

  • @marcdeni8555
    @marcdeni8555 7 лет назад

    this could be the beginning of "DETECTNOLOGY"

  • @adamoktanofa6402
    @adamoktanofa6402 8 лет назад

    nice projects and idea.. can u tell me the title of the song in the last sec of video..? thx

  •  10 лет назад

    Great.

  • @TradieTrev
    @TradieTrev 10 лет назад

    Cool!

  • @dhananjaymahajan3531
    @dhananjaymahajan3531 7 лет назад

    excellent work ....
    pls help on following points....
    1) is lidar A1M8 compatible with xv lidar controller ?
    2)u have used bluetooth to send data to computer ...can you pls tell me how...exactly it is done
    3)from which website should i buy this stuff

    • @mindthomas
      @mindthomas  7 лет назад

      1) No, the RPLiDAR (A1M8) is not compatible/equal to the XV LiDAR and thus not compatible with this project out of the box.
      2) The LiDAR data is received and processed in the STM32 processor and stored in RAM. The processed data is then transferred over UART to the Bluetooth module which is connected to a PC emulating a Serial Port (using SPP).
      3) I have purchased my XV LiDAR on eBay for around $100 USD

  • @usmanazhar2017
    @usmanazhar2017 8 лет назад

    hi bro, my neato clean only corner not clean center my room tell me please ,what problem what i do??

  • @joritori6883
    @joritori6883 3 года назад

    I want to the pin connector diagram of the project!!Could you give me please? I use the RPLIDAR but it isn't active :(

    • @mindthomas
      @mindthomas  3 года назад

      Which RPLiDAR version do you have? Please see the wiring description in the bottom of this blog post: blog.tkjelectronics.dk/2014/08/handheld-xv-11-lidar-with-stm32f429-and-matlab

  • @TizanaMenYo
    @TizanaMenYo 10 лет назад

    Well done bro !!
    Which IDE do you use for coding in the STM32F4 Microcontroller??

  • @GuiMVII
    @GuiMVII 4 года назад

    Do you recommend a course/website/tutorials to learn more about programming with stm32 platform? Watching your github I see that in highschool they dont teach a lot of stuff that is in there...

    • @mindthomas
      @mindthomas  4 года назад

      ST Microelectronics has some good Getting Started guides and videos which I suggest you to start with: www.st.com/content/st_com/en/support/learning/stm32-education/stm32-step-by-step.html
      I have also found the following blog very useful: stm32f4-discovery.net/

  • @chloemcholoe3280
    @chloemcholoe3280 5 лет назад

    Awesome for a roomba

  • @jamcguire100
    @jamcguire100 8 лет назад

    How does the lidar unit itself function? Can you dismantle it and show us what they've got inside?

    • @mindthomas
      @mindthomas  8 лет назад

      +James A. McGuire Please see the following disassembly of the XV-11 robot to find pictures and more information about the LiDAR unit: www.sparkfun.com/news/490
      Further pictures can also be seen here: www.robotshop.com/blog/en/neato-xv-11-disassembly-see-the-guts-of-your-robotic-vacuum-978

  • @manjuanathindi
    @manjuanathindi 9 лет назад

    I also tried in open space with enough natural light. I am getting similar data.

  • @SpartenTacticalUnit
    @SpartenTacticalUnit 10 лет назад

    Omg i want one please make a video on how to make it or better yet make kits and ill buy one

  • @deSpeyer
    @deSpeyer 7 лет назад

    Hi! Sadly, your blog is down at the moment..I also received this unit, but have some problems. All readings (except for approx. 1 second during spin-up of the motor) have the bad-data-flag set, otherwise I can read out and decode the packets just fine, so protocol and connection are good. Do you have any suggestions, or did you also experience this behavior at some point?

    • @mindthomas
      @mindthomas  7 лет назад

      Saying that it works for the first second while it spins up indicates to me that this issue might be related to a synchronization problem.
      How are you powering and controlling the speed of the DC motor? If you power it directly from a battery or voltage supply without any speed controller you have to be aware that the motor easily makes the unit spin too quickly.
      In my blog post I described how connecting the DC motor to the 3.3V supply would limit the speed and reduce the likelihood of the synchronization issue.

    • @deSpeyer
      @deSpeyer 7 лет назад

      I tried connecting the motor to a stabilized 3.3v/3v-source, as well as spinning it exactly at 300rpm using pwm-control based on the speed-information of the packets I received from the scanner. The turnrate is rocksolid at 300rpm +- 0.5rpm. I am receiving clean and uncorrupted packets all the time, so this is no issue at all, it's just that (except for this brief 1-second period during startup) the bad-data flag is set all the time.

  • @FrankLopezx
    @FrankLopezx 9 лет назад

    have you try saving the connected contours of what makes your room ? this was you can actively use that map for survey ? while your lidar will still be on doing its updates on the room and any new moving objects

    • @mindthomas
      @mindthomas  9 лет назад

      Hi. Its not just a matter of saving the contour. It is a highly intensive mathematical procedure called SLAM.
      But no, I haven't tried this.
      Regards Thomas

    • @FrankLopezx
      @FrankLopezx 9 лет назад

      mindthomas well is not math if you already got the data, all you need to do is use a program that can take those values and convert into a array of vectors therefor displaying the already scanned imaged "saved data" so if anything this will be an addition program that will run aside with this hand held. just store data in a file that the second program can grab and read C# can do this in visual studio or Processing

    • @mindthomas
      @mindthomas  9 лет назад

      +Frank Lopez But the origo of these vectors needs to be adjusted while you walk around - just like LIDAR with GPS.
      Please search for LIDAR and SLAM on RUclips for more practical information.

    • @FrankLopezx
      @FrankLopezx 9 лет назад

      mindthomas i understand your view but do understand that your talking about one of many types of approach. this can be taken care of by using a imu module $2 and match that imu to the handheld and link that imu data to the actual program reading the saved map values, doing this update of reading constantly will translate into a moving map thats match where your pointing your device to

  • @marouanehanhasse3757
    @marouanehanhasse3757 7 лет назад

    hi thank u for the video i wanna a Lidar like this and i don't know how much it is and don't know where can i get it

    • @mindthomas
      @mindthomas  7 лет назад +1

      Neato XV-11 modules runs for about $100 on eg. eBay.
      See eg. www.ebay.com/itm/NEATO-XV-11-12-14-21-SIGNATURE-VACUUM-LIDAR-LASER-DISTANCE-SENSOR-ORIGINAL-PART-/352008156403

  • @huwalleva8948
    @huwalleva8948 8 лет назад +1

    yeah。 I have done this this year

  • @yusufkaaninan1279
    @yusufkaaninan1279 7 лет назад

    Have you used a TTL adapter for lidar data?

    • @mindthomas
      @mindthomas  7 лет назад

      No. That is not needed as I am using the STM32 processor running at 3.3V

  • @Дмитрийсергеевич-о9п

    круто.. лидары обычно очень дорогие..

  • @olegmiroshin2152
    @olegmiroshin2152 Год назад

    hi, is it matlab on pc?

  • @rishavbhattacharya7937
    @rishavbhattacharya7937 6 лет назад

    Which gui builder did you use? for Stm32f429 lcd

    • @mindthomas
      @mindthomas  6 лет назад

      No GUI builder has been used. The graphics you see is programmed in C++ using the graphics library functions provided by ST.

    • @rishavbhattacharya7937
      @rishavbhattacharya7937 6 лет назад

      Thank you sir.

  • @didzan
    @didzan 9 лет назад

    Any blog with steps for visualize graphic in PC with Python?

    • @mindthomas
      @mindthomas  9 лет назад

      We haven't done such. But by doing a quick Google search I stumpled upon this: matplotlib.org/
      I think this is what you are looking for.

  • @Xaoticex
    @Xaoticex 10 лет назад

    Is this device runs only with a matlab script ?

    • @mindthomas
      @mindthomas  10 лет назад +1

      No. The embedded device itself, the STM32, is programmed in C - so no MATLAB running here.
      MATLAB is only used on the computer to actually display the polar plot of the distance measurements - not doing anything else, nor any parsing of the actual XV-11 data either, as this is all done on the STM32.

    • @Xaoticex
      @Xaoticex 10 лет назад

      mindthomas
      Nice , great job

  • @sedwardstx
    @sedwardstx 10 лет назад

    Can you please share the source code? I just picked up one of these lidar sensors and would love to replicate this on my stm32f429

    • @mindthomas
      @mindthomas  10 лет назад +1

      Yes, I will soon be publishing a blog-post about the project including the source code and CoIDE project.

    • @mindthomas
      @mindthomas  10 лет назад

      The source code has now been uploaded and can be found thru our blog. Please see the video description.

    • @sedwardstx
      @sedwardstx 10 лет назад

      mindthomas Awesome, thank you very much!

    • @suatyildiz1953
      @suatyildiz1953 5 лет назад

      @@sedwardstx can you help me about this project please steve edwards

  • @yusufkaaninan1279
    @yusufkaaninan1279 7 лет назад

    hello Which software format did you use the sensor for?

    • @mindthomas
      @mindthomas  7 лет назад

      What do you mean? Do you ask about the LiDAR to microprocessor protocol or the wireless protocol to the PC over Bluetooth for visualization?

    • @yusufkaaninan1279
      @yusufkaaninan1279 7 лет назад

      Various software formats available for the lidar sensor

    • @yusufkaaninan1279
      @yusufkaaninan1279 7 лет назад

      ((((((I am using this code))))))
      %% Matlab script for read and plot VX-11 lidar data
      % V0.22 New
      % Author: Cheng-Lung Lee
      % Date: 2010/11/24
      %
      % Testing with this LDS
      % Piccolo Laser Distance Scanner
      % Copyright (c) 2009-2010 Neato Robotics, Inc.
      % All Rights Reserved
      %
      % Loader V2.4.13386
      % CPU F2802x/c600
      % Serial AAA42110AA-0003662
      % LastCal [2010182117]
      % Runtime V2.4.13386
      fid = serial('COM13','BaudRate',115200);
      set(fid,'InputBufferSize',400000) % Set serial buffer size >(6+360x4)*2=2892 byte
      set(fid,'Timeout',1) % Set read Timeout in 1 sec
      fopen(fid)
      %fclose(fid);
      %% local loop back to test serial port
      % fid_fake_data = fopen('XV11_NoShiled.bin'); % read data from sparkfun binary format
      % for i=1:20
      % tx_data=fread(fid_fake_data , 200, 'uint8' );
      % fwrite(fid,tx_data,'uint8');
      % end
      %% Setup plot for lidar
      figure(1);
      lidarplot=plot(zeros(1,360),zeros(1,360),'.'),% plot something
      axis equal,axis([-2000 2000 -2000 2000]),grid on
      xlabel('X mm'),ylabel('Y mm')
      drawnow
      pause(.1)
      %% Start read serial port
      index=0;
      deg4index=0;
      XV11_Status=0; % 0~3 search for header, 4 has header, 5 timout/error.
      data=zeros(2,4,'uint16');
      Ddata=zeros(1,360,'uint16');
      Rdata=zeros(1,360,'uint16');
      if fid.BytesAvailable>0
      fread(fid, fid.BytesAvailable, 'uint8');
      end
      while(XV11_Status=(22))
      deg4index=fread(fid, 1, 'uint8' )-hex2dec('A0'); %1 byte index & unknow flag
      speed=fread(fid, 1, 'uint16' ); % encoder ticks
      data(:)=fread(fid, 8, 'uint16' ); % 8 byte distance data and 8 byte reflectivity or uncertainty
      Checksum=fread(fid, 1, 'uint16' ); % check next header
      nextheader=fread(fid, 1, 'uint8' ); % check next header
      if(nextheader==hex2dec('FA'))
      Ddata(deg4index*4+1:deg4index*4+4)=data(1,:);
      Rdata(deg4index*4+1:deg4index*4+4)=data(2,:);
      else
      XV11_Status=0;
      end
      % like LMS200 lidar, most likely XV-11 only use 13
      % bits for distance, bit 14 and 15 are flag for
      % data quality and sensor information
      % try to read flag here
      %bit14flag=bitand(data(1,360),uint16(hex2dec('4000')*ones(1,360)))>0
      %bit15flag=bitand(data(1,360),uint16(hex2dec('8000')*ones(1,360)))>0
      deg4index+1; % count from 0 to 89
      if (deg4index==89)
      index=index+1;
      dist=bitand(Ddata(1,:),uint16(hex2dec('3FFF')*ones(1,360))); %mask out bit 14 and 15
      [X,Y] = pol2cart(0:2*pi/360:2*pi*(1-1/360),double(dist));
      % plot(X,Y,'.'),axis equal,axis([-500 500 -500 500]),
      title(['Scan: ' num2str(index)])
      set(lidarplot,'xdata',X,'ydata',Y);
      drawnow
      %pause(.01),
      end
      end
      case 4
      %
      otherwise
      XV11_Status=0;
      end
      end
      fclose(fid);

  • @ClearNinjaFox
    @ClearNinjaFox 8 лет назад

    dam do you know of any links that does this but for Arduino and Processing or c#/c++ ?

    • @mindthomas
      @mindthomas  8 лет назад

      +Sys.stem You can do a similar thing with an Arduino, but the processor ressources will be quite loaded due to the many samples.

    • @ClearNinjaFox
      @ClearNinjaFox 8 лет назад

      TKJ Electronics how bout the samples gets BT to a pc and result sent back to the processing window, i dont care about the actual handheld this is just a approach to let the bot know its map then work out a best avoidance and route from point A to B

    • @ClearNinjaFox
      @ClearNinjaFox 8 лет назад

      TKJ Electronics what would be the pseudo code for something like this ?

  • @gopinadh9056
    @gopinadh9056 5 лет назад

    I want to learn stm 32 can you help me how to get started please helpmeee

    • @mouradmkhakh8903
      @mouradmkhakh8903 3 года назад

      You can find a lot of courses from At website.

  • @YSTech2010
    @YSTech2010 9 лет назад

    What is is maximum detectable range? by the way, I like ur German accent:)

    • @mindthomas
      @mindthomas  9 лет назад +1

      +YSTech2010
      The range is around 0.2m to 6m.
      Thanks but no thanks. I am actually Danish so please don't compare my accent to the germans ;-)

    • @YSTech2010
      @YSTech2010 9 лет назад

      Haha, Danish is even better! XD

  • @abdullahaydn26
    @abdullahaydn26 8 лет назад

    hi body. you stole my dreams. :) really congurulations. its perfect i think but ı am wondering that how do you show on the screen??? is it your code or is there any precode designed code and one more thing. as well you say lidar sensor very expensive how can ı procure cheaper this sensor

    • @mindthomas
      @mindthomas  8 лет назад +1

      The graphics library to get the display on the STM32F4 board up and running is provided by ST for free (included in the CubeMX IDE from where you can generate startup files and the project).
      This library contains the most general drawing functions as setting pixels, drawing lines, writing text etc. For any more advanced graphics you would have to write your own library.
      This is one of the cheaper LiDAR units that you should be able to buy on eBay etc. for about $100-$150 USD.

    • @abdullahaydn26
      @abdullahaydn26 8 лет назад

      TKJ Electronics thanks a lot.
      I wish you continued success.

  • @jmconrad78
    @jmconrad78 8 лет назад

    How accurate is the resolution ?

    • @mindthomas
      @mindthomas  8 лет назад

      1 degree, but with quite some dropouts. So maybe only an effective resolution of 3-5 degree at every revolution of 5 Hz.

    • @jmconrad78
      @jmconrad78 8 лет назад

      Stupid question: are the degrees (0-360) set as a fixed positions on the LiDAR? For example if I set it down facing one direction, will the packet containing the data for degree angle 0 be a constant poll of the same position in space?

    • @mindthomas
      @mindthomas  8 лет назад

      Of course not the same position in space as this is another reference frame than the one which the LiDAR is attached to.
      The sensor data is provided in a reference frame defined by the LiDAR itself. So the data will be oriented as the LiDAR is pointing.
      Then you can do filtering and sensor fusion to combine the LiDAR data with a gyroscope and/or magnetometer to get estimate the current orientation and use that to map the LiDAR angle readings.

  • @yusufkaaninan1279
    @yusufkaaninan1279 7 лет назад

    Could you show me the full Matlab code?

    • @mindthomas
      @mindthomas  7 лет назад +3

      The MATLAB code can be found here: github.com/TKJElectronics/XV11Lidar_STM32F429/blob/master/DisplayLIDAR.m

    • @pusatberk4193
      @pusatberk4193 4 года назад

      @@mindthomas so also can you share your Arm codes ? and thanks this awesome project.

  • @cemaldagl158
    @cemaldagl158 5 лет назад

    Hi, as far as I am concerned, that is a wonderful Project to implement. However, I need your help to comprehend how bluetooth modul Works with MATLAB. May I kindly request your e-mail?
    Sincerely...

    • @mindthomas
      @mindthomas  5 лет назад

      The Bluetooth module used in this video (HC-05) works as a Virtual Serial Port when paired to the computer. This allows me to open this serial port and read the incoming data in MATLAB using the serial port object: se.mathworks.com/help/matlab/serial-port-devices.html

  • @daslolo
    @daslolo 6 лет назад

    What dev environment is that?

    • @mindthomas
      @mindthomas  6 лет назад

      The STM32 code was developed in the Eclipse-based CooCox CoIDE. Today I would however suggest to use the System Workbench for STM32 (SW4STM32) which is also Eclipse-based but with with a wider and more recent list of supported devices. SW4STM32 is limited to STM32 devices though, whereof CoIDE supports multiple ARM families from eg. NXP/Freescale, Texas Instruments, ST etc.
      The visualization is done with MATLAB which processes the incoming Bluetooth packages.

    • @daslolo
      @daslolo 6 лет назад

      Thanks, is the programming language C? Are there libraries or do you need to poke the hardware directly?

    • @mindthomas
      @mindthomas  6 лет назад

      Yes. SW4STM32 uses the GNU-GCC compiler. For STM32 devices I recommend to use the HAL library or the LL library (for space constrained projects).
      To get started I suggest you try the CubeMX to generate the project files including the necessary libraries. This generator is able to generate project files for the SW4STM32 IDE.

    • @daslolo
      @daslolo 6 лет назад

      CubeMX is incredible, schematics, even timings, and that auto project creation is very well made. I'll try programming. Is there a simulator? Also have you used an Arduino? If so how does the programming compare?

  • @yusufkaaninan1279
    @yusufkaaninan1279 7 лет назад

    Hi, I am using arduino uno and xv lidar sensor in my project.I provide communication between arduino uno and matlab with arduino ıo matlab.
    #include
    SoftwareSerial mySerial(10, 11); // RX, TX
    void setup() {
    // Open serial communications and wait for port to open:
    Serial.begin(115200); //seri haberleşme başlangıç
    while (!Serial) { //
    ; // wait for serial port to connect. Needed for native USB port only
    }
    mySerial.begin(115200);
    }
    void loop()
    {
    if(mySerial.available()) //
    {
    byte in = mySerial.read();
    delay(1);
    Serial.println(in, HEX);
    }
    }
    I can get data from the sensor with the above codes
    But I do not know how to use this data I read.
    I am transferring serial data but how can I calculate the distance?
    If you answer me, please.

    • @mindthomas
      @mindthomas  7 лет назад +1

      Just reading a single byte and then waiting will not work. The bytes that comes from the XV11 comes in a packed format so you will have to read a whole package and decode the content, after checking and confirming the validity of the package using the checksum.

  • @TradieTrev
    @TradieTrev 10 лет назад

    Cool!