Introduction |
Published day: 15/3/2016
|
In this tutorial I will show you how to make your own Arduino IOT system for your kite!
This system will be able to measure real-time values of the barometric pressure, altimeter, temperature and humidity. You can put it on your kite, drone, atmospheric balloon, even on your balcony! We will use the WiFi technology to communicate with it, our goal is to take values up to 200 meters from our ground station. To make that possible we will use a WiFi router with two 5dBi antennas, you can also use a directional antenna to extend the range. On the next steps I will also show you how you can easily find the max range from your WiFi router. |
Measured values will be automatically available to our ThingSpeak.com channel for observation and farther analysis.
So, let's get started!
So, let's get started!
Arrows may not center when in edit mode. Once site is published, the arrow will be centered on the tab
When the site is published, this border and note will not show up.
Drag & drop your tab 1 content here
For this project we will need:
For your own custom circuit* :
*If you want to use an Arduino board try something small, like Arduino Nano or Arduino Micro. |
|
Sensors and modules:
Our code is only supporting the BMP280 sensor of Adafruit. If you want to use another brand it will be necessary to make changes to our code.
There are too many versions of ESP8266 WiFi modules out there... some of them will not work with our code, so please make sure to use the same version (link - photos here)
- DHT-22 (for temperature and humidity) ($9 link)
- Adafruit BMP280 (for barometric pressure and altimeter)
- ESP8266 WiFi module (~3$ link)
- 3.7V Rechargeable battery (500mAh will be fine)
Our code is only supporting the BMP280 sensor of Adafruit. If you want to use another brand it will be necessary to make changes to our code.
There are too many versions of ESP8266 WiFi modules out there... some of them will not work with our code, so please make sure to use the same version (link - photos here)
Drag & drop your tab 2 content here
Here is the circuit schematic.
Connections of the ESP8266 WiFi module:
|
Drag & drop your tab 3 content here
Visit www.thingspeak.com and click on the "Get Started" button to make a free account.
Now click on the "New Channel" (second image). Give it a name and select four fields:
|
|
If you want you can fill more info about your channel, e.g. Latitude and Longitude of your sensor. If you want to share sensor info with your friends (and more..) click on the "Make Public?" check box option.
Finally click on the "Save Channel" button. Click on your new channel and select the API keys tab (third image). Copy your "Write API Key" , you will need it in the next step. |
Drag & drop your tab 4 content here
Here's the code, embedded using Codebender!
Before you proceed:
Before you proceed:
- Attach your ATmega328 IC to the Arduino uno board
- Remove the RX and TX cables from the Arduino board.
- #define SSID "name" // "SSID-WiFiname"
- #define PASS "password" // "password"
- String msg = "GET /update?key=YOUR_WRITE_KEY"; //change it with your write key...
- curPre=1023.25; // Change it with current pressure of your city, find it here:https://www.wunderground.com
You can only really do a good accurate job of calculating altitude if you know the hPa pressure at sea level for your location and day! The sensor is quite precise but if you do not have the data updated for the current day then it can be difficult to get more accurate than 10 meters.
Try downloading the Codebender plugin and clicking on the "Run on Arduino" button to program your Arduino board with this sketch. And that's it, you've programmed your Arduino board directly from your browser!
Now you can re-connect the RX and TX cables. Now check your ThingSpeak channel to see the first sensor's info!
Now you can re-connect the RX and TX cables. Now check your ThingSpeak channel to see the first sensor's info!
Note: If you want to use the Arduino IDE instead Codebender you will need to manual add the necessary libraries. Try to find them on google.
Drag & drop your tab 5 content here
How can you find the max range for your network?
It's simple, go to an open area and open a command prompt (on Windows OS) and type: ping 192.168.1.19 -t Change the IP if necessary / the "-t" will send pings continuously, make sure that the ESP8266 and your computer is already connected with your WiFi router. |
Take the ESP8266 and start walking to one direction. (use the 3.7 battery for power source), leave someone behind to watch the computer screen.
When you will receive "Destination host unreachable." (or something like that) stop and measure your distance.
In my case with a WiFi router with 2 5dBi antennas I measured 200 meters. Try to use a bigger antenna to extend this range.
When you will receive "Destination host unreachable." (or something like that) stop and measure your distance.
In my case with a WiFi router with 2 5dBi antennas I measured 200 meters. Try to use a bigger antenna to extend this range.
Drag & drop content here
Well done!
That's it! You have successfully complete this guide and now you have your own Arduino based IOT system ready to... fly!
I will also put a video and share my channel info soon! Make sure to mark it as favorite!
I hope you liked this, let me know in the comments!
I will also put a video and share my channel info soon! Make sure to mark it as favorite!
I hope you liked this, let me know in the comments!