I have often found that a good indicator on how well a project is documented is by the schematics. Are they easy to understand? Are they hand drawn? Produced by proper CAD software or MS paint?
Basic Logic Diagram
So fundamentally, this is how the circuit works. Analog pins A0 and A1 are the inputs to the logic gates. To select a logic function, just read whichever pin is suitable.
A2 is the input coming from the OR gate, A3 is the input from the resulting NOR gate (inputs on a NAND shorted = NOT, which is inverting an OR gate = NOR), A4 is the AND gate input with A5 being the output from the NAND gate. Simples.
The schematics are mainly derived from this site:
CV491 (Double Triode) OR Gate Schematic
This is identical to the higher voltage schematic, although it must be noted that the input voltage is only 5v, with the cathode resistor replaced by a 100k resistor.
Below my poorly drawn schematic versus the original can be seen.
EF183 (Pentode) NAND Gate (acting as a NOR Gate)
This was actually found elsewhere on the internet, mainly here:
The usual changes were made when I converted this to my project.
V1 just became 5v, with a 100k resistor at the anode.
Additionally, as this was going to be fed into an arduino, the potential divider was removed, and the output is just fed straight into Analogue input A3.
V3 is supposedly half of V1 (not sure where I got that from), so this was produced by a potential divider formed of two 10K resistors to halve the input voltage.
Additionally the two inputs were tied together to produce a NOT gate, which in turn was connected to the output of the OR gate (effectively pin A2 on the arduino)
As with the OR gate, my fairly terrible schematic can be seen below:
It has been noted that the use of one of the control grids as an input is quite unusual, and that a friend of mine "has never seen that done before", admittedly this is my first project with Vacuum Tubes so I cannot really verify how usual or unusual this is.
6D2 (Dual Diode) AND Gate
I must admit I am quite impressed (for some reason) that this actually works. It seems almost too simplistic to work. Then again a few people are quite impressed that the tubes are capable of producing any sort of logic with the voltages they are running at.
As with the other tubes, the anode resistor has been replaced with a 100K resistor and the input voltage is only 5v. However, a mistake is also present with the original schematic, as the output is not noted. Although this has been taken to be the voltage at the anode, which was passed to A4 on the arduino.
Again my dreadful schematic can also be seen below.
12AT7 (Dual Triode) NOT Gate
Ah finally! The final gate.
As can probably be guessed from the previous schematics, the 22K resistor was replaced for a 100K, and the tube was operating at 5V, not 150V... which would fry the arduino in an instant.
In a similar vein to the EF183 NAND gate shenanigans, the potential divider was removed in favour of just simply passing the resulting voltage to A5 on the arduino to work out later.
However, in contrast to the EF183 NAND gate, the inputs on the logic gate were not directly connected to the outputs of the previous gate, instead it is passed through a 1K resistor. This can be seen in my own schematics:
A Word on Heaters
As can probably be seen on my schematics (if you can decipher them that is) you can probably see that each of the heaters are being powered by 6v, whereas the Vout on the arduino Galileo is 12v, whereas some tube filaments can run at 12v but aren't? So whats going on?
The 6D2 and the EF183 both have filaments that run at 6v, however the CV491 and the 12AT7 have filaments that can run at 12v, but can be configured to run at 6v by connecting pins 4 and 5 to positive and pin 9 to ground.
To make my life simpler/easier for me to remember so I didn't accidentally burn out a few filaments, I configured all of the filaments for 6v. Then I was able to just easily connect two tubes in series so they would all happily glow from the 12v source. Luckily the Power Supply (And hence the Vin on the arduino header) provided with the Arduino Galileo is 12V.