Chapter 6 – Other electronic components and concepts

From MKRD.info Wiki

NOTICE: As a courtesy, you are viewing a preview version of an upcoming book, Transistors and Semiconductors: Clearly, Simply, Intuitively, and Concisely Explained by Michael LoneWolf. Since this is just a preview, the text below has been stripped of formatting and images. I need YOUR help to have this book published. Please HELP by visiting my Funding Request page at the main website. DISCLAIMER: This is an obsolete (draft) version of book manuscript. It is not intended to be used for study or reference, but for book preview purposes only. Support the project so that you can purchase a print copy of the most up-to-date book version with all formatting and illustrations!



The reader has realized by now that this book has never discussed what's actually inside a semiconductor electronic device, and what exactly the term “semiconductor” means. I reward the reader for reading up to this point, and reveal the hidden truth about semiconductor electronic devices:

Semiconductor electronic devices work because they contain magic blue smoke. It is not possible to observe the magic blue smoke in operation, nor is it possible to know how it works. However, if the electronics experimenter is careless (by operating the device beyond its breakdown voltage, current, or power ratings), the magic blue smoke escapes, and the device doesn't work nomore.

First, we will cover some electronic devices which we haven't seen before. Then, we will cover some classic circuit building blocks which are commonly used.

6.1 Other semiconductor devices

A variety of other semiconductor types exist, but I have chosen to not cover them all. Either because no additional knowledge is required to understand their behavior, or because they are not made and sold by anyone anymore. The reader may wish to read about these devices elsewhere, which include:

Tunnel diode

Varicap/Varactor

Avalanche diode

Exotic diode types

SCS

GTO

For motor control, there are two TRIAC trademarks to look up: Alternistor and Snubberless

Uni-junction transistor (UJT)

Programmable uni-junction transistor (PUT)

etc, etc

Battery Cell

There are several types of battery cells:

Cells commonly labeled with “heavy duty” and “super heavy duty” are actually the worst battery cells. These are made of carbon zinc, and last for much less than an alkaline cell. These are usually sold along with electronics with the words “batteries included”, or in discount retail stores. It costs very little to have these batteries included, and the “super heavy duty” phrase is a parody of itself. Do not try to save money by buying these batteries.

Alkaline battery cells (brand-name types, usually) last a reasonable amount of time, but are a waste of money and resources because they are not rechargeable. Their no-load voltage is about 1.5V, which drops to about 0.9V when the cell is completely dead. The proper way to test an alkaline cell is with a medium-current load like a lightbulb. A voltmeter can do only a very rough indication of the full/discharged status.

The 9V battery cell. This battery is actually the most expensive, the least powerful, and the shortest lasting battery-based source of power. Inside, a 9V battery is actually a stack of what looks like watch “cell” type batteries, stacked six high. The battery is considered dead at 6V (1V is dead for any battery cell). The battery can supply little current. When not used, there must always be a cap or a piece of tape over battery terminals, to prevent a short (which will cause the battery to heat up a lot!).

A rechargeable battery cell. These have a “charged” cell voltage of 1.2V and are considered dead at about 1V. Notice that the “charged” voltage of a rechargeable battery is about the same as the “discharged” voltage of an alkaline battery. Not all of consumer electronic devices are designed with this in mind.

The Ni-MH voltage-capacity plot, compared to an alkaline cell looks like:

Fig 6.1

Notice the quick drop-off at the end of battery capacity, but a stable voltage level before then. Again, consumer electronics which was not designed with rechargeable Ni-MH batteries in mind may appear to receive enough power from the battery, but then “run out of charge” in a matter of minutes.

Using rechargeable battery cells

The best energy storage for hobbyists are Ni-MH AAA thru D cell sizes, and 9V cells. I am a big fan of Ni-MH AA rechargeable battery cells. Disposable AAA—D and 9V batteries are a great waste of resources. My recommendation for the reader is to buy a pack of rechargeable batteries, and educate the household that battery cells will no longer be thrown out when they run low.

However, I am not a fan of retail rechargeable batteries and chargers. The recent ones have chargers which charge a battery in 30 minutes or even less. This shortens battery life. A much slower charger which takes four or more hours to charge a battery, and is specific to Ni-MH cells will ensure a long battery life. Also, rechargeable batteries lose charge quickly when being stored, but the new LSD (low self-discharge) cells are a good investment.

The biggest weakness of Ni-MH is the high self-discharge. Unless a few cells are left in a maintaining charger, reaching for batteries which have been stored for a month or two, you'll find that they are discharged. Low self-discharge (LSD) Ni-MH cells have recently become available (such as Sanyo Eneloop and Tenergy).

A good AA-size rechargeable cell will have a fully charged cell voltage of 1.2V, and a typical AA-size cell capacity rating of 2500mA*h, where the specification is given as a maximum current multiplied by the length of time, and is pronounced "milliamp hours". For example, if the cell is discharged in 5 hour, the rate at which the capacity is determined, it will supply a total of of constant current for that time period. If the cell is discharged at a slower rate, such as 8 hours, then it can supply a constant current of . The slower the discharge rate, the less internal heating the cell experiences, and the longer the cell overall life. It is not a good idea to discharge a cell anywhere near the maximum rate. A rate of 0.2-0.5C should not be exceeded.

Ni-MH cells must not be discharged below 1V per cell. For Ni-MH AA cells, by whatever name it is called – undervoltage lockout, battery discharge monitor, low voltage alert – can be implemented with a single specialized IC such as Maxim MAX6778 family. Again – Ni-MH must not be fully discharged like Ni-Cd cells. Ni-MH cells do not have the “memory” effect of Ni-Cd cells. Stop use of a Ni-MH cell when the voltage starts to drop quickly below 1V. Life of rechargeable cells increases if they are not discharged completely and cell temperature is monitored, especially during charging.

Other rechargeable battery types available are:

Lithium (LiFePO4) CR123A rechargeable (Tenergy RCR123A, 3V)

Lithium-Ion AA rechargeable

At high power levels: Sealed Lead-Acid (SLA), deep-cycle or lead-acid car battery.

Rechargeable battery life is dependent on how properly it is being charged, stored, and discharged. In general, battery life will be long if it is used in moderate temperatures, and it is not charged or discharged completely or quickly. Most battery types severely reduce their capacity at cold temperatures.

AA cell charger

A proper Ni-MH charge process involves several different steps, and should be delegated to a specialized IC. It is important to not charge two cells in series at the same time, or any battery pack for that matter. A single bad cell will prevent proper charging of the pack.

Discharging the cell must be done properly as well. Different types of batteries cannot be mixed together (alkaline, Ni-MH, Ni-Cd, Zinc). Full-capacity and discharged cells cannot be mixed together. If that happens, fresh cells will force their current thru the bad cell, overheating it and making it leak. It is not uncommon for bad cells to even have their polarity reversed by the other batteries!

I have charging circuits posted online.

LDR

An LDR (light-dependent resistor), photocell, or a photoresistor is a semiconductor device which changes its resistance from very high at dark ambient levels, to low when exposed to light. Its response is usually very linear. A typical application is inside of every night-light.

Let us look at the datasheet of an Advanced Photonix, Inc PDV-P8104.

We see a dark resistance of 2M minimum, and an illuminated resistance of 30-60k at a specified 10 Lux illumination level. There is also a spectral response range given, just like with photodiodes.

Note that while device responds quickly to increasing illumination level by dropping its resistance, it takes a significantly longer amount of time for the device to raise its resistance to a high level after illumination is removed. 10 seconds to rise to normal high resistance is typical for an LDR.

RadioShack #276-1657 is an assortment of five photoresistors. Measure their resistance at different light levels and see how they respond.

Thermistor

A thermistor is a semiconductor device which changes its resistance according to the temperature the device is exposed to, either up or down, according to the type. The two types are NTC and PTC, which stands for either a negative or a positive temperature coefficient.

I recommend that the reader looks at the datasheet of a Vishay NTCLE100E3. Most of the datasheet is self-explanatory, but I would like to point out two important points. Firstly, the 10k resistance is not a room-temperature value. Don't expect a circuit to see the 10k at room temperature. Secondly, if a significant amount of current is passed thru the device, then the device will heat itself up, and change its own resistance. Depending on the coefficient type, this effect will either reinforce itself, or cancel itself, by affecting device parameters.

6.2 Non-linear devices and circuit protection devices

By non-linear we mean “do not follow Ohm's Law”.

A fuse is the simplest non-linear device. A fuse is a low resistance until a certain current amount. After that amount of current, the fuse “burns out”, and becomes an open circuit. Among the non-trivial things to know are:

For standard “glass barrel” type fuses, any operating voltage is acceptable, as long as it is below the fuse specification.

It takes a certain small amount of type for a fuse to blow. There are fast-blowing and slow-blow fuse types available. The slow-blow blows out only after a few seconds, even if the current flowing thru the fuse is somewhat higher than the rated current. This type of a fuse is a good idea, since circuit components such as capacitors and motors draw a significant start-up current which greatly exceeds the normal operating current.

Since the “something is drastically wrong” current is most likely significantly higher than the operating current, fuse current rating can be, as a rule of thumb, 1.5-2 times the circuit normal operating current.

SMD populated boards contain SMD-sized fuses. This is usually the cause of “electronic device does not work at all” symptom. Typically, these SMD fuses are tiny, not labeled, and are placed in several random locations on the board. This is usually the extent of “repair” which the consumer electronics gets when sent in for repair – a tech is armed with knowledge of fuse locations, and simply tests them and replaces as needed. The device is then sold as a refurbished unit to other customers.

There are self-resetting fuses, with names such as “PTC Resettable Fuse”, PolySwitch®, etc. They abruptly change their resistance from low to high when a certain current is exceeded, but return to low resistance when the over-current condition is removed and they cool down. PTC stands for Positive Temperature Coefficient.

Temperature protection devices are a safety feature of many appliances. They are placed into transformers, on motors, inside appliances which have a heating filament, etc, etc. In general, the resistance of these devices changes according to temperature. There are many different types of devices available, anything from “single failure to disable permanently” devices, to mechanical devices, to “resettable” devices to “temperature dependent resistors”.

For the changing-resistance type devices, the new term is “tempco”, which stands for “temperature coefficient”. A positive tempco has resistance increase with increasing temperature, while a negative tempco device has resistance decrease.

MOV

A Metal-Oxide Varistor deserves a special mentioning – but for its infamy, actually. The device is commonly placed across the AC wires like so:

Fig 6.2

to protect against over-voltage spikes and lightning. The device is in every power supply, surge-protector power strip, etc. At a voltage less than its rating, the device is a high resistance. At voltages higher than the rating, device resistance suddenly changes to a low resistance. Any over-voltage spike is dissipated as heat within the device. As soon as the over-voltage condition stops, the device returns to its high-resistance default. It is, however, a single-use device. A single over-voltage spike degrades the device. Repeated over-voltage conditions cause cracking, breakdown, and devices becoming low resistance. They follow their decision to go low-resistance by catching on fire! Consumers are not told that the surge-protecting power strip must have its MOV replaced after any suspected significant over-voltage or lightning condition, or the whole power strip is to be thrown out.

The infamy should actually be on the engineers and the consumers. On engineers, for making a “barely works, but is cheapest” circuit. A few additional devices such as a fuse or a breaker before the MOV, or an equivalent TVS would add to the cost. And the infamy should be on ignorant consumers as well.

Arcing protection

As we have found out earlier in the book, inductors produce a high voltage spike across themselves when current thru the inductor is suddenly turned off. That voltage is high enough to jump across the air between contacts of a switch. The arcing which results, besides being a health hazard, also wears out and destroys the thin plating of switch contacts, as well as produces EMI/EMF noise.

Whenever significantly inductive loads are switched, one of the transient suppressing devices should be used with switches or relays which control the load.

Transistor protection

All transistor types do not tolerate high voltages at the control terminal. BJTs will have large current flow thru the base-emitter junction if a constant-voltage source of >0.7V is applied to the base.

A BJT base must be protected against voltages in excess of the very low VBE limit (5V typ), and against excessive current into the base-emitter diode, which will produce excessive heating of the transistor and an eventual failure. Watch out that base current is always limited, perhaps thru a base resistor. We have already discussed an innocently-looking circuit which will destroy BJTs with voltage spikes from a current shunt. If base control voltages are uncertain, then a base resistor in addition to a voltage-limiting protection circuitry must be placed at the base of a BJT.

MOSFETs have low maximum gate voltages. A MOSFET's gate must be protected against being floated (being unconnected to a driving circuitry) in addition to not having VGSmax exceeded. If a MOSFET switches low drain voltages, and is permanently attached to the driving circuitry, then a gate to source resistor of 100k is usually sufficient. However, if the transistor drives large drain voltage swings, has to do it quickly, or has its gate controlled by a source outside that PCB, then a bi-directional voltage-limiting protection circuit must be used at the gate.

Lightning protection

It is beyond the scope of this book to cover such protection, but all I need to say is that absolutely no device can withstand lightning several times. After a lightning strike, all TVSes and MOVs must be replaced.

6.3 Integrated Circuits

Integrated circuits (IC) is the reward for our study. Compared to discrete circuits, ICs are simple, fun to use, and are very capable.

Designing with ICs is usually a plug-and-play affair. An IC is selected which was made for the purpose that is needed, the datasheet is examined for any pertinent information, and some precautions are made when using the IC in circuit.

Operational amplifier

An operational amplifier (op-amp for short) is the most universal IC device.

Fig 6.3

Its symbol is shown. The device has two inputs, labeled on the left side of the op-amp as "+" and “–”. The output is on the right, and power supply connections are on the top and bottom sides of the triangle representation. The minus of the power supply has nothing to do with the input minus (same goes for plus). It is actually a reference to the fact that an op-amp is so universal, it can be powered either by a dual-polarity power supply or by a single-ended power supply with the minus being the “COM” of the circuit.

An op-amp amplifies the difference between the two input terminals. The two inputs can be at arbitrary voltage levels. For example, if “+” was at 10V, and “–” at 8V, then the op-amp will amplify a -2V signal. The amplification gain and other parameters are set by external circuit components.

A whole book can (and have been) devoted to this single device. Discussion of an op-amp here is only an introduction to get the reader interested. Rudimentary circuit analysis skills (node and loop analysis, Kirchhoff laws, Thevenin equivalent, etc) are required to design with op-amps, but the devices themselves are a pure blessing. They have a very wide range of operating voltages, have very large gain (which can be set to an arbitrary amount by external components), very high input resistance and very low output resistance, contain a large circuit consisting of many amplifying stages in a small device which costs a quarter, and can be used to create circuits to serve any function, among all of their other benefits and features. Modern analog circuits nearly always contain op-amps, since many different circuit functions can be implemented with it.

RadioShack sells LM741, TL082 and LM324 op-amps. A good circuit analysis book (Irwin, Boylestad, etc) will provide all the necessary explanations and circuit analysis techniques.

Comparator

A comparator is a device which is closely related to an op-amp. It has the same symbol, and uses almost the same internal circuitry. It is not designed to amplify signals however. The gain is designed to be a very large number (more than ten thousand). If the two inputs are of equal voltage, then a comparator “amplifies” a zero difference, resulting in zero output voltage. If, however, the “+” input was a little higher than the “–” input, then the differential voltage will be “amplified” by a very large gain. Since the comparator is supplied by a power supply voltage which is little compared to the product of a small voltage times the huge gain, then all the comparator can do is rail its output (produce an output voltage as closely as possible to the supply voltage). It is therefore used for comparing voltages, or detecting when one voltage level exceeds another.

There is a critical issue to be aware of with comparators – most have “open collector” output:

Fig 6.4

Connected like this, the output does not do the intuitively expected behavior – raise its output HIGH when the voltage being compared exceeds a reference voltage. All the comparator does is drive the base of that output BJT. To get any results, a pull-up resistor must be used:

Fig 6.5

The output in this case is high when reference voltage level is not exceeded. That HIGH output has a limited current drive, of course. When the input voltage (“+”) exceeds the reference voltage (“–”), the output goes LOW. Note that unlike an op-amp or digital logic, a comparator does not have two output transistors which can swing rail to rail.

6.4 Circuit blocks

Power supply filtering capacitors. We have already found out why a pair of capacitors must be placed in any circuit. As we have seen in that section, the pair consists of a low-ESR, high-capacitance electrolytic, in parallel with a high-frequency ceramic capacitor. The capacitors provide energy for short bursts, short out noise and prevent it from circulating thru the circuit.

Capacitors for ICs must be located next to each chip. IC datasheet usually provides guidelines for filtering capacitors.

Constant current source

Fig 6.6

This symbol signifies a constant-current source which does exactly that – provides a source of exact current. Current sources are primarily used in ICs. They are outside of the scope of this book, but are an excellent reason for further reading.

6.5 Pulse Width Modulation and Motor Control

So far, we have been covering a lot of limitations of driving the load anywhere in-between the fully-ON and fully-OFF points. We have seen that the only way a transistor can supply an intermediate amount of power to a load was by dissipating the rest of the power in itself, in the form of heat.

Is there a technique which will allow us to have it all? To be able to drive high-current loads at any arbitrary level, and without generating heat, which requires heat sinks and wastes power?

There is. And it is called PWM (Pulse Width Modulation). Instead of driving a load by opening a transistor at intermediate levels of resistance, it is driven by controlling the proportion of time it is fully on or off. For the switching to not be noticeable, it is done anywhere from a hundred times a second to a hundred thousand times a second.

Fig 6.7

The switching (an another term is chopping) is not noticeable if it is filtered out by an output capacitor or the inertia of the load in not being able to respond to the fast on/off switching. As long as it is not noticeable, this has additional benefits. Driving a loaded motor with an analog input, for example, may cause the motor to not move at all at small drive levels. With PWM, full voltage will be briefly applied to a motor which is lightly driven, and the motor will apply full torque to the load, for a brief amount of time.

The driving circuitry benefits as well, since generation of PWM signals is very easy for digital circuits to do.

A block diagram of a PWM controller looks something like:

The trend in electronics is towards a fully digital circuit. We can have an audio system, for example, which accepts a digital input, processes it without introducing noise or errors, operates a very efficient (lossless) high power switch for the amplifier stage, filters the high power ON and OFF voltage levels with an LC network, and drives a speaker with a signal that, as far as the load is concerned, is a pure sine wave, and not a switching digital signal. Such a circuit is very small, lightweight, cheap, and very energy efficient.

6.6 Switch Mode Regulation

The digital concept can be also applied to such traditionally linear circuits as power supplies. For example, instead of a linear regulator such as a 7805/12, we can use a buck voltage regulator:

Fig 6.8

The switch S closes for a short amount of time, supplying current to the inductor. After a certain amount of energy is stored in the electromagnetic field of the inductor, the switch is thrown open. The inductor tries to prevent current change thru itself, and converts its stored energy into current. After a short amount of time, the inductor exhausts its stored energy and drops its voltage below what the output voltage requirement is. The switch is thrown closed again. The capacitor smooths out output fluctuations. The diode establishes a path for current flow with the switch open.

We can also build a boost dc-dc voltage regulator:

Fig 6.9

This works similarly. When the switch is thrown closed, energy is stored in the inductor. As the switch is open, voltage across the inductor jumps above input supply voltage. Capacitor smooths out fluctuations, while the diode prevents shorting of voltage across the capacitor when the switch is closed.

A buck/boost circuit is a combination of the two, and it can produce a stead output voltage whether the input is higher or lower in voltage compared to the required output. We can also build a switching-mode AC to DC power supply:

Fig 6.10

The high AC voltage is first rectified into DC. A fast-switching transistor pulses current thru the transformer. In response to the pulses, an AC voltage of a different amplitude is generated on the transformer secondary. That AC is rectified again. Compared to the linear transformer-based power supply, the transformer of the switching-mode AC-DC power supply is much smaller, because it operates at a frequency much higher than 60Hz.

Besides being small and efficient, the circuit can also easily adjust to an input voltage variation. Usually, 100-240V universal power supplies are built, which can be operated anywhere in the world (where residential AC voltage is not 120V as it is for USA).

DC-DC voltage conversion and regulation is a very interesting topic. DC-DC voltage conversion has little thermal losses, and can produce an output voltage which is either higher or lower than input voltage. If the reader wishes to play with a pre-built module, Dimension Engineering has the DE-SWADJ and AnyVolt Micro nifty little things, which are nevertheless pricey at $15-20. I have DC-DC regulator circuits listed on this book's website.

6.7 H Bridge

A limitation of the PWM chopping circuit we have already covered is that the motor can only be driven in one direction. There is another trick which we utilize if we want bidirectional control of the motor, and it is called an H bridge:

Fig 6.11

Four switching transistors are used this time, but the benefit is that full forward and reverse voltage can be applied across the motor. Using PWM, we can also apply as much or as little energy to the motor as needed, and even a brake function is easily implemented by simultaneously opening two of the upper or lower transistors at the same time.

The one condition which must never be allowed is two switches on the same side open. That would short VDD to COM. While this may seem a stupid comment to make, in reality those switches do not open and close instantaneously. If they switch slow, changing direction in the H bridge will cause VDD to COM shorts. This is called shoot-through.

Another point which many novice designers of H-bridges overlook are the realities of driving inductive loads and capacitive MOSFET gates. Both need a lot of current to happen, and both will try to resist any sudden changes. Additionally, when current to the inductive load is turned off or reversed, there will be very large spikes across MOSFETs, into the power rails, and into MOSFET gate drivers.