Mechanical Engineeer
Computer Scientist
Computer Scientist
Computer Scientist
We wanted to build a free space map of any environment so that our robot could find its location within the environment using a map that it is generating. The free space map will record the distance from the robot to the nearest object and the direction of that reading. From this information the location and orientation can be estimated and then path planning can be used to navigate the robot through the environment while simultaneously generating a map.
Our specific goal was to build a two-dimensional map of an environment using distance acquired by LIDAR and an angle from a potentiameter. This website will describe the process that we took to build a unit that could record distance and angle to create a two dimensional map of the environment and show the progress that we made.
The final product could map a room up to 80 meters in diameter but for the video we set up a small environment in the shape of a parallelogram to show the map being built in real time. If the video does not load a YouTube link is here.
For anyone that is interested, we included all of the code and listed the parts used so that you can build your own and improve on our design. Some of the parts were 3D printed so we included the SolidWorks part files in the table. The instructions assume a general understanding of Arduino and soldering. Please let us know if the directions are missing information or are confusing at corbin.f.spells@gmail.com or if you made some great modifications.
Part | Store | Cost |
---|---|---|
LIDAR-Lite v2 | SparkFun | $114.89 |
AutoDriver - Stepper Motor Driver | SparkFun | $34.95 |
Any RC Battery with 3 Amps and 8-45 Volts | ~$20.00 | |
RedBoard | SparkFun | $19.95 |
Potentiometer | Digi-Key | $15.00 |
Slip Ring with Flange - 22mm diameter, 6 wires | Adafruit | $14.95 |
Stepper Motor - NEMA 14 | Inventables | $13.87 |
FingerTech Timing Belt 180mm 60T | The Robot Market Place | $2.99 |
1/4-20 Set Screw | FMW Fastners | $0.37 |
Lidar Mount | 3D Print | $0.00 |
Motor Gear | 3D Print | $0.00 |
Potentiometer Gear | 3D Print | $0.00 |
Red Board Plate | 3D Print | $0.00 |
Base | 3D Print | $0.00 |
Wire the lidar using the Fritzing schematic below. The 680 microfarad capacitor must be used to increase the speed of the lidar unit to 500 hertz.
When wiring the stepper motor you do not need to worry about wiring the coils backwards, all that matters is that both wires from one coil go to the same pair on the AutoDriver board. Also you will notice that both the lidar and the AutoDriver use the same 5V source from the RebBoard and that this could be a problem since the lidar is using a capacitor across these. Instead use the the same 5V pin but use the second GND source that does not have the capacitor.
You will need the Processing code on your computer to read from the RedBoard and create the graph in real time. Download Processing from here. The Arduino code gets uploaded to the RedBoard; you will need to install the LidarLite and AutoDriver libraries from here and here. If you do not know how to install libraries in Arduino then check out this link.
We also included some pictures of our setup to help you see how everthing fits together.