How to Make Temperature and Light Intensity Logging | Proteus Simulation | Fritzing | Liono Maker

Introduction: How to Make Temperature and Light Intensity Logging | Proteus Simulation | Fritzing | Liono Maker

About: Engineer

Hi this is Liono Maker, This is my official YouTube Channel. This is open Source YouTube Channel.

here is the Link: Liono Maker YouTube Channel

here is the video link: Temp & light Intensity Logging

In this tutorial we will learn how to make Temperature and Light Intensity Logging with Arduino UNO and Micro SD-Card Module. The main component is LDR which is used to measure light intensity and other one is LM35 which is used to measure temperature. These two analog signal are sent to Arduino pin Ao and A1. SD Card is doing main job in this project that is logging. data logging or data recording is a technique in which we are writing our data in our file then we see line graphs in Excel. The sequence of instructions required every time to write to an SD card is;"filename", FILE_WRITE);



Information on an SD card can be read and the contents displayed on the serial monitor. The Serial.print() and Serial.write() are used to display the content of data file.

Step 1:


SD (Secure Digital) cards can be used for data storage and data logging. Examples include data storage on digital cameras or mobile phones and data logging to record information from sensors. Micro SD cards can store 2GB of data and should be formatted as FAT32 (File Allocation Table) format. The micro SD card operates at 3.3V, so only micro SD card modules with a 5V to 3.3V voltage level shifter chip and a 3.3V voltage regulator can be connected to the Arduino 5V supply.

The micro SD module communicates with the Arduino using Serial Peripheral Interface (SPI). The SPI connecting pins on the micro SD module include the MOSI, MISO, SCK pins and the SS pin denoted chip select (CS), which are connected to Arduino pins 11, 12, 13, and 10, respectively.

SD-Card Interfacing with Arduino UNO:

GND ------GND






Data is only written to the file on the SD card following the file.close() instruction; therefore, every file.println(data)instruction must be followed by a file.close() instruction and be preceded by an"filename", FILE_WRITE)instruction. The function has default setting of FILE_READ, so the option FILE_WRITEis required to write to a file.

The sequence of instructions required every time to write to an SD card is"filename", FILE_WRITE);




LM35 is a precession Integrated circuit Temperature sensor, whose output voltage varies, based on the temperature around it. It is a small and cheap IC which can be used to measure temperature anywhere between -55°C to 150°C.

There are three legs of Lm35;




Lm35 is a unique temperature sensor, used to detect the temperature. Its first terminal are connected with VCC to 5volt Arduino pin and second terminal is Out connected with Analog pin, which is define in coding. The third terminal is connected to Gnd, which is Gnd.


A photo resistor (acronym LDR for Light Decreasing Resistance, or light-dependent resistor, or photo-conductive cell) is a passive component that decreases resistance with respect to receiving luminosity (light) on the component's sensitive surface. The resistance of a photo resistor decreases with increase in incident light intensity; in other words, it exhibits photoconductivity.

LDR Interfacing with Arduino UNO:

Its one terminal is connected with 5volt and second terminal is connected with 4.7k resistor. The second end of the 4.7k resistor is ground. LDR is itself a resistor and this type of configurations are used to measure & voltage, this is voltage divider technique. The common terminal is connected to analog pin of Arduino (pin# is defined in coding). I’m sharing pictures.

Step 2:

Proteus Simulations:-

In this tutorial we are using Proteus Software, which is used to simulate our project (Temp & Light Intensity logging). Firstly, open your Proteus software take components and devices to make your circuit diagram. After completing circuit we need to simulate it. for this purpose we need to upload Arduino coding hex file in Arduino Property. Right click on Arduino and go to Arduino Property copy & paste hex file location or directly select your file then upload it. the second thing is to upload SD card file, for this purpose select 32 GB and go to file location and then copy and paste this file or upload it directly by selecting from respective folder. following is the way to upload you file : Copy & Paste SD card file Location \ File name.

after completing these two work you need to verify the circuit that you made if there this a mistake in your please correct it before simulation.

There is play button in the left corner of Proteus software schematic page. press it and your Simulation is started.

/* The Following are the instructions for SD card to write the data on file.

The sequence of instructions required every time to write to an SD card is;"filename", FILE_WRITE);


3_file.close(); */

after these instructions Arduino code takes delay(5000); then record new reading and so on this process going on. the virtual terminal shows the results as following.

SD Card OK






you can change your delay response to record your data in short time. you can see this response on data file.

Step 3:

Real Time Data line Graphs in EXCEL:-

Microsoft Excel is used to make line graphs of temperature data and light intensity data respectively in this project.

Firstly, we need to open Excel and inject (go to Data and select your txt file) your data file in Excel. separate your temperature and light intensity data columns. go to the insert and insert line graphs. I'm sharing my complete files also Excel file and Real Time data Line graphs and data file.

these graphs tell us as the temperature changes and then resistor of photo-resistor ( LDR) also changes.

Step 4:

Complete Files used in this project: -

Here is my YouTube link, this is the open source channel. we are providing everything related to our project and things used in our project, relative files etc.

I'm sharing my complete files & pictures in a zip file, which have;

1_Fritzing file

2_proteus simulation files

3_Arduino coding file

4_Arduino coding HEX file

5_SD Card file

6_data file

7_Excel file including line graphs

, etc.

Step 5:

Be the First to Share


    • Space Contest

      Space Contest
    • Organization Contest

      Organization Contest
    • Tinkercad Student Design Contest

      Tinkercad Student Design Contest