Posts

Automatic Hashtag Maker for Newsbot

Image
Newsbot is a twitter-bot which tweets news headlines from various verified news sources. To increase its reach and engagement I had created a rudimentary version of an auto-hashtag maker. The algorithm is very basic. It just crawls the URL of the article and filters out the stop words (Eg: to,an,a,the..). It then analyses and sorts the words based on their density. It then compares these words with the once already in the headlines and if there is any match, it uses the matched word as the hashtag. Nothing fancy. It did its job of increasing the views per tweet and added some followers too but most of the hashtags were totally hilarious.

As you can see above, the hashtags were not at all informative. But sometimes this method did give an average hashtag... And sometimes pretty good ones too... As this algorithm does not take into account the importance of words in shaping the meaning of a sentence, it doesn't make powerful hashtags. 
The 2nd version, which the Newsbot now uses, ut…

Cluster Analyser: A K Nearest Neighbours Based Classifier

K nearest neighbors  is one of the most popular classification algorithms. I just happened to create my own version of it to understand how it works and ended up with a simplified version of KNN that is easy to use and pretty accurate.

https://github.com/theroboticlab/Cluster_Analyser

Photon: A Simple Analog Line Follower

Image
The robots that I build do not stay for long as I dismantle them and use their parts to build other
projects. Actually I do that to save money and whenever my friends ask me to show some of my robots, I am left with nothing. So I decided to build a permanent robot that I can show to my friends and relatives if they ask me to do so. I wanted to keep the robot as cheap and simple as possible so as to not hamper other projects. I decided to build a simple line follower as line followers, though simple, are very entertaining to watch.

SensorsPhoton had to be cheap so I decided to use LDRs and LEDs to build a line sensor. The principle behind its working is very cheap, white reflects light whereas black not so much. I used white LEDs to allow Photon to follow any colored line on a contrasting surface. 




Motors I used geared motors in Photon because they are cheap, provide sufficient torque and draw sufficiently small amounts of current under load.


Brain I had to keep the main circuit cheap so…

How does the Movie Search Engine work?

Image
Recently I put together a Movie Search Engine that has built-in Sentiment Analysis that reads the reviews for the movie and gives the rating accordingly. The rating also takes in some other factors. Its built using php. It was just a fun project and was very quick to build because of some excellent APIs.

The site uses the TMDB API for the posters and OMDB API to get the IMDB ID and the user rating. I used a web scraping to collect user reviews from IMDB using the collected ID. If a movie is searched for the first time on the search engine, it stores its details locally on the server to decrease the load time when the movie is searched for again.

The disadvantage of using 2 different APIs for searching a single movie is that sometimes the poster and the movie doesn't match, but I had to use both the APIs as the OMDB API doesn't allow poster access for free. IMDB doesn't allow its poster to be used.

For the sentiment analysis I used the PhpInsight Library. It was very easy to…

Choosing a battery for your robot

Image
One of most difficult things that you may face while building a robot is not just the circuit or the program or the mechanics but the power-source. You would want to invest on a reliable power-source that you can use for a long time in a number of projects. I personally dealt with this difficulty a lot of times and in some cases I had to stop the entire project midway due to the lack of a good power-source.

Always look out for these 2 things while selecting a battery:- 1. The capacity (Usually given in mAh) - If a battery as 2200 mAh capacity it means the battery has the ability to deliver 2200 mA (2.2 A) for an hour. (This figure is not always accurate and is mostly observed only under laboratory conditions.)
2. Voltage - Voltage determines how well the battery can push the robot (symbolically and not to be taken seriously). Higher voltage means the battery will be able to deliver the current more easily against resistance.
Alkaline Alkaline batteries are the most abundant and easy t…

Jarvis: An Arduino Based Home Automation System

Image
I was inspired by Jarvis from the Iron Man and strongly wanted a home automation system. The existing systems were not cheap so I decided to build my own home automation system using an Arduino. At present its functionality is limited to switching the devices on or off but it can process natural language at a very basic level that allows you to use this technique to incorporate natural language processing capabilities into other Arduino projects. CAUTION: I DID NOTtest this project with real world appliances and if you are planning to do so, do it at your own risk. I strongly advice a professional electrician's help in doing so. The project is fairly simple in terms of the things required.ArduinoBluetooth Module (Preferably HC-05)LEDs (For prototyping) x 4BC-547 transistors x 410k and 150 ohms resistors x 4 eachRelay Board (Optional, only if you are serious about installing Jarvis in your home)Power supply (I used a powerbank and a 9V battery)Wires and BreadboardAn Android phone …

Arduino logobot

Image
I had built a simple robot whose movements can be programmed through four switches a long time ago. I had recently written about it on instructables.

Hello there! When Arduino released its robot I was particularly fascinated by the logobot sketch. I thought, logobot could be used to teach children about robotics and programming and they would also have a lot of fun with the robot. So I decided to build my own version of the logobot. Step 1: Materials This build requires:ArduinoL293D motor driver (You can also use a shield but you may have to tweak the code a little)5 pushbuttonsPerfboard / BreadboardMotors and wheels (You can also get a ready-made chassis that can be really helpful)Wires2 x 9 v batteries (one for Arduino and one for the motors) Step 2: Switches and Circuit