Introduction: Lidar Car Bot
This project is about building a small robot using an Arduino that can look around, find nearby objects, and lock onto them. You can drive the robot using your computer’s keyboard through a Python program. When you press a key to turn on “protect mode,” the robot stops moving and starts scanning the area using a distance sensor mounted on two servos. These servos move the sensor side to side and up and down in a zig-zag pattern. While scanning, the robot looks for anything close by. If it finds something within a set distance, it stops scanning and points at it. A blinking light shows that it's searching, and the light stays on once it finds a target.
Supplies
•4x dc gear boxes and tires
•1x motor controller
•1x Arduino
•2x servo motor
•1x 3d printed chassis
•1x 3d printed servo gimbal
•1x ToF sensor
Step 1: 3d Print Your Chassis and Attach Motors
using the provide 2 stl files upload them to the slicer of your choice and print them, once printed take the bottom plate and attach the motors to them, I used double sided tape to do this but the chassis has holes where you can screw the motors for a more stable connection, once the motors are attached, attach the wheels to the motors.
Step 2: Add Motor Driver
Step 3: Add Top Plate and Arduino + Bread Board to Top Plate
now attach the top 3d printed plate to the chassis you will notice that there is a hole cut out in it that the top of the motor drive will stick out of. once attached you can add your arduino and breadbard to the top of the plate.
Step 4: Add Servos and ToF Sensor
now you can add the 2 servos and the ToF sensor on to the top of the chassis, to do this I used hot glue to hold the first servo to the cahssis and then hot glue to attach the secon servo to the first and then again hot glue to attach the 3d printed mount for the tof sensor and then again to attach the tof sensor to the mount, see the picture for final assembly, we are using 2 servos to be able to see both x and y axis.
Step 5: Wiring
now its time to wire everything I have attached pictures of my car wired so you can see how I plugged everything together as well as this list of Arduino pins and where they go.
5V - 5v bread board
gnd - gnd on breadboard
A4 - SDA tof sensor
A5 - SCL tof sensor
12, 11, 10, 9 - motor drive control pins
13 - 5v to motor controller
6 - led pin
3 - servo 1 control
2 - servo 2 control
Step 6: Download and Run
now taht you have everythign assembled and wired you can download and install the arduino and python code and run both of them, make sure to change the port in the pyhton code to the port you are using for your arduino. to controll the car use wasd to move it around and then when you want the lidar portion to go off click z and the robot will stop moving and scan the sky untill it finds something in its range.
Step 7: Trouble Shooting
some issues i ran into while assembling and how i fixed them.
motors spinning in worg direction, make sure that the positives are connected together and then neagtives are connected together and are the same on both sides when plugged into the motor controller.
lidar would disconnect whil scanning, this was just that the wire was not plugged in all the way, same goes for the servos.

