POSTING SENSOR VALUE TO A SERVER USING RELAY IOT BOARD

IoTLABZ introduce a new Relay IOT board that can be easily used for industrial or home automation projects and experiments. This is a double Relay board which has esp8266 on board chip with a 3 pin RMC connecter to connect a sensor and also has 100-230VAC to 5V DC converter on the same board. It can be programmed using FTDI/CP2102. The board is manufactured with Automatic Pick and place machine with high quality standard. We can control the on-board relay from the cloud using wifi connectivity or develop your own firmware.

The wifi module (esp8266) used to Post data (sensor value) to a server as per the code uploaded in it. The on-board SMPS module is mounted on the board, so that you can supply 5V DC from 120V AC – 230V AC and has a power rating of 3 Watt. This make it perfect for small projects that needed a 5V supply from mains.

So in this post we will go beyond the boundaries of the local network and access the board over the internet. In this post, i would like to post a temperature sensor value and post it to a server. We can access this value from anywhere using an android application for completing this task by using ThingSpeak.

What is ThingSpeak?

ThingSpeak is an open source Internet of Things (IOT) application and API to store and retrieve data from things using HTTP protocol over the internet or via a local area Network. ThingSpeak platform that let you collect and store sensor data in the cloud and develop IOT application. The ThingSpeak IOT platform provides application that let you analyse and visualize your data in graph and then act on that data. The data is send to Thingspeak  from our Relay IOT Board.

ThingSpeak act as a data collector which collects data from the IOT board and also enable the data to be pulled into a software environment for historical analysis of data.

How to create a ThingSpeak account?

Press the Sign in button and enter the Email id and Password.

After Sign in and press on New Channel button.

Enter the Name, Description,  and select the Field 1 (Here we are uploading only one sensor value so we select only one field other wise you can select as much of field as number of sensors).

You can modify the field, axis, private view and public view of the channel.

Now copy the API key and Channel ID, insert it in your code written in Arduino IDE .

Now build the code and upload it in your ESP8266 after that you will see the sensor value graphs on the ThingSpeak channel.

In this code we are uploading value of  a temperature sensor(LM35) to a server (ThinkSpeak) and it is plotted on a graph.

Sample Code to upload a sensor value to ThingSpeak

 

OUTPUT

Resources
How to Buy

 

Leave a Reply