Wednesday, September 19, 2012

Components Review

Here I give a review of electronic components that I used, particular on their quirks.

Atmega644A
Atmega644A has the same peripherals as Atmega644P, but Atmega644A has the same device signature (1E 96 09) as Atmega644, which is different from Atmega644P (1E 96 0A).  Atmega644 has to be used for device programming with avrdude.  There seems very little difference between Atmega644A and Atmega644PA.

The bootloader based on Atmel app note AVR109 works with avrdude.  Sometimes, the first invocation of avrdude does not work, but the 2nd invocation should work.

By default the clock source is the calibrated internal 8MHz RC clock, and the divide-by-8 bit is enabled, so the system clock is effectively 1MHz.  The JTAGEN is programmed by default, so the side effect is that PORTC2-5 are not I/O ports, DDRC has no control over them.  They have pullups on them.  The JTAGEN fuse should be unprogrammed to enable I/O port for these pins.  The BOOTRST should be programmed to point to the bootloader if used.  The default bootloader size is 4K 16-bit words.  The AVR109 bootloader fits in 1K words.  The 1K bootloader starts at 0xF800.

The I/O port pullup strength is about 38.5K.  The bandgap voltage has some spread, one measured 1.07V and another 1.16V.

The UARTs work at 38400 baud with the internal 8MHz RC clock.  But for reliability the crystal oscillator is still preferred.

The brown-out detection function turns out to be very useful to eliminate bizarre, inexplicable and intermittent behaviors at power on and off.  When the BODLEVEL set to 100, the brownout voltage is 4.3V as specified.

When switching between the ADC channel, ample settling time should be given.

MAX3232
Dual Channel RS232 transceivers output +/-5.4V with 5V supply.

MAX488
RS422 transceiver.

SN74LVC1G86
The single XOR logic gate is in the small SOT23-5 package.  VOL is 0.1V when sinking 12mA with 5V supply.

ADG706
The 16:1 analog mux.

AD8602A
The OpAmp.

LMC6484
This is a general purpose quad CMOS opamp with rail-to-rail I/O.  The maximum voltage is 16V.  The gain-bandwidth product is 1.5MHz.  

AD8210
A current shunt monitor works with common-mode input -2V to 65V at a supply voltage of 5V.  To work below the supply voltage, it uses a pull up on the input, so the common-mode input impedance is only 1.5KOhms.  The side effect is that it injects voltage into the input, which might not desirable.

LMP8602
It is superior to AD8210 in many ways. The bias current is smaller, the quiescent current is lower, the common-mode input range is wider, the specified supply voltage range is wider.  The 50x gain reduces the power dissipation on the sense resistor.  It has a more flexible output structure with accessible node between the two gain stages.  The dynamic response is slower than AD8210.

INA282
This current monitor has switched capacitor input with offset cancellation.  But the performance is not as good as advertised.

ACS713
This is a Hall-effect current sensor.  The main advantage is the very low resistance 1.2mOhms.  But the gain and offset are not as good.  The gain has some more nonlinearity and temperature dependency than the shunt current monitor type.   After running high current through it for a while, the offset would change especially noticeable when the current is reduced back to near zero.  I'm not sure if it is just a temperature effect or some sort of magnetic remanence.

LTC4357
The oring controllers can replace oring diodes.  It tries to servo the FET drop to 30mV; the actual drop will depend on the power FET.  It enables loading sharing.  But unlike diodes, it does consume current, about 2mA, and when two are used to form diode OR, they will consume 4mA which could be significant.

LT1910
The N-FET driver includes a charge pump to generate the gate voltage.  It has over-current protection with a external current sensing resistor.  When it is off, it draws about 2mA current which could be significant for low power operations.

LM317
A classic voltage regulator designed by the legendary Bob Widlar can take a maximum input voltage of 40V and output the maximum current of 1.5A.

The LM317DCYR is the TI clone in SOT-223 with top marking L3, retailed for $0.71 a piece.  The reference voltage is measured at 1.251V.  With two 1% resistors (with good tracking), the output can be set to within 0.5%.  Because the adjust pin sources a small current, the voltage setting resistors should not be too large.  

V7809-500
This switching regulator is a drop in replacement for the popular fixed-voltage regulator LM7809.  The specified maximum input voltage is only 32V.  I took it up to 36V and it still regulated and no damage was done it.  The output contains switching noise at the frequency of 312KHz 30-40mVp-p, which can be reduced by the post linear regulator and ferrite beads.  It can also be configured as an inverting regulator (buck-boost), generating -9V.  It has built-in short protection; I accidentally shorted the output, no harm was done to it.

VYB15W-Q24-S5
The isolated DC/DC converter module outputs 5V/3A.  It has low quiescent current.

UHE-15/2000-Q12-C
The isolated DC/DC converter module outputs 15V/2A.  The no load current seems high and it gets hot without loading.

PS710B
A solid-state relay can handle 5A nicely when the two photo-FETs are paralleled.

IRFR1018
The N-Channel power FET has 8mOhms Rds-on.

SUD50P06-15
The P-Channel power FET has 15mOhms Rds-on.

SUM110P06-07
The P-Channel power FET in the D2PAK(TO-263) package has specified 6.9mOhms Rds-on.  At 12A load, the Vds drop is less than 70mV with Vgs at -13V.  It maintains low Rds even with Vgs at -4V.  The Vgs has maximum range of +/-20V.

BSS138
A N-Channel FET in SOT-23 package has low threshold and low Rds-on.

CPC1117N
This is a solid-state relay that is normally closed with resistance of 5Ohms.  It turns off when 0.23mA current is applied with voltage around 1.13V.  I use it to turn on/off a P-channel power FET; it would have the fast turn-off and slow turn-on feature.

LVK24
The 1W 4-terminal current sense resistor comes in 1% and 0.5% tolerance.  I accidentally pulsed it with a large current (by shorting the output); the resistance is off a little since.

DS2E-ML2-DC24V
This two-coil latching relay has the coil resistances of 1.59K and 1.55K Ohms.  Rated at 24V, one coil actuates at minimum 11V and the other coil at minimum 13V.  It can be used as one-bit nonvolatile memory.

SSL-LX5093BYD
This is a blinking yellow LED.  At about 3V, it draws about 6mA when it is on.  It is sometimes convenient to have a blinking LED without having to add an oscillator, but the blinking frequency is fixed about 1-2Hz and is voltage dependent.

Friday, September 14, 2012

Observations

"An engineer has probably about 8 productive hours in a week. So why do we work 40 hours? Because we don't know when the 8 productive hours kick in."

"You might think it is great to have your hobby as your job, but you would end up hating both your hobby and your job."

"Simulation is like masturbation; it is not good for you if you do too much of it."

"National research laboratories are like welfare for engineers and scientists; without them a lot of engineers and scientists will be out on the streets."

"Why do engineers procrastinate?
  1. There are fewer criticisms to the design when the time is short.  A design done earlier draws unnecessary criticisms and suggestions for modifications.
  2. A design completed earlier makes the task look too easy.
  3. The engineer may be rewarded with another task when he finishes early. "
"Be wary of engineers who talk a great deal.  They usually do very little.  In their mind, talking is equivalent to doing."

"I judge people's competency in electronics by looking at their copies of The Art of Electronics. If the book is well-worn, I can trust this person to do electronics; but if the book looks new, I'd conclude that the person is well versed in electronics. If a person does not have this book on his book shelf within arm's reach, he is not into electronics at all."

Sunday, July 15, 2012

UART clock tolerance

The clock tolerance issue is analyzed in the Maxim App Notes 2141.  Assuming 16-clock sampling scheme, the tolerance is +/-5 clocks for nominal and +/-3 clocks for worse cases.  From the start bit to the middle of the stop bit with 8-bit data, the total is 152 clocks.  The percentage tolerance is +/-3.3% and +/-2%.

Tuesday, June 26, 2012

Approximations and Rules of Thumb

Pi seconds are a nano-century.

Maximum current on PCB trace: 500mA per 10mil 1oz trace.

PCB 1oz resistance: 0.5mOhm per square

Saturday, June 2, 2012

Monday, April 2, 2012

EEssential Weekly Notes #6

ChipQuik

The normal solder (63% Sn 37% Pb) has a melting temperature of 361F (183C).  ChipQuik has a very low temperature solder (48% Sn 28%Pb 21%In 3%Bi) which has a melting temperature of 136F(58C).  When ChipQuik solder combines with the regular solder, the new alloy has a melting temperature of 150F.  So surface mount devices can be removed with the ChipQuick solder by keeping the solder molten with only 150F (low enough not to damage the devices).

Monday, March 26, 2012

EE Notes

Motor winding insulation temperature ratings
NEMA classes are A (105C), B (130C), F (155C), H (180C).   Class B is the most prevalent since 1960's.

SLA Battery Charging
Current limited (0.25C) charge to 2.45V/cell then drop to 2.30V/cell.

LiFePO4 Battery Charging
Current limited (0.2C - 0.7C) charge to 3.65V/cell hold till the current drops to 10% of initial charge rate.

Chip Resistors
0402 resistors are most commonly 1/16W.
0603 resistors are most commonly 1/10W.
0805 resistors are most commonly 1/8W.
1206 resistors are most commonly 1/4W.

Tantalum Capacitors
The voltage ratings are usually 50V or below.  Even at 50V, the large value tantalum capacitors are expensive, so Aluminum electrolytic should be considered instead.

Relay
1-Form-A: single pole normally open
1-Form-B: single pole normally closed
1-Form-C: single pole double throw

Sunday, March 4, 2012

EEssential Weekly Notes #5

Ferrite bead vs Inductor

The ferrite bead is lossy at high frequencies, i.e. low Q or resistive.  The high frequency energy are absorbed and dissipated as heat.   A pure inductor is non-lossy and stores energy.  While a real inductor has some inevitable resistive element, it absorbs energy equally at all frequencies.

Mu-Metal

Mu-metal is high permeability material; it achieves the magnetic field shielding by redirecting magnetic field lines.

Sunday, February 12, 2012

PCB Layout: Basics

PCB layout generally is not a task that many EE's are proficient at. They may even consider it somewhat beneath them and it is the work for technicians. Many schools do not consider it significant enough to warrant a course and EE students are expected to pick it up by themselves when needed. But actually PCB layout concerns a wide range of topics, including material science, electrical engineering, mechanical engineering, thermal engineering, packaging technology, fabrication technology, assembly etc. A good layout engineer must be aware of concepts in all these areas.

Let's start with printed circuit board materials. The basic conducting material is copper, an excellent conductor of both electricity and heat. The thickness of copper is given in ounce, the weight of one square foot; one ounce and two ounces are common.  The thickness of 1oz copper is given as 1.37mil.  (The copper density is 8.96g/cm3, so 1.37mil is 1.02oz.) Exposed copper traces are usually coated with very thin layer of tin or nickel (~0.1mil) for preventing oxidation. Outer layers and via are plated with copper. Electrical resistivity with temperature coefficient and thermal conductivity are relevant to PC layout. Plated copper has higher resistivity than copper sheet. The most common PCB dielectric is FR4, others include G10, polyimide. Dielectric constant with frequency variation and loss tangent are needed for layout. The temperature range where the dielectric is stable is also important. Polyimide has higher temperature range than FR4, so it is used in space electronics. PC boards are built in layers with core and prepreg. Prepreg bonds core laminates under pressure and temperature. Board is covered with solder mask except for pads or other exposed areas.  The solder mask gives the PCB the common green color, but the other colors are also available, such as blue, maroon and white.  Silkscreen is used for component labels.

From electrical point view, PCB traces establish electrical connectivities, but they add resistance, inductance and capacitance. Resistance causes joule heating and voltage drops. Especially for high current traces, trace width must be sized correctly. Charts are given in current vs trace width for different temperature rise. Note that outer layer traces can carry much larger current for the same temperature rise. Trace inductance and capacitance are more important in high speed designs, where they may significantly impact signal integrity. Electromagnetism which has been simplified to Kirchoff laws in circuit design now manifest itself in its full form. The spatial arrangement becomes important. EM compliance has to be dealt with in layout. Transmission line effect has to be taken into account. 2D and 3D field solvers are becoming more routinely employed to determine signal integrity in high speed applications.

PCB is after all a mechanical structure. It has to be mechanically mounted to other structures. Design files convey mechanical information. Some terminologies come from mechanical engineering.
PCB is also a medium for heat to conduct. Thermal analysis of circuit board depend on the layout. Layers can be added for thermal purpose, copper area can be created to reduce thermal resistance.
Circuit elements come in various of packages. A layout engineer must keep abreast of advances in packaging technologies.

PCB layout is bounded by the capabilities of fabrication technologies and cost. A layout engineer must be aware of constraints placed by these capabilities and aim for reliable manufacturing. 7 mil minimum trace width and spacing are fairly routine.

During actual layout, component placement is the most important for it eventually determines the qualities of layout.  A proper partition of the circuit section is guided by the foremost by the current flow.  The loop area must be minimized.  High current circuit sections should be close to the voltage source and away from the sensitive circuits.

Layout is prone to human errors. Long gone are the days when layout is done manually with tape. A good layout software is essential.

Continued here.

Thursday, February 2, 2012

EEssential Weekly Notes #4

Bond wires

The standard bondwire is 1mil in diameter and 2mm in length.  It has very roughly 1nH/mm. [T. Lee, CMOS RF]  A D-PAK MOSFET (AOD452) has 6.5mOhms Rds on with 2x12mils wire bond; the wire resistance is ~0.6mOhm.  [Alpha & Omega, AN911].   The package resistance is about 20% of total MOSFET resistance. For DPAK, the package resistance is 0.5mOhm with Powerbond II [Infineon, PowerBond]. 

Flex circuits

For Minco, 16 layers max, 1.5mil min trace/space, 2mil min hole diameter, 6mil thick per layer.

Solder Conductivity

The 63% tin 37% lead solder alloy electric resistivity is 144e-9 Ohm-m, thermal conductivity 40.9 W/m-K, and thermal expansion coefficient 21.4e-6/C. As a comparison, the copper resistivity is 17e-9 Ohm-m. So the solder has more than eight times the resistance. Plugging a via hole with solder would do very little to reduce its resistance.

Sunday, January 29, 2012

Hierarchical Design in Altium

Altium Designer promotes hierarchical design, which seems to make sense.  It can help manage large designs and encourage design reuse.  Those concepts have long been prevalent in software design.  In a true hierarchical design, the local nets should stay local, but Altium seems to have problems with sheets with same named local nets.   We are forced to define unique names to different sheets.

The ports are considered differently from the wires; so the port names do not become signal names even when the wires are not named. This may be a little unexpected.  If we think of ports are module interface declaration, inside the module, the port name should be used as signal names.  More confusion is created when the nets are flatten: what net names are ultimately used if nets are assigned names in the hierarchy.  Altium would even complain about same net names in different hierarchy.  There does not seem to have a well defined way of resolving net names.

Another thing that could cause confusion is the netlist option "Allow Ports to Name Nets".  If  we try to connect nets by name, we find Altium actually consider the net with net label and the net connect to the port with the same name to be different in PCB while showing exactly the same name.  The rule for flattening the netlist seems applied inconsistently.  For some nets, the net labels are used and for other the port names are used in the final PCB netlist even though both net labels and port names are assigned.

Altium cannot use a multi-part component in the multiple instances.  A hex inverter IC has six inverters.  If one is used in a sheet and the sheet is used in multiple instances, Altium will end up with multiple ICs rather than distribute subparts to different instances.  But there is not an easy way to resolve this.

In conclusion, the hierarchical design in Altium has to applied with greater caution.  I do find some utility for it when a design block are used more than once, but otherwise it is better to avoid at this moment

Monday, January 23, 2012

EEssential Weekly Notes #3

Backdrilling

Backdrilling is a PCB design technique to remove stub from a through-hole.  It is to reduce reflection from the stub for the high-speed signals (>5Gb/s).  Blind vias and buried vias can achieve the same effect for vias, but at a increased manufacturing cost.  But backdrilling is especially useful for backplane connectors, but  seems only applicable for press-fit connectors.

Monday, January 16, 2012

EEssential Weekly Notes #2

Magnets flux density vs temperature

Because thermal motion randomizes magnetic domain, the flux density of magnets decreases with increasing temperature.  NdFeB magnets has a temp co of dB/B/dT = -1.1e-3 /C.

Magnetostriction

The inductor humming is caused by magnetostriction, magnetic material changing shape in response to a changing magnetic field.

RS232 receiver

It is customary to use a RS232 driver IC to convert a TTL signal to RS232 signal level.   The RS232 driver IC includes a charge pump to generate the required negative voltage.  But if we look at the RS232 receiver spec, we'll notice that the transition actually happens at positive voltage; for example, MAX232A RS232 input threshold low is typically 1.3V and threshold high is 1.8V.  So it is possible to send digital output (0 to 3.3V or 5V) to a RS232 receiver IC and be decode correctly (even when it is outside of the RS232 spec).

Rise/Fall time measurement

The rise time of the first order low-pass step response is 0.35/BW.  The measured rise time is the square root of the sum of the square of the signal rise time and the square of the scope rise time.  This is only strictly true for Gaussian step and Gaussian impulse response, but it is a good approximation with the signal rise time is greater than the scope rise time.  The scope frequency response can be well approximate by a second order low pass with a damping factor of 1/sqrt(2).

Wednesday, January 11, 2012

EEssential Weekly Notes #1

Tin Whisker Investigation

NASA Goddard has a presentation on Tin Whisker on Toyota accelerator pedal position sensor failure.  It shows ribbon connector leads (copper alloy with 2um pure tin) shorted by tin whisker ~2mm long,1um diameter, 240 Ohms.  Standard Ohm-meters may not be able to detect the whiskers because the voltage is too low to break down insulating films.

Analog Devices iCoupler

The analog devices iCoupler technology is described in this article.  The transform is built with CMOS metal layer, a high breakdown polyimide layer and a gold layer.  High speed CMOS circuits with 1ns edges are connected to the transformer with wafer scale packaging.

Free PCB Layout Software

Some free PCB layout software worth noting are the open-source KiCAD and gEDA, Sunstone PCB123, DesignSpark PCB.  These tools seem to be able to handle moderately complex designs.

Make You Own PCB

A relatively simple and low-cost procedure of making your own PCB is shown here.  It starts with pre-sensitized circuit board, then developer and etching solution.  A board can be made for less than $50.