One challenge was making the cars small enough so that we can have multiple ones driving on the same circuit while still having a fast and precise drive. For that, we decided to use basic but effective electronic components. The list of the components used for each car is as follows:
- ESP8266 board
- ESP32-CAM board
- L298N motor driver
- External antenna (connector & antenna)
- Motor
- Servo
- Color sensor
- 7.4V Lipo battery
The ESP8266 board was used to connect every other component and to make a connection to the server used to control the cars while the ESP32-CAM board was used to stream the point of view of each car on a dedicated server.
The electrical components were connected as follows:
graph LR
A[[Battery]] -- 12V --- B{Driver}
A -- GRD --- B
B -- 5V--- D(Motor)
B -- OUT1 --- D
B -- OUT2 --- D
B -- 5V ---E[ESP8266]
B -- GND ---E
E --IN1 ---B
E --IN2 --- B
C((Color sensor)) -- OUT --- E
E -- S0 --- C
E -- S1 --- C
E -- S2 --- C
E -- S3 --- C
E -- 3V3 --- C
E -- GND--- C
C -- LED-GND --- C
B -- 5V --- F(Servo)
E -- GND --- F
E -- IN --- F
B -- 5V --- G[ESP32CAM]
E -- GND --- G
H([Antenna]) --- G
The color sensor being sensible to the lightning conditions and itss distance to its target, it needed to be calibrated to be as precise as possible. The code of the calibration is available on the repo.
A dediacated server was made at the beginning of testing and showed the performace of the sensor as seen below.
11809102-D3DA-4FC2-A24D-6DFAAB497B5F.mov
The design of the circuit was made using Fusion360. The main design of the circuit is shown below.
We then chose to laser cut the circuit on 3mm MDF boards, so we had to make a puzzle like design for both cutting and easier transportation and storage. The full .dxf file is included in the repo.
The laser cutting used aprox. 3 1.6x2m boards.
The final circuit looked like this:
To hold the iPhone used to track the cars 3 meters above the ground, we had to be creative and make a phone holder that was attached to the railing of the DLL's first floor. The structure was laser-cut on 1cm MDF boards and was designed on FUSION 360 (.dxf design file available on the repo). To make the phone holder strong and reliable, a puzzle-like design was used between pieces and the connections were strenghened by wood glue.
To hold the iPhone in place, a custom designed holder was 3D printed and mounted on the MDF structure. The .f3d file available on the repo was made for an iPhone 14 Pro Max.
To stream each car's pov, we used an esp32 cam on each car which streams continually on a custom server. The code used to enable the streaming on the boards allows to chose the quality and format of the video output. We personally went with the SVGA format and a quality of 63 (to have a fluid stream). All the videos are then combined on a streaming server which can handle up to 6 cars' povs. The code for the server and the html design are both on the repo.
It looked like this: