User Tools

Site Tools


2014:vacuum_tube_sr_latch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
2014:vacuum_tube_sr_latch [2014/12/15 16:44]
fbourke created
2014:vacuum_tube_sr_latch [2014/12/18 23:43]
fbourke
Line 1: Line 1:
 +====== Vacuum Tube SR Latch ======
 +with Forrest & Ruby
  
-==== Abstract ==== +^           Our 12AX7 Vacuum Tubes           ^ 
-We investigated 1940s era computers—esp. the ENIAC (Electronic Numerical Integrator And Computer)—and,​ using this knowledge, designed and constructed a basic bistable functioning element used in digital computers—the Set-Reset Latch, or simply SR Latch. Our ENIAC-based SR Latch design uses four triode vacuum tubes, basic analog components, and optional neon lights for output state indication. ​+|            {{ 2014:​img_4256b.jpg?​1024 }}             | 
 +====== Abstract ​====== 
 +We investigated 1940s era computers—esp. the [[http://​en.wikipedia.org/​wiki/​ENIAC|ENIAC]] (Electronic Numerical Integrator And Computer)—and,​ using this knowledge, designed and constructed a basic bistable functioning element used in digital computers—the Set-Reset Latch, or simply SR Latch. Our ENIAC-based SR Latch design uses four triode vacuum tubes, basic analog components, and optional neon lights for output state indication. ​
  
-==== Background Info ==== +====== Background Info ====== 
-=== The SR Latch === +===== The SR Latch ===== 
-The Set-Reset Latch, or SR Latch, is a basic element in digital computing. It has two inputs, Set and Reset, and either one or two outputs (which we refer to as ''​Q''​ and ''​nQ''​). ''​Q''​ and ''​nQ'''​ are always opposites (hence the binary nomenclature). Our latch is falling-edge triggered, meaning when Set or Reset transitions from a high to low state the states of ''​Q''​ and ''​nQ'''​ are updated. Our latch is transparent,​ meaning the output is updated immediately upon the inputs changing, and it ignores rising-edge transitions. Some latches have enable inputs that can make them opaque, but ours does not offer this feature. We do, however, offer suggestions on how to extend our latch to have an enable input. The logic table for our latch is shown in \fref{tab:​sr-latch-table}. A careful reader might notice that the condition for which both set and reset fall at the same time is not shown on the diagram. This case is not possible—in reality, the second edge will take precedence ​and +The Set-Reset Latch, or SR Latch, is a basic element in digital computing. It has two inputs, Set and Reset, and either one or two outputs (which we refer to as ''​Q''​ and ''​nQ''​). ''​Q''​ and ''​nQ''​ are always opposites (hence the binary nomenclature). Our latch is falling-edge triggered, meaning when Set or Reset transitions from a high to low state the states of ''​Q''​ and ''​nQ''​ are updated. Our latch is transparent,​ meaning the output is updated immediately upon the inputs changing, and it ignores rising-edge transitions. Some latches have enable inputs that can make them opaque, but ours does not offer this feature. We do, however, offer suggestions on how to extend our latch to have an enable input. The logic table for our latch is shown in the table below. A careful reader might notice that the condition for which both set and reset fall at the same time is not shown on the diagram. This case is not possible—in reality, the second edge will take precedence, or internal manufacturing inconsistencies in the tubes will dominate.
  
-Another basic element of digital circuits is the clocked flip-flopAs we note later, the designers of the ENIAC called our edge-triggered latch a flip-flop, but we typically reserve the term flip-flop for a unit that is opaque until a clock edgeTo make a clocked flip-flop, ​+^                Falling-Edge Triggered SR Latch States ​         ^^^^ 
 +^  ''​S'' ​     ^  ''​R'' ​     ^  ''​Q'' ​         ^  ''​nQ''​ ^  
 +|  {{2014:​uparrow.png?​30}} ​   |  {{2014:​uparrow.png?​30}} ​    ​| ​ ''​Q'' ​       |  ''​nQ'' ​  | 
 +|  {{2014:​downarrow.png?​30}} ​   |  1     ​| ​ 1        |  0   | 
 +|  1  |  {{2014:​downarrow.png?​30}} ​      ​| ​ 0        |  1   | 
 +|  0    |  {{2014:​downarrow.png?​30}} ​     |  ''​Q'' ​       |  ''​nQ'' ​  | 
 +|  {{2014:​downarrow.png?​30}} ​   |  0     ​| ​ ''​Q'' ​       |  ''​nQ'' ​  |
  
 +Another basic element of digital circuits is the clocked flip-flop. As we note later, the designers of the ENIAC called our edge-triggered latch a flip-flop, but we typically reserve the term flip-flop for a unit that is opaque until a clock edge. It is possible to make a clocked flip-flop from two SR latches with enable inputs.
  
-% Please add the following required packages to your document preamble: 
-\begin{table}[!ht] 
-\centering 
-\begin{tabular}{@{}cccc@{}} 
-\toprule 
-''​S'' ​  & ''​R} ​  & ''​Q''​ & <​math>​\overline{''​Q''​}</​math>​\\ \midrule 
-<​math>​\uparrow</​math> ​ & <​math>​\uparrow</​math> ​ & ''​Q''​ & <​math>​\overline{''​Q''​}</​math>​\\ 
-<​math>​\downarrow</​math>&​ 1            & 1          & 0                     \\ 
-1            & <​math>​\downarrow</​math>&​ 0          & 1                     \\ 
-<​math>​\downarrow</​math>&​ 0            & ''​Q''​ & <​math>​\overline{''​Q''​}</​math>​\\ 
-0            & <​math>​\downarrow</​math>&​ ''​Q''​ & <​math>​\overline{''​Q''​}</​math>​\\ \bottomrule 
-\end{tabular} 
-\caption{Falling-Edge Triggered SR Latch States} 
-\label{tab:​sr-latch-table} 
-\end{table} 
  
-=== How Vacuum Tubes Work === +===== How Vacuum Tubes Work ===== 
-\begin{figure}[!ht] +^           The simple triode symbol on the left shows the three electrodescathode (k, heater shown underneath),​ grid (g), and anode (a). The right side image is the diagram of the 12AX7 with pin layout. ​          ^ 
-    \centering +|            ​{{ 2014:triodes.png?640 | The simple triode symbol on the left shows the three electrodes: cathode (k, heater shown underneath),​ grid (g), and anode (a). The right side image is the diagram of the 12AX7 with pin layout.}}             |
-    \includegraphics[width=.8\textwidth]{triodes.eps} +
-    ​\caption{The simple triode symbol on the left shows the three electrodes cathode (k, heater shown underneath),​ grid (g), and anode (a). The right side image is the diagram of the 12AX7 with pin layout.} +
-    ​\label{fig:triodes} +
-\end{figure}+
  
-A vacuum tube is a device that controls a flow of current. Vacuum tubes operate on the principle of thermionic emission. Thermionic emission is the principle that energy in the form of heat can induce a flow of electrons from a filament (the heated cathode) to an anode. In the case of a triode, the grid electrode is a mesh or wire grate that allows or blocks thermionic emission to occur between the filament and the anode. The grid is typically held at a negative potential relative to the cathode. The more negative the grid is, the stronger the negative electric field it produces, the stronger the electrons from the cathode are repelled. Control is possible by pulling the grid closer in potential to the cathode (grid more positive), thus allowing electrons to pass through to the anode and current to flow through the tube. A small change in grid potential can produce a large change in current. The ratio of these changes is called the transconductance of the tube, expressed as <​math>​gm</​math>​and in units of mhos (inverse ohms). In operation, our tubes have a transconductance of approximately 0.0015 mhos, meaning a change of 1V on the grid produces a change of 1.5mA flowing through the tube. +A vacuum tube is, at it's highest level of abstraction, ​a device that controls a flow of current. Vacuum tubes operate on the principle of thermionic emission. Thermionic emission is the principle that energy in the form of heat can induce a flow of electrons from a filament (the heated cathode) to an anode. In the case of a triode, the grid electrode is a mesh or wire grate that allows or blocks thermionic emission to occur between the filament and the anode. The grid is typically held at a negative potential relative to the cathode. The more negative the grid is, the stronger the negative electric field it produces, the stronger the electrons from the cathode are repelled. Control is possible by pulling the grid closer in potential to the cathode (grid more positive), thus allowing electrons to pass through to the anode and current to flow through the tube. A small change in grid potential can produce a large change in current. The ratio of these changes is called the transconductance of the tube, expressed as <​math>​gm</​math>​and in units of mhos (inverse ohms). In operation, our tubes have a transconductance of approximately 0.0015 mhos, meaning a change of 1V on the grid produces a change of 1.5mA flowing through the tube. 
  
-==== Why bother with old technology? ==== %TODO: make this title better +====== Why bother with old technology? ====== 
-Studying the engineering decisions behind old technology is fascinating. Looking around the Internet, descriptions of how vacuum tubes work are sparse and usually focused on audio electronics. We intend this page to become a resource for any designer looking to build digital logic from vacuum tubes+Studying the engineering decisions behind old technology is fascinating. Looking around the Internet, descriptions of how vacuum tubes work are sparse and usually focused on audio electronics. We intend this page to become a resource for any designer looking to build digital logic from vacuum tubesor on a broader scale, someone with a similar background to the authors looking to understand ​the functioning ​of vacuum tubes.
-%A paragraph ​or so about why the project you chose is worthwhile and interesting. +
-==== Implementation ==== %TODO: better title +
-% N.M.: better title ideas: +
-% - Implementation +
-% - The Works (minus ​the poppy seeds) +
-% -  +
-%This portion can assume an audience that has taken Computer Architecture,​ but don’t get burdened by buzzwords. A sure sign of a bad engineer is over reliance on acronyms. +
-How to read tube diagram +
-Explanation of parameters+
  
-=== {Reading ENIAC Documentation} +===== Your first tube project? ===== 
-There are a few ``quirks''​ modern engineers may not be used to when reading the documentation for ENIAC. The first and most obvious is what we call an SR Latchthey call flip-flop. In current parlanceflip-flops are clocked elements while latches are not—ours are simply transparent.+The authors would not recommend attempting ​to replicate this project as a first introduction to vacuum tubesunless one is especially set on doing some sort of digital logic. We would suggest attempting to build tube-based headphone amplifiersuch as [[http://​diyaudioprojects.com/​Solid/​12AU7-IRF510-LM317-Headamp|this one]].
  
-Another feature of old documentation is the units of capacitance—the only unit available was the microfarad. In schematics, capacitors are often not labelled with units, and instead written as ``.001'' ​for 1 nanofarad. For even smaller capacitors, the unit we would now call a picofarad was called a micromicrofarad,​ or <​math>​\mu\mu ​F<​math>​. The grid coupling capacitors in our schematic have values of <​math>​22\mu\mu ​F<​math>​.+ 
 +====== What we did ======  
 +===== Re-designing from ENIAC Documentation ===== 
 +Our design is based around the design we found in this [[http://​archive.computerhistory.org/​resources/​text/​Knuth_Don_X4100/​PDF_index/​k-8-pdf/​k-8-r5367-1-ENIAC-circuits.pdf|paper]]. 
 + 
 +There are a few "​quirks"​ modern engineers may not be used to when reading the documentation for ENIAC. The first and most obvious is what we call an SR Latch, they call a flip-flop. In current parlance, flip-flops are clocked elements while latches are not—ours are simply transparent. 
 + 
 +Another feature of old documentation is the units of capacitance—the only unit available was the microfarad. In schematics, capacitors are often not labelled with units, and instead written as ".001" ​for 1 nanofarad. For even smaller capacitors, the unit we would now call a picofarad was called a micromicrofarad,​ or μμF. The grid coupling capacitors in our schematic have values of 22 μμF.
  
 Regarding the values of components, it seems the EIA series were not commonly followed for capacitors at the time. 25pF capacitors are rather difficult to find—fortunately 22pF capacitors are perfectly acceptable substitutes and 25pF is within the tolerance for most common 22pF capacitors. Regarding the values of components, it seems the EIA series were not commonly followed for capacitors at the time. 25pF capacitors are rather difficult to find—fortunately 22pF capacitors are perfectly acceptable substitutes and 25pF is within the tolerance for most common 22pF capacitors.
  
-==== Building up from an SR Latch ==== %better title +Reading the schematics ​from the ENIAC documentation is a little tricky, because they do not add the conventional connection dots on their schematics when connections ​end in a "​T." ​
-%TODO: Include everything necessary to pick up where you left off. This should include: +
-\begin{itemize} +
-\item Code +
-\item Schematics notes on simulation +
-\item Build Instructions +
-\item List of difficulties and gotchas while doing the project +
-\item Work Plan reflection (OOPS) +
-\item Possible TODO to extend ​the depth of the project +
-\item ZIP file to submit to the wiki +
-\end{itemize}+
  
-=== The Circuit ===+The ENIAC used [[http://​en.wikipedia.org/​wiki/​6SN7|6SN7]] dual triode tubes. Unfortunately,​ 6SN7 tubes are very hard to come by, as they have been entirely replaced by the ECC40 tube, and subsequently in 1946, the [[http://​en.wikipedia.org/​wiki/​12AU7|12AU7]]. The 12AU7 is currently popular for audio electronics,​ specifically headphone amplifiers. Due to this popularity, it is difficult to find 12AU7 tubes for a reasonable price. The [[http://​en.wikipedia.org/​wiki/​12AX7|12AX7]] is a similar tube with a higher gain that is popular in modern guitar amplifiers which we chose primairy for its low cost (due to being currently in production).
  
-\Fref{fig:​eniac} shows a circuit diagram of the ENIAC'​s Accumulator program control circuit. We took the SR Latch from this circuit (subcircuit inside blue dashed lines) to make our SR Latch. ``Set''​ is the input to the <​math>​0.001\mu<​math>​F capacitor leading to tube 1, and ``Reset''​ is the input to the <​math>​0.001\mu<​math>​F capacitor leading into tube 2. The neon light connected to <​math>​Q</​math>​indicates the states of ''​Q''​ and <​math>​\overline{''​Q''​}<​math>​. 
  
-    \begin{figure}[!ht] + 
-    ​\centering +====== Building up from an SR Latch ====== ​ 
-    ​\includegraphics[width=1\textwidth]{eniacSRLatch} +===== The Circuit ===== 
-    ​\caption{The ENIAC'​s Accumulator program control circuit.+ 
-    \label{fig:​eniac} +The following figure shows a circuit diagram of the ENIAC'​s Accumulator program control circuit. ​We took the SR Latch from this circuit (subcircuit inside blue dashed lines) to make our SR Latch. "​Set"​ is the input to the 0.001μF capacitor leading to triode 1 (U1 in our version), and "​Reset"​ is the input to the 0.001μF capacitor leading into triode 2 (U2 in our version). The neon light connected to ''​Q''​ indicates the states of ''​Q''​ and ''​nQ''​.
-    \end{figure}+
     ​     ​
-Our SR Latch design (\fref{fig:​latch}) was simulated in LT Spice and implemented with two 12AX7 dual triode vacuum tubes and two neon lights to indicate the states of ''​Q''​ and <​math>​\overline{''​Q''​}<​math>​. Regarding simulating the circuit, we used tube models that were in the ``heated''​ state (the model is named NH12AX7). In the same model file, the 12AX7 model includes a heater parameter, so it is possible to simulate what happens when the heater is in an undervoltage condition or during startup when the heater is still warming up (and the tube is not ready to conduct yet). 
  
-    \begin{figure}[!ht] +^  The ENIAC Accumulator program control circuit. ​  ^ 
-    ​\centering +|  ​{{ 2014:​eniacSRLatch.png?​640 | The ENIAC'​s Accumulator program control circuit.}}  | 
-    ​\includegraphics[width=1\textwidth]{SRLatch+ 
-    ​\caption{Our SR Latch circuit diagram.} +    ​ 
-    ​\label{fig:latch+Our SR Latch design (shown below) was simulated in LTSpice and implemented with two 12AX7 dual triode vacuum tubes and two neon lights to indicate the states of ''​Q''​ and ''​nQ''​. You can download our spice file {{ 2014:​srlatch-spice.zip | here}}. Make sure the ''​.inc''​ file is in the same directory as the ''​.asc''​ file. In the ''​SRLatch.asc''​ file, there is more than the SR latch we built. In addition, we also provide a structure for a pulse inverter using two triodes (which produces both positive and negative pulses at both the rising and falling edges of an input) and a possible structure for adding an enable input. The pulse generator works quite well, the enable input is significantly more dependent on the input voltages being in the correct range. Regarding simulating the circuit, we used tube models that were in the "​heated"​ state (the model is named NH12AX7). In the same ''​12AX7.inc''​ model file, the 12AX7 model includes a heater parameter, so it is possible to simulate what happens when the heater is in an undervoltage condition or during startup when the heater is still warming up (and the tube is not ready to conduct yet). 
-    \end{figure}+ 
 +^           Our SR Latch circuit diagram. ​          ^ 
 +|            ​{{ 2014:​SRLatch.png?​840 | Our SR Latch circuit diagram.}}             | 
 + 
 +To provide the 12V for the heaters, we simply purchased a modern switched-mode 12V power supply. In reality, the heaters would have most likely been fed from a transformer tap specifically designed to power the heaters. To provide the 165V for the positive rail, we simply directly rectified a 110V mains input and filtered it with a 120μF photoflash capacitor. For increased safety, it would have been better to use an isolation transformer,​ but we will leave this improvement for future engineers.  
 + 
 +We tried several spice models, but we found the best ones [[http://​www.duncanamps.com/​technical/​ltspice.html|here]]. 
 + 
 +===== Mechanical Design ===== 
 + 
 +We designed an enclosure for our SR Latch out of 1/4" acrylic. We used period-correct orange neon lights as indicators for Power On, Heaters On, ''​Q''​ and ''​nQ''​. We have uploaded our CAD files (designed in SolidWorks 2014) {{ 2014:SRlatch.zip | here.}
 + 
 +^           ​Render of our Mechanical Design. ​          ^ 
 +|            ​{{ 2014:​isorender.jpg?​840 | Render of our mechanical design}}             | 
 +^           Our Finished Box           ^ 
 +|            {{ 2014:​img_4257b.jpg?​840 }}             | 
 + 
 +===== Analysis of Our Plan ===== 
 +We stated that building an SR latch was a yellow "​intermediate"​ goal, and we're happy to have accomplished this. We did investigate doing other digital logic with vacuum tubes. We found a source called [[http://​www.quadibloc.com/​comp/​cp01.htm|What Computers are Made From]] that has two schematics: a tube NOR gate shown as two triodes with their plates tied together, and a tube NAND gate that is shown as a pentode with the top and bottom grids attached to the inputs. While we purchased a few pentode tubes, we decided to focus on the 12AX7s. In our SPICE file, we began experimenting with making an AND gate out of 12AX7 triodes. Under incredibly specific input conditions, it worked well, but it required precise voltage dividers and would probably be a pain to construct. 
 + 
 +A "​gotcha"​ we encountered when building our mechanical system was trying to fit our circuitry into the box. Our latch worked outside of the box, but when we closed the box it caused one of our outputs to short. It's always a good idea to use removable glue the first time you glue your box together! 
 + 
 +^           Top View of Our Finished Box           ^ 
 +|            {{ 2014:​img_4258b.jpg?​840 }}             | 
 + 
 + 
 +===== Useful Links ===== 
 +http://​www.ludd.luth.se/​~ragge/​vtc/​ 
 +http://​www.quadibloc.com/​comp/​cp01.htm 
 +http://​www.google.com/​patents/​US2784312 
 +http://​archive.computerhistory.org/​resources/​text/​Knuth_Don_X4100/​PDF_index/​k-8-pdf/​k-8-r5367-1-ENIAC-circuits.pdf 
 +SPICE models from: http://​www.duncanamps.com/​technical/​ltspice.html
  
  
2014/vacuum_tube_sr_latch.txt · Last modified: 2014/12/18 23:43 by fbourke