Control Input Output of ESP8266 with AJAX

I used to brag about Arduino YUN being the IoT enabler. Then came along super cheap ESP8266 but there was an entry barrier to using it as it seemed like someone who is proficient in Electronics only could make it work. Then came companies like Adafruit, Sparkfun, etc who spoon fed the makers with a version of ESP8266 suitable to their skill level. Prior to this I wanted to experiment with it but never did. Then I procured 3 Adafruit ESP8266 Huzzahs and played with LUA programming. Arduino IDE supporting the ESP8266 was icing on the cake as anyone who has worked on Arduino could now work on ESP8266.

Although I have a degree in Electronics Engineering and have done programming in school and college, I have never worked in that field as I work on Computer Networks. I consider makers to be “Jack of all trade, Master of one”, so rather than learning all technologies associated with making, it is helpful if you get related stuff from people who have already done it. So when I find something which has not been documented and can be helpful to others, I write about it. If you have read my post on “Control Input Output of Arduino Yun with AJAX“, I wish to achieve something similar in this article. This post could not have been possible without the help of “ESP8266 Tutorial” as working with YUN HTML is easier than working with HTML on ESP8266. YUN has a separate HTML file and INO file. ESP8266 is having just one file and to put tons of HTML code in it is difficult. The above mentioned article describes how to easily do that.

Continue reading

Web Controlled Power Strip using Arduino Yun and Yaler

With Data becoming a major Asset in the Internet generation, it has been stored at locations called Data Centers. Managing the equipments which hold the Data is simple as they are accessible over the Internet. If you are aware of how electronic peripherals work esp. related to computers, you will know that every once in a while they malfunction and need to be rebooted. The problem is that in most cases these devices don’t respond so rebooting them in a conventional way is not possible. The only way to restart them would be power cycling the device. This would not be much problem if you have a manned Data Center or you have remote hands and eyes support. The problem is when you have a malfunctioning equipment at a place where there is no one to look after it. At such times, an IP PDU (Internet Protocol Power Distribution Unit) can be very helpful. This is a Power Strip which you can control over the Internet to power cycle devices plugged into it. In this article, we will look into how to use an Arduino YUN to make an IP PDU aka IP Power strip aka IP Power extension. The reason I am making this is because with Arduino YUN “I have got the Power”.

Continue reading

Arduino YUN powered Home Surveillance Rover

In a previous article (Internet of things), we looked into how to make a Web Controlled Mobile Home Surveillance rover. In this article, we will look into how to optimize the previous rover in every ways possible.

Disadvantages of Rover V1
1) The cost of building the rover was exorbitant. There were many circuits involved which could have been avoided.
2) There was an additional cost involved and this was the power cost. In order to power these circuits, many power supplies were required because every circuit had different voltage and current requirements.
3) Another factor was that the HTML used to control the rover was coded without AJAX which meant every command required whole page load. This caused many requests to the Rover to be skipped as the Wifi shield was not able to handle it and controlling the rover was very difficult.
4) As the eye of the rover was through Raspberry Pi camera and control was through Arduino, the viewfinder and control page were different and hence navigating the rover was difficult.

Advantages of Rover V2

1) The cost of building the rover was brought down as instead of 4 boards (i.e. Arduino UNO, Arduino Wifi shield, Arduino Motor shield and Raspberry Pi), only 2 boards sufficed (i.e. Arduino YUN and Arduino Motor shield).
2) Power cost has been reduced as only 2 boards have to be powered.
3) Controlling the Rover has become very smooth as AJAX requests are very efficient and the YUN handles these very efficiently.
4) The viewfinder and Controls are on the same page using iframes.

Arduino Yun Rover Continue reading

Web Controlled Table Lamp using Arduino Yun and Yaler

Anyone reading the title will definitely wonder why a Table Lamp would ever need to be switched On or Off via the Internet. Well, until unless there is something so special with a Lamp being On or Off, there is no reason for a Lamp to be controlled via the Internet. The logic here is that if you can control a Lamp over the Internet, why not any other Electrical appliance? You can control your home cooling or heating, you can control home lighting when you are on vacation (to simulate that the house is still occupied), you can check whether you have kept an Iron switched On or not, etc. According to me, the biggest product Arduino has come out with is the Yun. It is like the controller meant for Internet of Things. Just add a relay to it and you can control any Electrical Appliance over the Internet. Continue reading

Control Input Output of Arduino Yun with AJAX

Arduino has gone totally IoT with the Arduino Yun. It has both Wireless and wired connectivity options. IoT doesn’t necessarily mean that it has to deal with Cloud drives, automated inputs, automatic backup to SQL database, etc. It can also mean that your inputs and outputs are user controlled albeit over the Internet. In my previous project, I made a rover which would be controlled by a web interface. Since the webpage was designed such that it would load the whole page depending on each user input (this is how HTML works), many times the http request would timeout as the Arduino was not able to process whole page loads. I had to find out a way in which the web page would not have to change each time I changed the direction of the rover. This is where AJAX comes into picture. What AJAX enables us to do is send a request to the Arduino and get a reply from the Arduino while not requiring a page reload. Since I learn stuff as and when there is a requirement, I scoured the Internet for folks who had already implemented such a thing. The only article on the Internet which dealt with Arduino Yun and AJAX was “Interact and remotely control Arduino YUN with Ajax” by Boris Landoni. Continue reading

Web Controlled Mobile Home Surveillance

This project is very close to my heart as since I was a child, I used to play with electronics. I used to open them up and desired that one day I would be able to understand it and make things like those. I remember making a torch light when I was a little child but since I didn’t know much about switches, my mother remembers that the torch remained on throughout the night until the battery drained away. I was born to be an engineer but when I graduated from engineering, I learnt nothing. Now 10 years after completing my engineering, I got inspired Aragon style “Become whom you are born to be” and I started to reignite my passion for electronics. I put all my expertise of electronics and robotics which I DIDN’T learn in college and came up with this Arduino and Rapberry Pi powered Web Controlled Home surveillance rover. I have burnt a lot of cash on procuring the components as many were not locally available and little less than equivalent amount on the shipping.10498567_699067163464425_3428803516225232023_o Continue reading