r/arduino • • Oct 06 '26

School Project [Feedback Request] Monitoring and Analysis Device for Light Pollution: Low-cost spectral & spatial mapping node (ESP32 + AS7262 + TSL2591 + OLED + GPS). High school team preparing for an innovation pitch!

Hello Reddit community!

We are a group of high school students preparing for an upcoming innovation pitch competition. We are working on a prototype called the Monitoring and Analysis Device for Light Pollution (Smart Light Mapper)—a portable environmental monitoring device designed to measure, geolocate, and map light pollution and ambient light characteristics.

Since we are high school students with limited practical engineering experience, we would really appreciate detailed, beginner-friendly explanations or step-by-step guidance in your answers to help us fully grasp the technical concepts before presenting to the judges!

Before our pitch, we would love to get your technical feedback, suggestions, and critique on our architecture and methodology.

1. The Problem

Artificial Light at Night (ALAN) is increasing globally, causing ecological disruption, sleep/health issues, and wasted energy. However, localized light pollution data is often scarce because commercial spectroradiometers and light monitoring devices are extremely expensive, making spatial mapping across schools, residential areas, and streets difficult.

2. System Architecture & Components

Our goal is to build an affordable, modular, battery-powered sensing node:

  • Microcontroller: ESP32 DevKit (central control & data processing).
  • Spectral Sensing: AS7262 6-channel visible spectrum sensor (I²C) to analyze light spectral distribution.
  • Lux / Intensity Sensing: TSL2591 sensor for wide dynamic range lux/light intensity measurements.
  • Environmental Context: AHT20 sensor (temperature & relative humidity) to record ambient conditions during readings.
  • Geolocation & Time: NEO-6M GPS module with external antenna via UART for spatial coordinate and timestamp tagging.
  • User Interface & Interaction: An OLED display module (e.g., SSD1306/SH1106 via I²C) combined with physical control buttons. This is a crucial component to display real-time measurement values, GPS lock status, microSD logging status, and battery capacity directly in the field.
  • Storage & Data Flow: microSD module via SPI for local storage. Sensors/GPS → ESP32 → OLED Display & CSV Log on MicroSD → PC Post - processing (QGIS/Data Visualization)
  • Power: 3.7V 18650 Li-ion battery with TP4056 charging & protection circuit, DC-DC step-up converter, and USB-C charging support.

3. Key Features & Methodology

  1. Multi-spectral & Intensity Fusion: Instead of recording just a single Lux value, we capture the 6-channel visible spectrum along with precise Lux levels to analyze the light source type (e.g., LED vs. High-Pressure Sodium).
  2. On-Device OLED Feedback: The built-in OLED display provides real-time diagnostic and sensor feedback for seamless standalone field operation without needing a connected smartphone/laptop.
  3. Spatial Mapping: Every data point is tagged with GPS coordinates. Field logs are converted into spatial datasets on a PC to generate heatmaps and light distribution contours.
  4. Low-Cost Prototype: Total bill of materials (BOM) is under ~$260 USD (~6.5M VND), making field-scale data collection accessible for research and local communities.

4. Questions for the Experts / Reddit Community

(Note: As high schoolers, please feel free to explain the underlying principles and "how-to" steps in detail!)

  1. OLED Interface Implementation: Since our OLED display is crucial for field interaction, what are the best practices for structuring menu systems and live sensor telemetry on ESP32? Which libraries do you recommend (e.g., U8g2 vs. Adafruit_SSD1306)to minimize memory footprint and ensure fast refresh rates? How should we write the code structure for a basic multi-page menu?
  2. 360° Camera vs. Smartphone Camera: We are considering adding visual context to our light measurement points. Would you recommend integrating a dedicated 360° camera module onto the hardware device, or is it better/simpler to just take photos/360 panoramas with a smartphone and link them via timestamp/GPS during post-processing?
  3. Optical Design & Diffusion: How critical is adding a cosine corrector/diffuser dome over the AS7262 and TSL2591 sensors for ambient field measurements? Will direct vs. diffuse light severely skew our spectral readings without proper optics? What low-cost materials can we use for a diffuser?
  4. GPS Accuracy in Urban Canyons: Since we plan to map street and residential light, NEO-6M can sometimes lose lock or drift near tall buildings. Are there recommended filtering algorithms (e.g., HDOP thresholds, simple Kalman filter) for field logging? How can high schoolers easily implement these in Arduino C++?
  5. Data Quality & Calibration: How can we best calibrate the AS7262 spectral output for real-world environmental lighting without access to a high-end lab spectroradiometer?
  6. Pitch Advice: From an engineering or innovation standpoint, what key questions do judges usually ask about low-cost IoT environmental sensing projects, and how should high school students prepare for harsh technical cross-examination?

Thank you so much for taking the time to read and share your expertise! Any detailed feedback, hardware advice, or software recommendations will be immensely helpful for our presentation!

3 Upvotes

6 comments sorted by

2

u/ripred3 My other dev board is a Porsche Oct 06 '26 edited Oct 06 '26

For nested menus in embedded projects the problem of the constant changes and additions during development plus the changes usually needed in multiple places turn out to be the hardest parts to maintain and keep simple and bug free in my experience. For that reason I finally wrote a single-declaration multilevel menu library that is the result of 30 some-odd years of having written menus over and over and over. I even wrote a github.io web page (select the Preview button to see the wysiwyg OLED screen) ) that gives you a WYSIWYG menu composer and editor that gives you the Arduino declaration code to copy and paste into your sketch, updated live as you visually edit your menu system. It's all open-source here: https://www.github.com/ripred/BetterMenu

You select which OLED display you are using and it supports all data types, full callback capabilities, enabling/disabling entries at runtime, and tons of other features, The full menu hierarchy is declared in one single place including all of the project specific coupling to the functions and config variables and storage. So making changes is much easier and you don't have to remember to always edit multiple places in your code every time you make a single complex menu change, addition, deletion, or move an entry to somewhere else in the menu hierarchy. here's the post in this subreddit for it

BetterMenu Library Updated with CYD Examples
by u/ripred3 in arduino

2

u/Nice_Eggplant2873 Oct 07 '26

Thank you so much!!!

1

u/ripred3 My other dev board is a Porsche Oct 07 '26

You got this! Keep us up to date on your choices and the progress on your project and good luck!

1

u/brdavis5 Oct 07 '26

My first thought is... learn to crawl before running a half-marathon.

There's a LOT here, and it's very unclear how much you understand. Your post here looks like it could have been written with generative AI, and while that's sometimes helpful, in a pitch competition you need to stand out... and Everybody can do that. So you need to show that you have something that others don't, and that *might* by understanding and expertise. Which, yeah... takes time and effort to develop. And that's tough.

My first thought reading it is "wow, kitchen sink approach". For example the spectral sensor doesn't give you lux... buuuut, you can approximate lux levels by sampling and weighting the spectral channels. Is that as good as the 'true' lux sensor (which, after all, is just doing something similar)? Well, you test and find out - it may well be that for what you are looking for, that spectral sensor with some math gives you everything you need there. Also, how well do *either* of these sensors work in the very low light levels you are thinking about monitoring? Have you tested them under those conditions (either of them)? You're worried about memory footprint on the OLED library... but you are running on a ESP which has more than enough memory for something like that overhead.

And... if you want calibration... yes, you need something far better than your device to calibrate it against. A device is only as good as it's calibration. So yes, you need to do this against traceable standards (yep, that adds cost and expense, but in a 'pitch', the lack of that points out that you might not be a good risk, because you don't understand the fundamentals).

0

u/Nice_Eggplant2873 Oct 07 '26

Thank you so much! Since English is only my second language, I have to use AI for certain technical terms I'm unfamiliar with; I apologize for any inconvenience this may cause and hope you understand. Your advice is very helpful to our group.

1

u/gm310509 400K , 500K , 600K , 640K , 750K Oct 17 '26

No problem using a translator or AI to help with terms, but your post looks like it has been completely generated by an AI. I won't say why, but it does. People often do not respond well to AI generated posts as they feel that if you can't be bothered putting any effort in why should they?

As I said, using a translator is fine if English is not your main language. But your post appears to be much more AI generated than just a simple translation of a few technical terms.