The goals of assignment 01 are to build your robot and to establish computer control over it, including sending commands and receiving sensor measurements. The subgoals of assignment 01 include:
Chassis and drivetrain assembly
Electronics installation and wiring
Top plate, battery and LIDAR installation
ESP32 firmware upload
GUI control and sensor verification
The key deliverable for Assignment 01 is to be submitted on Brightspace, one submission per team, from either team member:
Assignment 01 Video: illustrating command and control of the robot via the GUI. The video must show all four of the following:
Both motors driving forward and backward
Both encoder counts updating as the wheels turn
The gyroscope heading updating as the robot rotates
The LIDAR scan appearing in the GUI map
2. Plot: Ilustrating the robot's yaw angle as a function of time, recorded while a human was teleoperating the robot to follow an square shaped path.
The robot you will build in this course is a two-wheeled differential drive platform. It has two independently driven wheels on a common axle and two passive ball casters, one at the front and one at the rear. Because the two wheels can be driven at different speeds, the robot can drive straight, follow arcs, and rotate in place about the midpoint of its wheel axle. This is the platform you will use for the motion planning labs later in the semester, so it is worth building it carefully.
All computation runs on an ESP32 DevKit V1 microcontroller, which creates its own WiFi access point. Your laptop connects directly to the robot, so there is no router in the loop. Commands and telemetry travel over UDP.
The robot carries three sensors:
Two quadrature wheel encoders, one per motor, for measuring wheel rotation.
An MPU6050 inertial measurement unit, used here for the yaw rate and the integrated heading.
An RPLIDAR on the top plate, giving a 360 degree scan of the surrounding distances.
The Kit: Each team receives a chassis that has already been partially prepared. The following are pre-installed and should not be removed:
Brass heat-set threaded inserts throughout the chassis and top plate.
The two black motor brackets on the wheel axle line.
The two ball casters on the underside of the chassis, front and rear.
The remaining components are supplied loose. The bolts for each component are packaged in a bag together with that component.
Kit Contents: Each Each kit is packed as the items below. Bags are numbered and referenced by number throughout the rest of this document, so keep them until the robot is fully assembled.
Across all bags, the kit includes 14 jumper wires in total: 8 female-to-female, 4 female-to-male, and 2 male-to-male. Section 4 (Wiring) tells you what each connection is; match it to a jumper of the right type by checking whether each end is a pin or a socket.
Tools come in bag 9:
M2 Allen key
M2.5 Allen key
M3 Allen key
A screwdriver
Orientation convention: Throughout this document, the front of the robot is the half of the chassis that holds the motor controller, and the rear is the half that holds the ESP32. In every assembly photograph the robot is shown from above with the front toward the top of the image. Therefore the left side of the image is the robot’s left side, and the right side of the image is the robot’s right side. This matters, because the left and right motors are wired to different pins, and getting them backwards will make the robot turn the wrong way.
A note on the photographs: The photographs in this section show each component fitted in its place, but the wiring has not been made yet. Cables and jumpers that appear loose or resting on the chassis are simply not connected in that photograph. All wiring is done later, in Section 4.
Step 1: Start with the bare chassis. Identify the front half, which will hold the motor controller, and the rear half, which will hold the ESP32, the IMU and the power distribution board. Figure 2 shows which bolt belongs at each set of threaded inserts, so it is worth keeping open while you work through the rest of this section.
Step 2: Mount the motor controller in the front half of the chassis using 4 x M3 bolts (Bag 1). Orient the board as shown, with the heat sink and the tall row of header pins toward the front of the robot, and the pin row labelled 12V GND GND 5V toward the rear. This orientation puts the white motor connectors K1 and K3, and the ENA IN1 IN2 IN3 IN4 ENB pin row, where the wiring will reach them.
If a bolt does not go in. On some frames, the motor controller’s mounting holes were printed smaller than intended. If a bolt will not thread into one of the four holes, do not force it: fasten the board through the two holes that do accept a bolt. Two bolts are enough to hold the board securely.
Step 3: Mount the ESP32 DevKit V1 in the rear half using 2 x M2.5 bolts (Bag 2). The board is mounted upside down, with the component side facing the chassis floor and the two rows of header pins facing up, so that you can push jumper wires onto them later. Orient the board so that the USB connector faces the rear of the robot, aligned with the opening in the rear chassis wall; this alignment allows the ESP32 to be reprogrammed later without opening the top plate.Tighten the two bolts moderately, not fully tight.
Step 4: Mount the MPU6050 to the left of the ESP32 using 2 x M2.5 bolts (Bag 3). Keep the board flat against the chassis floor, because a tilted IMU will bias the heading estimate.
Step 5: Mount the power distribution board to the right of the ESP32 using 2 x M2 bolts (Bag 4). This board carries a step-down regulator with a fixed 5V output, and that 5V rail supplies the ESP32, the IMU, the wheel encoders and the LIDAR. Its own supply comes from the motor controller. The battery pack plugs into one of the two 12V ports on the motor controller, and two jumper wires carry that supply on to this board: the red jumper goes into the 12V pin and the black jumper into a GND pin of the motor controller pin row. In the photograph below the jumpers are fitted to the power distribution board but not yet connected at the other end.
Step 6: The two drive motors are identical. Each one is a DC gear motor with a quadrature encoder on its rear face, and each one carries two separate cables: a two wire power cable, red and black, and a four wire encoder cable. Leave both cables unconnected for now, and simply lay them inside the chassis. All wiring is done in Section 4.
Step 7: Fit the first motor into its bracket. Slide the motor in from the inside of the chassis so that the output shaft passes through the central hole in the bracket and the encoder end faces inward, toward the middle of the robot. Then fasten the motor to the bracket with 2 x M3 bolts (Bag 5), driven from the outside of the chassis into the two threaded holes on either side of the shaft. These two bolts are in addition to the four screws that already hold each bracket to the chassis.
Step 8: Slide a brass hex hub (Bag 6) onto the exposed shaft and tighten its M3 set screws with the M3 Allen key. Push the hub all the way onto the shaft, until it stops. Make sure the hub cannot slip on the shaft, because a hub that slips is the most common reason for a wheel that turns freely by hand but not under power.
Step 9: Repeat Steps 7 and 8 for the second motor.
Step 10: Fit a wheel onto each hex hub and secure it with 1 M3 bolt (Bag 6) through the centre of the hub. Tighten until the wheel sits flat against the hub and does not wobble.
Step 11: Stand the robot on a flat surface and check it over. Both wheels should turn freely by hand, both ball casters should touch the surface, and the chassis should not rock.
Orientation. The top plate has the same front and rear as the chassis. The end that carries the battery holder is the front of the plate, and it sits above the motor controller when the plate is fitted to the chassis. In the photographs below the plate is shown with its front toward the top of the image, matching every other figure in this document.
Step 12: Take the bare top plate. Two holes are already provided for cable routing: a small hole at the front-left carries the battery connector down into the chassis, and a larger hole nearer the centre of the plate carries the LIDAR cable bundle. You do not need to feed any cables through yet, this step is just to help you recognise the two holes before you mount anything over them.
Step 13: Fit the battery holder to the front half of the top plate using 4 x M3 bolts and nuts (Bag 7), with the bolts driven in from the same side as the battery holder itself and the nuts tightened on the underside.
Step 14: Fit the RPLIDAR to the top plate using 4 x M2.5 bolts (Bag 8), driven in from the underside of the plate up into the LIDAR’s mounting bracket. The unit only sits correctly in one rotation, see the photo below for the orientation to use.
Conventions used in this section. Every ESP32 pin below is identified as it appears when you look at the board from underneath, which is how it sits in the chassis after Section 2. Figure 20 shows this view: note that the two columns of the header swap sides compared to the printed labels on the top of the board, while the order of pins along each row stays the same.
Single ground rule. Only one GND pin on the ESP32 is used, the one next to VIN in the bottom row. That pin, together with VIN, is what powers the ESP32 itself: VIN takes 5V from the power distribution board, and this GND takes the board’s common ground. Every other GND in the system (both encoders, the MPU6050, the LIDAR) connects to the power distribution board’s GND terminals, not to a separate ESP32 GND pin.
Wire colours. The LIDAR and the two drive motors arrive with fixed wire colours already crimped onto their connectors, and the tables below use those colours. For every other connection (the MPU6050 and the two jumpers between the ESP32 and the power distribution board) any wire colour may be used.
Lidar. Check which type you have. Two LIDAR wiring variants are in circulation, marked with a small 1 or 2 on the unit. The LIDAR itself is the same, but which wire colour does what differs between the two, so check the mark on your unit and use the matching table below.
The motor controller’s own 12V and GND terminals and its two motor output connectors (K1, K3) are covered in Section 2; this table only lists the signal pins that go to the ESP32.
Check which encoder PCB you have. Motors ship with either a blue or a red encoder PCB, visible on the small board at the back of the motor. The power wire colours differ between the two: on a blue PCB, white is 5V and yellow is GND; on a red PCB, blue is 5V and black is GND. The orange and green signal wires are the same either way.
Step 17: With the wiring from Section 4 complete, do a minimum cable management pass before closing the top plate. If the cables are left loose the plate will not seat flush and will not close properly. Pay particular attention to two things: gather the jumpers above the ESP32 into a low, flat bundle, since many jumpers land in that area and they are the most likely to hold the plate open, and keep all cables clear of the motor controller’s heat sink, since a cable trapped under the top plate at that point will also stop it from closing.
Step 18: Fit the top plate onto the chassis using 4 x M3 bolts (from Item 1, the frame bag) into the four corner inserts, the same inserts identified in Figure 2. The robot is now mechanically complete.
Step 19: Install the Arduino IDE (2.x) from the official Arduino website.
Step 20: Add ESP32 board support. In File → Preferences, add the ESP32 boards index URL to “Additional Board Manager URLs”. Then open Tools → Board → Boards Manager, search for “esp32”, and install esp32 by Espressif Systems (latest version).
Step 21: Select the board. In Tools → Board → esp32, choose ESP32 Dev Module.
Step 22: Connect the ESP32 to your laptop with a USB cable and select the matching entry under Tools → Port. This is typically plug and play on a recent laptop; if the board does not appear as a port, install the CP2102 or CH340 USB-to-serial driver that matches your DevKit board.
Step 23: Get the code. [Repository link: https://github.com/sparterbrine/ROB-UY-3303_Fall_2026] Download or clone the repository and locate ESP32_code.ino and GUI_code.py [file names to be confirmed].
Step 24: Personalise your network credentials before uploading. Every robot in this course runs the same firmware, which creates its own WiFi network. If two teams leave the default network name unchanged, your laptop may connect to the wrong robot. Near the top of the sketch, change ssid and password to something that identifies your team, for example Robot_WiFi_T03.
Step 25: With the correct board and port selected, click Upload. The USB opening in the chassis (Section 2, Figure 4) lets you do this with the top plate already closed.
Safety. Before the first power-on test, beach the robot: raise the wheels off the ground, for example by resting the chassis on a box, so that the robot cannot drive off the table or run into anything while you are still checking that everything works.
Step 26: Turn the robot on using the switch on the battery holder.
Step 27: On your laptop, connect to the robot’s own WiFi network, using the network name and password you set in Step 24.
Step 28: From a terminal, navigate to the folder containing the GUI code and run:
>> python3 GUI_code.py
A window titled “Robot Console” should open.
Verification tests: Check all four of the following. These are the same four items required for the Assignment 01 Video described at the start of this document.
Both motors, forward and backward: Use the vertical speed slider (or the Raw Timed Move panel) to drive both wheels forward, then reverse. Confirm both wheels turn in both directions.
Both wheel encoders: While the wheels turn, watch the Enc A / Enc B readout update. It is fine if the counts run down instead of up.
Gyroscope: Rotate the robot by hand and watch the Gyro Z / Abs Angle readout change.
LIDAR: With the LIDAR spinning, watch red dots appear in the black canvas on the right as it detects the surroundings.
Once all four checks pass, record the Lab 01 Video and submit it on Brightspace as described at the start of this document.
This table collects every ESP32 pin used anywhere in this document, sorted by pin number, as a single quick-reference cheat sheet. For the reasoning behind each connection, see the per-component tables in Section 4.
Pin identification follows the same convention as Figure 22: every pin above is read from the underside (solder side) of the board, matching how the ESP32 sits in the chassis.