How PCB files are transfered to circuit boards

When you are done with “clean” period of task – designing, drawing a circuit and tracing a PCB, you need to transfer a design to a real board. Here starts what I call a “messy” part of design. When designing at home there are several options – to use prototyping boards or make PCB by yourself. In second option you have to transfer PCB image to board with copper layer. There are several methods of doing this: direct transfer with glossy paper where image is printed with laser printer or use more advanced ultraviolet exposure. This way PCB image is printed on paper or film directly from program window without keeping in mind about pcb file formats. Different situation iswhen fabricating professional PCB’s. Each company which fabricates PCB boards always announce what type of file formats they support. So if you are going to order a PCB better check with them in order to save your time. The most common and standard format is so called Gerber file format. Almost all layout tools are able to produce Gerber files. If you want to preview your generated Gerber files there is a nice free Gerber file viever(GCPrevue) from GraphiCode, Inc. (http:\\www.graphicode.com)…

Continue reading

PCB routing considerations

One of hardest tasks when fabricating PCB’s is Printed Circuit Board(PCB) routing. There is no unified rules on how properly board should be routed and it would be impossible to write them as situation on each board is different. One of general rules are that the shortest routes are the best because longer routes tend to generate more noises or pick them up from different sources. It is obvious that every conducting material acts as an antenna no exception with PCB routes. No secret that each route acts as small transmitting and receiving antenna. So one thing is to keep in mid when routing PCB is to route short as possible. Another concerning area is a cross-talk or cross-coupling between routes. This effect appears when two traces run along each other and energy from one trace route couples to another. This effect is obvious in high frequency digital and analog circuits. This effect can make device dis-functional because only of crosscoupling effect. These defects are hard to determine as electrically circuit board is correct. If this effect is noticed – the only solution is to cut traces off and run separate wires instead. It is better to do keep this…

Continue reading

Microcontroller Simulators and emulators

Sometimes you just haven’t ability to flash microcontroller in order to test program functionality in development phase. For this there may be many reasons like you don’t have a prototype ready or you need to test parts of code and so on. For this there are software simulators used which simulates microcontroller work without microcontroller itself. Simulators usually don’t have connection to real world all operations are simulated in software. Microcontroller simulator is a program model which imitates its work. Modern simulators now simulates not only arithmetic operations but also I/O operations and even peripherals like timers, ADC, USART, I2C and so on. In many cases there is possible to prepare whole project jus using simulator and then burn compiled code to real microcontroller. Simulators usually allow: debugging at source code level; follow operation time in slow motion but with real world values; connect stimulus signals like they are real world signals. Simulator can be expressed as several blocks interconnected with each other:   This is basic illustration because many moder simulators may have much more blocks. Memory block imitates work of real memory. Microcontroller program has to be loaded to this memory. O course this memory can be split…

Continue reading

Protect you car from rusting using cathode protection

Car owners know, that small scratch may cause a rusting which will expand even under painted areas. Fighting rusting is a pretty hard task. There are lots of methods that car keepers are using to prevent from rusting. Many are using anti-rust coating, but it has shortcomings – success depends on how good it has been done. The rusted area needs to be cleaned with care and sometimes requires to disassemble some pieces of a car. Such an operation requires a decent amount of time and constant control. Besides, the car is always in a stressed environment: cold, salt, water, vibrations, stones, and other harsh conditions. There is still a chance of damaging surface coating. For constant prevention from further rusting, there is an electronic device used which requires only one installation. Cathode rusting protection isn’t a new thing. It has been used for protecting various objects on top and underground. Ships are actively using cathode protection, which is aggressive in salty waters. The idea is to use a special protector who melts in salty water instead of the protected metal. Water piping companies who use metal pipes first of all paints pipes with protection coating then wrap them in…

Continue reading

How does tri-state buffers work

Those who work with microcontrollers probably know about data buses. Only one device(memory, peripherals), that are connected to bus can work at one moment. So only one unit can have direct connection to bus besides CPU which usually is a host. So decoding circuit determines the desired unit and connects it to bus. Other devices are effectively disconnected so that they wouldn’t have any affect to bus operations. They are carried out by tri-state buffers. Tristate buffers allow to isolate circuits from data bus. This means that circuit is switched to high impedance state. Usually we know dual state circuits that can have two logical levels “0” and “1”. But there is also widely used tristate logic, where is ability to switch I/O to high impedance state. Tristate logic can simply be made by two transistors:   Using such circuit we can have following output results according to input variations:   Q1 Q2 Output OFF OFF High Impedance OFF ON 0V ON OFF +5V   Simply speaking when output pin is in high impedance state it is physically disconnected from circuit.  

Continue reading

Using Gray code for rotary encoders

Gray code is well known and widely used in angular movement systems where angular positions has to be known. Gray code encoder can be constructed pretty easily by masked wheel where tracks are read with photocells.   Did you look at the picture and thought for yourself that gray code is same binary code. Well no… main problem with binary system that using binary code in tracks there are many positions where several tracks change state at same time. This may result in error. Actually in gray code only one track can change at same time during rotation. So then if error occur, the resulting erro will be only one bit. Gray code is easy to convert to binary this task can be done by any microcontroller using a lookup table:     Also you can convert Gray code to binary analytically. To convert from binary to Gray, start at the MSB and compare it to 0. If MSB is equal to0, then write 0 as the MSB for the Gray coded number, otherwise write 1. Next compare the next MSB and compare it to the MSB. If they are equal write a 0 in the position for the Gray…

Continue reading

Nonlinearity and span of transducers

Every time when developer is selecting a transducers for their projects they have to look through various parameters and select part which best fits the design needs. This time lets look at some transducer characteristics that can be found in specifications. Transducer Range First of all lets clear out what is a range of a transducer. Range is understand as maximum and minimum input and output signal. For instance we can take simple thermal sensor which input range can be from -50 to 120ºC and output range of 0 to 5V. Range can be understand not as only measured signal range but working environment parameters like working temperature range, power supply voltage range etc. Full scale deflection – Span Span is the maximum variation in the input or output. Span can variate due an error that mostly is linear and can be adjusted. Span error is measured in percents which shows how much the output value is different from correct value.   Another linear error close to span error is zero offset. This error occur because of calibration errors or other changes like aging or environmental conditions change. Zero offset error is constant over all range. It can be fixed…

Continue reading