Archive

Archive for the ‘Tech’ Category

My first Robot - LFR (Pronounced ‘Loafer’)

November 16th, 2009

If there is anything that is considered a rite of passage among embedded hobbyists then it undoubtedly has to be the creation of a robot. A robot is not only challenging from the point of view of an embedded system designed to perform a particular function, but it also has mechanical and structural facets to it which makes it even more difficult.

But please do not assume the robots we hobbyists build would be even remotely smart and glamorous like R2D2 from Starwars or the three-laws-bound R. Daneel Olivaw from Asimov’s novels. In stead, our robots are from a much more humble origin; most of us are satisfied with simple line followers and object avoiders. Speaking of which, let me introduce you to my first robot, which I have christened, LFR - Line Following Robot - but you may call him Loafer in affection.

As the name says, this robot is programmed to follow a painted line on any plane surface using a sensing contraption. For LFR, I have used an ATmega32 - an ideal choice primarily because of its on chip debug interface. An endeavour as ambitious as robot building definitely warrants a good debug features.

For my sensor array, I have used two LDRs or Light Dependent Resistors and an LED to act as the light source which is used to shine the path of the robot. The light reflected from either side of the line is then measured and compared to decide which direction to turn the robot. The turning is achieved by using a differential drive i.e. a drive which turns the wheels independently of each other. An LM339 is used as a comparator chip and a ULQ2804A chip is used as the motor driver chip

The below schematic diagrams show how steering of the robot is achieved by using the LDR-LED sensor array. The diagrams show the cases when the robot moves in a straight line, turns left and turns right respectively. This is based on the amount of light reflected off the black painted line.

LFR - moving in a straight line.

LFR - moving in a straight line.

LFR - turning left.

LFR - turning left.

LFR - turning right

LFR - turning right

After the schematic diagrams, now here I present some actual pictures of LFR. Alas! I do not have any videos of this one. One issue which I found with LFR was that the entire circuitry along with its batteries was a bit too heavy for my motors to drive. So it moved rather sluggishly. This is one improvement which I have in mind for LFR 2.0 ;-). And in case you are wondering, for the line, I pasted some black insulation tape on my marble white floor.

So without further ado, here are some snaps of LFR. The first one is a labelled picture for the curious.

Labelled top view of LFR

Labelled top view of LFR.

lfr_side_view

Side view of LFR - notice the big tires.

If you are curious,  click here to see the ATmega32 C source code for LFR. As usual, with ATmega32, the code is extremely convenient. I used the avr-gcc toolchain to compile this and my own homemade JTAG debugger to debug my code. And yes, if you have seen the code then your guess is probably right, I have used PWM to control the speed of the motors here ;-) . Oh and probably you might have also noticed the JTAG debugger interface on the top right hand corner of the main robot board.,

So that was all about LFR - my first robot. It does not follow any of the three laws of Asimov, but yes it is nice to build your own robot, for fun as well as learning!

I hope you enjoyed this post. Stay tuned for more! Until the next time, g’bye and take care! And please do not forget to comment if you like this post.

admin Embedded Hobbyist, Tech , , , ,

gnuProload - an official introduction

November 15th, 2009

It has been quite some time (more than year) since I created my gnuProload software to program AT89S52 microcontrollers over Linux after reverse engineering an existing software which ran only on windows. But a few months ago, I enhanced that software to enable it to program even Dallas DS5000T microcontrollers.

If you want to know how gnuProload itself came into being, please read this post first. It is quite interesting, in case you are passionate about software in general and open source in particular. It tells the story of how I refused to walk into the trap of closed source software and how I was forced to reverse engineer a piece of software which ran only on windows (prior to my reverse engineering) ;-). In case you are wondering, the name of that post is derived from the critically acclaimed movie by Stanley Kubrick, Dr. Strangelove ;-).

Ok, let’s not digress. What happened was that sometime around August, this year, I was contacted by a fellow from Brazil who visits various universities giving lectures on embedded development on Linux etc. So he wanted to present my software in one of his talks. I was flattered, naturally :-). So I went ahead and created a set of slides for him to present it in his talks. In this post, I am just providing those same slides for you to go through. I hope these bunch of slides will give you more information rather than my original post about gnuProload.

So here it is, download and enjoy! Oh and by the way, you would need OpenOffice.org to view these slides. And if you are too lazy to download it, here is a PDF copy of it ;-).

Enjoy! As usual, don’t hesitate to put in your comments. Have a nice day!

~Seemanta

admin Embedded Hobbyist, My Creations, Tech , , ,

SEAShell - my new software for accessing Serial EEPROMs

May 3rd, 2009

Some time last year, I got myself  a few serial EEPROMs. As the name suggests, they are accessed serially using some serial protocol(usually SPI or I2C). Hence these serial  EEPROMs don’t have a parallel data/address bus that we normally associate with EEPROMs in general. Here is a photo of my SPI based EEPROM, a 25AA256 from Microchip.

Microchip_25AA256_SPI_EEPROM

Memory is written to and read from the EEPROM using a serial protocol, which may be SPI or I2C. I already wrote a post back then when I interfaced a SPI based serial EEPROM with my arduino board. This time, I have interfaced that same SPI based serial EEPROM(the microchip 25AA256 to be precise) with my Dallas DS-5000T microcontroller development board which has a DS5000T in it and that is basically a variant of the classic 8051 core. But alas! the DS-5000T does not support hardware SPI!! Hardware SPI means that you don’t have to implement the SPI protocol in software and by just setting up a few registers you can simply copy the byte in the output register and the microcontroller takes care of encoding each bit within that byte and sending it across the SPI bus. So that means that I had more work to do. I had to in fact implement the SPI bus protocol in software, which is also known by the term bit-banging. But before we discuss further let us look at how an SPI bus looks like:

SPI bus schematic

SPI bus schematic

As you can see, SPI works on a master-slave paradigm. The master is the one which initiates all data transfers. There can be several slaves on the same bus and the master has to select the slave it wants to communicate with by asserting the chip select line(also called slave select or SS line) of that slave. Here, SCLK stands for slave clock. The master has to supply the slave with clock pulses for it to work. MOSI means master out-slave in and MISO means master in-slave out. The former is used to transmit data from the master to the slave and the latter is used to receive data from the slave into the master. SS means slave select as indicated earlier. The slave would be active only when SS is asserted by the master by pulling it low.(It is asserted by pulling it low since SS is active low, indicated by the bar on top).

For more details about SPI, you can take a look at this Wikipedia link. The way my system is designed is that my DS5000T board acts my master which issues the EEPROM read/write commands. And the EEPROM itself acts as a slave. In order to communicate with the DS5000T, I use the PC serial port. The software that runs on my DS5000T, I call SEAShell -  or Serial EEPROM Access Shell. It is a shell in the sense that it allows you to read/write a particular byte within the EEPROM. Although I have not created a file system of sorts within my EEPROM, but that is an eventual goal. It would be really cool to have my own seemFS or Serial EEPROM Embedded Micro File-System. (I must add, I continue to impress myself with my cool names ;-) ).

So here is how my SEAShell setup looks like:

SEAshell_Schematic_Diagram

Schematic setup for SEAShell.

The circuit schematic of the connections between the DS5000T and the serial EEPROM is also very simple for this setup. It is so simple that I am not going to bother creating another drawing for it. The connections between the DS5000T and the 8 pin 25AA256 Serial EEPROM can be done as follows:

a) Pin 2.0 of  DS5000T –> Pin 1 of 25AA256 (/CS)

b) Pin 2.1 of DS5000T –> Pin 2 of 25AA256 (SO)

c) Pin 2.2 of DS5000T –> Pin 3 of 25AA256(/WP)

d) Pin 2.3 of DS5000T –> Pin 7 of 25AA256(/HOLD)

e) Pin 2.4 of DS5000T –> Pin 6 of 25AA256(SCK)

f) Pin 2.5 of DS5000T –> Pin 5 of 25AA256(SI)

g) Pin 4 of 25AA256 should be grounded.

h) Pin 8 of 25AA256 should be raised to VCC, +5 volts DC.

For more details about the 25AA256, you may refer to its official datasheet here.

The connection between the PC and the DS5000T board, of course uses the MAX232A level shifter(since RS232 voltage levels are not TTL compatible) and a few 10 uf capacitors. That is a standard connection and a bit of google can tell you how to interface a MAX232 IC with a serial port.

On the software side, I have written two programs for this:

a) SEAShell.asm  : An assembly language program for the 8051 that is burned into my DS5000T development board (using my very own gnuProload software, of course!). The job of this program is to provide an interface to the human user through the PC serial port to allow the human user to interactively (or in an automated way), read/write data into the Serial EEPROM. The source code for SEAShell.asm can be found here.

b) SEAShellUtil.c : A C language program that utilizes the automated mode of SEAShell.asm and can be used to read/write big files into the serial EEPROM. This is needed because we cannot expect a human user to type in several thousand bytes in case he/she wants to write them into the EEPROM. The source code for SEAShellUtil.c can be found here.

So my complete SEAShell setup comprises of the following  components:

a) The DS5000T development board. Note that any 8051 compatible microcontroller can be used because my SEAShell.asm uses only standard 8051 assembly language, no fancy 8051 variant specific things are used. Here I used my DS5000T because it was convenient for me. I could also have used my Atmel AT89S52 here.

b) The software consisting of SEAShell.asm and SEAShellUtil.c

c) The Serial EEPROM itself, which is a 25AA256. You can use any serial EEPROM which is based upon SPI. But you would have to modify the page size within the SEAShell.asm and SEAShellUtil.c code. Also find out whether the EEPROM accepts data MSB first or LSB first and then modify SEAShell.asm accordingly.

d) A simple serial port communication software like minicom (on Linux) or HyperTerminal(on Windows). Note that, SEAShellUtil.c would run only on Linux. However, you may try out the interactive mode of SEAShell.asm on any OS that has a serial port communication software(like minicom or HyperTerminal).

Here is a photo showing my hardware setup for SEAShell:

SEAShell_hardware_setup

Photo showing hardware setup for SEAShell.

The EEPROM can be seen on the right hand side fitted in a small ZIF socket. My DS5000T board can be seen on the left. Still further to the left you can see the serial port DB9 connector which connects to the PC on the other end. Also above the serial port connector is the small USB connector that supplies power to the DS5000T development board directly from my PC.

And to clarify matters more, here is a screencast which shows SEAShell in action:

I hope you like this post about SEAShell. As usual, do write in your comments and suggestions. Your comments go a long way in inspiring me to create more such stuff ;-) !

Until next time, this is Seemanta saying good-bye to you all and take care!

admin Embedded Hobbyist, My Creations, Tech , , , ,

10 cool Ubuntu applications to boost your productivity.

March 26th, 2009

I have been using Ubuntu for quite some time now and am quite hooked onto it. I like Ubuntu for its simple yet clear looks, ease of software installation and ease of customization all at the same time. Here is a list of 10 cool Ubuntu applications which will boost your productivity.

Note that, this is a subjective list based on what I feel would be productive. Your opinion and mileage would vary based on your personal taste and priority of what you like to do with your Linux box. Also note, all these applications referred here are based on an ‘Intrepid Ibex’ installation.

1. Terminator:

screenshot-seemantavyasa-tmp-terminator

Terminator is a replacement for the gnome-terminal. I personally used gnome-terminal but ever since I came across terminator, I have been using it, forgetting gnome-terminal in the process. The main difference between terminator and gnome-terminal is that terminator supports splitting the terminal window into horizontal and/or vertical sub-terminals AND tabbed terminals while gnome-terminal ONLY supports tabbed terminals.

Installation:

sudo apt-get install terminator

The way I use terminator is to create a permanent ‘root’ window so that all commands that need to be ’sudo-ed’ can be directly given here. Remaining windows are created on a need basis to work on non root stuff.

Usage:
Once installed, it would appear in Applications->Accessories->Terminator, in the gnome desktop environment.

Link:
http://linux.softpedia.com/get/Terminals/GNOME-Terminator-29392.shtml

2. Gnome do:screenshot-1

Gnome do is a kind of keyboard based program launcher(similar to the popular launchy application in windows). You can summon Gnome do with Win+Space keyboard combination and type whatever application you want to fire up. Gnome do performs an intelligent match based on your application usage pattern and then you can ‘do’ it or in other words, execute it.

But the best reason to gnome do is its new docky interface that comes with version 0.8.0 onwards. In my opinion, this is the BEST gnome dock I have ever seen. Do not want to sound demeaning to the popular AWN and the Cairo dock, but gnome do docky is the best dock out there. First of all, docky is not as slow as AWN and the effects are much more slick than Cairo dock. Also configuration of docky is MUCH simpler than configuring the Cairo dock. And it runs fastest out of the three. Way to go, docky!! Below is Gnome do in ‘do’ mode where I summoned it by typing Win+Space and just typed A N J U. It matched that with the Anjuta IDE. Pressing ‘Enter’
key here launches Anjuta.

screenshot-2

Installation:

sudo apt-get install gnome-do gnome-do-plugins

Usage:
Once installed, it would appear in Applications->Accessories->Gnome Do, in the gnome desktop environment.

After launching, a nice looking dock comes at the bottom of your screen with all the application icons.
You can press Win+Space to summon the ‘do’ interface and summon any program to execute. Please note however, by default Gnome do won’t come up in docky mode right after installation. You need to change its appearance from classic mode to docky mode in its ‘Preferences’ tab.

Link:
http://do.davebsd.com/

3. Screenlets:

Gnome screenlets is Linux’s answer to the popular desktop widgets that you occasionally see in Windows, whether from Konfabulator or the native ones in Vista. I tried many ’screenlet-esque’ packages like gDesklets, aDesklets etc. but screenlets stole the show. Main reason is it is MUCH more stable and usable than gDesklets or aDesklets. Besides, if you know python, writing new screenlet becomes a breeze.screenshot

In fact the package includes an ‘example’ screenlet that does not nothing but is a skeleton python screenlet script that you can modify to create your screenlet within minutes. It’s open source, dude! Enjoy!

Installation:

sudo apt-get install screenlets screenlets-doc

Usage:
Once installed, it would appear in Applications->Accessories->Screenlets in the gnome desktop
environment.This brings up the screenlet control center so to speak, from where you can centrally control the
activation/deactivation/configuration of all screenlets. There are a plethora of screenlets too, right from
weather, to calendar to CPU meter and what not.

Link:
http://screenlets.org/index.php/Home

4. Devhelp:

If you develop applications in the gnome environment, then chances are you must yearn for a centralized place for documentation. Nah, I am not speaking of man pages that can be viewed in the terminal , but specific documentation like glib APIs or LibGlade APIs. Then devhelp is the right application for you.

screenshot-gtk-reference-manual-gtkwindow-1The best part is, as and when you keep installing different gnome libraries and their associated documentation using apt or synaptics paackage manager, it keeps on adding those documentation packages  into the devhelp library.  That way, you always have a centralized repository of information at your fingertips. Happy hacking with DevHelp!

Installation:

sudo apt-get install devhelp devhelp-common libdevhelp-1.o

Usage:
Once installed, it is accessible from Applications->Programming->Devhelp

Link:
http://live.gnome.org/devhelp


5.  Tilda:

Ok, so you need to access the command line ever so often for doing some of your tasks through the command line. But you think that clicking on the minimised terminator icon or gnome-terminal for that matter, is time consuming and sucks. Never could have agreed more ! I agree for some time consuming tasks it might make sense to click on the minimised terminator icon, maximise it and do your work. But for giving simple one liner commands that becomes an overhead. That’s where I use Tilda. I summon tilda to do normal routine stuff like delete a particular folder, create symbolic link etc.. However, when I think that I would be using the terminal for some extended period of time, then I use terminator.

screenshot-3

If you have played games like Quake or Doom then you would remember that pressing the ’tilde’ key would cause a game console to drop down where you could give in-game commands or chat with your teammates over the network. Tilda does exactly that. Press the ’tilde’ key and voila ! A terminal drops down where you can do all your neat stuff. Done? Press tilde again and there it vanishes leaving you to work with whatver you were doing. It is so non-intrusive and yet always there for you to summon it, whenever you need it. This happens to be one of my most often used program in Ubuntu. In case you are wondering why ’tilda’ is not called ’tilde’ and called ’tilda’ instead then as per the website, it seems ’tilde’ name was already taken in sourceforge when the author registered his software.

Installation:

sudo apt-get install tilda

Usage:
Tilda runs in the background by default pressing tilde(~) summons tilda.  Presising tilde key again sends it back to the background.

Link:
http://tilda.sourceforge.net/wiki/index.php/Main_Page

6. Tomboy:

While on the gnome desktop, you may have needed to take notes on certain things. Well, use tomboy for that. Ah, you would say, whats so special about a note taking application. Well for one, in tomboy you can link your notes. You can have a main note, and then each link in your main note can be a hyperlink opening another sub-note and so on. Secondly, if you modify the link in the sub-note to correct a typo or any other reason for that matter, tomboy would automatically rename the link in the main note. Neat, eh? And if that’s not all, tomboy also enables you to synchronize your notes at a centralized web server ! Check it out for more details.

screenshot-41

Installation:

sudo apt-get install tomboy

Usage:
Once installed, accessible from Applications->Accessories->Tomboy Notes

Link:
http://live.gnome.org/Tomboy

7. Nautilus scripts:

Nautilus is the default gnome file manager. If you install these scripts in nautilus, you can multiply your productivity a million times because you can achieve almost anything just by right-clicking and then selecting things like, open command prompt here, archive file, extract here etc. This greatly enhances productiviy as this screenshot will illustrate. There are literally a plethora of options available when you install these scripts and not just the three examples mentioned above.

screenshot-file-browser-1

Installation:
Download and follow the instructions mentioned in the below link.

Usage:
While in the file manager, right click and select the script you want to execute. Above screenshot will clarify better.

Link:
http://g-scripts.sourceforge.net/

8. Preload:

Preload is an adaptive read-ahead daemon that is designed to decrease the load time of software. It is adaptive because it analyzes your application access pattern and then caches those applications in RAM so as to decrease their load times. As per reports I have heard, it leads to as much as 30% decrease in load times. I have indeed observed faster load times for Firefox after installing preload.

Installation:

sudo apt-get install preload

Usage:
Nothing. Preload is a daemon which would run at startup once you install it. So, just install and enjoy faster load times !

Link:
http://www.techthrob.com/2009/03/02/drastically-speed-up-your-linux-system-with-preload/

9. ffmpeg:

Want to rip out the audio of a video file you have? Want to add an audio track to a video which does not have sound? Want to convert your AVIs into flv format before uploading them to youtube? Want to transcode from ogg video format to AVI? You just think of it, and ffmpeg does it! It’s a swiss army knife for all who want to transcode video files.

screenshot-seemantavyasa-hb-terminator

The only minus is that its plethora of options can scare away the casual user. But there are a host of sites which would give you a quickstart guide sort of thing to get started on ffmpeg the quick and dirty way. If you are curious, in the above screenshot, I am inserting an audio mp3 track(audio_track.mp3) into an ogg video file(out-9.ogv) and then encoding the resulting output directly into flv(audio_video.flv) format. Above,  you can see ffmpeg at work as it outputs its progress.

Installation:

sudo apt-get install ffmpeg

Usage:
Are you kidding? There are so many options for ffmpeg that I can’t even dare to put them here. Try out this link to get a feel of the power of ffmpeg. ffmpeg is a command line application accessible from the bash prompt once installed.

Link:
http://ffmpeg.mplayerhq.hu/

10. VLC Media player:

This is another must have application on Ubuntu. I have seen VLC player able to play almost any *damn* format on my Linux box. It supports so many formats that you would lose count if you try to remember each one of them. VLC player truly and undoubtedly remains the video media player of choice for me on Ubuntu. In my opinion, having VLC player is productive because you install it once and then forget it and any other codec-not-found woes ;-)
screenshot-monsters_incmp4-vlc-media-player

Installation:

sudo apt-get install vlc

Usage:
Once installed, it is accessible from Applications->Sound and Video->VL Media Player

Link:
http://www.videolan.org/

So there, I have reached the end of my list. I hope installing these applications proves to be a real productivity booster for you just as it has been for me. If you enjoyed reading this post or it proved useful to you, then I would love to hear more from you. Leave a comment/question/suggestion/whatever for me to read on my blog.

So much for this time, see ya around!

admin Linux, Tech, Ubuntu , , , ,

Fun with the Maxim DS5000T microcontroller

March 19th, 2009

A few months ago, I got myself two DS5000T microcontrollers. DS5000T is a popular product from Maxim semiconductors. It is (yet) another microcontroller based on the 8051 core. However, it is much advanced than plain 8051s or even the very popular AT89S52 microcontroller.

A very special word of thanks to Maxim who made the free samples of DS5000T available to me free of cost. In the market they cost about 50 USD each. Without their support I would not have been able to make this project. So thank you, Maxim ! :D

So here is how a DS5000T looks like:

IMG_0649

The DS5000T is considered advanced because it has an in built serial bootloader within it as well as its entire RAM contents are backed up even when you do not connect power. This makes it one of the most expensive 8051 based microcontrollers out there today. Because of the serial bootloader, we do not need any specialized programming hardware to burn the microcontroller. All we need to do is connect the microcontroller to a PC serial port and then follow a particular protocol and then send the hex file we wish to burn in it using that particular protocol. The bootloader accepts the data stream through the serial port and performs in-application programming of the device, thereby programming our hex file in it. Oh and did I mention it has an inbuilt real time clock as well ?

When I got these DS5000Ts, I at once set out to create a sort of development board for it. I was lucky to come across this link which gave the complete schematic for just such a thing. So I went ahead and created my board. Here is a snap of it:

img-0642

On the left hand side, you can see two connectors. The bigger grey one is the RS232 or the serial port connector. The other end of it goes directly to my laptop. Well, not exactly since I do not have a serial port on my laptop. It actually connects to the output of my USB-to-Serial converter.

The smaller white one is the USB which powers the development board. On the top there is a small slider switch which is used to switch the board from programming mode to run mode and vice versa. All these details would be explained in the forthcoming video.

The big black IC that you see at the center is the DS5000T. It is somewhat bigger because of the fact that the DS5000T is completely based on NV RAM which is maintained by a small in built battery. This battery maintains the program as well as data contents for as long as 10 years. So technically, this microcontroller does not have any flash ROM or EEPROM. It contains NV RAM only, all of it. The NV RAM can be partitioned and a part of it can be configured to act as program memory and the other as data memory (8051 has a Harvard architecture). There is a total of 32KB available on the DS5000T and so I can configure the entire 32KB as program without any data or a part of the 32 Kb as program and the remaining part as data. I can also potentially misconfigure it to have 0 Kb program and 32 Kb data. But then the microcontroller would not work at all !

Now comes the biggest problem: I had my development board but no software to burn it. Well, there was this utility from Maxim itself to load hex files into it using the serial bootloader but then it was windows based and did not run on Linux. Being a Linux fanatic, I set out to create a Linux port for that loading software.

Just then it dawned upon me that I could use my earlier ‘gnuProload’ and enhance it so that it could talk to a DS5000T microcontroller as well. In case you have not read my earlier story on ‘gnuProload’ I suggest you do so, primarily because it is a very interesting read and secondly, it would some give you some background about gnuProload itself.

So after a weekend hacking session I was ready with my new version of gnuProload, which I preferred to call version 2.1. I made considerable enhancements in this version. First there was this ‘preferences’ dialog where the user could choose various settings like serial port device, baud rate, microcontroller type etc.. Secondly, I fixed some other bugs and made the operation much more smoother than the previous version. Thirdly, gnuProload settings were now entirely driven from a user config file. Various settings could be changed by changing the config file which was parsed once when gnuProload started up.

I made a screencast to show a demo of gnuProload. It is followed by the actual LED blinking demo wherein you can see how a small assembly program that I have written blinks an LED. Do post in your comments if you like the video :-) (Clink on the HD button in Youtube if you want a larger, better quality version of the video)

So, that was about me and my DS5000T. Here’s hoping I would create more exciting stuff with my DS5000Ts !

P.S. If you wondering how I created my screencast video then it is actually a combination of audacity, record-my-desktop, gnome-sound-recorder, ffmpeg and Windows Movie Maker. Phew!

P.P.S. Due to problems with the sound quality I was getting with record-mydesktop, I had to record the sound separately and then add it into the main screencast video. This is where audacity and ffmpeg came in handy. Maybe I shall write a small how to do this as well !

admin Embedded Hobbyist, Linux, My Creations, Tech

Cool screenlet to monitor Hard disk Load Cycle count on Ubuntu.

March 8th, 2009

If you are using Ubuntu, then chances are that you already know of the notorious issue which causes hard disk to wear down three times as fast on laptops.

More details about this bug can be accessed here. The Ubuntu team has claimed to fix this bug and currently it is enabled in the Ubuntu Intrepid ‘proposed’ repositories. However, you would have to wait a while to get the official fix in the ‘Intrepid’ repositories. There is also an ‘ugly’ fix for this issue which is an unofficial fix which can be found here.

The root cause of this issue is the very high rate of increase of the Load_Cycle_Count of laptop hard disks causing more wear and tear of your disk. The ‘ugly’ fix manages to bring this rate down to a reasonable level. However, you may want to keep tabs on your Load_Cycle_Count for many reasons. That’s where my screenlet comes into the picture.

I already made a post on Ubuntuforums on this. I have given detailed step-by-step instructions on creating the screenlet which shows the current Load_Cycle_Count, the current HDD temperature and the average Load_Cycle_Count per hour. Just click here and go to my Ubuntuforums post.

Oh, in case you are wondering, this is how my desktop looks after activating the screenlet(Click on it for actual size):

My desktop screenshot showing the screenlet in action.

And yes, whatever do you with your computer, you are at your own. This is an informative post. While my every intention is to help you, I can in no way be blamed if your computer goes boom !

admin Linux, Tech, Ubuntu , ,

In defence of Ubuntu against old school hackers.

March 7th, 2009

ubuntulogo1

I have been using Ubuntu since version 5.04 came out. And let me add, this is the damnest Linux distro out there today !! I was a Debian devotee but after 4 years of Ubuntu, now I am a born-again Ubuntu convert. I like it mainly due to its EXTREME ease of use. The Anti-ubuntu camp must be drawing its swords and lunging for my throat with the previous statement, I am sure. They believe that Ubuntu has betrayed the hacker community by making things a mere click away. They believe Ubuntu is bad for the hacker ethos, an ethos that encourages exploration and DIY(Do-It-Yourself).

While I fully subscribe to the hacker ethos, to them I would say only one thing: If hacking Linux is the ONLY thing you ever did then probably Ubuntu is not for you and you should stick to an old-school distro(like Slackware). Ubuntu might be really taking the joy of doing things ‘Yourself’ from you.

But what if I am NOT a Linux hacker? What if my interests are in some other field like Robotics or embedded systems? What if I like to hack on embedded stuff like 8-bit microprocessors and stuff? I still hack ON Linux, but I do not hack Linux itself. Linux becomes the platform for me, a means to achieve and end, and a FREE means at that too! Note the distinction I have drawn here: Hacking (something) ON Linux is different from Hacking Linux.

This is where Ubuntu scores over other distros: It does its job so smoothly that it allows me to focus on whatever I want and then quickly fades to the background never reminding that it even existed. That is what OSes are supposed to be, right? If I get as OS, then I should not spend more than half of my time rigging it with scripts and binaries and customizing it to work as I desire. Well, if I ENJOYED doing all that rigging and writing scripts then it is a different matter. But I do not. Truth be told, there are very few people who solely are focused on that. Linux users have a several reasons for using Linux: Some want the freedom of using Open Source, some don’t want to spend hundreds of dollars in buying closed source alternatives,  some are mere users trying out a different look and feel and way to do things and some like me like to hack on 8-bit systems and embedded stuff. And some of course, are old school hackers who want to control every aspect of their Linux system. (Linux from scratch is an interesting alternative for such people.)

And the only way to serve such a diverse user base is when Linux becomes CONVENIENT to run. Why should an user of sdcc (the Small Device C compiler : a free and open source compiler for 8051 8-bit microcontroller) should bother with resolving dependencies manually when the same can be done seamlessly by the aptitude package manager?

On the other hand, if you ARE really a slackware type hacker who wants to customize and rig everything, then Ubuntu allows you to do that too, because deep down, it is still Linux and follows the same philosophy when it comes to running the system as a whole.

So you see, Ubuntu gives a win-win situation for everyone! And that is why I am big fan of it. It allows me to hack on my beloved AT89S52, or my favorite ATmega32 , or write GTK+ based applications. And at the same time it allows me to add my own customization tid-bits once in a while (hey, I AM a embedded hacker, but that does not mean I don’t try my hand at writing system administration scripts every now and then ;-) )

To conclude: Install Ubuntu and do whatver you have always wanted to do. Go, chase your dreams!

admin Linux, Tech, Ubuntu , ,

My new Dell Studio 14 laptop – A Review

January 6th, 2009

A very happy new year to you all and I wish that the new year brings you more joy, happiness and prosperity.

Well, I got to celebrate my new year in a bit more special way than usual. A day late, but my new Dell Studio 14 laptop arrived on 2nd Jan. Actually it had arrived on 1st Jan itself but since that was a holiday and also since I had given my work address for delivery I was able to pick it up only on 2nd. I specifically wanted a small sleek laptop rather than a bulky one. Also I wanted it to look a bit different than the scores of inspirons that we have out everywhere. So I went for the Studio range which is a trade-off between the lower end inspirons and the high end XPSs.

And here is my configuration, not too fancy but decent enough:

- Intel Core 2 Duo(T5800), 2.00 Ghz, 800 FSB , 2 MB cache
- 3 GB DDR2 RAM
- 320 GB SATA HDD from Western Digital, model no. WD3200BEVT
- Integrated 2.0 MP Webcam with lateral array microphone
- Windows Vista Home Premium pre-installed (I installed Ubuntu Intrepid later on, of course)
- 1280×800 pixels TrueLife(tm) 14.1” WXGA screen.
- In built 8-in-1 SD card reader
- Dual Headphone jacks.
- Slot Load 8X DVD R/W Drive with dual layer write capabilities
- In built wireless network catcher that can be used to detect wireless networks without powering up the laptop.
- Travel remote that slides into the express card slot.
- Dell Wireless 1397 802.11b/g Half Mini Card
- Dell(TM) Wireless 370 Bluetooth Module
- In built 10/100/1000 Gigabit ethernet
- Pair of Creative Noise Isolation ear buds (EP630) supposedly free and which costs about 1300 INR in India.
- All OS, drivers and utilities DVDs. This is very important and not offered by any other laptop manufacturer that I know of.

I had ordered it on 19th Dec. My hands had already started to itch starting from that day, ending only on 2nd Jan. I am really happy with my laptop and here are some snaps that I took of it:

IMG_0619 IMG_0622 IMG_0624 IMG_0625

Also here is a YouTube video with me reviewing the various aspects of the it. I have tried to cover as much points as possible but in case there is some aspect you feel I have missed out, you can drop me a comment and I would be happy to help you.

And one more thing, the video is split into two parts since YouTube restricts all videos to 10 minutes.

So here you go, enjoy and do write in your comments:

Part I

Part II

admin My Creations, Personal, Tech , , ,