loading

Hello everyone! I am Michalis Vasilakis from www.ardumotive.com and in this Instructables 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.

Q & A and updates : http://www.ardumotive.com/iot-kite.html

So, let's get started!

Step 1: What We Will Need

For this project we will need:

For your own custom circuit* :

  • ATmega328p (+28 pin socket)
  • 16Mhz Crystal oscillator
  • 2x 22pF, 1x 0.1uF capacitors
  • 10K Ohm resistor

You will also need one Arduino uno board to program the ATmega328p IC. It's also highly recommended to build your circuit on a breadboard first.

*If you want to use an Arduino board try something small, like Arduino Nano or Arduino Micro.

Sensors and modules:

  • DHT-22 (for temperature and humidity) ($9 link)
  • Adafruit BMP280 (for barometric pressure and altimeter)
  • ESP8266 WiFi module (~3$ link)

Power source:

  • 3.7V Rechargeable battery (500mAh will be fine)

Note:

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)

Step 2: ThingSpeak Account - Create Your IOT Channel

Visit www.thingspeak.com and click on the "Get Started" button to make a free account.

Now click on the "New Channel" (second image above). Give it a name and select four (4) fields:

  • Field 1: Barometric pressure (Pa)
  • Field 2: Altimeter (m)
  • Field 3:Temperature (oC)
  • Field 4: Humidity (%)

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 above).

Copy your "Write API Key" , you will need it in the next step.

Step 3: The Circuit

Here is the circuit schematic.

Connections of the ESP8266 WiFi module:

  • RXD to Arduino TX pin
  • GPIO0
  • GPIO2
  • GND to GND (what else?)
  • VCC to Arduino 3.3V Pin or "+" battery (3.7V) cable
  • RST to Vcc
  • CH_PD to Vcc
  • TXD to Arduino RX pin

Connections of the DHT-22 sensor:

  • VCC to Arduino 3.3V pin or "+" battery (3.7V) cable
  • DATA to Arduino pin 11
  • NC
  • GND to GDN

Connections of the Adafruit BMP280 sensor:

  • Vin to Arduino 3.3V pin or "+"battery (3.7V) cable
  • 3Vo
  • GND to GDN
  • SCK to Arduino SCL pin (A5)
  • SDO
  • SDI to Arduino SDA pin (A4)
  • CS

You can test your circuit by building it first on a breadboard with the Arduino uno board. For your final custom circuit board make sure to use a 28pin socket for the atmega328 IC.

Step 4: The Code

Here's the code, embedded using Codebender!

Before you proceed:

  • Attach your ATmega328 IC to the Arduino uno board
  • Remove the RX and TX cables from the Arduino board.

Add your information in the code below by pressing the "Edit" button:

  • #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 - or attach the ATmega328 IC back to your custom circuit.

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 the on google.

Step 5: Find Max Range

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.

Step 6: 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!

For more Arduino tutorials and cool projects you can visit our web page: www.ardumotive.com

I hope you liked this, let me know in the comments!

If you liked it, you can also vote it ! Check the upper right corner ;-)

Thank you!!

<p>Not sure if this is an advert for your site or codebender, which you have to sign up to. Can you put the sketch in the 'ible please ?</p>
<p>1st this is not an advert, it's a full guide - tutorial</p><p>2nd the codebender is the online arduino ide, i you like it use it, if you don't don't use it, i don't care.</p><p>3rd read it to find the sketch.</p><p>4th You don't need to sihn up to anything, my site or codebender to complete this guide.</p>
<p>Just double checked, an you do have to Singup/Register with Codebender...</p><p>As for the sketch, I apologise, I see what I thought was a Graphic is actually interactive and the code can be copied from within</p><p>&quot;For more Arduino tutorials and cool projects you can visit our web page:<a style="">www.ardumotive.com</a>&quot;</p><p>Suggests advertising...</p><p>Regardless, it's a cool instructable..</p>
well i dont have the sensor yet but it looks a pretty cool project and im goin to make it soon. thanks for sharing
<p>Perhaps I missed it, but where is the raw sketch?</p>
<p>Great idea. I have a Uno for which I bought a zif socket and put it in the socket the chip goes in. That way I can put a new chip in and program it and then just put it in my project. That way I can soon modify the code if I want to change it. Of course I can play with it in my Uno and get it right first anyway :-)</p>
This is very cool. Thanks for sharing.
<p>:)))</p>
Wow! I never considered that I have a TUBE of 25 or so 328s just waiting to get programmed and used like this...
<p>:D</p>
This is a fantastic project bravo
<p>Thank you!!</p>

About This Instructable

7,243views

114favorites

License:

More by Ardumotive_com:Arduino 3D Printed Compass Arduino Bluetooth Car With Custom PCB DIY Arduino LED Matrix Display - 80x8 Px 
Add instructable to: