Subscribe to EDN
RSS
Reprints/License
Print
Email

Decoder lights the way

A two-line-to-four-line decoder indicates status even when both signal lines lose power.

Jean-Bernard Guiot, Mulhouse, France; Edited by Martin Rowe and Fran Granville -- EDN, February 19, 2009

To display the status of two digital outputs, you can simply connect an LED and its resistor on each output. You must, however, interpret, or “decode,” the displayed binary code. In addition, when no LED lights, users have no way of knowing whether it means that both outputs are off, that the power is off, or that a malfunction has occurred. In some applications, including industrial and medical settings, an indicator sending an ambiguous signal would be unacceptable. This Design Idea describes a simple circuit that resolves this problem by displaying four states on four LEDs (Figure 1). The operator need not understand binary coding, and, if no or more than one LED lights, it can mean only “no power” or “default.”

The circuit works in the following way: If both inputs A and B are low, Q1 allows current to pass through D1 and resistor R2 to A; only D1 will light. Symmetrically, if both inputs A and B are high, Q2 passes, and the current can pass from A through R4, Q2, and D4; only D4 will light. If both inputs are on different levels, only D2 or D3 will light. Table 1 shows the possibilities; all other displays point to a default, such as a bad connection, a no-power condition, or a malfunction.

A totem-pole output that can sink and source the current for one LED must drive the A and B inputs. Resistors R2, R3, and R4 are for applying a 12-mA LED current if the power supply is 5V. No component is critical. For example, you can use generic transistors, such as the NPN 2N3904 and the PNP 2N3906. You can even use transistors with integrated base resistors, further reducing the component count.

RSS
Reprints/License
Print
Email
Talkback
Canon Resource Center

Featured Company


Most Recent Resources

Advertisement
Related Content

No related content found.

  • 0 rated items found.
Advertisement

KNOWLEDGE CENTER

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
Featured Job On
Scroll for More Jobs
Advertisement
About EDN   |   Site Map   |   Contact Us   |   Subscription   |   RSS
© 2012 UBM Electronics. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other UBM Canon sites

UBM Canon | Design News | Test & Measurement World | Packaging Digest | EDN | Qmed | Pharmalive | Appliance Magazine | Plastics Today | Powder Bulk Solids | Canon Trade Shows