Close
0%
0%

A study on VLM-driven ceiling fan airflow analysis

Utilizing VLMs to determine dual fan configurations for optimum cooling based on LiDAR-oriented real-time airflow simulations on Unity.

Similar projects worth following
0 followers
Utilizing VLMs to determine dual fan configurations for optimum cooling based on LiDAR-oriented real-time airflow simulations on Unity.

As consecutive heatwaves were passing through my region at the beginning of Summer, I had been intrigued to develop a research project regarding AI-oriented HVAC simulations to increase real-world cooling efficiency both energy-wise and coverage-wise. Although there were meticulous research papers, even commercial firms providing services to analyze the cooling efficiency of air conditioning units by thorough HVAC simulations, I decided to focus on developing my project around ceiling fans. Even though ceiling fans are not as popular as air conditioning units nowadays, I had noticed there were a plethora of ceiling fan installations in my city, especially in historic shopping districts, bazaars, and government establishments. Thus, I decided to focus my research on simulating ceiling fan-induced airflow and deriving optimal system settings from this simulation for efficient cooling.

Considering I wanted to see the impact of AI-oriented simulations on deriving optimum configurations for a real-world ceiling fan system, I decided to design a dual ceiling fan mechanism from scratch, enabling me to control all experiment parameters while building my ceiling fan airflow simulation program. Though a little untraditional, I decided to base my dual ceiling fan design on a differential bevel gear mechanism to be able to move both fans 180° vertically and 360° horizontally, leading to a lot more complicated but comprehensive simulation-driven airflow analysis and real-world cooling efficiency improvements.

After deciding on the bare bones of the dual ceiling fan mechanism, I needed a method to map the surroundings of operating ceiling fans since a precise airflow simulation must include real-time obstacle updates to analyze airflow path fluctuations triggered by solid surfaces such as walls, open doors, windows, or even moving people. Generally, HVAC simulations for industrial settings utilize highly sensitive 3D LiDARs with SLAM or sensor fusion techniques to generate accurate heat maps. Nonetheless, since I wanted to focus on fan-produced indoor airflow analysis for much simpler settings, I decided to utilize an RPLIDAR A1M8-R6 LiDAR scanner and turn its 2D scan points into a simple 3D obstacle map in my airflow simulation program, enabling fan-produced air displacement routes (trails) to bounce off of their surfaces.

In the spirit of making the ceiling airflow simulation program easily accessible and open-source, I decided to utilize Unity to develop all airflow analysis features, including the obstacle generation from 2D LiDAR scan points, without utilizing any third-party or paid Unity services. Although Unity might seem like an odd choice since it is a cross-platform, performance-focused 3D game engine, I wanted to capitalize on its advanced scene and animation rendering features in order to simulate accurate airflow fluctuations and track fan-produced air displacement routes (trails). In this regard, I was able to obtain animation-based frames individually for each pre-defined ceiling fan configuration (angles, fan strength, etc.), enabling me to conduct airflow analysis by taking instances from a long animation (video) sequence.

To derive optimal ceiling fan configurations from selected airflow simulation frames so as to achieve real-world efficient cooling, I decided to utilize vision–language models (VLMs) running locally. As I wanted to demonstrate the performance of open-source vision–language models without tailoring model output for a specific ceiling fan-installed space, I did not train any models beforehand. In this regard, I was able to see whether off-the-shelf open-weight vision–language models could be deployed to obtain airflow simulation-based ceiling fan configurations to achieve energy-efficient and optimal cooling of a real-world closed environment. I thoroughly discussed my findings in the following tutorial, but I can briefly state that the vision-language models (Qwen) I employed performed well...

Read more »

  • 1 × Dragonwing IQ-9075 EVK
  • 1 × RPLIDAR A1M8-R6 LiDAR Scanner
  • 1 × Custom PCB (4-layer)
  • 1 × Arduino Nano 33 BLE
  • 2 × BTS7960B DC Motor Driver Module

View all 30 components

  • 1
    Development process, device overview, and final results

    As mentioned, I needed to develop Unity, web, and mobile applications working in collaboration to achieve the VLM-assisted ceiling fan features and LiDAR-based airflow simulation. In addition to developing these applications, designing the ceiling fan mechanical components, electrical circuit, and the unique 4-layer PCB was quite a challenge, considering the custom differential bevel gear mechanism controlling the vertical and horizontal positions of the ceiling fans. Although I documented my thought process and development steps in the following written tutorial, I highly recommend checking the project demonstration video with timestamps for a brief overview, as showing is always more preferable than telling for a research project :)

  • 2
    Step 1: Building the electrical structure of the ceiling fan mechanism

    Even though this is a greatly scaled-down version of a ceiling fan system, I wanted to build a high-grade primary electrical structure to supply RS775 DC motors, Nema 17 stepper motors, dual light bulbs, the IQ-9075 EVK, the Nano 33 BLE, and all of the remaining electrical components, such as the rotary encoders.

    Thus, I utilized professional routing products to obtain power from the main electric line (grid), as if the fan mechanism were installed on the ceiling, and distribute power to each electrical component respectively.

    #️⃣ First, I soldered jumper wires to the RS775 DC motors (12V) via my TS100 soldering iron and sealed the connection ends with heat-shrink tubing. I utilized jumper wires only for testing and replaced them with 2 x 0.75 mm² copper cables for the final version, since jumper wires could not provide enough current to run the DC motors at their full potential.

    #️⃣ Then, I built the primary supply circuit. I represented the grid connection via a male grounded plug carrying voltage through a 2 x 1.5 mm² copper cable.

    #️⃣ I utilized a 4-pole power distribution block (4x7 125A) to separate the grid connection to power the electrical components mentioned below.

    #️⃣ To power the IQ-9075 EVK, the Nano 33 BLE, and the touchscreen module, I used a female grounded plug connected to the distribution block via a 2 x 1.5 mm² copper cable, since these parts require tailored chargers.

    #️⃣ I utilized 2 x 0.75 mm² copper cables (split) to power the E27 threaded lamp holders directly through the 2-channel relay module.

    #️⃣ I also utilized a 2 x 0.75 mm² copper cable (sheathed) to power the high-grade 12V switching power supply.

    #️⃣ For each copper cable end connected to the distribution block, I installed insulated ring (crimp) terminals to ensure safe and intact electrical connections.

    #️⃣ Finally, I connected the associated copper cable to the mentioned external power supply, which is a high-end 12V enclosed switching power supply (MT-350-12) and supports up to 29A. I chose this power supply since I needed to power multiple RS775 DC motors and Nema 17 (17HS3401) stepper motors, which demand high current loads, especially when working concurrently.

  • 3
    Step 1.1: Building the ceiling fan mechanism control circuit based on Nano 33 BLE

    After completing the primary electrical structure, I started to work on the ceiling fan mechanism control circuit, consisting of motor driver modules, rotary encoders, and the electrical components required to achieve all of the ceiling fan features, including but not limited to the vertical and horizontal angle adjustments.

    // Connections
    // Arduino Nano 33 BLE :
    //                                BTS7960B DC Motor Driver (40A) [First]
    // 5V      ------------------------ VCC
    // GND     ------------------------ GND
    // D2      ------------------------ R_PWM
    // D3      ------------------------ L_PWM
    // 3.3V    ------------------------ R_EN
    // 3.3V    ------------------------ L_EN
    //                                BTS7960B DC Motor Driver (40A) [Second]
    // 5V      ------------------------ VCC
    // GND     ------------------------ GND
    // D4      ------------------------ R_PWM
    // D5      ------------------------ L_PWM
    // 3.3V    ------------------------ R_EN
    // 3.3V    ------------------------ L_EN
    //                                A4988 Driver Module [First]
    // 3.3V    ------------------------ VDD
    // GND     ------------------------ GND
    // D6      ------------------------ DIR
    // D7      ------------------------ STEP
    //                                A4988 Driver Module [Second]
    // 3.3V    ------------------------ VDD
    // GND     ------------------------ GND
    // D8      ------------------------ DIR
    // D9      ------------------------ STEP
    //                                A4988 Driver Module [Third]
    // 3.3V    ------------------------ VDD
    // GND     ------------------------ GND
    // D10     ------------------------ DIR
    // D11     ------------------------ STEP
    //                                A4988 Driver Module [Fourth]
    // 3.3V    ------------------------ VDD
    // GND     ------------------------ GND
    // D12     ------------------------ DIR
    // D13     ------------------------ STEP
    //                                Grove - Triple Color E-Ink Display (1.54")
    // GND     ------------------------ GND
    // 3.3V    ------------------------ VCC
    // TX      ------------------------ RX
    // RX      ------------------------ TX
    //                                2 Channel Relay Module
    // GND     ------------------------ GND
    // A6      ------------------------ IN1
    // A7      ------------------------ IN2
    // 5V      ------------------------ VCC
    //                                KY-040 Rotary Encoder Module [First]
    // GND     ------------------------ GND
    // 3.3V    ------------------------ +
    // A1      ------------------------ DT
    // A0      ------------------------ CLK
    //                                KY-040 Rotary Encoder Module [Second]
    // GND     ------------------------ GND
    // 3.3V    ------------------------ +
    // A3      ------------------------ DT
    // A2      ------------------------ CLK
    //                                Motor Speed Sensor (LM393 Optical) [First]
    // GND     ------------------------ GND
    // A4      ------------------------ OUT
    // 3.3V    ------------------------ VCC
    //                                Motor Speed Sensor (LM393 Optical) [Second]
    // GND     ------------------------ GND
    // A5      ------------------------ OUT
    // 3.3V    ------------------------ VCC

    #️⃣ I utilized two RS775 12V DC motors (12000 rpm) as ceiling fan motors, which are powerful and reliable.

    #️⃣ As I wanted to adjust the vertical and horizontal angles of the ceiling fans by designing a unique differential bevel gear mechanism with 2 DoF (Degrees of Freedom), I utilized two Nema 17 (17HS3401) stepper motors for each ceiling fan.

    #️⃣ To drive the RS775 DC motors, I used BTS7960B DC motor driver modules, which support motors up to 40A and are more than enough for my RS775 motors able to draw 10A to 25A+ under heavy load or stall conditions.

    #️⃣ To drive the Nema 17 stepper motors, I utilized well-known A4988 stepper motor driver modules. As discussed in the following steps, I increased the driver current limits by utilizing the onboard potentiometer to draw more power, since the default limit was not sufficient for vertical movements.

    #️⃣ After pondering about tracking the vertical and horizontal angles of ceiling fans, I decided to utilize KY-040 rotary encoder modules to calculate the vertical position (angle). While designing the ceiling fan mechanism's mechanical parts, I ensured that the rotary encoders would be stationary and their shafts would align with the pivot axis of the differential bevel gear mechanism. In this way, I was able to estimate the vertical positions (angles) of both ceiling fans by directly tracking the encoder shaft rotations.

    #️⃣ Since the Nano 33 BLE does not provide a stable internal 3.3V voltage and I needed to employ interrupt handlers to estimate vertical angle changes, I noticed that the rotary encoders produced fluctuating angle values, even when the shaft was not swiveling. Thus, I added two 100 nF ceramic disc capacitors between the associated Nano BLE pins and the encoder's CLK and DT lines; one leg to the encoder pin and the Nano BLE pin, the other leg to GND.

    #️⃣ Since I wanted to enable the ceiling fans to rotate 360° horizontally, I did not need to track their exact horizontal positions. Nonetheless, I needed a way to determine once the ceiling fans' vertical axis becomes perpendicular to their horizontal axis, which makes the fans dissipate air at the highest elevation. As I wanted to determine this horizontal alignment via a non-contact detection method in order to avoid limiting the fans' movement, I decided to utilize LM393 optical motor speed modules. Although these optical modules are designed to calculate motor speed by counting full rotations, they are perfect for a non-contact limit switch to detect zero (home) positions. While designing the mechanical parts, I just ensured that the optical module would be on the same stationary plane with the rotary encoder and added a pin near the vertical axis pivot point to determine when the axes would be perpendicular. In this way, I was able to zero (home) the fan vertical angle at the perpendicular alignment position, leading to more accurate angle estimations.

    #️⃣ To enable the ceiling fan mechanism to display the latest connection states, I decided to utilize a triple-color e-ink display, which can show black, white, and red pixels. Despite its slow update rate, this screen was perfect for a simple on-device ceiling fan interface since it does not produce light and can sustain the latest updates even without power.

    #️⃣ As mentioned earlier, once I made sure all electrical connections were working as intended, I replaced the jumper wires with suitable copper cables for the RS775 DC motors.


View all 5 instructions

Enjoy this project?

Share

Discussions

Does this project spark your interest?

Become a member to follow this project and never miss any updates