Home > Articles > Programming > Games

The Black Art of Video Game Console Design: Analog Design with Discrete Components

The good news is you have the foundation you need to understand the fundamentals of what’s going on with capacitors, inductors, filters, transistors, and so forth that you will need to begin designing a video game console.
This chapter is from the book

The first two chapters were a little brutal on the theory of electronics, so in this chapter we are going to start making our turn to digital electronics and a more practical hands-on "results" approach rather than a lot of theory. That is, we are going to introduce or re-introduce a number of components and see how to use them along with some examples, rather than analyze them as we did in the previous two chapters. At the end of this chapter you should feel very comfortable with basic electronics, components, and what to use them for. You may not be able to design much in the way of complete analog systems, but you should at least be able to follow along and understand the general workings of anything later in the book that has to do with analog design. Considering that, here's what this chapter has in store:

  • Basic Mechanical Components
  • Capacitor Models
  • Inductor Models
  • Filter Design
  • Diode Models
  • Voltage Regulations
  • Power Supply Design
  • Introduction to Transistors
  • Implementing Digital Logic with Transistors
  • Clocking Logic

3.1 Basic Mechanical Components

Although the majority of electronics are passive components like capacitors or resistors, along with active components such as digital chips, you still need basic inputs such as switches, and ways to adjust values. These kinds of components aren’t that sexy, but they are necessary. Let’s take a look at two classes of "mechanical" components: switches and potentiometers.

3.1.1 Switches

Switches come in thousands of sizes and shapes. For example, Figure 3.1 depicts a number of switches from a the popular switch manufacturer SwitchCraft, found on the Internet at http://www.switchcraft.com/. They also make lots of other connectors and other cool parts. In any case, the main function of switches whether they are large or small is to interrupt or connect a signal current flow, just as the wall switch in your bedroom turns on a light. There are a number of types of switches, but they can be generally categorized into their functionality by means of describing the number of contacts or circuits they have, along with the number of possible positions. So that we have a common vocabulary, here are some terms used in switch descriptions to begin with:

  • Poles—The number of switch contact sets that conduct current.
  • Throw/Way—The number of conducting positions: For single or double, "throw" is used; for three or more, "way" is used.
  • Momentary—Switch returns to its normal position when released. A spring is usually employed internally to accomplish this.
  • Open—The switch is in the off position, contacts not conducting.
  • Closed—The switch is in the on position, contacts conducting; there may be several on positions.
Figure 3.3

Figure 3.1 SwitchCraft’s plethora of switches.

3.1.1.1 Momentary Switches

The simplest switch is the momentary switch. Figure 3.2 shows a schematic diagram of two variations: normally open and normally closed. The normally open variation means that when you release the switch plunger, the circuit is open; when you press it, you close the circuit. The normally closed variation is the opposite: You press the switch to open the circuit. Figure 3.3 shows some pictures of classic momentary switches. The red cap usually means normally open, while the black cap means normally closed. In addition to the generic names, there is a more technical way of naming these switches. In Figure 3.4, you see that there is a single circuit to be opened/closed and the switch has a single state (released/depressed); thus these switches are classified as Single Pole Single Throw or SPST. What if you wanted to control two circuits at once with a single momentary switch? No problem; you simply need a Double Pole Single Throw or DPST. That means there are two circuits, but still only one state for them to be in. Figure 3.5 illustrates the schematic symbol for a DPST switch.

Figure 3.2

Figure 3.2 Normally open/closed momentary switch schematics.

Figure 3.2

Figure 3.3 Normally open/closed momentary switch examples.

Figure 3.4

Figure 3.4 Example SPST switch and circuit.

Figure 3.5

Figure 3.5 DPST switch schematic.

3.1.1.2 Slide Switches

The next type of switch is called a slide switch. Some common slide switches are shown in Figure 3.6. The point of a slide switch is that it’s not momentary, but stays in the position you leave it in. Figure 3.7 depicts the schematic symbol for a slide switch. As you can see, there are three connections on this particular switch; therefore, it can connect circuit A with B or B with C, but not A with C. The symbol on top of the switch represents the metallic or conductive slider. So this particular switch would be Single Pole Double Throw or SPDT. If there were two sets of contacts (two circuits) then we would have a Double Pole Double Throw as shown in Figure 3.8.

Figure 3.6

Figure 3.6 Common slide switches.

Figure 3.7

Figure 3.7 Schematic symbols for the slide switches.

Figure 3.8

Figure 3.8 Double Pole Double Throw switch.

3.1.1.3 DIP Switches

The word DIP switch stands for dual in-line parallel in the context of a switch; however, people sometimes will say "dual in-line package" as well. Figure 3.9illustrates the electrical symbol of a DIP and Figure 3.10 shows images of common DIP switches. DIP switches are usually nothing more that N slide switches in parallel; they are used in most cases to set hardware flags, control settings, etc. Each one of the switches is generally a SPST slide switch. You can find them in very small packages such as DIP2 all the way up DIP32. Common sizes are DIP4 and DIP8. When we get to digital electronics, we will use DIP switches all over the place; for example to set control lines that are sampled by the hardware or memory system.

Figure 3.9

Figure 3.9 DIP switch schematic.

For example, say that we need 4 control lines to either be 0 or 1; these control lines might select a memory chip or a port, who knows, but as a hardware designer we want a way to use a switch to send four 0/1 signals. Figure 3.11illustrates a DIP4 circuit that does this. Referring to the circuit, there are 4 independent switch circuits, each tied to ground, and each has a resistor connecting it to the system’s +5 power supply. All the switch circuits are identical, so we need only analyze one such as S0. When S0 is open, there is a path from the +5 supply to the output of S0, so any connection made to S0’s port will see a +5; this equivalent circuit is shown in Figure 3.12. A small current Iopen will flow in this case. As long as Iopen is very small (a few milliamps or microamps), the voltage drop over the resistor will be small and the port at S0 will have nearly +5 volts on it (a HIGH or "1" in digital electronics). The amount of current that flows depends on the resistor and the circuit that is being fed by the port. In most cases with TTL (transistor transistor logic), the load current will be milliamps, and with CMOS (Complementary Metal Oxide Semiconductor), the load current will be nearly 0 or in micro amps. The point being—the current Iopen is very small and we don’t need to worry too much about it. Now, the second case is more interesting; let’s look at that.

Figure 3.10

Figure 3.10 Images of DIP switches.

When the S0 switch is open, the port at S0 is feed with a +5 volt, but when we close the switch then we "short" S0 to ground. What happens now? Referring to Figure 3.13, there is an equivalent circuit shown for this case. There are two current branches, one from the +5 through the resistor to ground; this current Iclosed will always be

  • Iclosed = V/R = +5/R

Figure 3.11 Mechanical 4-bit HIGH/LOW switch.

Figure 3.12 Equivalent circuit for single switched bit open.

Figure 3.13 Equivalent circuit for single switched bit closed.

Thus, this is one consideration when selecting R. The second current is the "sink" current needed by the device being driven to pull it down to a logic level 0; this is in the specification/data sheet and we will learn it later, but again might be a few micro to milliamps, but since we are shorting directly to ground, this current will always be sinkable. Therefore, this switch with a passive resistor array creates a 4-bit 0/1 digital signal. The one confusing thing about the arrangement is that when the switch is CLOSED or "ON," the circuit creates a 0 (0V); when the switch is OPEN or "OFF" the circuit creates a 1 (+5V). This is simply the way that it is designed.

One last note: The configuration of resistors we just saw in the DIP switch example is called "pull ups." They are named that way since they pull-up the signals. There are also pull-downs; you can pull signals down to ground as well of course. However, most designers prefer pulling signals up rather than down, since a digital "1" takes less current sometimes to generate than a digital "0", so a pull-up and short to ground is cleaner.

3.1.1.4 Rotary Switches

Rotary switches are used when you want to gate or send a signal from one (or more) sources to one of N possible destinations (old TV sets used to have these rotary switches, for example). Figure 3.14 illustrates a one pole, N-way rotary switch. The single pole can be thought of as the "common" node (not necessarily ground), and by rotating the mechanical switch you can send the common signal to any one of the N-connections. Or you can use the switch backward and think of connecting one of the N-ways to the common. For example, when I was in high school, I made a little communications network with TVs and audio for the school. They wanted to be able to send a TV signal and audio signal to one of 5 rooms from a single source. Of course this is trivial with one of these switches; assuming a common system ground for example, I sent the composite video signal to one of five rooms using a circuit as shown in Figure 3.15. A similar circuit was used for audio. Of course, I put the whole circuit in a box, labeled it really nice and added a 9V battery with some blinking lights to make it look like it did something more complicated!

Figure 3.14

Figure 3.14 A rotary switch.

Figure 3.15

Figure 3.15 A video selector circuit based on a rotary switch.

3.1.1.5 A Plethora of Switches

Although the switches we just covered are the most commonly used, there are so many kinds of switches you could literally fill a 2,000 page book with them. In other words, if you have a mechanical event that you want to detect with a switch, there’s something; I guarantee it. Some examples of exotic switching mechanisms are

  • Hall Effect switches that switch or detect magnetic fields.
  • Mercury switches that turn on/off based on orientation and a floating glob of conductive mercury.
  • Reed switches that turn on/off based on the application of a magnetic field that effects an internal permanent magnet inside the switch.
  • Pressure switches that turn on/off based on air pressure or vacuum.

3.1.2 Potentiometers

Potentiometers (POT) are nothing more than variable resistors. Figure 3.16shows the schematic symbol of one along with a few actual devices. Basically, there is a knob or slide on the potentiometer that allows you to adjust the resistance from 0 to the maximum value. These are VERY useful devices. Internally, potentiometers work more or less by having the port contacts 1,2,3 connected to a piece of resistive material like carbon. When the slide or knob is turned, the current path length through the resistive element is changed as shown in Figure 3.17. Since the resistance of any material increases proportionally to its length, by placing a contact at two ends of the resistive material (contacts 1 and 3) and then placing a movable contact that makes a frictional contact to the resistive element (contact 2), you can change the resistance between contact 1 and 2 (call it R12) and between contacts 2 and 3 (call it R23) by moving the slide, knob, etc. Therefore, referring to Figure 3.17, the resistance of each branch or contact pair is simply

  • R12 = X1*Re
  • R23 = X2*Re

Or if the total resistance of the element is Rpot then

  • R12 = X1*Re
  • R23 = Rpot – R12
Figure 3.16a

Figure 3.16a Potentiometer schematic

Figure 3.16b

Figure 3.16b Some common POT configurations.

Figure 3.17

Figure 3.17 The mechanical operation of a slide potentiometer.

That is, the resistance is always divided between the two circuit legs, where Re is the resistance in ohms of the element per unit distance. Of course, we don’t really care about this much detail when using real potentiometers, and simply look at the specs for final resistance. So if a potentiometer is rated at 10K ohms then the resistance between contacts 1 and 3 is always 10K ohms; however, the resistance between contacts 1,2, and 2,3 changes as the potentiometer is adjusted. The specs of a potentiometer usually describe the action of the potentiometer. For example, "1-turn" would mean that there is a single 360 turn of the knob or dial that goes from 0–N. For example, let’s say that we have a 1-turn POT with a resistance of 10K. Let’s design a voltage divider with it that creates a 2.5V voltage at one of the contacts. Starting with the circuit shown in Figure 3.18a, we see that in fact, the POT can be used as a voltage divider; we also know from our study of voltage dividers that the voltage drop over each resistor R1 and R2 is simply their values divided by the sum multiplied by the source voltage.

Figure 3.18

Figure 3.18 Voltage divider circuit based on potentiometer.

Considering this, we simply need R1=R2=5.0K; this is easy! Just create the circuit as shown in Figure 3.18b and turn the knob (or dial) to 50% or half a turn, and that’s it. Of course, you need to set Vin to 5.0V (but I left it as a variable to show you that Vin is irrelevant of the voltage divider’s "action"). And the cool part is that you can adjust the voltage simply by turning the knob, so you have created an adjustable voltage supply. Of course, there’s the problem that you can only pull very little current with the supply, since any load would alter the impedance too much. However, if you were to use say a 100 ohm POT for the adjustment instead of 10K ohm and then only attach loads that pulled a few milliamperes, you would be fine.

As a final note, potentiometers are mechanical and thus have a lifetime; you can’t turn them back and forth an infinite number of times. They are fine for adjustments, but if you used them to constantly change something they would wear out and break. Also, they are nothing more than resistors internally, and thus have maximum power dissipation specifications in the watt range usually.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020