Thursday 15 January 2009

The PN Junction

The PN junction is the most basic junction type. But this is the basis of how diode's work and in a more complicated fashion, the basis of how transistors work.

But before we start with that, maybe a little bit of theory first. I'm going to start with the difference between a conductor, a semiconductor and an insulator. The theory behind all this is very deep and often not necessary to know. Ignoring a lot of the background theory, when looking at the atomic structure of a silicon crystal, energy levels can be detected. There are many of these levels, but as engineers, we're only interested in two, the Valence and the Conductive bands. Now electrons need to move between these bands for current to flow. In a conductor, these electrons move more freely than in an inductor. The difference is measured in the difficulty it takes in moving one electron from the Valence band to the Conduction band.

This is measured in electron Volts (1eV is equal to 1.9 x 10^-19 Joules). Joules is the unit of energy, for example, there are 2000 Joules in a mars bar, which is 478 calories.

Back to the bands, in an inductor, the difficulty in moving the electron from one to the other is typically greater than 5eV. For Semiconductors, this is ranges from 0.5eV to 3eV. Obviously conductors offer very little resistance and are less than 0.5eV. Three common materials used for semiconductor material is:
Silicon (Si): Eg = 1.1eV
Geranium (Ge): Eg = 0.7eV
Gallium Arsenide (GaAs): Eg = 1.3eV
Silicon is of course the most popular of these three as it has a reasonable bandgap and is easy to manufacture in large quantities with sufficient purity. Gallium Arsenide is particularly useful in high speed devices and military applications.

With this theory in mind, I can now explain p-type semiconductors and an-type semiconductors. Put them together, what have you got? That's right, a PN junction.
In a process involving adding impurities to the above materials, called doping, we add either arsenic or phosphorous to the semiconductor material. These parts will be added in the ratio 1:10,000,000 to 1:1,000,000,000, so you can imagine how precise they have to be (think of the lads in the bunny suits in the Intel manufacturing plant, thats what they do!). So an n-type semiconductor is negative as it has extra electrons, a p-type is positive as it has extra electron holes. Since electrons have negative polarity, this should make sense.

Putting these two types together, you will see the free electrons in the n-type flow to the electron holes in the p-type and similarly, electron holes in the p-type will flow to the n-type, causing what's called a depletion region. For current to flow through this depletion region, a minimum of 0.7V (for silicon devices) is needed to bridge the gap. This gives the effect of pushing the electron up a hill into a higher energy level.

In a diode, because of this PN junction, one side being positive and the other negative, this means that current will only flow in one direction. For the current to flow through, the diode must be put in the right way, this is called Forward Biasing. The inverse is called Reverse Biasing, where no current will flow. Now obviously, when it is reverse biased, current will flow, if you apply an excessive amount of voltage, this is called the breakdown voltage, where the device simply melts and becomes a short circuit.

I think I'll leave it at that for the moment, I don't really want to get bogged down in theory here. Will try and write up Transistors (PNP and NPN junctions) next as they follow on from this topic.

Revising the basics

Back to basics, god it's been a long time, but it's good to throw out a few basics just to refresh. How basic should I go? Lets go mad, back to the super easy basics. Assuming Passive conventions, here's some basic laws.

Ohm's Law: v = Ri
Voltage Source: v = Vs
Current Source: i = Is
Capacitor: i = C (dv/dt)
Inductor: v = L (di/dt)
Kirchhoff's Current Law (KCL): Sum of all currents on a node, with appropriate sign is zero.
Kirchhoff's Voltage Law (KVL): Sum of all voltages around a loop, with appropriate sign is zero.
Power dissipated when vi > 0
Power genereated when vi < 0
Power: P = vi
Energy stored in Capacitor: E = 1/2(Cv^2)
Energy stored in Inductor: E = 1/2(Li^2)

Where, v = voltage, R = resistance, i = current, C = capacitance, L = inductance, P = power and E = energy.

That's just a small refresher. I could go into transfer functions and testing for linearity and some possible equations, but that's way too complicated to show here without diagrams.

Wednesday 14 January 2009

Ubuntu

I've finally done it, I've installed Ubuntu on my home system. My Dad had just installed it on his little Atom system so I decided now would be a good time to get back into it again. The only difference between the two distributions is that mine is the 64bit version and my Dad's is the 32bit version. So I'm planning to see how much difference there is between the two versions and if I get much performance out of it.

Just a quick run over of Ubuntu. Ubuntu is an operating system based on the Debian/Linux distribution. The word itself, is a zulu word meaning 'humanity', which relates to the ubuntu philosophy "I am who I am because of those around me". It's free and open source software, meaning users are free to run, copy, distribute, study, change and improve the software under the terms of the GNU GPL licence.

Anyways I'm hoping to get more into programming again and get more involved in what linux has to offer. So far, I've installed the main distribution and made the recommended updates. The main problems I've had so far have been trying to update the drivers for my graphics card and my sound card. I've got an nVidia GeForce 8800 graphics card and a Creative Sound Blaster X-Fi sound card. Both companies provide Linux drivers that should work. After downloading nVidia's drivers off their website, I proceded to try and install it all, their method is an awkward one, until I found the Synaptic program within Ubuntu which would do the installation for me without any problems. Using glxgears I was able to confirm that the fps went from 433fps to 6800fps which is a signiifcant increase. Now glxgears isn't the best benchmarking tool, but it'll do for the moment, I'll get better tools as I progress.

I thought the sound card was an easy one to install. I downloaded the drivers off Creative's website and installed it as instructed. Then I simply changed the sound settings in Ubuntu to output to my sound card instead of the on-board sound card. This worked straight away. However, after a reboot, it doesn't work, so I've done something wrong somewhere, I just need to figure out what's going on. Looks like I've plenty to learn and plenty to write up about on my way.

For now I want to learn more about Synaptic, it sure beats apt-get for updating and installing new software/drivers.

Tuesday 13 January 2009

The Gym

So I've just finished a four free day trial with Westwood gym in Clontarf. I got the voucher off entertainment.ie if anyone's interested. I'm feeling fitter and more energised but I've made up my mind that I definitely do not want to join Westwood. The facilities are good, I'll give them that. There's a huge gym area with a multitude of walkers, cross trainers, bikes and all sorts of equipment I'll never figure out. Gym area also includes exercise mats, medicine balls and a running track. It's got a lot. There's also a spinning room (for bikes and spinny things I assumed), a climbing wall and a large indoor tennis court area.

The swimming pool is a whopping 50 metres and can be a little tough to get used to. There's also a sauna, huge jacuzzi, plunge pool, caldarium and steam room as well.

It's a good gym, but for me, something just didn't feel right. To start, there were a load of teenagers, they tend to be annoying alright, but that doesn't bother me. The people who go there tend to be quite rude and not particularly friendly. This doesn't bother me that much either. You have to bring your own mp3 player for the gym instead of just plugging into your own TV screen at each treadmill (like in Northwood gym, my old gym). But the thing that got me is the price, ouch! It's 499 just to join and become a member. Then you must pay 75 euro a month after that. That racks up to a whopping 1399euro in your first year and 900euro for subsequent years. OUCH!

Ok I know you can get discounts for joining, at the lowest, you can join for 75euro and pay only 55euro a month (for off peak times membership, most people can't do this), but even at that, that adds up to 735euro in your first year at the absolute minimum! Now that's still twice what Northwood are charging and 200euro more than most clubs.

My old gym, Ben Dunne's Northwood Gym out in Northwood complex there, just off Santry Avenue is a great gym. I originally joined for 275euro. At that price you can't go wrong. Everyone was friendly. I was helped out with a personal regime very quickly and was asked every now and again about how it was going. The pool isn't 50 metres, nor does it compare to westwood, but for what I'm using it for, it was adequate. Every machine has its own TV with headphones jack, so you only need a small pair of headphones. There's never queues for the machines (maybe for the weights) and there's always plenty of parking outside. It's in an area of little traffic so you're not going mad trying to get in or out. Personally I prefer Northwood, it does the job for me.

On a final note, the gym for me is somewhere I go to keep fit, boost my energy, work out stress and spend some quality time to myself. At Northwood gym I felt I could do this easily and in peace.