Purpose:
While it's a bit of an overstatement we could say that we now know how to create a sketch for our Arduino, write to various pins to control things (like LED's), read input values to gather data (TMP36 temperature sensor), and have some general ideas about 'coding' in the Arduino IDE. All that stands between us and a data logger is having a place to store the data and a way to keep the Arduino powered when it's not plugged into our computer. We'll start with the remote power question, move to the data storage question, and consider an extended possibility to do timing a little differently that we have so far.
Procedure:
- For this lab you will need your Arduino, the 9V battery adapter that possibly came with your kit, the SD Card Reader board from the kit, the micro SD card from the kit, a temperature sensor (either the TMP36 or the DHT11 that some of you have), your breadboard, and some jumper wires, and perhaps other miscellaneous stuff.
i) External Power: The Arduino can be powered in a number of different ways. Everything you might need to know and much much more is available on this open-electronics site. We will explore how to use a 9V battery (unregulated) to power our Arduino when it's not connected to the computer. Here is our guide to external power.
ii) As we have learned about particular tools with the Arduino the first task has been to create a test process for just that tool. In this case the tool is the SD Card Reader. Here is a guide to wiring and doing a basic test of the SD Card Reader.
iii) In the previous step you wrote to and read from an SD card while it was connected to our computer and used the serial monitor to watch what was going on. Now we want to reconnect your temperature sensor from the previous lab. The goal here is to read the temperature and then write it to the SD card. As always here is the guide for storing temperature data.
iv) Once we've stored the data we need to read the data from the SD card. If you have a microSD connecter/reader on your computer you can literally plug it into your computer and read it like a flash drive. If note we will need to use a modification of our SD Card Test sketch from step II. Here is the guide for reading a data file on the SD card.
v) Bonus Round: Sorry -- no bonus round this time. I'm sure you can think of things we would want to do as a bonus round but I'm totally out of time at this point.
- LAB DELIVERABLES:
-
I) On a page with your name etc embed a screenshot of your serial monitor showing the data that you stored and read out of the SD card. Figure out how to write a date to the top of the data file that is appropriate for this lab.
II) If we get to the temperature part of this lab embed a screen shot of the temperature data that you stored on your SD. That data should span at least 60 min and include times and temperatures with labels.