Skip to content

Commit 51118d9

Browse files
committed
mkr zero tutorial
1 parent 74bee0b commit 51118d9

File tree

6 files changed

+78
-0
lines changed

6 files changed

+78
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: "MKR Zero Weather Data Logger"
3+
description: "Read temperature and humidity values in a remote location and store the data in an SD card."
4+
coverImage: "assets/Weather_Data_Logger_(6_of_10)%20-%20Copy.jpg"
5+
tags: [data collection, weather]
6+
author: "Arduino_Genuino"
7+
difficulty: intermediate
8+
source: "https://create.arduino.cc/projecthub/Arduino_Genuino/mkr-zero-weather-data-logger-574190"
9+
---
10+
11+
## Components and Supplies
12+
13+
- [Arduino MKR Zero](/hardware/mkr-zero)
14+
- [Jumper wires (generic)](https://www.newark.com/88W2571?COM=ref_hackster)
15+
- [Capacitor 100 nF](https://www.newark.com/58M4550?COM=ref_hackster)
16+
- [Resistor 4.75k ohm](https://www.newark.com/multicomp/mcmf0w4ff4751a50/metal-film-resistor-4-75kohm-250mw/dp/58K3862?COM=ref_hackster)
17+
- [microSD card](https://store.arduino.cc/index.php?main_page=product_info&products_code=X000009)
18+
- Medium breadboard
19+
- [DHT22 Temperature and Humidity sensor](http://celare.cl/am2302-dht22-digital-temperature-humidity-sensor-module-for-arduino-am-2302/)
20+
21+
## Apps and Online Services
22+
23+
- [Arduino IDE](https://www.arduino.cc/en/main/software)
24+
- [Arduino Web Editor](https://create.arduino.cc/editor)
25+
26+
## About This Project
27+
28+
### Introduction
29+
30+
With this project, you will be able to create in a few minutes a temperature and humidity data logger. You can use the built-in SD card reader of the MKR Zero to store the data. Plug a battery, add a protective case and you will have a neat weather data logger that you can use in remote locations where no connection is available. Imagination is the limit!
31+
32+
## Hardware
33+
34+
In order to build the weather data logger we will use an Arduino MKR Zero board. The small form factor and built-in SD card reader makes it a perfect choice for this project.
35+
36+
Second we will need a DHT22 temperature and humidity sensor. This sensor is easily available and very versatile. It can be powered from 3.3V to 6V. We will connect the power pin of the DHT22 to the VCC (3.3V) pin in our MKRZero. We will also need a 4k7ohm pull up resistor for the data line and a 100nF capacitor to clean the noise in the power line. For more info on DHT22, see[ Adafruit's DHT tutoria](https://learn.adafruit.com/dht/connecting-to-a-dhtxx-sensor)l.
37+
38+
We will use a small breadboard with 3 jumper wires to connect everything together, a SD card to store the information and a 3.7V LiPo battery to make our data logger portable.
39+
40+
![Hardware parts.](assets/Weather_Data_Logger_(10_of_10).jpg)
41+
42+
43+
### Protecting Your Components
44+
45+
It is important to keep your electronics dry, so if you are planning to put your weather data logger in a harsh environment, don't forget to use a protective case to avoid damaging the electronics!
46+
47+
## Schematics
48+
49+
* Plug the MKRZero to the breadboard.
50+
* Plug the DHT22 to the breadboard.
51+
* Connect the Power pin of the DHT22 to the VCC pin in the MKRZero.
52+
* Connect the Data pin of the DHT22 to digital pin 7 in the MKRZero.
53+
* Connect the ground pin of the DHT22 to GND pin in the MKRZero.
54+
* Connect the 100nF capacitor between the Power and GND pin.
55+
* Connect the 4k7 pull up resistor between the Power and the Data pin.
56+
* Plug in the SD card in the MKR Zero board.
57+
58+
![Circuit.](assets/MKRZERO.png)
59+
60+
## Code
61+
62+
<iframe src='https://create.arduino.cc/editor/Arduino_Genuino/9a077c75-51b7-42b0-9a73-5e5b5562a429/preview?embed&snippet' style='height:510px;width:100%;margin:10px 0' frameborder='0'></iframe>
63+
64+
65+
### Arduino IDE
66+
67+
Ok, now you should have all the electronics placed together. It's time to upload the sketch to the MKR Zero board. For this project you will need the libraries for the DHT22 sensor. You can find the libraries in this [GitHub repository](https://github.com/adafruit/DHT-sensor-library). Download them and place them in "libraries" within your sketchbook folder.
68+
69+
Now you need to download the sketch for the weather data logger and place it in the sketchbook folder. You can find the sketch down in the tutorial.
70+
71+
Open your Arduino IDE and use the Boards Manager to install the MKR Zero board. Once installation is finished you should be able to select the MKR Zero board from the menu `Tools -> Board`. Now connect the MKRZero to your computer using the `microUSB`cable. In the IDE, go to **File->Sketchbook->MKRZERO_WeatherDataLogger** and open the sketch. Compile and upload to the board.
72+
73+
Voila! Your system is ready for battle. You can see the values also from the serial monitor.
74+
75+
![Serial Port info](assets/MKRZERO_WeatherDatalogger_serialPort.png)
76+
77+
78+
![Enjoy!](assets/Weather_Data_Logger_(4_of_10).jpg)

0 commit comments

Comments
 (0)