Archive for the ‘Micro controllers’ Category

Installing latest arduino on Ubuntu 14.04

April 9th, 2016 Comments off

I have been   tinkering with NodeMCU devkit boards recently. The easiest way to program these little beasts is to use arduino platform and install the compilers and other tools from . Unfortunately the stock arduino shipped with ubuntu 14.04 is quite old.  You need a recent version of arduino  software. to get the esp8266 board working.

Here is what I did.

Removed the existing arduio installation

My nodeMCU collection.

My nodeMCU collection.

$ sudo apt-get remove arduino

Download the appropriate arduino software from  This is available for both 32 bit and 64 bit editions.  Choose the correct version.

The arduino software platfrom is written  in Java. So install java runtime.

$  sudo apt-get install openjdk-7-jre

Unzip the arduino software  and move it to an appropriate location. I moved it to  /opt.

tar -xJf arduino-1.6.4-linux64.tar.xz
sudo mv arduino-1.6.4 /opt

Add appropriate path to .bashrc file.

I added PATH=$PATH;/opt/arduino-1.6.4/bin. Change it according to your arduino location and version.

Open a terminal and execute the new arduino.

Categories: Computers, Gnu/Linux, Micro controllers Tags:

Plug and Play DDS VFO with arduino

December 7th, 2013 Comments off

I have been trying to program  cheap Chinese DDS modules recently.   I wanted to  add a DDS VFO to one of my bitx rigs. These modules are available  at $4.5 from aliexpress. They claim that it can work up to 40Mhz.

I used an arduino Uno along with a rotary encoder for  controlling the module. The DDS module pin out is shown below.



The connections to arduino and rotary encoder is  shown below.





You can download the code hosted on github from  here. 

The code is for 40m VFO    with IF of 9Mhz.  You can easily modify it for other  bands and IFs. Additional functions can be programmed easily.

The DDS modules  are available on line form from many sources. The rotary encoder can be obtained from element14.



My letter to BSNL

September 10th, 2009 9 comments

I have a land line connection at home.  It is from  BSNL, the state owned Telecom giant in India.  I am too disgusted with their service and shot of the following email today to all publicly visible BSNL officers.   Let us see whether email work in India.

The exact nature of the problem cannot be described in words , so calling customer care is useless.  See the pictures below to have a general idea of problems with my  BSNL land line. I live in a urban area. If the connection is like this in a city,  the situation  in villages will be much more pathetic.

BSNL phone line  -Open junction  box on the pole

BSNL phone line -Open junction box on the pole

Hanging wires coming to my home

Hanging wires coming to my home

BSNL style copper pair joints

BSNL style copper pair joints

How to join two cable  - BSNL style

How to join two cable - BSNL style

Nodal Officer
Public Grievances
Kerala Circle BSNL

I am an unfortunate customer of BSNL having the land line no. 0471-xxxxxx . This phone has never worked for 3 days at a stretch. The connection coming to my home is hanging on the poles and is within the reach of even small children. Every time a vehicle passes the cable breaks. There is no RJ 11 outlet inside the house. The connection to the instrument is given is the most unprofessional manner.
I have booked umpteen number of complaints . Each time they come and cut the overhanging cable and fixes it . In effect , if I want to make a call I have to go to the neighbour and file a complaint first.
Dejected and disgusted with the kind of service and the personnel dishing out the service, I am surrendering the phone. I know emails wont work in a government company like BSNL, so I am CCying the mail to all addresses that I can find right from your minister to the local exchange. So please excuse me if you have received this mail in mistake.

Also, I am writing an entry in my blog on the status of Consumer Satisfaction in BSNL. Please read it here.   I have some interesting pictures too.
Thanking you for the services rendered so far.

Yours faithfully

Sunil T T

CC to,,,,

Update :  4pm September 10 2009

There seem to be some  one who is reading email in BSNL.  I got the following e mail  one hour back ( I am removing the persons name and phone no.)

to me

show details 1:56 PM (1 hour ago)

Sir This is in acknowledgement to ur detailed mail and blog.Ur grievance has been registered in Circle PG cell vide KRL/CO/2009/14224 and a detailed report is avwaited after redressal.If you dont mistake kindly wait for surrendering ur telephone connection as your grievance has been borught to the notice of all concerned .The inconvenience caused is regretted. and  we assure our best services always at our level.Tou can track  the status of your grievance on line on website or by feeding the above docket Number and first two letters of your name ie “su” .

Assistant General Manager (PG)
O/o CGMT, BSNL Kerala Circle, Thiruvananthapuram-33
Tel.: 0471-xxxxxxxxx,   , [12727 (Toll free)]
Fax : 0471-xxxxxxx, Mobile: xxxxxxxxxx
email :

But wait,  look at the web links they have forwarded.

This gave me an address not found error.  May be our assistant  general manager has mistyped it. I also make mistakes. It seems they have know idea about the  .in domain

I looked at the other  URL  and got the following screen.

BSNL Grievence online

BSNL Grievence online

Let us see how it turns out.

Update : 11 am 11 Sept. 2009

A line man from BSNL appeared today. He was looking violent.  I had warned my wife and children about a possible attack from BSNL personnel.

He pulled down two leaves from my coconut tree . See the picture  below. Tried to fix some joints.

Cocunut leaves Pulled down by BSNL

Coconut leaves Pulled down by BSNL

Finally , he located the fault to one of the joints that I posted yesterday. The original  joint was replaced with the joint give below. This is inside the house.  I think , I have to take fire insurance for  the house thanks to BSNL.

Oh!  I forgot to mention , BSNL  it self is providing insurance . See this .   How   thoughtful  they are, expecting  this kinds of hazards for the customers.

New generation BSNL wire Joints

New generation BSNL wire Joints

He then replaced the original phone with another. Now , the phone is working.  But the overhanging wire and the open junction box remains the same.    My phone works for  now and possibly it will work  till this evening .

I used to use dial up internet some time back. I plugged in my lap to the line and tried to access internet .  As expected the data rate is  some thing like 1bit/sec.   The idiots manning the lines have no idea how I use the  phone. For them , phone is just for making local calls. No wonder people are massively surrendering  land lines.  Hail reliance and Tata, at lease their personnel are user friendly.

I am sending the following email to BSNL so that my complaint is not closed prematurely.


Dear Madam,
They fixed the phone . I have posted some more pictures for your kind reference on my blog. Also, posting them to my twitter account and other activist group  emails. I know your men will close the complaint immediately .   I have got this kind of fix several times already .  I want a permanent solution to the open DP and  the wire joints.

Thanking you for the services rendered so far.

Yours faithfully

Sunil T T

Update: 14th  September 2009

I got another email from CMD bsnl as below.  This seems to be a routine reply.

Dear Sir,

We acknowledge receipt of your mail. The same has been forwarded to KERALA

Telecom circle / Telephones for necessary action with intimation to you.

With Kind  Regards.

AGM (Cordn. – I)


Update :19 September 2009

Great going with BSNL.  A lady claiming to be Sub Divisional engineer visited my home just now. She was accompanied by a few other staff looking sullen. I showed her the entire problem and told her that the cable is patched at several places and that I am unable to access dial up.   She advised me to take BSNL broadband . I thanked her and told that enough is enough  with BSNL.  She was on the verge of  argueing with me .   I showed her the open junction box (DP) and told her that any kid can pull it out.   She said that is none of my b

Categories: Living in India, Micro controllers Tags:

How to become a certified (Pseudo) Free software Activist

January 5th, 2009 7 comments

My recent posts on the state of free software in Kerala,  have drawn flak from several pseudo free software activists.  Some of them have even called me an agent of Microsoft.  I think this post is going to generate some more heat and the pun is intentional.

Recently Kerala State IT mission and  C-DIT have launched a new initiative called Centre for advanced  training in free and open source software(CATFOSS).  You can read about the objectives of the centre in this lenghty article.  ( Google  cache here)

Last week CATFOSS  announced admission to a six  month training program in advanced free and open source software.  As an academic, I was interested in this novel program. I looked at the website and discovered  several interesting information.

<Quote from CATFOSS>

In order to resist this process, two decades back, Mr. Richard Stallman founded the Free and Open Source Software (FOSS) movement in 1983. As the name FOSS itself implies, the ideology behind the FOSS movement has been that the fruits of the ICT revolution should flow freely among the users of this technology, the world over

<Quote from CATFOSS ends>

As far as I know, RMS has some objections to  Open Source  Software. Look at his article “why open source misses the point of free software” .

I was educated in a Government school and my English is not very good.  Still, I will recommend the website as an excellent model for precise writing . See this.

<Quote from CATFOSS>
One of the major problems the State government had to face in the process of to propogating FOSS was the lack of trained human reources and non-availability of FOSS based tools. Thus, the Centre for Advanced Training in Free and Open Source Software (CATFOSS), proposed to be initiated by the end of November 2008 at Ernakulam in the ITes Habitat in collaboration with Kerala State IT Mission (KSTIM) and Centre for Development of Imaging Technology (C-DIT) will unquestionably be a courageous step and perhaps the first of its kind in India to develop highly qualified manpower who can enrich the applications of FOSS based software tools in a time bound manner, thereby bridging a very crucial gap in the e-governance sector and IT industry in Kerala and elsewhere.

<Quote from CATFOSS ends>

Brochures and websites show you only the tip of the iceberg. Let us look at what else  CATFOSS offers.  If you are interested in the  recently announced  Advanced Training in Free and Open Source Software,   you can apply online here.   ( Google cache here). The course fee is only Rs50000/- and employment opportunities are very good  even during  the current recession.  The seats are limited,  so rush your application.

Let us see what you will learn. The prospectus is here.  (Google Cache here)

< Quote from Prospectus>

The curriculum at CATFOSS will have the following objectives :
a) Introduction to free software ecosystem, its philosophy and technical aspects.
b) Empowerment to spearhead free software projects.
c) Thorough knowledge in free software development work flow.
d) Indepth knowledge in designing, implementing, deploying and maintaining a free software
based solution for the society.
<< Quote from Prospectus ends>

Wow! Lot of advanced things to learn.  Is there any company recruiting  Free software activists? May be the  Kerala government can accommodate some. Who else ? God only knows . We, keralites  are living in God’s  own country.

There is a bonus. CATFOSS will teach you soft skills free of cost along with the course.  Look at the academic committe who formulated this crap.

Finally, how much public money is needed for this. Only  82 lakhs. 😀 .

Free software enthusiast of Kerala , wake up.  There is a new course designed for  you. You can become  a Free Software Activist in six months. Results assured. Rush the seats are limited.

Update: The  CATFOSS site has been take down. The google cache is here. I am adding relavant links from google cache.

Building Bitx part 2- The crystal filter.

July 15th, 2008 Comments off

The 10 MHz crystal filter is one of the most important modules of bitx transceiver. Bitx uses an IF of 10 MHz. 10 MHz crystal filters are available at approximately Rs10 ( 1 US$ = Rs40 approximately) in the Indian market. I bought 10 crystals from a local electronics shop. The first thing I did was to number the crystals with a marker pen.


I wired up the following circuit (as described in Farhan’s website.

I didn’t have 680pf in my junk box I used 560pf capacitor. The circuit was built on a small PCB as shown below.


The Test Circuit


The crystal test circuit wired in ugly style

Then I measured the frequency of the oscillator. My readings are tabulated below.

Crystal no Frequency in MHz
before closing the
Frequency in MHz after closing the switch
a 9.99531 9.99819
b 9.99535 9.99809
c 9.99553 9.99832
d 9.99560 9.99835
e 9.99547 9.99818
f 9.99558 9.99809
g 9.99530 9.99810
h 9.99560 9.99824
i 9.99567 9.99827
j 9.99587 9.99814
k 9.99582 9.99815

As per Farhans advice I choose 4 crystals that are matched.

Then I built the filter as shown below.


The filter half built.


10mhz filter completed.


10 MHz filter fixed to a small PCB for testing.

I have the following test set up in my shack.

a) a frequency counter. ( A beautiful piece of equipment I bought form vu2ptr during ham Fest.)

b) A DDS vfo

c) An oscilloscope.


My Test Setup

I terminated both sides of the filter with 200 ohm resistors and then the DDS out put was fed to the filter. The DDS frequency was varied and the filter output observed on the CRO. I have taken readings at 100 Hz apart. I plan to plot a curve using gnuplot tomorrow.