Thesis Day 1

Previous Work

This was my first day working with the Lidar Sensor. I wasn't sure whether or not the sensor would work because the company that made it went out of business.

Inital Testing

After going through online resources left behind by the Scanse Sweep lidar company, I came across their Github page and followed the wire diagram to hook up the lidar to an Arduino Mega 2560. I then downloaded the Arduino programming software and followed the Github instructions to import the Sweep library. The lidar requires an external 5V power apart from the arduino, so for testing purposes I attached the usb cable that came with the lidar to my laptop. At this point, both the arduino and lidar were being powered by my laptop, but this was solely for inital testing. The arduino Sweep library came with sample code to run a scans. I was met with suceess as the lidar reported three scans of the environment on the Arudino monitor.

The values reported to me were just numbers really, I was given the angle, distance, and signal strength, but I didn't have an proper way to confirm their accuracy. The Scanse Sweep lidar company had made a application to visual the readings of the Lidar on a map. Unfortunately, the download for the application was removed from their website. Yet, using The Wayback Machine I was able to download it by going through an older version of their website.

The application displayed the lidar readings on a 2D grid, with the lidar at the sensor. From first glance, the map appeared to be a good model of the room. Using a piece of paper and a meter stick, I measured how accurate the readings were. At distances of less than a meter, the distance of the paper as reported by the lidar were somewhat inaccurate (The manual had noted this fact, I was just testing it), and past a meter, the lidar was accurate.

Wiring to Robot

After confirming that the lidar works with the arduino and that I could program and adjust its behavior, I knew the next step would be to have the arduino to communicate with a robot. My FRC Team, 4930 Electric Mayhem, has a spare robot, Jonbot, which just has a drivetrain and a vertical electric board and is used for programming and electrical testing. After reading online on Reddit and Chief Delphi, I determined that the easiest way to wire and program the Arduino would be to hook it up the the Roborio's I2C port. I am not very proficient in wiring and did not want to proceed unguided in my attempts, fortunatley I was able to find this blog which gave excellent instructions on how to wire the arduino to the I2C port and provide it with power. Rather than solder the wires to the arduino, I used wire connectors to connect the 18 guage wire from the Voltage Regulator Module to standard breadboard wire for the arduino. I turned on the robot and the arduino recieved power.

Jonbot (test robot)

18 guage to breadboard wire connection

Lit up Arduino

Future Work

Now that the arduino and lidar are wired to Jonbot, I should be able to send and recieve data between the roborio and arduino. I will write and test the code for this when I come to work on the project again. Also, I want to be able to have a view of the robot's environment, as seen by the lidar, available on the driverstation screen. I won't be able to use the application provided by the company since it requires the lidar to be directly plugged in to the computer running the application. I will try to make my own program using the java swing library to display the data, although I will have to learn how to create a gui through the robot's code.


© All Rights Reserved.