Summary of Arduino Data Logger Shield & Sensor Test using ATmega328P with Proteus Simulation
This Proteus-simulated project uses an ATmega328P to read an LDR and TMP36 via ADC with a 3.3V external AREF, converts readings to light categories and Celsius/Fahrenheit, and sends real-time results over UART to a serial terminal for debugging and logging.
Parts used in the Arduino Data Logger Shield & Sensor Test using ATmega328P with Proteus Simulation:
- ATmega328P microcontroller
- TMP36 analog temperature sensor
- LDR (Light Dependent Resistor)
- 10kΩ resistor (voltage divider)
- 3.3V reference source
- Crystal oscillator (32.768 kHz for RTC shield context)
- Serial terminal (UART)
Introduction
This microcontroller project demonstrates a simple yet practical Arduino data logger shield sensor test using an ATmega328P in Proteus simulation.
The system reads light intensity from an LDR and temperature from a TMP36 sensor, then sends real-time data to a serial terminal.
It’s a beginner-friendly embedded systems project that explains analog sensing, external voltage reference usage, and serial monitoring.
Designed for DIY electronics learners, this project shows how sensors behave before moving to real hardware.
Proteus makes it easy to test, debug, and understand the working principle without physical components.
How the Project Works (Overview)
The ATmega328P continuously samples two analog sensors:
-
An LDR for light intensity
-
A TMP36 for temperature measurement
Using a 3.3V external analog reference (AREF), the microcontroller converts sensor voltages into digital values via its internal ADC.
The processed data is categorized (light levels) and converted into Celsius and Fahrenheit for temperature, then transmitted over UART to a serial terminal.
Block Diagram / Workflow Explanation
-
LDR + Resistor Divider produces a voltage proportional to light intensity
-
TMP36 Sensor outputs an analog voltage based on temperature
-
ATmega328P ADC reads both sensor voltages using external AREF
-
Firmware Logic converts raw ADC values into readable units
-
UART (Serial Monitor) displays live sensor data every second
Key Features
-
Uses external analog reference for accurate sensor readings
-
Simultaneous monitoring of temperature and light
-
Real-time serial output for debugging and logging
-
Threshold-based light intensity classification
-
Fully testable in Proteus VSM simulation
-
Minimal hardware with clean firmware logic
Components Used
-
ATmega328P microcontroller
-
TMP36 analog temperature sensor
-
LDR (Light Dependent Resistor)
-
10kΩ resistor (voltage divider)
-
3.3V reference source
-
Crystal oscillator (32.768 kHz for RTC shield context)
-
Serial terminal (UART)
Applications
-
Environmental monitoring systems
-
Temperature and light data logging
-
Smart room or greenhouse monitoring
-
Embedded systems learning labs
-
Sensor calibration testing
-
Arduino-based IoT prototypes
Explanation of the Code (High-Level)
The firmware initializes serial communication for data output and configures the ADC to use an external AREF voltage.
Inside the main loop:
-
The LDR is read using ADC channel A0 and classified into brightness levels
-
The TMP36 is read using ADC channel A1
-
Voltage is calculated from raw ADC values
-
Temperature is converted into Celsius and Fahrenheit
-
Data is printed to the serial terminal every second
The code avoids complexity and focuses on clarity, making it ideal for learning sensor interfacing.

Source Code
Download
/* Sensor test sketch
for more information see http://www.ladyada.net/make/logshield/lighttemp.html
*/
#define aref_voltage 3.3 // we tie 3.3V to ARef and measure it with a multimeter!
int photocellPin = 0; // the cell and 10K pulldown are connected to a0
int photocellReading; // the analog reading from the analog resistor divider
//TMP36 Pin Variables
int tempPin = 1; //the analog pin the TMP36's Vout (sense) pin is connected to
//the resolution is 10 mV / degree centigrade with a
//500 mV offset to allow for negative temperatures
int tempReading; // the analog reading from the sensor
Proteus Simulation
In Proteus, the circuit runs exactly like real hardware.
Adjusting the LDR light level changes the brightness classification, while modifying the TMP36 temperature value updates Celsius and Fahrenheit readings instantly.
The serial terminal displays continuous, readable sensor data, making debugging and learning straightforward.
FAQs
[ultimate-faqs Include_category=”arduino-data-logger-shield-&-sensor”]Conclusion
This project is a clean and practical introduction to sensor-based embedded systems using Proteus simulation.
It helps learners understand ADC usage, sensor voltage conversion, and serial communication in a real-world context.
Perfect for students and hobbyists, this project bridges the gap between theory and hands-on DIY electronics experimentation.
Complete File
Arduino Data Logger Shield & Sensor Test using ATmega328P with Proteus Simulation
- How does the project measure light intensity?
The project uses an LDR in a voltage divider read by the ATmega328P ADC to measure light intensity. - How is temperature measured and converted?
The TMP36 outputs an analog voltage read by the ADC; firmware converts the ADC value to Celsius and Fahrenheit. - Can the ADC use an external reference?
Yes, the ADC is configured to use a 3.3V external analog reference (AREF) for accurate readings. - Does the project provide real-time output?
Yes, data is transmitted over UART to a serial terminal every second for real-time monitoring. - What happens when the LDR light level changes in Proteus?
Adjusting the LDR level in Proteus changes the brightness classification shown by the firmware. - Is this project suitable for beginners?
Yes, the project is described as beginner-friendly with clean firmware logic focusing on clarity. - Can the circuit be fully tested in Proteus VSM?
Yes, the project is fully testable in Proteus VSM simulation according to the article. - What is the purpose of the 10kΩ resistor?
The 10kΩ resistor is used as the pulldown resistor in the LDR voltage divider.

