Wednesday, August 19, 2009

PCB! What the heck???


This post is especially for the beginners and hobbists. Its a great pain making huge circuits on bread boards and much more keeping them alive on them. Its good though in the start but when, its a matter of circuit with communication or clocks, u need noise free circuits. I remember trying UART for the first time and communicatig with the PC via RS232. It took us 3 days to figure out what went wrong. Our code was correct, written over many times, but still it didn't worked! And i guess the hardware was correct too.We finally decided to make a PCB. And it worked! But then what was wrong???

I would call it the inherit devil in each circuit. The "Noise". The more you keep your circuits open, they catch more noise. Remember each conductor is intelf an antenna. So when when it was on a PCB, following happened.

  1. No open or loose wires, which means proper connections.
  2. Atleast half of the noise due to wires was suppresses.
  3. It was easier to track down faults.
  4. Probability of working of project increased many folds.
Its not hard to make your own PCB at home. There are a lot of Free tools available to design PCBs. The idea I'm using here holds good only for single-layer PBCs.

Making a PCB is like developing a photograph. Here's what to do

1. Draw your layout using some PCB designing software (PCB EXPRESS (free of cost), EAGLE(Free for small boards), ULTRA ROUTE or anything that’s worth the money and you can lay your hands on.

2. Get its LASER print out on a cheap glossy sheet (my own method of cost effectiveness).

3. Put it upside down on to the copper plate.

4. Iron it for 3-4 minute.

5. Remove the sheet in one go.

Now you'll have a copper plate with black lines on it. Thats your circuit! Dip this in FeCl3 or H2O2

for 15 minutes. These will replace the copper, which comes in contact with the acid. The left over is your PCB. Yes one more problem though. the holes are still required. Well a small drill should do for you. Enjoy!!

Friday, July 31, 2009

Power of Resistance

For years scientists are trying to produce super conductors to transmit electricity without resistance, to avoid losses. But on the other hand a 'resistor' is equally important to make any circuit. I haven't seen any circuit so far that ends up without a resistance.

At college level its hard to decide what value of resistance should come up where. Lets take a simple example of LED circuit. I have seen people who won't even care to put a resistance in series with LED to glow it. When I asked many students the answer is again a question, "Why should we? Its already glowing!". Be it interfacing the LEDs to the Computer's parallel port or microcontrollers or simply driving them from battery no one just cares. But then my question is, "How do you drive LED on an 220v AC source?". And to be frank I get all those weird answers like "We should first step down the voltage". Well the answer is not completely incorrect! If you can do it without much losses(running on low voltage), you could save power you'll waste on resistance.
This simple circuit drives the LED at 5 volts. typically an LED requires 15 to 20 mA of current(actual value to be decided by manufacturers data sheet). I have used a 330 ohm resistance to limit the current to 12.61mA. 330 ohm is a standard value. this value can be tweaked to adjust the brightness.

Well there are other uses too. Lets discus them in points first.

  1. Pull up or Pull down resistance. (also called passive pull up or pull down)
  2. Limiting the current in input signals also for impedance matching in amps.
  3. Filters.
These few points can save a lot of problems in our circuits. Lets discuss the first one first.

Pull up or Pull down resistance
In general, a pull up or pull down is used to provide a reference to the input signal. Consider a circuit where the input is open(In case of switch intercaing with microcontroller), a pull up/down will either pull the voltage to Vcc or pull down to ground, hence avoiding floating voltages at the input of a gate.

Limiting the current in input signals
Limiting the input current is very important if you are playing only with voltage levels. Example, if you are reading some value with an ADC, we don't need much current. A series resistance in this case will help in limiting the current and avoid loading the source.

Filters
As in my previous post about caapcitor, I got a nice comment from one of my friends, talking about the filter. The decoupling capacitor in any circuit, includes the series resistance of the circuit and thus makes a cutoff frequency for a filter to block certainf frequencies. Now if we are aware of what to block, we can easily implemet RC filters to avoid noise.