Archive for May, 2006
I used to be using a 32MB memory stick pro for my Sony DigiCam. At 32MB, it is only capable to store 12 images with Fine mode at 5 Megapixel. That is not sufficient for every day usage. I usually have to step down in pixel size to get more pictures. Therefore, I have just bought a 1GB memory stick pro duo. This bumps up the camera capacity to 384 pictures with the same specifications. Plus I got it at a discount, good deal
May 18th, 2006
Two different cameras produce two different image results taken under the same conditions. One is taken using FujiFilm E550 and the other using Sony DSC-W1. Both images are good. Details of the Nokia keypad can be seen easily on both pictures. The first picture is taken using Sony digital camera and the last picture is taken using Fuji FinePix E550.
May 18th, 2006
Operational Amplifier or so called ‘op-amp’ is the famous solid-state IC that uses external feedbacks to contorl its functions. It has a very high gain with one inverting input (V-), one non-inverting input (V+), one output (Vout), positive and negative power supply (Vs+ and Vs-). Most of the time we look at op-amp as an ideal op-amp to simplify things. In real life applications, op-amp behave almost like an ideal op-amp usually in MOSFET type op-amp. In ideal op-amp, it has an infinite open-loop gain, infinite bandwidth, infinite input impedance and zero output impedance.
This is a picture of op-amps including the famous 741. These small ICs are cheap in the cents per piece. The DC behavior of such real op-amp for its open-loop gain usually in the 100k to millions. The real op-amp does not have infinite gain and bandwidth. When the two inputs are equal in voltages, then the output is zero volt. The current entering the two inputs are small or can be assume to be zero.
Op-amp is usually use for filter design. A simple sallen-key low pass filter is shown done on SPICE. It tooks less than 10 minutes to actually build the circuit using the computer aided design software and simulation shows almost everything than can be done hands on in laboratory. Simulation is a good way to check your work in laboratory.
The plot shown is the frequency response of the filter output. As we could see, this is a pretty simple low-pass filter that allow signals to be passed below the 5 kHz range and reject anything above 10 kHz. There are many other different filter techniques that can be used in filter design according to the specifications. Op-amp is widely used in analog signal processing systems and in many other applications.
May 17th, 2006
In analog designs, we deals with inputs and outputs that are continuous with values from the lowest potential Vss to the highest potential Vdd. There is so called the passive analog circuit which consumes no external power, and there is so called the active analog circuit which of course consumes external power to accomplish the designer’s task. The passive analog circuit involves the use of the basics devices such as resistors, capacitors, inductors and diodes. Whereas in active analog circuit involves the use of transistors and op-amps. Any of these circuits can be fabricated into analog IC chips. This brings us to the analog IC designs and also Mixed Analog and Digital VLSI circuits.
May 16th, 2006
I just thought I would share this quote from the chinese philosopher, Confucius.
I hear, and I forget.
I see, and I remember.
I do, and I understand.
– Confucius
That tells us that the best way to understand something is to learn by doing. Get your hands on it and experiment with it. This means get to the laboratory, put something together, power it up, and observe the result.
May 14th, 2006
Analog is not old fashioned. I think analog is interesting and fun. If you are into electrical technical knowledge, then understanding analog design is a good point to start. In today’s world, analog and digital designs comes hand-in-hand. So to be good in both is a plus. I personally have the passion for the digital designs a lot more than the analog designs. One thing to know is that in real world, signals are in analog then digitized into today’s digital trends. The analog signals is known to be continuous and we could take these continuous signals and convert them into discrete digital signals. Digital design techniques are easier to design, data storage is much easier, much accurate, less noise and can be easily fabricated into Integrated Circuit chips. Analog design has always been a much involved process in compare to the digital design. In analog designs there are extra specifications to be taken care of such as the gain, bandwidth, signal distortion and noise. It tooks longer to master analog domain than the digital domain. More in-depth about analog designs which includes analog IC designs and can be easily simulated using Computer Aided Design software such as SPICE (Simulation Program with Integrated Circuit Emphasis). Also, more in-depth about digital designs which means TTL Gates (Transistor-Transistor Logic Gates), flip-flops, processor, CMOS, etc.
May 13th, 2006
So I was sitting around today wondering what I know about impedance. I come across the term impedance a lot in analog circuit design. If you understand ohm’s law and the concept of resistance in DC circuit, then impedance is the generalization of the concent from DC to AC. In short, impedance is basically a measure of the total opposition to the current flow in an AC circuit. It is made up of two components, the resistance and the reactance. Impedance (Z) is expressed in complex number. Z=R+jX. Where R is the resistance and X is the reactance.
In AC we not only have the amplitude, we also have the frequency and phase, therefore impedance not only allow the current to flow but also changes the phase, as frequency changes, it also changes the ampltitudes and phases. In ideal resistor, which means ignoring all the parasitics, we should expect to see the same impedance for all frequencies. In ideal cap, we will have the impedance that goes down with increasing frequency. In an inductor, we will have the impedance that goes up with increasing frequency.
There is a linear relation between impedances for capacitor and inductor with respect to frequency. The phase for inductor’s voltage is always 90 degrees ahead of its current. The capacitor’s current leads the voltage.
Simple MATLAB Script to calculate impedance is shown below.
Download impedance.m
% Matlab script to calculate impedance for series and parallel circuits
% Author: Ridwan Chendarma Chin
mode=input(’Select 1 for series and 2 for parallel: ‘);
C=input(’C= ‘);
R=input(’R= ‘);
L=input(’L= ‘);
f=input(’f= ‘);
X_C=1/(2*pi*f*C);
X_L=2*pi*f*L;
Z_C=(0-j*X_C);
Z_L=(0+j*X_L);
Z_R=(R+j*0);
if (mode == 2)
Z_T=1/((1/Z_C)+(1/Z_L)+(1/Z_R));
else
Z_T=Z_C+Z_L+Z_R;
end
Z_mag=abs(Z_T) % magnitude
Z_angle=angle(Z_T)*(180/pi) % angle in degrees
May 12th, 2006
Today I added a new rewrite condition to my apache configuration. This rewrite condition would forward any invalid subdomain request to the correct subdomain. So for example a user type in their url box ww.domain.com or any other wild-card subdomain, the user should be forwarded to the default www.domain.com.
A situation might occur like this. A person who likes your page, make a link to your page, due to human error, the person types ww.domain.com instead of www.domain.com. This creates two subdomains with identical pages, which is a no no for the search engines.
One of the advantages to forward invalid subdomain to the default is that this is a concept widely practiced to suit the search engine optimization for both google and yahoo. According to my research, some of the search engine crawlers dislikes multiple identical copies of pages from different domains or subdomains. It is known that if one to disobey the search engines algorithm, then their pages might get penalized and removed from the search results, which is not good. Here is how I add the rewrite condition to my apache configuration to forward any invalid subdomains to the default www.domain.com.
Add the following lines to your apache configuration:
ServerAlias domain.com www.domain.com *.domain.com
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteRule (.*) http://www.domain.com$1 [R=301,L]
Notice the return 301 status code which tells the requester that the invalied subdomain has moved permanently. This again is search engine friendly.
May 10th, 2006
Do people really click on their browser’s back icon? Yes, they probably do. Would adding a link that brings a user back to the previous page a smart idea? Yes, maybe it is a smart idea. The reason is because in most occasion the user’s mouse pointer would usually be around the area of the page but not at the top left hand corner of the browser. Therefore, a back link on the page makes going back to the previous page much easier. Below is a short code snippet that I have been using if I am to write a PHP script on my own and I think it is very effective.
if (isset($HTTP_REFERER)) {
echo “<a href=’$HTTP_REFERER’>Back</a>”;
} else {
echo “<a href=’javascript:history.back()’>Back</a>”;
}
The above PHP code basically says that if the predefined variable HTTP_REFERER is set, then print a back link to the previous page, else use the java script method history.back(). Simple as that and it is fun.
May 9th, 2006