For my senior design capstone project we were tasked with designing and building a functional wind tunnel. Key requirements included data acquisition and visualization of the test chamber airspeed, as well as the independent lift and drag forces acting upon the test specimens. The test specimens had to be able to pitch up or down to change the angle of attack, and their angle of attack needed to be measurable to detect their stall angles.
While having a fancy UI was not a requirement I took this opportunity to learn more about ESP32 programming, and wanted to get my hands dirty with LVGL. The personal goal for this project was to learn and document the process to create a usable program for the 3.5" variant of the Cheap Yellow Display. Examples and documentation for the 2.8" version is abundant, but I had an extremely difficult time finding anything on this one. This project uses the display drivers found in the esp32-smartdisplay, which is added to my project as a git submodule. VsCode with the PlatformIO plugin was used for programming/building/uploading, which seemed like the least painful approach to take. After looking into SquareLine Studio as a GUI for generating the relevant lvgl code I found the EEZ Studio project, which aims to be an opensource alternative. Despite some features not being completely implemented yet, I managed to get a good workflow going, and ran into very few issues with it.
Operating in tandem with the ESP32 was an Elegoo Mega 2560. The Arduino clone was chosen due to the large number of available connections, and reads lift and drag data from a pair of load cells using their own independent HX711 voltage amplifier boards. The chamber velocity was also calculated by the Elegoo using an analog differential pressure sensor connected to a pitot tube. An A4988 stepper motor driver controlled by the Elegoo is used to change the test specimen's angle of attack. Communication between the Elegoo and ESP32 occurs over I2C, which was probably the biggest hurdle for me during this project. The esp32-smartdisplay library uses I2C to control the screen, and I ended up figuring out that in order to use the only available gpio pins on the ESP32 I had to create a second I2C bus. An MPU-9250 gyroscope is wired in parallel with this I2C connection, with the ESP32 acting as the master, and the Elegoo/MPU acting as slave devices.
In the near future I plan on updating this repo with some pictures of the final assembly as well as videos/screenshots from the generated UI, as I am pretty proud of the progress I was able to make during this project.