Arduino Data Logger Using SD Card and Excel.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone that I'd like to show you how to make a simple data logo using a pin on an SD card as you can see this is my setup here so the media company T is going to be SD card module inside locked place T an SD card up took about this in my previous tutorial put a link that video I talked about how to use this SD card module and I was how ds3231 RTC module that's going to help me in keeping my time and date I also have a light dependent resistor is going to be used for measuring the light intensity then decide I've included and lm35 temperature sensor and also have a simple potentiometer are abusing two very orient across one of the analog pins of my adrenal so in other word was this data logger is going to be doing is collecting data from these sensors and the potentiometer of a given period of time and in that data is going to be stored inside the SD card so I'll be able to store at it date and time from the ds3231 RTC module they now be able to store the light intensity using this dependent resistor you know store the temperature from the LM through five temperature sensor then I'm also going to put a simple potentiometer value I'll just put it as a potentiometer percentage change that is going to be determined by the change in the analog bodies that will be read from the analog pin we have connected this potentiometer so I'm going to connect the potentiometer analog pin to the now collected temperature sensor around pin 1 and I also clipped like dependably stuck in 0 let me have a simple look at the kind of program that I'm going to be using to run this data logger this is the code we are going to be using for a simple project so I need these libraries here the ds3231 is for controlling the RTC that you are using then the spi and SP dot h libraries are for controlling the SD card reader that we have this libraries usually come pre-installed in the arduino ide so you don't need to look much for them then we also declare the pins or you're gonna be connecting our sensors for example you're gonna connect the temperature sensor and the analog pin a2 then the light dependent resistor is going to be connected to another and in the potentiometer is an analog pin zero then you create a simple object you name it data file that is gonna be used for saving our data on the SD card then you specify the chip select pin for our SD card is very important in initializing our SD card then you go to setup the setup mainly involves initializing of the SD card and the major idea he has to open eyes the card and even give a name the kind of document that we are going to be forming when storing our data so in my case I'm going to name my document log data to TX something I need to specify here is that the name that you give to you document should have a maximum of 8 characters and then this is an extension name then the other thing you can do in the initialization is to write a fast line or the heading of the kind of data that you are storing for example in my case the first line is going to have data time temperature light intensity and then the potentiometer values or percentage since I'm going to be also using the px dykes tool so I would yes also use the simple CEO commands to enable me to run that tool on the Excel spreadsheet so in the loop they just going to be reading the values from the analog pins and then convert them to a desired value that we want for example I can read the value from the temperature sensor and convert it to temperature individual dishes then you can also convert the value to from the lab definitive that intensity and the potentiometer world can also be converted to percentage so this other part of the code is for storing data on the SD card and remember I said that the values when stored should be separated by commas talk more about it when it comes to that part where the reading data from SD card uses the importance of this commercia then this other part is for use in the LX docks tool that I'm going goes for using here then lastly I'm going to be putting a delay of 3 seconds meaning that that I'm going to be having that's going to be read every after 3 seconds I'll put a link in the description below so that you can be able to have a look at this data I'll put a link in the description below that you can be able to access this code and you can even do some changes if you are using different types of sensors so now it's what happens if you upload this code to Arduino so I have now uploaded according to my adrenal so the data from the different sensors you automatically begin being stored on the SD card and you can even check it out here using our serial monitor so if I press my serial monitor here so you see here giving you the different values and that being stored on the SD card okay top top this bit up issues the plx Docs to use in the excel spreadsheet that you were first close the serial monitor then I'll open the lakes Ducks tool from me I remember this kind of a brush to have real-time observation of the data as it is progressing through Co communication with that you know boat to not observe that I will just press connect here and as you can see I considered dates they log in time the time the temperature intensity and in the potentiometer so if you vary the values of the potentiometer keep on burning the words of the potentiometer and the light intensity you observe the body's changing in by now could you say the values changing after three second as the intensity and the potentiometer value and the temperature value will be observing them here on the Excel spreadsheet using this tool I've talked more about this in a separate tutorial so you can check it out to know how this works so after collecting data of a given period of time that you are specified and you can stop here just go to disconnect and after that you can even unplug the arduino from the computer and remove the SD card and then you can be able to access the data on that is the can already put the SD card in my computer and as you can see here are be seeing the text document memories of details log data you know code never gone missing this text document the log data then we can if I click on it you'll be able to see the data has been stored inside there so he have had each time temperature light intensity and then the percentage of the potentiometer has been rotated so remember the date and time we are good from the ds3231 RTC then the temperature was good from the temperature sensor the light interest was good from the light dependent resistor and then the potentiometer reading what God has was demonstrated before so after here you can be able to analyze this data but as you can see if you are going to use a simple text editor like the notepad it's very hard to do any kind of analysis using this kind of text editor so what we need to do is to import this data into an excel sheet so that's what I'm going to be doing so what you do you open your Excel spreadsheet like here then you have to import the other data from the notepad to Excel so to do that you just go to data then you click here from text then you select where your document is on my log data the new click import and then you're gonna have a text import wizard because remember data that's what we had was in the notepad and then I won't be opening it in the Excel spreadsheet so the main part of this text import wizard is to specify the kind of delimiter that you have because the data we have is in the CSV format CSV means comma separated values so if you look here and write data you discovered that the data is idea is being separated by comma Taurus what you could CSV format so in this case we need to specify the color blue limit as a separator that are using the Noahide data so you just go to next and then we select our delimiter which is comma and as you can see now it has really shown you how the data is going to be displayed on the spreadsheet just click finish okay so as you see the data is now placed very well on the spreadsheet and as if you do some simple comparison you discover that these commands we are specifying a given column so whenever you see a comma that means move the next column so after having the Excel spreadsheet you can do all types of data manipulation and analysis as you want so I can demonstrate here for example if I want I can get the time and I read these readings yeah then I can show the data maybe in the line graph like yeah so that's how you do the kind of simple analysis using the data and the Excel spreadsheet so that is it for our simple data logger can try it out using many other sensors in this case I wanna use the same a few sensors but you can use it with any other sensors but you and you do the analysis using the Excel spreadsheet so hope you've learned something new today don't forget to like my videos and to watch my other videos and subscribe to my channel thanks for watching you you you you you you
Info
Channel: MYTECTUTOR
Views: 22,645
Rating: undefined out of 5
Keywords: arduino data logger, arduino data logger excel, plx-dax with arduino, arduino with excel
Id: N0NN1I1fBfU
Channel Id: undefined
Length: 10min 16sec (616 seconds)
Published: Sat May 30 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.