Arduino and ESP8266 Control ThingSpeak




Arduino and ESP8266 Control Device with ThingSpeak (IoT)

System Diagram

Hardware
  1. Arduino Board or compatible board
  2. ESP8266 WiFi Module ( ESP-01 ) with Flash New Firmware.
  3. Relay Board
Option 
Regulator Power Supply for Relay Board


Wiring Diagram

ESP8266 pin CH_PD to 3.3 V
ESP8266 pin UTXD to Arduino Pin10  ( RX1 ) 
ESP8266 pin URXD to Arduino Pin11  ( TX1 ) 

Arduino Pin 2 to Relay Channel 1
Arduino Pin 3 to Relay Channel 2



My Development Board



Development Kits on ebay
http://www.ebay.com/sch/marychanyanuch2012/m.html?



Software
1.ESP8266 firmware 
2.Arduino Code
3.ThingSpeak.com

ESP8266 firmware 
You need to upload new firmware to your ESP8266 Module.
Download Firmware from ESPDUINO  https://github.com/tuanpmt/espduino

Firmware is in folder espduino-master/esp8266/release/
It has 2 files .
0x00000.bin
0x40000.bin






Arduino Code 

Original Code from 
Rock solid esp8266 wifi mqtt, restful client for arduino
http://tuanpm.net/rock-solid-esp8266-wifi-mqtt-restful-client-for-arduino/

But,I've modified to control device with ThingSpeak.com

Arduino Code Download V0.2
www.softpowergroup.net/files/Arduino/thingspeak_Control2.zip


Code are need some edit.
Set your SSID Network and Passwoard.






Make your TalkBack Command to control deives.
and make your Channel for show your Data.
Getting Start with ThingSpeak  https://thingspeak.com/docs




ThingSpeak TalkBack API
 To control devices use TalkBack API Command.

GET TalkBack Command

GET https://api.thingspeak.com/talkbacks/2225/commands/XX?api_key=1234567890ABCDEF
xx = COMMAND_ID ( 00 - 99 )


UPDATE TalkBack Command


PUT https://api.thingspeak.com/talkbacks/2225/commands/XX
api_key=
1234567890ABCDEF
command_string=
OPENDOOR
position=
5

More Info https://thingspeak.com/docs/talkback





My Website
email : info@softpowergroup.net   Tel .081-6452400

Arduino ESP8266 Sent Sensor data to IoT ThingSpeak ( Internet of Things )


Arduino ESP8266 Sent Sensor data to IoT ThingSpeak 
( Internet  of Things )

A major component of or rather the very concept, Internet of Things, is about how to connect various devices to the network so that they can both send data and receive commands. Various technologies to address the last mile connectivity, such as Bluetooth, WiFi, NFC, etc... already exist, but most of these are complicated to deploy and often need additional hardware such as a local control server or appliance.


System Diagram
Hardware
  1. Arduino Board or compatible board
  2. ESP8266 WiFi Module ( ESP-01 ) with Flash New Firmware.
  3. DHT11 Temperature / Humidity Sensor 

Wiring Diagram

ESP8266 pin CH_PD to 3.3 V
ESP8266 pin UTXD to Arduino Pin10  ( RX1 ) 
ESP8266 pin URXD to Arduino Pin11  ( TX1 ) 


ESP8266 Module Pinouts



DHT11 pin 2 (Data ) to Arduino PIN D8



Development Kit Prototype





Development Kits on ebay
http://www.ebay.com/sch/marychanyanuch2012/m.html?




Software
1.ESP8266 firmware 
2.Arduino Code
3.ThingSpeak.com
ESP8266 firmware 
You need to upload new firmware to your ESP8266 Module.
Download Firmware from ESPDUINO  https://github.com/tuanpmt/espduino

Firmware is in folder espduino-master/esp8266/release/
It has 2 files .
0x00000.bin
0x40000.bin








Arduino Code 

Using DHT11 library from: https://github.com/RobTillaart/Arduino

Original Code from 
Rock solid esp8266 wifi mqtt, restful client for arduino
http://tuanpm.net/rock-solid-esp8266-wifi-mqtt-restful-client-for-arduino/

But, I've modified to work with Android UNO Board.







What is Thingspeak?
ThingSpeak is an open source “Internet of Things” application and API to store and retrieve data from things using HTTP over the Internet or via a Local Area Network. With ThingSpeak, you can create sensor logging applications, location tracking applications, and a social network of things with status updates.

Then we use ThingSpeak Channel to store and show your sensor data over Internet HTTP.

Getting Start with ThingSpeak  https://thingspeak.com/docs




View Sensor Data through Thingspeak.com

My Data in my place on 16 May 2015 ( 16:10 - 16:30 )




My On line Real Time Data 
Visit here https://thingspeak.com/channels/36913






Android ThingSpeak Data Monitor App.



ThingSpeak Data Monitor in Android App.
https://play.google.com/store/apps/details?id=iot.sensor.data.monitor


Reference

Rock solid esp8266 wifi mqtt, restful client for arduino

ThingSpeak

ESP8266 Firmware Update with Arduino Board



ESP8266 Firmware Update with Arduino Board


The ESP8266 module is a cheap Wireless module.It has SOC(system on chip) that can handle TCP protocols. By default, these modules come with an AT command processor and can act as a serial to WiFi bridge. There is lots of info on the web about this module.



Some Application need to flash firmware.

So,I try to update firmware with Arduino Board.


Hardware

  1. ESP8266 WiFi Module ( we use ESP-01 )
  2. Arduino UNO Board
  3. Logic Level converter
and some jumper cable.



Wiring Diagram

Normal Arduino is 5V supply must use level converter. 



If use Arduino 3.3v ,so don't need level converter.



Software 
  1. Arduino IDE with Set upload mode code
  2. ESP Flash Download Tool V0.9.3.1
  3. Firmware bin file ( xxx.bin )


Arduino IDE 1.x.x and Set Upload Mode code



 Arduino Code for Set ESP8266 Upload Mode

     int ch_pd = 3;
     int io0 = 2;

     void setup() {
       pinMode(ch_pd, OUTPUT);
       pinMode(io0, OUTPUT);
       digitalWrite(io0,LOW);
       digitalWrite(ch_pd, LOW);
       delay(1000);
       digitalWrite(ch_pd, HIGH);
     }

     void loop()
     {
      
     }




ESP Flash Download Tool



Download link




Reference

http://www.thaieasyelec.com/



ESP Flash Download tool

Download link