Our project is centred on using gyroscope and accelerometer data to play games such as BrickBreaker and Labyrinth.
Compute: we wired up our ESP32, and connected it to our USB connector, gyroscope and LCD panel. We use I2C to communicate with the gyroscope, and SPI to communicate with the accelerometer.
Power: we use a Linear Voltage Regulator IC to step down the USB power input of 5V to 3.3V, which is the voltage the LCD panel and accelerometer run on.
Sensing: our MPU6050 senses the angle, which we obtain using the provided Adafruit library, and use to control our game
Actuation: the angle data from the MPU6050 controls the game, which is displayed on the LCD panel
Main components are ESP32 (MCU), MPU6050 (gyroscope/accelerometer), and ILI9341 (LCD Display). In the schematic, the MPU provides data to the ESP32 through the SCL and SDA pins, while the LCD updates the display using ESP32 data. We have a voltage regulator to go from 5V to 3.3V to power our MPU and ESP32.
Layout
For assembly, we hand-soldered all our components using solder wire and flux, with the exception of the ground pads of ESP32, which we soldered using solder paste and a reflow oven. Throughout the process, we ran continuity, resistance and capacitance tests to test our circuit during assembly, making use of the test points we had placed in our layout.
We faced numerous challenges during our assembly process. Firstly, due to an error in the example schematic, which we failed to notice, our D+ and D- pins in our USB were not connected to our ESP32. We fixed this, using patch wires, that we soldered onto the USB and ESP32 pads. However, this error was compounded by another. In our layout, our D+ and D- pins were flipped on one side of the USB. Thus, we had ended up accidentally shorting D+ and D-. To resolve this, we had to use a wire cutter to cut into the soldermask and sever the copper trace connecting the D+ and D- pads. Since we spotted this error only after finishing soldering our first board and running the MPU6050's tests, we had to solder an entirely new board.