LED VISUALIZATION
Description
This dataset and software package provides a visualization-integrated microcontroller-based experiment designed to support learning of Light Emitting Diode (LED) concepts through real-time measurement and interactive visualization. The system combines an Arduino-based data acquisition module with a Python visualization application to link electrical measurements (macroscopic level) with a conceptual model of electron movement and recombination in semiconductor energy bands (microscopic level), and with circuit representations (symbolic level). The Arduino program reads analog voltage signals from a voltage-sensing interface during LED circuit operation and streams time-stamped measurement data via serial communication (USB). The Python application receives the serial data, performs basic preprocessing (e.g., parsing, filtering, and scaling), and visualizes the experiment in two synchronized modes: (1) a dynamic V–I data view that helps learners identify data patterns and quantitative relationships, and (2) a conceptual animation illustrating electron flow, band-gap transitions, and the onset of light emission once the forward voltage approaches the LED threshold region. This integration is intended to facilitate sensemaking in data interpretation, enabling learners to connect experimental evidence to causal-mechanistic explanations of LED behavior. The package includes the Arduino sketch, the Python application/source code, and sample datasets exported from serial logs. Users can replicate the activity by uploading the Arduino sketch, connecting the LED circuit and voltage sensor to the microcontroller, and running the Python application to display real-time measurements and visualization. The provided materials are suitable for classroom demonstrations, inquiry-based laboratory activities, and research on students’ conceptual understanding and representational reasoning.
Files
Steps to reproduce
Download all file and save to your computer 1. Hardware Requirements - Arduino Uno - LED (any color) - Resistor (typically 220–330 Ω for LED current limiting) - Voltage sensor module / voltage divider interface - Breadboard and jumper wires - USB cable for Arduino 2. Software Requirements - Arduino IDE - Python 3.9+ - Required Python packages (install via pip): ```bash pip install pyserial numpy matplotlib pip install pygame, tkinter, plotly 3. Wiring Overview 1. Build the LED circuit with a series resistor. 2. Connect the voltage sensing input to the measurement point defined in voltage.ino (pin A0). 3. Ensure all grounds are common (Arduino GND and circuit ground connected). 4. Upload the Arduino Program (voltage.ino) 1. Open Arduino IDE. 2. Open the file: voltage.ino 3. Connect the Arduino via USB. 4. Select the correct board: o Tools → Board → (Arduino Uno) 5. Select the correct port: o Tools → Port → (choose the COM/tty port shown) 6. Click Upload. 5. Verify Serial Output (Arduino Serial Monitor) 1. Open Tools → Serial Monitor. 2. Set the baud rate to match the value in voltage.ino. 3. Confirm that numeric data are printed continuously 4. Close the Serial Monitor before running the Python visualization (to avoid port conflicts). 6. Run the Python Visualization (led_full.py) 1. Ensure the Arduino is still connected via USB. 2. Identify the correct serial port: o Windows: COM3, COM4, etc. o macOS: /dev/tty.usbmodemXXXX o Linux: /dev/ttyACM0 or /dev/ttyUSB0 3. Run the program: 4. python led_full.py 5. If led_full.py requires specifying the port and baud rate, use: 6. python led_full.py --port COM3 --baud 115200 (Adjust values to your system.) 7. First-Time Sensor/Hardware Stabilization (if applicable) If your setup includes a sensor module that requires warm-up/stabilization, power the system for at least 2 hours during first use before performing formal data collection. 8. Expected Output When running correctly, the system should display: • Real-time numerical values (from the Arduino serial stream), and/or • A live plot (e.g., voltage over time or V–I curve), and • A conceptual visualization/animation of LED processes (electron flow/band transitions), depending on your implementation in led_full.py. ________________________________________ 9. Troubleshooting No data / blank visualization • Check the selected serial port. • Ensure the baud rate in led_full.py matches Serial.begin(...) in voltage.ino. • Close Arduino Serial Monitor (it can lock the port). Unstable / noisy readings • Check wiring and ground connections. • Add simple averaging/filtering in Arduino or Python. • Ensure the voltage divider ratios are correct. Permission error (macOS/Linux) • Try running with permissions or add user to dialout group (Linux): • sudo usermod -a -G dialout $USER Then log out/in.
Institutions
- Indonesia University of EducationWest Java, Bandung