This invetion is an electro-pneumatic adding/subtracting machine. It uses pneumatics to do the arithmetic, and electricity/motors to feed bits into the pneumatics, and touch sensors to read the results from the pneumatics. Why build a pneumatic adding machine when we can make the RCX do the math much more easily and a lot faster? Good question! There are two reasons:

1. Because I perceive pneumatics as a way of getting around the I/O constraints of the RCX. 

2. Because our illustrious envcons made the bold statement that it could not be done! 

To use the calculator, you press the keys on the 16 key keyboard, when neccessary the program feeds the numbers to be added or subrtacted to the pneumatics, and the results are displayed on the RCX's LCD display. 

There are two innovations in this invention; pneumatic OR gate, and a 16 key keyboard.

The pneumatic OR gate is made up of two large pneumatic pistons, and a pneumatic switch. I consider an expanded piston to be a 1 input into the gate, and a contracted piston to be a 0 input. The mechanics of the gate are such that if either or both of the pistons are expanded, then the pneumatic switch is flipped one way. If neither piston is expanded, the pneumatic switch is flipped the other way.

There are three OR gates used to make a half adder, which has two inputs bits, a sum output and a carry output. In NQC terms the pneumatics calculate like this:   

int in0_bit, in1_bit; // the inputs to the adder

int sum_bit, carry_bit; // the outputs of the adder

carry_bit = in0_bit & in1_bit;

sum_bit = (in0_bit | in1_bit) & ! carry_bit;

There are four possible combinations of inputs the the half adder: 

in0_bit in1_bit |   carry  sum 

 0        0           |    0          0 

 0         1           |    0          1

 1         0           |    0          1 

 1          1           |    1          0

 Those who are aware of boolean logic will recognize the sum_bit output as an exclusive OR gate (XOR) output, and the carry_bit output as an AND gate output.

Using DeMorgen's theorum we can convert an OR gate to an AND gate by inverting (change a 1 to a 0 and a 0 to a 1) the inputs and inverting the output. In my pneumatic logic, inversion is done by reversing the hookups to the pneumatic cylinders.

When people add two numbers together in decimal, we start with the rightmost decimal place, add the two digits, record the carry into the next decimal place, and moce onto the next decimal place adding the carry and the two digits in that column. PneumADDic does the same thing only in binary.

For each bit in the numbers (operands) you want added together, pneumADDic must perform three pneumatic calculations: 

1. Add the two bits of the operands, remembering the sum and the carry results.

2. Add the sum bit from step 1 to the carry in (from the previous bit columns result), record the sum bit and the carry bit.   

3. Add together the carry bit from step 1 and the carry bit from step 2 (only one can be on) and record the sum bit (as carry in for the next bit column).

The sum bit from step 2 is the result for this binary place in our operands. The sum bit from step 3 is the carry out for this binary place, which will be used as the carry in for the next binary place.  

When all binary places are computed, pneumADDic displays the results on the RCX's LCD display. PneumADDic can handle 3 decimal digits. 

PneumADDic uses two motor controlled pneumatic switches to feed values into the pneumatic half adder. It reads the results out of the pneumatic logic using small pistons that when expanded press touch sensors.

The 16 key keypad is arranged in an array of four rows by four columns. Each row and each column has a touch sensor to detect if a key in that row or column was pressed. When you press down a key, two touch sensors get pressed: a row touch sensor and a column touch sensor.

I hooked all of the row touch sensors together in a resistor ladder network and hooked that to one sensor input. I did the same for the column sesnors and ran that to a second sensor input. I made my own resistor blocks that when hooked between a touch sensor and RCX, puts the resistor in series with the touch sensor. 

The touch sensor/resistor ladder combination acts as a digital to analog converter. The RCX's analog to digital converter, plus reading the sensor in raw mode enables the program to tell which row and which column touch sensors were pressed. 

PneumADDIc uses two compressors to charge up four air tanks that provide the pressure for running the pneumatic logic. A large piston, rubber bands and a touch sensor are used to create a pressure sensor. The program uses the pressure switch to know when to run the comnpressors.   

In the picture, the compressors, air tanks and pressure sensor are in the back left. The three OR gates that make up the half adder are the large things in the back. The sum and carry output sensors are to the right of the pneumatic logic. Motor controlled pneumatic switches are in front of the sum and carry outputs.

The sum and carry output sensors are hooked to the RCX as part of the row and column resistor ladder networks.  

The keyboard is in the front left. To its right are the resistor ladder networks, and to the right of that is the RCX. 

There are 11 touch sensors, four motors, two large pumps, 5 pneumatic switches, 7 large and two small pistons in the design.