Is LIDAR easy to use for hobbyists? DIY Roomba? Obstacle Avoidance System for Robotics

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
ever wondered how modern robots don't run into walls or how driverless cars know where obstacles are positioned so that they can avoid them well one modern sensor system which can achieve such 360 degrees of object detection is called Leiter which is short for light detection and ranging and since the company Elector is currently selling a small lighter system with decent hobbyist specifications I picked one up without hesitation so in this video we will find out how the slider sensor works how we can display its data on a computer and use it with nod we know and finally I will assemble a small robots with the sensor on top to possibly create a crude DIY Roomba well let's get started [Music] this video is sponsored by elector who not only run an online store but also published quite awesome electronics magazines that have been reading for years now and best of all Alecto is offering a free green digital membership to the magazines for all my viewers so have a look in the video description for the coupon code great Scott's 19 and start reading electoral for free today after unboxing the lighter system and had a closer look at the quality of the plastic housing as well as the power PCB and I have to say that it seems like a compacts well-built robust units that can easily be mounted to objects with its four spacers but before praising it's too much let's continue by removing the top lids in order to find a big metal chunk in which a laser diode as well as probably a photo receiver is housed at the back we can also find an STM 32 microcontroller units which is the brain of the lidar system simplified speaking it turns on the laser diode 5000 times per second to send out a laser beam this beam then gets reflected from the objects that is in its way and thus it's the photo receiver which then tells the STM 3230 laser beam has returned now since the system measures the time difference between the firing of the laser beam and its receiving and since we know that light travels with a speed of 299,000 792 meters per second we can easily calculate what distance the laser beam travels and thus by dividing it by two we cut the distance to our objects of course this kind of measurement is only possible in one fixed direction in order to get a full 360 degree fields this system uses a motor to rotate the laser with a frequency of 6 to 12 Hertz that is very simplified how the distance measuring works but now that our stm32 work at the final distance values how does it send it over to the communication port on the bottom I mean solid wire connections are not possible because the control PCB constantly rotates to find that out I removed the control as well as the PowerPC BIA and found LEDs and light sensors on both of them which are probably used to send over the data both PCBs also feature a more or less hidden coil that are both directly connected to specialized C's which are utilized for wireless charging and that is basically how the control PCB gets powered but nevertheless the power PCB got one more IC which is a DC to DC converter which is used to turn the 5 volts input voltage to 9 volts to power the DC motor and with that being said we are now familiar with the basic functional principle of the slightest answer so after I finished reassembling it it was time to start testing it's by following the user manual guides given by the manufacturer that means I connected the lidar tune included USB to UART converter hooked that up to my computer installed the drivers fluids and Stoddard's the given point cloud viewer software there I selected the X for lighter and then basically clicked the start button which not only activated the motor of the system but also created this beautiful dot map on my computer now by bringing an object with a known distance next to the sensor it seems to measure the distance within the given resolution of the datasheet brilliant and if you are confused how the angle value is referenced then let me tell you that we got a zero degree line which then increases to 360 degrees in the clockwise direction as you might already have guessed this system is not only a lot of fun to play around with but it is also useful to for example map a room and thus a robot should be capable of maneuvering through this room with those information which is basically what modern vacuum cleaner robots can do and what I wanted to try next the software is not suitable for that though because we need the raw angle and distance values which can be extracted from the sensor through its new art series interface that is why I opened the real term see will capture program where I set the baud rate of my communication port to 128 thousands like it is mentioned in the data sheets after opening the ports these sensor starts spinning and it reads us were few lines next I found out that by sending over the hexadecimal value a five and sixty year we can enter these scanning modes which will hopefully outputs the point data after sending those values over though this software starts showing tons of unreadable science the problem was that the sensor only sends over hexadecimal values so after fixing this mistake we can not only feel like we're in the matrix but we also got all the angle and distance information we need but because decoding such hexadecimal values by hands does not make much sense I instead turned to the offered Arduino library for the x4 lighter sensor whose example code can basically spit out the desired angle and distance values there was just one problem being that the sensors maximum communication voltage is based around 3.3 volts while the common Arduino uses 5 volts that is why I had to use an Arduino Pro Mini which I powered and programmed gooble 3.3 volts FTDI breakouts so after connecting the TX and rx pin of the sensor to the Arduino according to its pin out given by the data sheets and additionally powering it with five foods I uploaded the Arduino codes and had a look at the serial data through the we term software now there seems to be a some correct values but then again tons of error messages and distances of zero millimeter but nevertheless I wanted to see whether the available data is enough for my crude vacuum robot experiments that is why I ordered myself this pretty cheap what kids that comes with wheels acrylic plates motors and tons of cruise now it took me around one hour to completely assemble it because the kids came without instructions but once I was done with it it was a breeze to multi light a sensor and thus I was almost ready for testing before doing that though I had to create a small power control circuits that turns the five foods of my battery power source used for the motors and divider system into 3.3 volts for the Arduino and while I was edits I also added two MOSFETs to control the motor speeds later on for pulse width modulation according to this finalized wiring scheme I then hooked up all the components to one another and firstly created a small test codes to see whether the motors would function correctly which as you can see in this tipsy bicycle rider simulation seems to work just fine so next I tried implementing the lighter system and an algorithm which pretty much stops the robots when it is about to crash and then let Saturn into the direction with the farthest away objects only to repeat this procedure but since I am let's face it's pretty terrible at writing codes my final results did only work out to some degree so all in all using this hobbyist lider system with an Arduino is possible but not easy to accomplish but nevertheless I hope you still learned quite a bit about such lighter sensors if so don't forget to Like share subscribe and hitting the notification bar stay creative and I will see you next time
Info
Channel: GreatScott!
Views: 350,706
Rating: 4.9335318 out of 5
Keywords: LIDAR, light, detection, and, ranging, easy, simple, guide, beginner, beginners, tutorial, make, project, DIY, diy, roomba, vacuum, robot, radar, kit, laser, diode, photo, receiver, µC, microcontroller, uc, arduino, motor, spin, turn, 360, degree, field, rotate, rotation, computer, map, data, serial, interface, navigate, elektor, X4, YDLIDAR, mosfet, speed, code, hexadecimal, room, greatscott, greatscott!, electronic, electronics
Id: _--8K1BW_O4
Channel Id: undefined
Length: 10min 9sec (609 seconds)
Published: Sun Aug 18 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.