All posts by Utkarsh

Solution designer with Firstsource solutions. A post grad in Networks and IT Infrastructure. Technology enthusiast, blogger, webdesigner, Network security aspirant and in love with electronics and gadgets. This blog is an attempt to share what I find interesting... almost anything @Mtaram on twitter and

Unobot 1–My First Bot


My first obstacle avoiding bot based on the tutorial by Community of robots.

This is my first one and helped me learn a bit about sensors, feedback and servo operations. One difference in mine is the use of IR proximity sensor which I had lying around instead of the Sharp distance sensor.

This one does not measure distance and just detects the obstruction. That is why if it has a obstruction on both left and right it turns right. Idealy it should turn towards the farther one.

This one has been made from simple L293D based driver on a breadboard and DC motors on a half chassis of a line follower bot Smile

The code is the exact copy paste from the tutorial just to see if this thing works and it did, you can see in the vdo below. Would be making some changes to the structure and the software and post soon.

LASER Projector

laser circleI was fascinated by LASERs when I first went to IIT Kanpur during my school days. Since then I have been reading / playing a lot with LASERs. My first one was a LASER trip wire and then a LASER pattern generator. It all was around 10 years back. Having recently acquired an Arduino UNO a plethora of options have opened up. I have started to learn from the beginning and this time I have the power of a microcontroller with me. !0 years back these things were hard to find and were freaking expensive and I didn’t have a sponsor 😛

Now I play around with stuff and fund my own projects. I have recently made a dice and a digital thermometer just to learn the new way of doing it.

Next was this LASER Projector (pattern generator to be precise). It involves two DC motors and L293D as a motor driver.

I customized the Motor driver circuit for speed control with Arduino PWM.

The table shows the connection details.


Two push buttons were added to control the speed of one motor. The other one rotated with a constant speed. One PWM pin was used to control the LASER as it gets too hot when switched on continuously.

The photo below shows the setup (Not very neat though)


Source code


int motor1pin1 = 5;  //define digital output pin no.

int laser = 12;  //define the pin for laser output PWM.
int motor1pin2 = 6;    //define digital output pin no.

int speedpin1 = 3;     // define analog output pin no.

int motor2pin1 = 9;                  //define digital output pin no.

int motor2pin2 = 10;    //define digital output pin no.

int speedpin2 = 11;   // define analog output pin no.
int up = 1;  // define pushbutton pin no.
int down =2; // define pushbutton pin no.
int factor =32; //define speed control variable

void setup () {
pinMode(motor1pin1,OUTPUT);        //set pin 3 as output

pinMode(motor1pin2,OUTPUT);        // set pin 4 as output

pinMode(motor2pin1,OUTPUT);        //set pin 3 as output

pinMode(motor2pin2,OUTPUT);        // set pin 4 as output



void loop () {



Arduino – Digital Thermometer

LCDs facinate me very much. The second thing I did with my Arduino and the 16×2 LCD was to hook it up as per this schematic and try to say hi 🙂

Then I used the same logic to display the temperature.

Things used for this project are

  1. Arduino UNO
  2. 16×2 Hitachi compatible LCD
  3. LM35 Temperature sensor

This tutorial was used for the project.

The LM35 was wired as shown in the figure.

The major challenge faced during this project was writing the float temperature to LCD. There seems to be some issue with converting float to string in Arduino. After a lot of search I stumbled across dtostrf(). This funciton converts any floating boint number to a string of difined length with defined precision in a predifined buffer which can be printed on the LCD via LiquidCrystal library’s lcd.print().

Video of the thermometer

Source Code (modified)
//TMP36 Pin Variables
#include <LiquidCrystal.h>
#include <stdio.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int sensorPin = 0; //the analog pin the TMP36’s Vout (sense) pin is connected to
//the resolution is 10 mV / degree centigrade with a
//500 mV offset to allow for negative temperatures

* setup() – this function runs once when you turn your Arduino on
* We initialize the serial connection with the computer
void setup()
lcd.begin(16, 2);
Serial.begin(9600);  //Start the serial connection with the computer
//to view the result open the serial monitor

void loop()                     // run over and over again

//getting the voltage reading from the temperature sensor
float reading = analogRead(sensorPin);

// converting that reading to voltage, for 3.3v arduino use 3.3
float voltage = reading * 5.0;
voltage /= 1024.0

// print out the voltage
Serial.print(voltage); Serial.println(” volts”);

// now print out the temperature
float temperatureC = (voltage -.05 )*100 ;  //converting from 10 mv per degree wit 500 mV offset
//to degrees ((volatge – 500mV) times 100)
int decimal,fraction;
char temp[5];

//Serial.print(temperatureC); Serial.println(” degree C”);

lcd.setCursor(1, 0);
lcd.write(temp);lcd.write(” degree C”);
// now convert to Fahrenheight

float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;

//Serial.print(temperatureF); Serial.println(” degrees F”);

delay(1000);                                     //waiting a second

Arduino – 7 segment Dice

I have been waiting to play with embedded programming since and recently ordered an Arduino. I tested the spare LCD and displays with the normal tutorial commands and went step by step remeber the thing about slow and steady!

I want to build a vector LASER projector and a quadrocopter someday but that is too far. It is kind of my VISION. My Mission is to learn embedded programming via arduino.

It is one hell of a kit.

My very first experiment was a 7 segment dice.

It is a very simple project. Doenst require much and all the thing were in the kit that I ordered.

Still following is the list of what I used:-

  1. Arduino Uno
  2. 7 segment display RED
  3. Breadboard
  4. Jumper wires
  5. Push Button switch

The schematics for the display and Arduino I/O used by me are as follows

Arduino Pin 7 Segment Pin Connection
2 7 (A)
3 6 (B)
4 4 (C)
5 2 (D)
6 1 (E)
7 9 (F)
8 10 (G)
9 5 (DP)

I used a normal routine from one of the websites to cycle through the numbers 0 to 9.

Then I reduced the delay to have the numbers roll faster and faster.

Then I reduced the count from 9 to 6 (a dice has only till 6 and 0 was left just for fun).

Then I added a push button and added in the code to detect the state of the button.

When the button is pressed the state of the pin goes LOW and at that point I had programmed the loop to display the dot and pause for 2 seconds.

CATCH: The numbers scroll so fast that all we see is scrolling segment. And when the button is pressed the current number just paused for 2 seconds and then it starts again.

No random number generation 🙂

Video of the thing in action

source code (modification of sample code)
// Arduino 7 segment display example software
// License: (Go crazy)

// Define the LED digit patters, from 0 – 9
// Note that these patterns are for common cathode displays
// For common anode displays, change the 1’s to 0’s and 0’s to 1’s
// 1 = LED on, 0 = LED off, in this order:

//                                    Arduino pin: 2,3,4,5,6,7,8
int inPin = 1;
int val = 0;
byte seven_seg_digits[10][7] = { { 1,1,1,1,1,1,0 },  // = 0
{ 0,1,1,0,0,0,0 },  // = 1
{ 1,1,0,1,1,0,1 },  // = 2
{ 1,1,1,1,0,0,1 },  // = 3
{ 0,1,1,0,0,1,1 },  // = 4
{ 1,0,1,1,0,1,1 },  // = 5
{ 1,0,1,1,1,1,1 },  // = 6
//{ 1,1,1,0,0,0,0 },  // = 7
//{ 1,1,1,1,1,1,1 },  // = 8
//{ 1,1,1,0,0,1,1 }   // = 9

void setup() {
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(inPin, INPUT);    // declare pushbutton as input
writeDot(0);  // start with the “dot” off

void writeDot(byte dot) {
digitalWrite(9, dot);

void sevenSegWrite(byte digit) {
byte pin = 2;
for (byte segCount = 0; segCount < 7; ++segCount) {
digitalWrite(pin, seven_seg_digits[digit][segCount]);

void loop() {
for (byte count = 6; count > 0; –count) {
val = digitalRead(inPin);
if (val == LOW)
sevenSegWrite(count – 1);


Why investors are not making returns in the stock market the last 10 years, sensex gas grown at 17.79% CAGR. That means, if someone could have invested Rs. 1 lac 10 years back, it could have grown to 5.14 lacs. In the last 10 years one third of diversified equity mutual funds have delivered a CAGR of more than 25%. That means if someone could have invested 10 years back in these mutual funds Rs.1lac, it could have grown to Rs.9.31 Lacs.

But how many investors have REALLY got these kinds of returns…?

In this context knowing about the study conducted by Dalbar to determine how the investment behavior and decisions impacted the overall investment performance would be advisable. Dalbar, Inc. is a US based leading financial services market research firm. They have done comparative study on the returns of S&P 500 Index and the returns of the investors for a 20 year period ending 31-12-10.

The study revealed the following two important facts.

  • The average return of the S&P 500 during this 20 year period is 9.14%.
  • The average return of the equity investor during the same period is only 3.27%

When the market is delivering so much, why is that the investor is making out less? What are all the factors contributing for this gap in the market returns and the investor returns?

Though the market is delivering returns, investors were not able to benefit. Why is it so? What went wrong?  It is because of the nature or character of the investor.

Agriculture is getting affected by nature, either because of excess rain or no rain.  But we found out a system to fight against this nature. We built dams. So whenever there is excess rain, dams retain water to save agriculture and whenever there is no rain, it releases water to help agriculture.

Similarly investors are supposed to find and build a dam against their nature and behaviour towards stock market investing in order to get better returns.

What are the natures or behaviours of an investor that blocks him from getting the market return?


When stocks suffer large losses for a sustained period, the overall market can become more fearful of sustaining further losses. At that point in time everyone will come with their own logic, reasoning, and statistical evidence on the chances of further losses. Fear stands for “False Evidence Appearing Real”.


Most of us have a desire to acquire as much wealth as possible in the shortest amount of time.  This get-rich-quick mentality makes it hard to maintain gains and keep to a strict investment plan over the long term.

An investment portfolio based on ones personality

Basing investment portfolios on one’s personal likes and dislikes are the first of the powerful influences. It is like investing in cars and fancy gadgets just because you love them. Investing on shares just because you think they are smart or flashy is ambiguous, for they could sink in the long run. It is better instead to invest in profitable ventures that pay in the long run. It is true; our investment fancies make us pay a heavy price.

Follow the flock policy

The follow the flock for fear of being the black sheep policy makes you as an investor to believe in following others in the share markets. The pitfalls of group behavior lead us to buying high and selling less.

It also leads to unbalanced investment emotions of black or white (wrong or right) with no shades of objectivity and rationality. Buying high and selling low has made many investors suffer heavy losses in the long run.
A look at positive investment behavior:

It is good to be investment smart with humility and reasonable aspirations that makes achievement of financial goals a reality. I have never known of any high return investments that did not have high risks.

Patience over a lifetime and being able to assume stress helps in aiming for long term positive returns and contributes to assuming less financial stress after retirement.

Positive investment behavior requires balanced moods, one of neither elation nor panic. Neither selling in a panic due to share market positions or adverse world or country conditions is advisable, nor is a reaction of extreme financial prosperity, both can destroy a lifetime of healthy investment. A long-term investor needs to realize that neither despairing nor elation of situations in civilization proves worthy for long term financial portfolios.


(The author is Ramalingam K, an MBA (Finance) and Certified Financial Planner. He is the Founder and Director of Holistic Investment Planners ( a firm that offers Financial Planning and Wealth Management. He can be reached at

Anna Hazare Fasts in Mumbai for Better Lokpal

Anna Hazare Tuesday started a three-day fast for a strong Lokpal, while Prime Minister Manmohan Singh defended the government’s proposed ombudsman following an opposition onslaught.
As MPs furiously debated the pros and cons of the Lokpal bill in the Lok Sabha, Team Anna urged Parliament to dump the proposed legislation, saying it was too weak to combat the cancer of corruption.
Intervening, the prime minister insisted that the bill lives up to the promise MPs “collectively made to the people of the country” with a ‘sense of house’ resolution in August when Hazare fasted in Delhi.


A Study on Physical Gold and Gold ETF

Stock Market has lead to tendency of many to go in for much safer investments that gives a reasonable return. This is the reason for gold gaining popularity as one of the safest avenues for investment.

Gold has always held importance as a good investment proposition since the days of our ancestors. But the recent trends of daylight robbery, murders and greed for the precious yellow metal with the difficulty of storage and safety of physical gold had made gold a cumbersome proposition. In addition, fraudulent and not uniform practices followed by jewelers and difficulty in establishing the purity of gold contributed to the popularity and desirability of gold ETF’s.

Gold ETF’s or gold exchange-traded funds are instruments investing in gold of 99.5% purity. Investing and maintaining these funds just required demat account and a trading account with a registered stockbroker. Gold ETF’s are more ideal than physical gold due the following reasons:

¨     Gold ETF’s are investments in gold of 99.5% purity only. It prevents one from falling into the clutches of some jewelers that fool customers with smooth and artistic talk. This avoids chances of misplacement of trust, as only a goldsmith could find out the exact purity.

¨     Owning something virtual like gold ETF’s does away with the difficulty of storage and security experienced in possessing physical gold. The units of gold ETF’s can easily be stored in both demat and trading account without being known to the greedy, cheaters, robbers and looters. A word of caution here, you could be sure of it all when you keep your units in accounts with privacy of user name and password.

¨     Gold ETF’s are most ideal for small investors as they can be purchased in small denominations sometimes of even 1 gram or ½ a gram. So ETF’s can be bought easily in small installments regularly and increased in the virtual form. This advantage is not available when investing in physical gold.

¨     Low cost, with affordability in dealing with gold ETF’s contributes to their desirability over physical gold. These instruments are listed in exchanges; the exchange traded mechanism helping to reduce processing charges, disbursements and collection charges. Gold ETF’s also help do away with the carry charges in gold futures.

¨     The ease to convert gold ETF’s into liquid cash easily at real time prices on the stock exchange avoiding charges like commission, and unnecessary fuss over quality and price by jewelers make them a desirable investment. This makes buying and selling these units easy.

¨     Right and uniform pricing in Gold ETF’s offered no scope for price discrimination that is experienced in encasing physical gold at the jewelers. One lacking knowledge and experience in dealing in gold would do best to invest in good gold ETF’s.

¨     Gold ETF’s offer protection from the liability of taxes. The taxation system for gold ETF’s is similar to non-equity mutual funds. One only needs to pay the lower of the two, long-term capital gains tax of 10 per cent without indexation or 20 per cent with indexation on profits made.

¨     Gold GTF’s are likely to show lesser tracking errors as compared to normal funds as the creation and redemption of units are done with units of the same type. This accounts for lesser liquid cash being required and the short time interval between buying and selling of units.

However some may disagree with me and say that the psychological satisfaction of seeing and feeling physical gold in the physical form is important and gold ETF’s are a fictitious concept. It is purely a question of ones own perception, but I would strongly contest gold ETF’s if investment, safety and security is ones objective.

If you keep gold in the form of ETF, you will not have any emotional attachment towards that. You will really consider it as an investment. If you need money for buying a property or kid’s higher education you will feel free to encash it. But in the case of physical gold, we will not be prepared to sell it because we will have emotional attachment towards physical gold.

So, Gold ETFs are the better way to invest in gold.

Understanding Form 16

Most of us are aware of Form 16 given by our employers before April 30th each year that give details of the income earned, and tax deducted at source and paid to the government. This certificate proves useful in filing income tax returns. In addition banks also issuing Form 16 and Form16A to pension holders and those that earn interest income, with no Form 16 required when TDS is not deducted from salary. Knowing about Form 16 helps us to be a well-informed taxpayer and do better tax planning.

The 13 components of Form 16 are:

PAN that stands for Permanent Account Number, a 10 digit alpha-numeric code that is generated by the Income Tax Department of India. It is mandatory for everyone- NRI, PIO & companies that wishes to conduct business, file and pay taxes, invest, buy and sell property, open a demat or bank account to have this number in India. The need

TAN is best known as Tax Deduction and Collection Account Number is another mandatory 10 digit alpha-numeric number that is very necessary for all persons and companies that are responsible for collecting taxes. It proves useful to note that this number is unique in case of different companies.

Gross salary, the common term used in practice includes all regular incomes in an employee’s remuneration. It would include allowances, overtime pay, commissions, and bonuses, with all other amounts before the deductions are made.


It is best to know that perquisites are just additional benefits in addition to the fixed salaries. Known popularly as perks this term could include rent free accommodation, loans at subsidized rates and others.

Profits in lieu of salary are just payments given instead of salary that is given by at or in connection with retrenchment or termination of employment. This item forms a part of taxable income and includes gratuity, commuted value of pension, retrenchment compensation. However the contribution made by the employee or interest thereon is not taxed.

Next allowances in Form 16 are certain payments made or allotted to employees for bearing of certain expenses. It could include allowances like medical allowances, and travel allowances that are generally taxable in the hands of the employees.

House rent allowance or HRA In Form 16 refers to a special allowance paid to employees to meet the cost of housing. There is tax exemption on HRA and it is limited to the least of either the HRA received from employer, or rent paid in excess of 10% of the salary, or 50% of salary in metropolitan cities and 40% in other cities. The term salary here includes basic, dearness allowance and other commissions put together, this exemption not available to those that do not pay rent.

It is best to understand conveyance allowance as an allowance paid to an employee to meet commuting expenses between his/her home and place of work. There is a maximum exemption of Rs.800, with a special provision for an orthopedically handicapped employee until Rs.1600.

The term medical allowance paid for medical treatments and medicines is fully taxable. However reimbursement of medical expenses against submission of bills could get you a maximum exemption of Rs.15000 annually.

The allowance received to employees for entertainment services or entertainment allowance is allowed as a deduction for government employees. However in other cases one can avail of deduction as a least of actual allowance received, or 1/5th of salary excluding all other allowances and perquisites or Rs.5000.

Deductions as in Form 16 is given as an incentive given by the government to invest in certain long term savings schemes. This includes long term savings for retirement, insurance schemes and others that give tax breaks.

All taxes in India are subject to an education cess that is 3% of total tax payable. This contribution is made towards the Secondary and Higher Education development in the Indian economy.

It is lastly important to understand the relief granted to employees when salary is paid in arrears in a lump sum best known as Relief u/s 89. This includes salaries received in arrears/advance, family pension received in arrears, retirement benefits such as gratuity, commuted pension, VRS and retrenchment compensation.

Understanding your form 16 helps you in many ways like planning for taxes, filing your income tax and so on.


The author is Ramalingam K, an MBA (Finance) and Certified Financial Planner. He is the Founder and Director of Holistic Investment Planners ( a firm that offers Financial Planning and Wealth Management. He can be reached at

Insurance For Home Makers

It has always been a question of common belief that the male member or the bread winner of the family only needs to be insured. This belief has emerged due to the fact that the financial interests of the other dependent family memebers had to be protected in case of death of the bread winner. However changes of lifestyles and with more women being employed in lucrative professions both in big cities and towns the perception of insurance has changed.

In addition the entry of many MNC-Indian insurance joint ventures, and their bringing out unique solutions and products, it is time that we all looked into taking insurance policies for home makers too. Home mekaers have been neglected all these years with regard to insurance.

It would be interesting to study why home makers too need insurance:

  • It is significant to note that in a country like India, homemakers contribute to households in the form of cooking, education of children and other menial work. But their importance and value of services evaluated in monetary terms is greatly neglected. It is true that the absence of these services on the death of the homemaker a big financial impact on lower and middle income families.
  • Another noteworthy factor that places a value on insurance of homemakers is that they provide great counsel to their spouse and children. So losing them would mean that lots of money would have to be spent on counseling services proving that loss of love and companionship is priceless.


  • It is also true that no one could replace a home maker mother and her loss could make it difficult to get competent and loving people to look after the family and children. It is also significant to note that the cost of competent daycare centers could be high and the cost of not insuring a home maker in lower and middle income families could be pretty high.
  • There is a money value behind each and every household work performed by the home maker. In case of any eventuality to the home maker, one need to shell out more money to upkeep the house in order.


Considering various aspects like paying expenses out of the pocket, remarriage and insurance, insurance proves to be the most reliable and safest solution. The insurance cover should be proportional to the amount of financial loss that would be suffered or through a need based cost replacement analysis.


In addition to insurance to guard against financial liabilities in case of death of a home maker it is vital to also plan for a dream retirement home and college education funds through various insurance linked plans.


Health insurance:


It is also true that insurance needs to be taken for critical illness, prolonged illness, accident or a major hospitalisation for all family members. It would also be beneficial to take health insurance policies early in life to gain benefits like full cover of all ailments and lower premium.


However each family could have their own unique insurance needs, so taking the advice of a trusted financial planner in the form of an insurance advisor or trusted bank would help. They would render you correct information, best skills and advice based on your family’s financial circumatances, priorities and risk profile.


Insurance for the whole family also requires that all the adult family members be fully aware of all the insurance policies taken, their benefits and exclusions and where they are kept. Having an open discussion about long term savings and insurance plans both for the bread earner and home maker and for children build a better family understanding and bond. They also convey the message that proper life insurance coverage should form an integral part of financial planning in families.


The author is Ramalingam K, an MBA (Finance) and Certified Financial Planner. He is the Founder and Director of Holistic Investment Planners ( a firm that offers Financial Planning and Wealth Management. He can be reached at


Galaxy Nexus: Android with a soul

Like the T-1000 standing in a sea of Arnolds, the Galaxy Nexus is better, faster and smarter than any other Android phone on the market.

Not that current Android phones fall short in machine power. Rather, much like the androids of the silver screen, the operating system has been the weak point. Previous versions of Android have lacked some intangible spark. A human element, perhaps — a missing je ne sais quoi that has been keeping many critics and users from fully engaging with the platform.

It’s a debatable point, but I’d argue that “special something” can be found in Android’s biggest competitor, Apple’s iOS. Siri, the voice-activated digital servant on the iPhone 4S, is a great example of a feature that marries technical prowess with a human touch: We speak to “her”, not to “it.”

Android, on the other hand, has always been sold on the strength of its robotic nature. Power, hardware specs and hackability were the reasons why we were supposed to buy an Android. It’s not a posh concierge, it’s a Swiss Army Knife.

But with the Galaxy Nexus, Google has put a little soul into the machine

Read more @ Wired