Sunday, January 24, 2010

A satisfying weekend.....

I have always had this inner feeling that I must develop all kinds of practical technical skills and learning, which will help me in dealing with theory better. And finally I had a satisfying weekend with respect to this wish of mine. I made my first home made PCB. The circuit was that of the USBasp-a popular and simple USB based programmer for the AVR family. Refer this link for more info.http://www.fischl.de/usbasp/. And all this..thanks to the friend who I consider as my electronics guru since my juniour college days-Tushar. He is the most down to earth person with the most of the electronics knowledge on this earth, according to me.
It began with a bit of planning on my side(thank you!), wherein I fixed this weekend for this activity, after a lot of procrastination. So Saturday morning, me n Tushar swooshed to Lamington Road- for those who do not know, it is THE place in Mumbai where all kinds of Electronics components reside. Tushar was walking through the lanes there, as if he owns them-after all, he knows most of the shops there, knows where you will find a particular component cheap. He has been going there regularly for the last 5 years. So basically I was lucky. Unfortunately we landed when the shop shutters were still sleeping. These guys are damn lazy. Always remember, if you want to go to Lamington road, be there after 11 am. Sunday closed. First Lesson for the weekend learnt.
You will find that a layout is already available for the circuit on the webpage that i referred to. But I did not want to copy it. So I made my own layout in Eagle along the week and made a list of components to be bought. I bought the components and the PCB fabrication materials required(Ferrous chloride, copper cladded PCB, drill and drill bits). We planned on working on it on Sunday morning, since we had to report to office and also had planned a visit to Elecrama2010. The Elecrama thing did not prove to be very useful, since we reached there when most of the stalls were winding up.
Come Sunday, we start off by printing the layout on a paper and then ironing it out on the PCB. After 4 unsuccessful trials, we learnt that a glossy paper(like most magazines have) is better for taking a print. a laser printer is mandatory. After ironing it out on the PCB, we dipped it in the ferrous chloride solution-all thanks to Tushar who has performed this process numerous times. After minute observation learnt that few tracks had merged, so had to separate them out using a blade. Drilled holes into the PCB(in the process, broke two drill bits), mounted the components and we were ready to go. But it did not work at first go. Again minute observation showed that a track was open. Bridged the track and hurrah....the programmer was born..........I have not grossed over the process details. You will find many Youtube videos on DIY PCB fabrication. All this made us again lose out on the last day of Elecrama2010, since we reached there an hour before the thing started closing. But all in all, it was a satisfying weekend for me....hope to have many such ahead.....Ohh..btw forgot to tell you that the first four unsuccessful printing trials made us think that perhaps my layout was faulty, and we reverted back to the one available on the webpage. So the one working now does not have the artwork done by me. But I am sure my design would also work. I will have that one printed too in the near future....and now heading for the week ahead.....

Speed Breakers

Somehow I have this thing about weekends. Guess, it is bcoz it is the only time in the week when I get to introspect. And this intospection can be killing, mind you. When the mind falls in a thought trench, it is difficult to climb up and come out of it. And in such cases, to the rescue come THE WEEKDAYS. Think of it as a road with speed breakers. You keep going fast, when suddenly you hit a speed breaker(in this case periodic ones). You go slow over them to speed up again. Is speed good? Dunnno..Would weekdays be good had they been like weekends..a BIG NO. But I miss the introspection on weekdays.....Thank God, they both exist...

Sunday, November 15, 2009

weekend ends...

Another weekend going by... I always end the Friday thinking I will do something exciting this weekend, learn something new, just anything that could help me widen the supposed-to-be "eyes of the mind". However, it always remains a mystery how the weekend goes by. So what did I do this weekend. I do not know..read a few random technical articles which tickled a nerve or two in the brain to be settled again as it was. Hmmm... well yeah, I saw Taare Zameen Par(TZP famously)
for a third time. The magnitude of tears being the same everytime I have seen it. It was shown on the local cable channel courtesy Children's day. The only message I get from the film is "Stop forcing your children to perform. Just encourage them and they will perform on their own."-a very important one. Even today a play was telecast called "Shyamchi Mummy"-a similar topic but showcasing a very opposite view. It must be a 6-7 years old play, when HSC exams were very critical for further admission.In this play, what happens is that the guy who is studying for the HSC is bullied badly by his mom who is bent on wanting to have him in the list of merit rankers. He hates doing all this, following schedules etc.. There's hell lot of jokes in the middle of how he tries to relax but ends up getting caught by his mom. But in the end, everything is happy since he tops the merit list. The messages from both these media quite clash and they only highlight the fact that it is the competition that is killing. I remember how when in school, getting the top rank was important...to me. It was only because of the importance that I attached with that position which made me frantic about getting it. I do not know how it became important for me. Maybe it was because of the praise that I was subjected to in school and at home whenever I scored it, that made me go for it everytime. But just out of school and going for IIT coaching and then juniour and engineering college proved to me how all these marks stand no value, especially in an Indian education system. I found out how I had forgotten sharpening my skills while running in the very local competition of the school. I found out that there were many more students coming from other schools who have scored maybe a below 10th rank but are truly talented and have nurtured their talents instead of running in the race and that is very important. I struggled to find out my interests after SSC, which would not have been the case had I considered many years ago. In fact I would have been much confident in the course that I enrolled, because till then the thought that it is the goal of life would have made a far greater impact in my mindscape. This is what I have learnt from my schooling years and wish to share with everyone. I feel the competition is important, but currently the competition is about something superficial, something tangible. What would be of much more help is if the competition is about bettering oneself internally, strengthening oneself internally, about making principles clear. And that, that would be a competition of oneself with oneself. This is what I have been telling whoever I meet, whoever I know who is yet to experience all this. And even if you have already lost all these crucial years like me, better late than never. Start it today, now. Strive for self betterment, strive for others to be better too...and then let people connect like systems....as the IBM ad goes....when systems connect the world gets smarter.

Thursday, November 12, 2009

I M BAK!!

My thoughts really seem to have gained some inertia....a long time since i wrote something..Anyways, it's been such a strange transition from the college days to the ones in my first job. Having this inertial mind as is, now a days, it's always filled of things about office. Back in college, it used to be about friends, family and studies. Quite literally. Just few weeks back, I realised that this has changed. And the thing to trigger this realisation was the fact that I had forgotten the birthday of my best friend....sad...indeed...But this is not always the case.. weekends is when nostalgia strikes and it strikes badly and yet you can do nothing more than chatting or a mail to dress it superficially.

Monday, June 15, 2009

FAT filesystem

In this post I have tried not to mention a lot of specifics, giving only an overview of the FAT filesystem. I know it's not very well written, but please bear...promise to get better with time.
The FAT file system actually refers to a family of filesystems consisting of the VFAT, FAT12,FAT16,FAT32, the numbers indicating the number of bits used to indicate the cluster number(FAT32 is an exception). The name comes from the logical structure that the file system uses-the File Allocation Table. This filesystem was used by DOS on the first IBM PCs and became a standard for the PCs that followed. The file allocation table provides information about allocation units. Now where did they come up? Well, generally, we think of files to be referred by the number of sectors of size 512 bytes on the disk. However one can imagine the performance issues that will be encountered when keeping track of big files in terms of the sectors. Hence the idea to group sectors into bigger chunks called clusters. The process by which clusters are assigned to files is called allocation. Hence clusters are called allocation units ranging from sizes of 4 to 64 sectors.
Every file must be allocated an integer number of clusters. This means that if a volume uses clusters that contain 8,192 bytes, an 8,000 byte file uses one cluster (8,192 bytes on the disk) but a 9,000 byte file uses two clusters (16,384 bytes on the disk). This is why cluster size is an important consideration in making sure you maximize the efficient use of the disk--larger cluster sizes result in more wasted space because files are less likely to fill up an integer number of clusters. The cluster size is determined primarily by the size of the disk volume after partition: generally speaking, larger volumes use larger cluster sizes.
The structure of a volume that is formatted using FAT filesystem has the structure as shown:

| Partition Boot Sector | FAT 1 | FAT 2(Copy) | Root folder | Other folders and files |


The Partition Boot sector:
The Partition boot sector is the first sector on a logical volume. A logical volume may be a primary partition, or a logical volume within an extended partition or a composite of two or more partitions. This file system boot sector is different from the master boot record(MBR). MBR is the first sector on the whole hard disk, while the partition boot sector is the first sector on a particular partition within the disk. During the boot process, after the POST is performed, the BIOS first finds a boot device, then loads the boot sector of the device. For a hard disk,this is the MBR. The control is passed on to the MBR code. The MBR code helps to load the boot sector of the active primary partition. Upto this point the boot process remains independent of the file system or the operating system used.
Now in case of FAT volumes that have Windows NT installed, the FAT boot sector is responsible for identifying the location of the file "NTLDR" on the volume, loading it into memory, and transferring control to it. Since execution control is passed on to the boot sector, there is need for an executable to be present at its first location. This is generally a JUMP instruction that serves to jump over the following "non-executable" locations. Then comes the OEM id that identifies the operating system that formatted the volume. Following the OEM id, there is a structure known as the BIOS parameter block that provides enough information to the executable part to find the NTLDR. It consists of info like sectors per cluster, sector size, number of FATs(including the multiple copies), root entries etc. On a bootable or non-bootable volume, the BIOS parameter block is followed by execuable code. The last 2 bytes in any boot sector are always 0x55, 0xAA.

The File Allocation Table:
The file allocation table contains the following types of information about each cluster on the volume :

* Unused (0x0000)
* Cluster in use by a file
* Bad cluster (0xFFF7)
* Last cluster in a file (0xFFF8-0xFFFF)

To protect the volume, two copies of the table are kept, in case one becomes damaged. In addition, the file allocation tables must be stored in a fixed location so that the files needed to start the system can be correctly located.
There is no organization to the FAT folder structure, and files are given the first available location on the volume. The starting cluster number is the address of the first cluster used by the file. Each cluster contains a pointer to the next cluster in the file, or an indication (0xFFFF) that this cluster is the end of the file.

The Root Folder:
The root folder contains entries for each file and folder on the root. In the conventional FAT system, the root directory is fixed in place after the 2 FATs. The file system hierarchy is thus anchored at the root directory. Even the size of the root directory has a limit. It can a hold a maximum of 512 entries in case of an hard disk. This is in contrast to the regular directory that can be placed anywhere and can have a variable size. One of the improvements introduced in the FAT32 version of the FAT file system was to remove these restrictions on the root directory. Under FAT32, the root directory is treated much more like a regular directory, and can be relocated and expanded in size like any other. An entry in the root directory contains information like name, attribute, time and date when created, last accessed date, last modified date and time, starting cluster number in the FAT and the file size. A FAT file has four attributes that can be turned on or off by the user-system file, archive file, read-only and hidden.

The root folder is followed by the storage of the other files and folders.

FAT32:
FAT32 is a derivative of the File Allocation Table (FAT) file system that supports drives with over 2GB of storage. Because FAT32 drives can contain more than 65,526 clusters, smaller clusters are used than on large FAT16 drives. This method results in more efficient space allocation on the FAT32 drive. The FAT32 file system includes four bytes per cluster within the file allocation table. However, the high 4 bits of the 32-bit values in the FAT32 file allocation table are reserved and are not part of the cluster number.

Ref: http://www.ntfs.com/fat-systems.htm

Adding Categories to Blogs

In case you are wondering how I have got categories on my blog plage, just read this one. I was dying to write on different topics but the thought of putting technical things juxtaposed to travel ones or others made me think of starting another blog for a different topic. But I thought of googling...and bang...some guru has done it already..http://makemoneywithkassper.blogspot.com/2007/06/how-to-add-categories-to-blogger.html

To explain the process in brief, I will tell you how I did it. First make this html script ready in any text editor. For me the script is:

<h2 class="sidebar-title">Categories</h2>
<u1>
<li><a href="http://e-nertia.blogspot.com/search/label/Introduction">Introduction</a></li>
<li><a href="http://e-nertia.blogspot.com/search/label/Technical">Technical</a></li>
<li><a href="http://e-nertia.blogspot.com/search/label/Travel">Travel</a></li>
</u1>

Replace the "http://........blogspot.com" with your blog homepage link and change the names of the topics as you wish(for me they are Introduction, Technical..). Make sure that the term in the link and the actual label are the same.
Now go to the Layout Page. It must be showing a skeleton of your blog page. The part of it that shows your blog archive and profile must also be having a link "Add a Gadget". Click on the link . In the new window that opens, click on the HTML/Java script option. Paste the HTML script that you have written in the text editor into the content box. No title is required. Save the changes. Done.
Now whenever you are writing a post that belongs to a particular topic, write in the box for the label the exact category that you have made for it. So for this post i wrote the label as Technical.
Happy Organisation!!
The challenge I faced during writing of this blog was printing the HTML script as text to show you the script. I hardly have any idea of HTML scripts. I saw the page sources of sites that have showed examples of HTML scripts. So, as a piece of information, i have replaced all the > with &gt; and < with &lt;

Friday, July 18, 2008

Alibaug Chi Sahal

Alibaug was a unanimous decision for a 2 day vacation since the more our three brains thought, the more we were confused. We booked the ST tickets a day earlier. The bus left Borivali at 5:15 am and two of us boarded at Goregaon(W) and one friend boarded at Andheri(W). The stop is opposite to the Filmistan studio in Goregaon and it’s near the Andheri Post in Andheri. Finally the trip started for the three of us. We did start babbling about movies(comparing the Lord of the Rings and the Harry Potter one). But that ended as soon as the mountains and enchanting scenes began to appear. We reached Alibaug stand at around 9:30 am. Then we went to Alibaug beach, scanned it a bit, and found it not worth of staying. So we left and came back to Alibag stand. We took an ST to Kihim beach, since I had heard of a resort near Kihim from an acquaintance. It’s called Sannidhya resort and it’s approved by M.T.D.C. Luckily, the last stop of the ST bus coincided with the resort. It’s a nice place to stay, a quite rustic one. We freshened up and sauntered around the place to find something that qualifies as a breakfast item since we had nothing since morning. Finally we found a shop that agreed to make “kanda pohe” for us at 12 noon. An hour later, we had lunch. It was good, both veg and non-veg. While feasting on the food, we had a chat with the guy who was serving us, and came to know that there’s a museum by the name of Karmarkar Museum at Sasavne which houses human sculptures. So after lunch we headed to Sasavne for the museum. This museum indeed has some exquisite sculptures, but for us muggles, they all were quite the same. It was closed when we reached there and was opened only for us. After returning back to the resort, we had tea and immediately left to enjoy the Kihim beach, after all Alibaug is equivalent to its beaches. We were a bit surprised to find the beach deserted. It was just the three of us on the whole beach and two or three fishermen very far away from us. The waves were awesome, but one has to be careful about the rocks that line the beach, since they can elude one’s sight at high tide and can prove perilous. After being content enjoying the force of the sea, we made our way back to the resort. That night, when we were having dinner, the guy who served us asked us not to go to the Kihim beach since there was news that few tourists got stung by jellyfishes. We were shocked since we had seen hundreds of them lying on the beach and yet didn’t give it much importance. Lucky us!Next day, we left the resort and headed to the Birla Mandir. This temple is situated near Revdanda. It was a long journey from the resort but the sight of the temple was quite rewarding. It must be among the few well maintained temples in Maharashtra. A temple in marble, the structure is quite fascinating. The temple is actually at its best when the lighting and the fountains come on. It must be a great sight to watch but we found ourselves there at the wrong time. We did not even find the poojari since the temple was closed at 11 am and was to open again around 4:30 pm. After leaving the temple, we found out from the locals that there were two more places that could be visited- Korlai fort and Kashid beach- and we had to select only one from them. We came to know that the fort wouldn’t be accessible at this time of the year. So Kashid beach it was. Another two Vikrams to take us to Kashid beach. The Vikram is the 8-seater rickshaw that is very common in Alibaug, and is also seen in Pune. But as you know, we Indians are very efficient in the usage of space. So this 8-seater is sometimes used as an uncomfortable 10 one and one that we got into broke all records with a mighty 12.Before going for the beach, we had lunch in one of the ‘khanavals’ ,around 2 km from the beach, where we got to taste local sea food and after getting an idea about the bus timings, headed for the beach .We found the Kashid beach better than the Kihim beach. There are hammocks attached on the beach where you can rest. The overall scenery in and around the Kashid beach was indeed enchanting, with the white sands and the surrounding hills. Here too, we could see the jellyfish lying on the beach. Yet, we risked it to get into the water and it was quite fun. Finally, we headed back to the stop but found that a bus had just passed and the next one to Mumbai would be after an hour or so. So, instead we got into a Vikram and went to the Alibaug stand and boarded an ST bound for Mumbai Central. It was a bumpy ride back home with a backseat in the ST, but with lots to talk about, it hardly matters where you are.........

Routes that we took:

Karmarkar Museum: From the resort->walking upto Chondi naka->Vikram to Sasavne

Kihim beach: 2 mins walking from the resort

Birla Mandir: From the resort->walking upto Chondi Naka->Vikram to Revdanda->Vikram to Birla Mandir

Kashid Beach: From Birla Mandir->Vikram to Revdanda->Vikram to Kashid beach

Some tips:

We felt that we should have come to Kashid beach first. So it would be better to consider going to Kashid first and then to Kihim.

Be very careful of the rocks at Kihim. They get submerged under the water at high tide and some can be sharp.

Be sure to get a report of the marine life in the water before getting into the water. In our case, we were very lucky to have enjoyed unhurt, but no one can guarantee it everytime.

Happy Holidaying!!!!!!