Search This Blog

Wednesday, January 21, 2009

Design Notes - Product Development - 07

Product Design includes Schematic and Firmware Design. The Mechanical Engineering that goes into making the enclosure and internal construction is also important. The Electromechanical design which is made of electrical circuit, pcb, panel-parts and cable management is sometimes so involved that it is developed with the help of vendors or suppliers.

Product design engineering also needs to take care of the costing and related issues. The costing includes the one time investment on design and tools, even custom Mold-Die, Jigs-Fixtures etc. The engineering costs are amortized over the quantity produced, in a product type life-cycle. Manufacturing small quantities is expensive, large quantities depends on marketing and customer base. Hence custom product manufacturing is a specialized technology all-together, this needs to be modular, programmable and configurable.

  • Just like in ICs, product design is of three types commercial, industrial and military or medical.
  • Quality: cost effective design, quality components, quality workmanship with good testing can result in a quality product. The packaging and production engineering too is important.
  • Whatever be the specs, design or simulation nothing like a prototype being tested by the customer in his environment. So do not go into volume production till such a test is done.
  • Design as per inventory : when you design a new product, we can design it with new types of parts, but it is also important to use parts that are standard to the company's inventory, Also you need to use up the parts which have been accumulated due to a discontinued product line or a failed idea. This way the design becomes more frugal and efficient. It also saves the company to build a new part type stock.
  • A Temperature Controller was fixed in a PCB manufacturer's Works, The readings was fluctuating and soon stopped working properly, the service engineer went and found that there was a strong smell of ammonia around the unit. When opened the tracks were eaten away by rapid corrosion and some of the component leads had disappeared. So another controller was made with extra coats of lacquer-varnish all over and RTV compound in many places. That solved the problem. For large numbers vacuum impregnate modules in epoxy resin.
  • Reworks or fixes will add rapidly to the BOM bill of Materials Cost. Then cost of servicing. So customers are of five types home-user, industrial, hazardous, military and medical. So Components are to be selected and product engineered and costed accordingly in that order.
  • If a product gives three years life with minimum service support it can save itself from building a bad reputation. six years will establish the brand on a long term basis, twelve years of product life you will have the user of the product selling for you. if you want to improve sales by giving a new model every three years, you will need a lot of innovation on the product and you need to buy back the old ones for a big discount, you can bear some cost for brand loyalty and hence build a reputation for more sales in the future. This implies proper and sensible investments in product design and development, engineering, reliability, standards and quality will help a company survive long term.
  • Theory and simulation can give you only part of the picture, you have to breadboard to test properly.
  • In schematic indicate pin numbers of every IC or map the correct part if manual place and route is used.
  • Keep functional blocks of circuits as modules or separate areas in a big PCB, this helps in testing and troubleshooting.
  • When you design an equipment keep the controls minimum, too many options and too many knobs and dials are not good ergonomics . For your equipment to be user friendly use simple navigation and not menus nested 6 deep.
  • Power circuits, digital circuits and analog circuits should have separate supplies and ground when possible.

Digital and Embedded Systems Design

An Embedded Microcontroller or DSP system is made of Chips, Circuits and Firmware. The digital voltage levels, speed, bus width, fan out, power consumption are some factors that a designer has to keep in mind. As portable and wireless gadgets are becoming more popular, RF, Ethernet and Energy Efficient Design aspects should be studied. Power electronics and Analog Circuits knowledge is used around the system, all this is integrated to make an instrument, equipment or gadget.

Digital and Embedded Systems Design
  • 80C51 ports can sink more current but source very less, hence use a 10k pull up at all the ports or outputs.
  • Firmware must be developed in increments, tested in increments, backed up in increments, must be modular (include) reuse.
  • Tristate output, High Impedance and Floating all mean the same when it comes to IC Inputs-Outputs. It means the pin is insulated from rest of circuit in the IC. That means it will not influence the node or bus it is connected to. A DMM terminals are floating means that the hand held plastic DMM has no electrical conductive link to earth or ground.
  • You can use hyper terminal to upload code to single board computers 80C51 like in BINARY or ASCII. 
  • ASICs are for large volume production, or for products which have a long product life cycle.
  • Low volume production use FPGA or CPLD, or even flash based microcontrollers, so that all your inventory can be reused and recycled.
  • Cell phones or a LAN card ASIC is ideal as volumes are good in cell phones and for LAN cards the technology is matured. For either FPGA or ASIC's you get IP Modules or Code Libraries for many functions and applications.
  • Whatever the method keep design flexible and modular for reuse and to save cost. remember the hardware is difficult to alter, software can be altered even at customer site, flash has made this possible
  • In the future chips may be both analog and digital programmable with flash.
  • Some FPGA, CPLD, ASIC links, WinCUPL, Design and Reuse, fpga4fun.
  • Unused CMOS inputs should have a pull up or pull down resistor, it should not float, or it oscillates.
  • Have a decoupling capacitor 104 that is 0.1uF or 100nF across the supply of every IC very near the IC supply pins.
  • A watchdog timer should be used in every microcomputer circuit like 8051 so that the system resets on hanging.
  • The reset on a microcomputer should be applied till the supply to it is stabilized, this will enable a clean start.
  • Analog ground (opamps), digital ground (CMOS) and power ground (relays and LED) should be separate, (linked at root)
  • Pull up or pull down resistors in TTL can be 10K and in CMOS 100K and in battery operated systems 1M.
  • CMOS gates and Opamps have a output drive capability of ~ 10-20mA, so when you drive a load say an LED use a series resistor to limit the current to 5mA to 10mA.
  • When the number of digital chips you use in a project goes above 20 or 30 then it is better to use PLD or CPLD types from Altera, Xilinx or Lattice etc.
  • Try to use same family ICs in a circuit, like only LS or only HCT, if you mix up then you have to do a design review.
  • In a industrial environment many motors, DC drives and AC drives will be running, this will produce EMI, RFI, kickback spikes which cause microcontroller based equipment to hang. Use a watchdog timer for uC.
  • More EMI immunity by using opto couplers for all input and outputs, 4-20mA current signals for input and output and an isolated wide range SMPS.

Sunday, January 18, 2009

Design Notes - Analog Basics - 06

Building discrete semiconductor and passive designs, using Opamps and Mixed Design Circuits are the first step in electronics. Most consumer Electronics have a high analog circuit content. Even in Embedded Systems the interface design that matters for real time systems is an analog circuit.

Here are some more analog points in my old notes.

  • The Contact resistance of connectors, thermocouple effects in connectors and solder joints and thermal gradients over the PCB can cause errors when you measure in high resolution.
  • High impedance points of circuit like 500 kilo ohm and above can pick up AC noise and DC leakage currents. this will affect the performance of circuit, so for DC you have to put a 'gaurd ring'of the signal ground around that point in PCB. For RF you have to shield with things related to iron and mu metal, for low signals even a copper shield will do.
  • Unused high impedance inputs of opamps or gates or any IC should be pulled-up or down.
  • High Impedance inputs which have to float can be made noise immune with a small cap to ground. Like a 102 CD.
  • If an opamp circuit with feedback oscillates, then a cap at the right place can stop it, it will dampen the oscillations, just like eddy current dampening in moving coil meters. One way is a cap across the feedback resistor another way a cap between inv- and non-inv+ inputs. A closed loop system may oscillate at border points. The value of cap depends on how fast (response time) the system has to be and the type of oscillations seen.
  • Inputs and Outputs are the points of electric abuse, opto isolate, use zener barriers with overrated devices.
  • If one layer of PCB is a ground plane and second layer has wide tracks they may form a capacitance (say 1pF) with the PCB glass epoxy as dielectric, more so in multilayer PCB as dielectric is thinner.
  • In a 3-1/2 digit meter circuit you may need 0.1% Resistors 10ppm or less, so in a 4-1/2 meter we need 0.01% Resistors 1ppm or less or temperature compensation circuits and trimpots.
  • Tolerance of resistors in a precision circuit and thermal drift of both opamps and resistors; can show movements in high resolution measurements. So the whole circuit may have to be built into a sealed 40 deg C Instrumentation Oven sealed in glass wool. This will work both in cold and hot climates.
  • Humidity, chemical fumes, dust and grime should not reach the analog circuit areas. Depending on application, a coating may have to be given or the entire unit hermetically sealed.
  • Use MFR (metal film resistor) 1% in all analog designs and if possible use only MFR for better reliability.
  • Glass epoxy PCB have high insulation resistance, above 10 tera ohms, and are not hygroscopic which means they do not drink water vapor, this makes them very suitable for precision instrumentation and sensitive circuits.

Saturday, January 17, 2009

Design Notes - Components Selection - 05

Selecting the parts for your product design, choosing the components intelligently is a part of Product Design Engineering.

Budget, Availability, Size, Alternate Vendors, Product Life and Quantity to be manufactured are some factors that determine the selection of a prudent and experienced design professional.

To choose the right type of part, an exhuastive knowledge of the behaviour of passives and discretes is essential. Some points i remember among the things that i learnt the hard way are listed below.
  • Over rate components at least double, if you need a 1A-100V-100uS diode, use a 2A-200V-50uS diode.
  • Electrolytic capacitors have a shelf life, if you need to store them you have to charge them every month.
  • Gold plating is used in connectors because it has low contact resistance and does not corrode or react
  • Use a 100uF and 0.1uF CD in parallel to filter because the inductance of 100uF is a lot (the electrodes are wound as in a coil) and high frequency passes over and is filtered by the 0.1uF which has negligible inductance.
  • Ceramic capacitors leak a bit, electrolytics leak a lot but plastic or mica capacitors do not leak at all, near perfect. An oscillator with a RC time setting needs a plastic cap for stability.
  • In industrial electronics equipment, connectors are a source of many problems, hence avoid connectors. vibrations, corrosion and frequent usage will result in strange problems.
  • Small signal diode 1N4148 switches at 4nS, current of 70mA and 70V withstand capacity.
  • 2N2222 and 2N2907 form a fast switching NPN-PNP pair and have been around for decades.
  • LED displays are best indoors and are not so good for sunlit outdoors, LCD is good for that.
  • All electromechanical parts like switches, relays, connectors and pots have limited number of operations.
  • Failure of parts are when parts are stressed beyond limit, bad environment, misuse, infant mortality and normal aging.
  • Most pots have a dielectric insulation between metal pot shaft and terminals of 1KV or more. Some commercial pots may have lesser breakdown voltage and that will be a product safety issue. So either way use Plastic Knobs or pots with plastic shafts.

Friday, January 16, 2009

Design Notes - Power Electronics - 03

SMPS designs should have clear line or patch of isolation for product safety and long term reliability. If you use opto-couplers they need to have 5kV or better isolation and 10mm between pins. The Live circuitry and the output circuitry should not overlap on PCB, tracks should not stray to the opposite side, The Transformers can be split bobbin if possible. A 10 to 20 mm desert (means no tracks) running from end to end of PCB under Transformer and under optos etc., Even ground tracks and ground planes should not stray.

The high voltage side must have layer to layer (mylar) insulation, means wind a layer and then put the yellow mylar tape, make tape concave so no strands should slip over to next layer, use split bobbin if possible. have terminations far away and enclosed for safety. vacuum impregnate with natural resin or epoxy depending on voltage and environment. product safety is very important.
  • If in your power supply you have a varistor, then you should have a fast acting fuse in series, as varistor fail as a short.
  • Wire and crimping of wires for supporting the high currents and high voltages must be carefully chosen. The copper cross section area gives its ability to carry current, the quality, thickness and flexibility of the insulation gives its voltage capability. The Tightness of the crimped contact will ensure long term reliability. Mechanical Stress prevention for all wiring is very important and guarded termination for user-operator safety.
  • BTA16600 and triacs of this series from ST have the metal TO220 tab electrically insulated from the device.
  • MOC3041 and others, switch triacs at zero crossover which reduces EMI-RFI and spikes. It means when the sine wave is close to zero volts the triac is turned on.
  • You have to ensure proper air circulation and fix proper heat-sinks with thermally conductive heat-sink compound or silicone grease with alumina. Anodized Aluminum heat-sinks with large surface areas and small fans are used in power electronic products for this purpose. If a component works very hot the specs will get derated, precision is lost and undesirable and unpredictable results will happen.
  • A thermistor must be used in series with huge power electrolytic capacitors to limit the enormous current inrush on start, or spikes may stress components, cap or EMI-RFI.
  • A freewheeling diode should be used across a relay, solenoid coil or motor because inductive kickback will damage transistor or mosfet. High current loads like relays can reset logic circuits if ground is not connected well, It also produces more ripple in supply, so it is better to have a separate supply for such parts.
  • EMI-RFI causes-Switching Loads Simultaneously (inductive loads). Power factor correction capacitors and devices. Lightning strikes (enhanced by earth faults). Line Inductance (inductive kickback, resonance). DC and AC Drives for Motors. Rectifiers with large filters and stray inductance.
  • Small battery operated gadgets when turned on after a very long time may not work properly due to a thin oxide layer at the battery connector, replace cells if required, scratch and clean battery and connector surface, the reason is some gadgets consume so low power that the current cannot break a micronic oxide layer. Keep using regularly.
  • Loose Contacts may have a resistance like 100mE (milliohm). A bit of corrosion and 10A of current will make that dissipate 100 * 102 = 10,000mW = 10W , if the contact area is 1 sqmm the heat will cause the resistance to increase, then the dissipation becomes more, sparking and welding may happen, it can even cause fire.

Thursday, January 15, 2009

Production Notes - Electrical - 02

All Electronic Products have interfaces to external electrical circuits. The power supply is also derived using converters or power supplies. Motors, Heaters and Transformers are examples of components in the electric power circuits.

  • 12V lead acid batteries should be charged with a constant current CC and constant voltage charger the CV being 13.6V. Deep discharge and over charging will reduce the cycles.
  • Lead acid batteries need a monthly distilled water update to ensure long life, sealed lead acid dont need attention. Keep lead acid batteries in well ventilated area due to acid fumes.
  • Electric Shock can kill hence take great care, Electrolytic capacitors burst and Transformers catch fire. turn off equipment after use. turn off all electricity when going out of town.
  • Inductive kickback starts a tubelight or automobile as high voltages are produced when current in inductor is turned off. This also is the cause of failure in power semiconductors.
  • Earthing is important, ensure it's perfect, the neutral to earth could be 5V AC max., also a circuit breaker and fuse a must. Use a electrical earth leakage circuit breaker to protect both man and machine.
  • Extra care should be taken to prevent injury to eyes while working. Also 230V/110V shock can be fatal. working on high energy electrical circuits and power electronics should be with all precautions.
  • You need a Fuse, Circuit breaker and earth leakage circuit breaker for safety against shock and fire hazard.
  • High voltage or current stress, mechanical vibration, user misuse, High Energy stress (freq and voltage), aging (cycles) cause failure.
  • Good earthing, servo motor regulated mains supply, earth leakage circuit breaker and over current circuit breaker, HRC fuse are some safety steps to take.
  • When working with HV or HE circuits wear shoes, keep yourself dry, the supply board should have above protections in red.
  • Use silicone shrink sleeves to insulate or close exposed high voltage wire ends or joints.
  • Sparking at the high voltage mains supply power contacts like a plug can cause electronic gadgets to fail.

Tuesday, January 06, 2009

Thermocouple Temperature using DPM or DMM

Description -

If wires of two dissimilar metals are joined at both the ends and the junction formed at one of the ends, is heated more than the other junction, a current flows in the circuit due to Seebeck thermal emf. This effect is used in thermocouple temperature sensors.

The Peltier effect is the converse of above Seebeck effect, which means that if a current is forced through junctions of dissimilar metals, the junction will generate heat or absorb heat (cooling) depending on direction of the applied emf. This effect is used to make portable and small refrigerators.

Going to practical temperature measurement, we know that one of the junctions is the sensing or hot junction (Tmes) and the other junction is the terminating or cold junction (Tref), the voltage between terminals 'a' and 'b' is proportional to Tmes - Tref (and given in the Table 1) . The formula being Vab = alpha x (Tmes - Tref), where 'alpha' is the Seebeck coefficient of the thermocouple.

Thermocouple Junction

Table 1

MV Thermocouple Temperature in Deg C As cold junction is not zero but is at room temperature (RT) add RT to temperature.
0 0
2.585 50
5.268 100
10.777 200 Example -

Feed 10.777 mV to the TC+ and TC- terminal if RT then is 30 Deg C reading on 2V DPM Will be 230 counts - 230mV.


16.325 300
21.846 400
27.338 500
33.096 600
Reference junction or cold junction at 0 deg C.

In the circuit, use only metal film resistors (MFR) of 1 per cent tolerance, as this is an instrumentation application. Power supply should be a stable +5V, -5V supply, for which one can use 7805 and 7905 regulators.

The inputs TC+ and TC- terminals should go to a 4-way barrier terminal block, the 2 extra terminals are used to mount TH1 Cu thermistor. This forms an isothermal block, which is good enough.

A simple way to make a TH1 Cu thermistor, is to take a 1 Meg-ohm 2W resistor as a former and wind 2 meters of 46 SWG enameled copper (Cu) wire (5.91 ohm/meter) over it. This gives a 12-ohm value. Terminate wire ends on resistor leads.

Circuit Diagram -

Thermocouple Temperature using DPM or DMM


Thermocouple Amplifier Circuit - PDF version of above, more details and easily printable.

Test and Calibration -

For calibration, you will need a DMM-DPM and a milli-volt source (as shown in the Fig.). First connect source to terminals TC+ and TC-, then set source to 0.00 mV (verify with DMM for zero). The output across +out and -out (use DMM) terminals must be mV representing the room temperature (RT). For example, if RT is 30° C (use a glass thermometer) then +out should be 30mV at 0mV input. Adjust VR1 till 30mV is read at +out terminal. This is 'zero cal'.
Millivolt Source
Now increase mV input to 21.85 (corresponding to 400° C). Now vary VR2 till +out terminal is at 430mV (temp. +RT). This is 'gain cal'. Now as VR1 and VR2 are interdependent you may have to repeat 'zero cal' and 'gain cal' a few times till you get the above values.

Properties of J thermocouple and design aspects of gain block used in the temperature measurement instrument are summarized below:

J Thermocouple Ansi Symbol 'J' -

  1. J is a thermocouple made of iron + VE and constantan -VE.
  2. Constantan is an alloy of copper and nickel.
  3. Full range of use is from -200° to +700°C
  4. Practical to use only from 0°C to 400°C.
  5. Useful in reducing and Alkaline atmosphere.
  6. Corrodes-rusts in acidic and oxidizing atmosphere
  7. Color code of wires negative-red and positive-white.
  8. J type is popular because of Low price and high mV output.
  9. J type TC used in rubber-plastic forming and general purpose use.

Design of Gain Block -

  1. Minimum input from thermocouple is very low like 1-2 mV. Hence ultra low offset (100uV opamp is required - OP07 used).
  2. Inputs may be subjected to wrong connections or high voltage. Use of R1 limits current and Zener ZD1 clamps voltage to safe level. (low leakage zener or use diode).
  3. Gain required is 400mV - 21.8mV that is approx 18 at 400° C. Gain Av = ( Rf + Ri ) / Ri here Rf is R7 and Ri = R5 + R6 + VR2 (in circuit value).
Design of TH1 cold junction compensation copper thermistor -
J Type TC output changes by 0.052mV per deg C as per Table 1. Copper has a temperature coefficient of 0.0042 ohm per ohm/deg C. eg. for a copper wire of 12 ohms, it is 12 x 0.0042 = 0.05 ohm/deg C.

For R1 of 5K current Thru TH1 =5V / 5K = 1mA. Change of voltage across TH1 with temperature is
0.05 x 1mA = 0.05mV / deg. This rate is same as J type TC hence it simulates cold junction

delabs Technologies