With HackerBox 0039, HackerBox Hackers around the world are leveraging ATX power supplies to power their projects, learning how transistors make up logic gates, and exploring the contents of cellular SIM cards. This Instructable contains information for getting started with HackerBox #0039, which can be purchased here while supplies last. If you would like to receive a HackerBox like this right in your mailbox each month, please subscribe at HackerBoxes.com and join the revolution!
Topics and Learning Objectives for HackerBox 0039:
- Tap standard voltage levels from a salvaged PC supply
- Convert 12V DC to a variable output voltage supply
- Assemble six different logic gates using NPN transistors
- Explore the contents of cellular SIM cards
- Accept or issue coin challenges - hacker style
HackerBoxes is the monthly subscription box service for DIY electronics and computer technology. We are hobbyists, makers, and experimenters. We are the dreamers of dreams.
HACK THE PLANET!
Step 1: Content List for HackerBox 0039
- ATX Power Supply Breakout
- DC-to-DC Power Buck Converter
- Acrylic Enclosure for Power Converter
- Three Exclusive Transistor-to-Gate PCBs
- Component Kit for Transistor-to-Gates
- Female MicroUSB Terminal Block
- MicroUSB Cable
- Three-Way SIM Card Adapter
- USB SIM Card Reader and Writer
- Exclusive HackerBox Challenge Coin
- Decals for Transistor-to-Gates
- Exclusive HackLife Vinyl Transfer
Some other things that will be helpful:
- Soldering iron, solder, and basic soldering tools
- Salvaged ATX Power Supply
Most importantly, you will need a sense of adventure, hacker spirit, patience, and curiosity. Building and experimenting with electronics, while very rewarding, can be tricky, challenging, and even frustrating at times. The goal is progress, not perfection. When you persist and enjoy the adventure, a great deal of satisfaction can be derived from this hobby. Take each step slowly, mind the details, and don't be afraid to ask for help.
There is a wealth of information for current, and prospective, members in the HackerBoxes FAQ. Almost all of the non-technical support emails that we receive are already answered there, so we really appreciate your taking a few minutes to read the FAQ.
Step 2: COIN CHECK!
CHALLENGE COINS may be a small coins or medallions, bearing an organization’s insignia or emblem and carried by the organization’s members. Traditionally, they might be given to prove membership when challenged and to enhance morale. In addition, they are also collected by service members. In practice, challenge coins are normally presented by unit commanders in recognition of special achievement by a member of the unit. They are also exchanged in recognition of visits to an organization. (Wikipedia)
Step 3: Transistors-to-Gates
The HackerBox Transistor-to-Gates PCBs and parts kit help to demonstrate and explore how logic gates are built up from transistors.
In transistor–transistor logic (TTL) devices, transistors provide the logic functionality. TTL integrated circuits were widely used in applications such as computers, industrial controls, test equipment and instrumentation, consumer electronics, and synthesizers. The 7400 series by Texas Instruments became particularly popular. TTL manufacturers offered a wide range of logic gates, flip-flops, counters, and other circuits. Variations of the original TTL circuit design offered higher speed or lower power dissipation to allow design optimization. TTL devices were originally made in ceramic and plastic dual-in-line (DIP) packages, and flat-pack form. TTL chips are now also made in surface-mount packages. TTL became the foundation of computers and other digital electronics. Even after very-large-scale integration (VLSI) integrated circuits made multiple-circuit-board processors obsolete, TTL devices still found extensive use as the glue logic interfacing between more densely integrated components. (Wikipedia)
Transistors-to-Gates PCBs and Kit Contents:
- Three Exclusive Transistors-to-Gate PCBs
- Decals for Transistors-to-Gates Circuits
- Ten 2N2222A NPN Transistors (TO-92 Package)
- Ten 1K Resistors (brown, black, red)
- Ten 10K Resistors (brown, black, orange)
- Ten 5mm Green LEDs
- Ten Tactile Momentary Buttons
Step 4: Buffer Gate
A Buffer Gate is a basic logic gate that passes its input, unchanged, to its output. Its behavior is the opposite of a NOT gate. The main purpose of a buffer is to regenerate the input. A buffer has one input and one output; its output always equals its input. Buffers are also used to increase the propagation delay of circuits. (WikiChip)
The buffer circuit used here is an excellent example of how a transistor can act as a switch. When the Base pin is activated current is allowed to flow from the Collector pin to the Emitter pin. That current passes through (and illuminates) the LED. So we say that the activation of the transistor Base switches the LED on and off.
- NPN Transistors: emitter pin towards bottom of PCB, flat side of transistor case to the right
- LED: Short pin is inserted towards the power ground net (towards the bottom of the PCB)
- Resistors: polarity does not matter, but placement does. The base resistors are 10K Ohm and the resistors inline with the LEDs are 1K Ohm.
- Power: connect 5VDC and ground to the corresponding pads on the back of each PCB
FOLLOW THESE CONVENTIONS FOR ALL THREE PCBs
Step 5: Inverter Gate
An Inverter Gate or a NOT Gate, is a logic gate which implements logical negation. When the input is LOW, the output is HIGH and when the input is HIGH, the output is LOW. Inverters are the nucleus of all digital systems. Understanding its operation, behavior, and properties for a specific process makes it possible to expand its design onto more complex structures such as NOR and NAND gates. The electrical behavior of much bigger and complex circuitry can be derived by extrapolating the behavior observed from simple inverters. (WikiChip)
Step 6: OR Gate
The OR Gate is a digital logic gate that implements logical disjunction. A HIGH output (1) results if one or both the inputs to the gate are HIGH (1). If neither input is high, a LOW output (0) results. In another sense, the function of OR effectively finds the maximum between two binary digits, just as the complementary AND function finds the minimum. (Wikipedia)
Step 7: NOR Gate
The NOR Gate (NOT-OR) is a digital logic gate that implements logical NOR. A HIGH output (1) results if both the inputs to the gate are LOW (0); if one or both input is HIGH (1), a LOW output (0) results. NOR is the result of the negation of the OR operator. It can also be seen as an AND gate with all the inputs inverted. NOR gates can be combined to generate any other logical function. The share this property with the NAND gate. By contrast, the OR operator is monotonic as it can only change LOW to HIGH but not vice versa. (Wikipedia)
Step 8: AND Gate
The AND Gate is a basic digital logic gate that implements logical conjunction. A HIGH output (1) results only if all the inputs to the AND gate are HIGH (1). If none or not all inputs to the AND gate are HIGH, a LOW output results. The function can be extended to any number of inputs. (Wikipedia)
Step 9: NAND Gate
The NAND Gate (NOT-AND) is a logic gate which produces an output which is false only if all its inputs are true. Its output is complement to that of an AND gate. A LOW (0) output results only if all the inputs to the gate are HIGH (1); if any input is LOW (0), a HIGH (1) output results.
By De Morgan's theorem, a two-input NAND gate's logic may be expressed as AB=A+B, making a NAND gate equivalent to inverters followed by an OR gate.
The NAND gate is significant because any boolean function can be implemented by using a combination of NAND gates. This property is called functional completeness. It shares this property with the NOR gate. Digital systems employing certain logic circuits take advantage of NAND's functional completeness.
Step 10: XOR Gate
The XOR Gate or Exclusive OR is a logical operation that outputs true only when inputs differ (one is true, the other is false). It gains the name "exclusive or" because the meaning of "or" is ambiguous when both operands are true; the exclusive or operator excludes that case. This is sometimes thought of as "one or the other but not both". This could be written as "A or B, but not, A and B". (Wikipedia)
While the XOR is an important logic gate, it can be built up from other, simpler gates. Accordingly, we are not building one here, but we can study this nice write up for an NPN Transistor XOR Gate Circuit as a first example of combing the transistor-based gates together to make more complex logic.
Step 11: Combinational Logic
Combinational Logic, in digital circuit theory, is sometimes referred to as time-independent logic because it has no memory elements. The output is a pure function of the present input only. This is in contrast to sequential logic, in which the output depends not only on the present input but also on the history of the input. In other words, sequential logic has memory while combinational logic does not. Combinational logic is used in computer circuits to perform Boolean algebra on input signals and on stored data. Practical computer circuits normally contain a mixture of combinational and sequential logic. For example, the part of an arithmetic logic unit, or ALU, that does mathematical calculations is constructed using combinational logic. Other circuits used in computers, such as adders, multiplexers, demultiplexers, encoders and decoders are also made by using combinational logic. (Wikipedia)
Step 12: ATX Power Supply Breakout
ATX power supply units convert household AC to low-voltage regulated DC power for the internal components of a computer. Modern personal computers universally use switched-mode power supplies. An ATX power supply breakout is designed to take advantage of an ATX power supply to create a benchtop power supply with enough current to run almost any of your electronics projects. Since ATX power supplies are quite common, they can usually be easily salvaged from a discarded computer, and thus cost little or nothing to acquire. The ATX breakout connects to the 24pin ATX connector and breaks out 3.3V, 5V, 12V, and -12V. These voltage rails and the ground reference are coupled to output binding posts. Each output channel has a replaceable 5A fuse
Step 13: Digital Control DC-to-DC Buck Converter
The DC-DC Step-Down Power Supply has adjustable output voltage and an LCD display.
- Power Chip: MP2307 (datasheet)
- Input Voltage: 5-23V (20V recommended maximum)
- Output Voltage: 0V-18V continuously adjustable
- Automatically saves the last set voltage
- Input voltage must be about 1V higher than the output voltage
- Output current: Rated to 3A, but 2A without heat dissipation
Calibration: With input power off, hold down left button and turn the power on. When the display begins flashing, release left button. Use a multimeter to measure the output voltage. Press the left and right buttons to adjust the voltage until the multimeter measures about 5.00V (4.98V or 5.02V is fine). During adjustment, ignore the LCD display on the unit. Once adjusted, power off the unit and then power it back on. The calibration is completed, but may be repeated as necessary.
Step 14: MicroUSB Breakout
This module breaks out a MicroUSB connector pins to VCC, GND, ID, D- and D+ screws on a terminal block.
Regarding the ID signal, an OTG cable (wikipedia) has a micro-A plug on one end, and a micro-B plug on the other end. It cannot have two plugs of the same type. OTG added a fifth pin to the standard USB connector, called the ID-pin. The micro-A plug has the ID pin grounded, while the ID in the micro-B plug is floating. A device with a micro-A plug inserted becomes an OTG A-device, and a device with a micro-B plug inserted becomes a B-device. The type of plug inserted is detected by the state of the pin ID.
Step 15: SIM Tools
A Subscriber Identification Module (SIM), widely known as a SIM card, is an integrated circuit that is intended to securely store the international mobile subscriber identity (IMSI) number and its related key, which are used to identify and authenticate subscribers on mobile telephony devices (such as mobile phones and computers). It is also possible to store contact information on many SIM cards. SIM cards are always used on GSM phones. For CDMA phones, SIM cards are only needed for newer LTE-capable handsets. SIM cards can also be used in satellite phones, smart watches, computers, or cameras. (Wikipedia)
MagicSIM Windows Software for USB Adapter can be used with the USB device. There is also a driver for the Prolific PL2303 USB Chip if needed.
Step 16: Live the HackLife
We hope you have enjoyed this month's voyage into DIY electronics. Reach out and share your success in the comments below or on the HackerBoxes Facebook Group. Certainly let us know if you have any questions or need some help with anything.
Join the revolution. Live the HackLife. You can get a cool box of hackable electronics and computer tech projects delivered right to your mailbox each month. Just surf over to HackerBoxes.com and subscribe to the monthly HackerBox service.