Showing posts with label Electronics. Show all posts
Showing posts with label Electronics. Show all posts

Monday, 8 February 2016

Fetching Data from any Website

             This Project idea struck in my mind during the time of IPL(Indian Premier League) when we used to be in our class attending lecture and we guys are so much curious about the live status of the match. At that time I thought of a small screen on which we can get regular updates of the match. And the Research Begins.........

            Visualizing it in block diagram wise, first of all we need search for a website on which we can get the live updates of whatever we want like live stock prices,current time, current temperature,YouTube Views,likes  and many more. Later we need to fetch the data from the server of that website and make an API(Application Program Interface). API serves the purpose of getting access to only those data which we are in need of from all the data available on the server.Suppose we need only number of views of our video uploaded on YouTube. So we need a interface which rather than requesting the whole HTML page, requests only number of Views of our video. Than we will give a GET request as we want to fetch the data from the server. All this task will be done through Thingspeak.com . A great website for your IoT based projects.

             In thingspeak.com, we will get our required API.  To test the API just request the link provided by thingspeak(On the right side of the page) in your browser than you will only get the data for what you requested.


In this Image,  I have created an API of number of views of my YouTube Video. Method I selected is GET as we want to fetch the data and HTTP version is 1.0. Than I Inserted URL of the page and for the last row (Parse String) you need to follow following steps.



Now paste that XPath into parse string row and thats it save it and API will automatically get generated. Test it by pasting that link into your browser. Than it will show something like this.


This is all about to pick up the right data.But what if we want to make project based on this. To make this data more useful you will require Arduino, LCD and the most amazing thing ESP8266 ( WiFi Module).


ESP8266(WiFi module)

             This is an absolutely amazing thing which will help your controller to communicate to the virtual world.And it is very easy to use. It has a on chip controller and we can communicate with this WiFi Module via AT Commands.Here is the list of all AT Commands.


If you are using Arduino Mega than you can use Serial1(RX1 and TX1) and Upload MultiSerialMega code into you board and change the baud rate to 115200 and you are ready to use WiFi Module. Just use all this AT commands once so that it will get easier to deal with this module further.

Steps for fetching data through API

Step 1:

Reset the WiFi module :- AT+RST
Set the mode to 3:- AT+CWMODE=3
Join any WiFi network :- AT+CWJAP = "SSID_Name","SSID_Password"

Step 2:

After connecting to the WiFi network, we need to establish a TCP connection to communicate with servers via port 80. To establish a connection, the AT command is,

AT+CIPSTART = "TCP","api.thingspeak.com",80

In our project, we are using API generated from Thingspeak.com so we have written the host server name as api.thingspeak.com. 

After this command we need to provide that how many number of characters we need to request. For this the command is,

AT+CIPSEND=90

in our case the number of characters are constant i.e. 90. Because different APIs from thingspeak.com will have different api key rest of all the things will remain same.

Step 3

After that we need to request the api generated from thingspeak.com. As we want to get the data from the server, we will send a GET request. And the sequence goes like,

GET /apps/thinghttp/send_request?api_key=XXXXXXXXXXXXXXXX 
Host: api.thingspeak.com

So whenever you make a new api, just change the key and leave rest of the things as it is.

Step 4

After following all the three steps, you will get the data in response. But many times the we need to filter the required data from the response we get.So for that we need to filter the required data form the response. And this can be done easily through some of the commands of String which I have mentioned in the code.


             This is all you need to know if you want to  fetch the data from internet and use it further for your project. I have made one sample project so that it becomes easier for you to understand the whole concept. This is the same project on which I have recorded the video i.e. fetching data from website and display it on your touchscreen. 

             If you don't have touchscreen module, just filter out the required data and analyse the response from the server on your serial monitor.

If the concept is still not cleared than have a look to my video tutorial for this whole procedure. And I have also shared the Arduino code for the same.


#techiesms


Saturday, 26 December 2015

HeartBeat sensor


             "Heart Beat Sensor" sounds very complicated to be made.But its not the reality, it is the most simplest medical device to make at home using very few components.


Heart Beat Sensor


 Components required to make a Heart Beat Sensor are:-

Components
  1. Proximity Sensor
  2. LM 358 IC
  3. 4.7uF and 100nF Capacitors
  4. 47k,6.8k,680k, and 1k resistors.
  5. Some LEDs.

            
             First let us discuss the connection of the circuit. 
  • First we need to connect the proximity sensor with transmitter in forward bias and receiver in reverse biased. 
  • After that fed the signal of from the receiver to High Pass Filter.
  • Than amplify this signal by feeding the signal into Non Inverting Amplifier.
  • Output of the amplifier will be pulses proportional to heart beat.
  • If we want to fed the signal into controller, than we will require an additional buffer amplifier.

Circuit Diagram


Now, discussing some theory of this circuit. Logic behind this is that when our heart beats, the blood circulates in our body. Due to this, their is minute volume change of blood on our index finger. Hence when we place our finger on the proximity sensor, that sensor senses that volume change and gives signal accordingly.

But this signal is very weak to even drive an LED. Hence we connect an Amplifier to amplify this signal. On the output of the amplifier,we will get the pulses which will be proportional to the Heart Beat. Our Heart Beats will be indicated by the LED connected at the output. 

Further if we want to fed this signal into the micro-controller, we need to attach an additional buffer to this circuit. In the micro-controller we can code that controller so that we get exact value of our Heart Beat.


So this is all about making your own Heart Beat Sensor. You can even watch my tutorial video on this in which I have made this sensor using SMD components. The link of the video is mentioned below.

Make a one for yourself and if you like this project, than share it with others.






#techiesms



Thursday, 17 December 2015

SMART MANDIR's Journey


               The whole concept,working and public reviews are their in the videos. But I'll talk something about which is not their in the videos. Something like behind the scenes of  SMART MANDIR. I'll share my experience of making this project to reality.
            
          SMART MANDIR DIARIES




Navratri is on head. Think something innovative this time for the decoration of mandir.” My mother asked.

I started working on it. Initially, the only thing that struck the mind was to decorate the mandir, simply with LED strips along with arduino, coded with different patterns that run continuously. I was still not contented.

“How about a high end humanoid robot that offers prasad to all devotees, same as my mother do after aarti ends???” I thought.

Finally, I came up with an idea.
I remembered a line follower car which could work as robot in my project. I started thinking about how to arrange things that would amaze all. Many ideas and thoughts crowded the room of my mind.

It was time for some action.
I called up my friend AKSHAY who is a great coder and a great Techie. We discussed lot together regarding the project and it was no time for Navratri, just 2 days left.

 Firstly, we completed the creative part - decorating the mandir. It was already one day down; we started working on the second part of our project - the core part i.e. Coding and Debugging.

Every great idea requires great efforts.

We tried numbers of codes to make our project look automatic and hassle free. We failed every time trying new codes.

As great THOMAS A EDISON said, “Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.”
We tried once more and not ended trying till we got it. Finally, the idea turned to reality.

I looked at my friend AKSHAY, we smiled…


Two days of hard work, two days of dedication, two days of creativity and coding, two days for ‘SMART MANDIR’.

#techiesms

Friday, 11 December 2015

E-Wand

         
  I was thinking of making something like magic using electronics. And the rest is history.


You must have seen Harry Potter movie, in which Harry used to do magic by just  pointing towards the things. And inspired by this, I with the help of my friend made the magical wand name E-wand the Electronic-Wand. Use this wand to turn On and Off the appliances by just pointing towards them. Just like Magic.......

Story behind this is that, I was thinking of a project that feels like magic. Thinking under this topic I came with an idea of making a wand just like that we see in animation movies or like one the magicians have inside the wand will be electronics part like a sensor which will provide the coordinates,a micro-controller which will control all the functions and a RF section which will communicate with other devices.

I discussed this idea with my friend Akshay, he suggested me using Smart phone and its inbuilt sensor instead of that wand because making the controller,sensor and RF module to get fit inside the thin wand would be quite difficult and complicated. So we went through research that how we can access our Smart phone's sensor for our use. We cam across an app named SENSODUINO through which we can send the data of our inbuilt sensors to the controller via Bluetooth. This is all we wanted at the transmitter part. On the receiver part i.e. appliances , we have connected a controller, Bluetooth module and a relay module. After doing simple programming our so called E-wand was ready for doing magic.


Sensoduino

https://play.google.com/store/apps/details?id=com.techbitar.android.sensoduino&hl=en

e-wand
https://www.youtube.com/watch?v=xoR3jrqzHOs

#techiesms