DIGITAL ELECTRONICS
NUMBER SYSTEMS Decimal Numbers
The decimal number system is comprised of ten digits, zero through nine. It is based on units of ten, and is called a base-ten system. For example, 4,732 is imme-diately recognized as four thousand, seven hundred, thirty-two. What the digits 4732 actually mean is the sum of four thousands, seven hundreds, three tens, and two ones. In the decimal number system, the digit in the one’s place is multiplied by 100, the next digit by 101, the next digit by 102, and so on, for as many digits as there are in the number.
4 1,000 4 103 4,000
7 100 7 102 700
3 10 3 101 30
2 1 2 100 2
4,732 Binary Numbers
The binary number system uses two digits, one and zero. It is called a base-two system. The binary system fits well with the way digital circuits operate. For example, a transistor can be controlled either to conduct or not conduct current, and can quickly switch from one state to the other. Whether the transistor is con-ducting or not controls whether its output is high or low, signifying a one or a zero.
The two-state digit is called a bit, a contraction of the words “binary digit.” An example of a binary number is 100101 (read as one-zero-zero-one-zero-one). This number is the sum of six binary values which totals 37 in the decimal number sys-tem. In the binary number system, the digit in the one’s place is multiplied by 20, the next digit by 21, the next digit by 22, and so on, for as many digits as there are
In computers, a combination of several bits is used to represent standard characters. Most computer products handle information in bytes, where a byte is a combination of eight bits. One byte can represent a number, a letter, or a special character.
Hexadecimal Numbers
Hexadecimal numbers are sometimes easier to manage when working with large numbers. Since it takes a long string of 1’s and 0’s to represent a number of any size, it might be convenient to group together binary numbers to form another value with the same meaning. Since computers operate mostly with 4-, 8-, and 16-bit numbers, a grouping of four bits is useful. The hexadecimal system, the base-16 system, is useful because 4 bits can be arranged 16 different ways, and 4 is a common factor of 4, 8, and 16. When working with bytes, two hexadecimal digits define one byte rather than the eight 1’s and 0’s which would be necessary in the binary number system.
The relationship among the decimal, binary, and hexadecimal number sys-tems, for the first 16 numbers, is as follows:
Decimal Binary Hexadecimal
Binary Digital Logic Circuits
Figure 5-9 shows a schematic diagram of a circuit with a battery, a light bulb, and a switch. When the switch is closed, the light bulb is on. When the switch is open, the light bulb is off. In the truth table, the binary numbers 1 and 0 are used to rep-resent on and off, or that the switch is open and closed.
The NOT function is illustrated in Figure 5-10. The light is on when the switch is not closed, and off when the switch is not open. The NOT function is an invert-ing function, and the circuit element is called an inverter. If the input is –
A, the output is, which is read: “A bar” or “Not A.”
Figure 5-9. Logic Circuit and Truth Table.
Figure 5-10. NOT Function.
Figure 5-11. AND Function.
Certain digital circuits are called logic circuits because they perform like the logic functions AND, OR, NAND, and NOR. Figure 5-11 shows the AND func-tion: the light is on only when both switches are closed. Figure 5-12 shows the OR function: the light is on when one switch or the other is closed. Figure 5-13 shows the NAND function: the light is not on only when both switches are closed. Figure 5-14 shows the NOR function: the light is not on when either switch is closed.
Figure 5-12. OR Function.
Figure 5-13. NAND Function.
Figure 5-14. NOR Function.
Figure 5-15. Logic Symbols.
Memory Circuits
In digital electronics, logic elements are used to make decisions. The decisions are then stored in memory elements whose basic building block is the flop. A flip-flop is a one-bit circuit which remembers 1’s and 0’s.
The logic diagram for a J-K flip-flop is shown in Figure 5-16. The truth table lists possible values for the inputs J and K and the output Q, which will appear after the next clock pulse. The value of Q only changes each time a clock pulse appears. The new value of Q depends on the inputs J and K. If J and K are both 0, the output Q keeps the same value (0 or 1) it had before the new clock pulse. If J and K are both 1’s, the output Q changes to the opposite of the value it had before the clock pulse. If J and K are 0 and 1, the output Q is set to 0; if J and K are 1 and 0, the output Q is set to 1. The other outputQ is always the inverse of Q.–
With AND, OR, NAND, and NOR circuits the outputs change immediately when inputs change. Flip-flop outputs change only when a clock pulse arrives. So a flip-flop is a memory circuit which remembers the input status from the last clock pulse.
Figure 5-16. J-K Flip-Flop.
Most digital systems and all computers need to remember thousands of bits of information. Large memories are made by integrating thousands of flip-flops onto a single piece of silicon, forming a single integrated circuit. Since most computers operate with 8-bit bytes integrated circuits are designed to store bytes by the thousands.
Several construction techniques exist for memory circuits to satisfy different needs. The most popular electronic memory types are Random Access Memory (RAM), Read Only Memory (ROM), and Programmable Read Only Memory (PROM). All forms of memory can be read over and over again without changing the contents.
Random Access Memory is used for the temporary storage of data. It is used for applications where information is stored and retrieved quickly and frequently.
A disadvantage of RAM is that all data is lost when power is removed from the circuit. This memory is also called volatile memory and can be supported with batteries (called battery back-up) to power the RAM in the event the main power supply fails.
Read Only Memory is made at an integrated circuit factory to a set of specifi-cations called a mask. This memory can be programmed to perform like many individual gates or to store data which can be accessed as needed. When making a masked ROM, permanent changes are made to the silicon inside the integrated circuit (IC) package. Once a ROM is programmed at the factory, the contents of its memory can never be re-written. This memory is permanent and remains intact even when power is removed. It is called non-volatile memory.
Programmable Read Only Memory stores information which cannot be re-written. Therefore PROMs can be programmed by the user at the laboratory or manufacturing facility and installed in the electronics. Another form of PROM can be erased and programmed by exposing the silicon through a glass window in the package to intense ultra-violet light while entering new data. This is called Erasable Programmable Read Only Memory (EPROM). Electrically Erasable Programmable Read Only Memory (EEPROMS) are erased and written electri-cally. Another form of PROM is FLASH memory which is faster and permits more erase/write cycles than EEPROM. This type is generally used when there is a requirement for a large amount of non-volatile memory. Programmable Read
Only Memories are useful for prototyping, for low volume requirements, and for applications where the data stored might be changed periodically. The software programs stored in PROMs are sometimes called firmware.
MICROPROCESSORS
Microprocessors get instructions and data from memory, perform arithmetic and logical functions on the data, and store the results. The instructions are in a specific sequence, specifically written for each application by a programmer.
Microprocessors typically operate on data organized in groups of 8 or 16 bits.
Usually the data path used by the microprocessor defines the data path of the memory chips in the circuit. For example, 8-bit microprocessors use memory circuits with 8-bit data paths. A microprocessor has an input-output system to control communications between itself and external devices. Microprocessors are packaged as integrated circuits.
Analog to Digital Conversion Circuits
These circuits convert an analog signal to a digital representation. The digital output is represented as a word ranging from 8-bits to 20-bits. These words can be in a signed or unsigned format. Successive approximation and sigma delta are examples of different techniques used to perform this conversion.
Digital Signal Processor
Digital signal processors (DSP) are used to execute repetitive math-intensive algo-rithms. Multiply and accumulate is a fundamental math function in a DSP that is used in higher-level calculations such as watthours and VARhours. A DSP cou-pled with an Analog to Digital Conversion circuit can be used in a digital meter for calculation of energy and power.
CHAPTER
INSTRUMENTS
E
LECTRICAL MEASURING INSTRUMENTS are necessary because the nature of most electrical phenomena is beyond the reach of our physical senses.Measurement of electrical quantities makes possible the design, manufacture, and maintenance of the innumerable electrical devices now in use.
The main purpose of any electrical instrument is to measure and indicate the value of an electrical quantity. The measurement may be indicated by a digital numeric value or by a pointer positioned on a scale. Some instruments provide additional functionality by recording measured values over time. This recording may be in the form of a physical indication on a moving chart, as maximum and minimum values during a time frame, or as periodic data stored in electronic memory. The devices commonly used for such measurements are voltmeters, ammeters, and wattmeters.
The field of instrumentation is extensive and includes many classifications of instruments according to portability, type of indication or record, accuracy, design features, etc. We shall briefly discuss only those instruments commonly used in meter departments. These include displaying, indicating, electronic digital, and recording measuring devices.
We will review digital, moving-coil, moving-iron, electrodynamometer, and thermal measuring technologies. Though digital is the most common technology offered today, many instruments utilizing the older technologies remain in use.