
It was breadboard time. I selected a 324 quad op amp package because it could be expanded to handle up to 4 sensors....probably 3 sensors and a pressure sensor. It is powered as a single sided op amp meaning only one battery is necessary. (Many op amps require two batteries.)I chose to use a common 9 volt battery but any 6 to 15 volt package could be used.
This is how one of the sections is used to produce an amplified voltage. The sensor output is connected to the non inverting input. Make sure you use the right dropping resistor for your sensor. Mine was 10,000 ohms. The negative lead of the sensor goes to the common ground. You can use any of the sections of the opamp. R1 is 1000 ohms and R2 is 20 thousand ohms. 1 + (20/1) = a gain of 21. I used section 3 of the quad op amp because of spacing.
| Pin 1 | SECTION 1 OUTPUT | Pin 8 | SECTION 3 OUTPUT |
| Pin 2 | SECTION 1 INVERTING IN | Pin 9 | SECTION 3 INVERTING IN |
| Pin 3 | SECTION 1 NON INVERTING IN | Pin 10 | SECTION 3 NON INVERTING IN |
| Pin 4 | + POWER IN | Pin 11 | GROUND |
| Pin 5 | SECTION 2 NON INVERTING IN | Pin 12 | SECTION 4 NON INVERTING IN |
| Pin 6 | SECTION 2 INVERTING IN | Pin 13 | SECTION 4 INVERTING IN |
| Pin 7 | SECTION 2 OUTPUT | Pin 14 | SECTION 4 OUTPUT |

I selected a basic stamp 1C for the microprocessor. While there are lots of microprocessors out there as well as PICs, this is one of the easiest to use for a one off project.
If I were going to build a bunch of these (and bore myself silly), I would just use a one time programmable PIC and burn it myself after I worked out the code and bugs using a stamp. That drops the size of the system considerably and the cost by about 20 bucks....but for one, its just not worth the additional time that I could be either diving, editing dive videos, writing web pages about diving, dreaming about diving, talking about diving, planning a dive trip, or building other diving stuff....ya get my drift.
Back to the project. I made my own programing cable for the basic stamp. It takes just three pins from the printer port. Pins 2, 11, & 25. I used a standard printer plug from my toy box (they are available from Radio Shack, soldered the wires into the plug and stuck the other ends in the breadboard. I made plug holders with some epoxy paste. If you have followed my other activities, you know I would not buy one, didn't you and you know I would find a use for some epoxy paste.
| Pin 1 | + POWER IN | Pin 8 | IO PORT 1 |
| Pin 2 | GROUND (Programming cable pin 25) | Pin 9 | IO PORT 2 |
| Pin 3 | PCO (Programming cable pin 11) | Pin 10 | IO PORT 3 |
| Pin 4 | PCI (Programming cable pin 2) | Pin 11 | IO PORT 4 |
| Pin 5 | + 5 VOLTS OUT | Pin 12 | IO PORT 5 |
| Pin 6 | RESET | Pin 13 | IO PORT 6 |
| Pin 7 | IO PORT 0 | Pin 14 | IO PORT 7 |
The next active part is an Analog to Digital Converter. This is the guy that takes the voltage signal from the op amp, converts it into a digital number that the stamp needs, and gives it to the stamp upon request. I selected a LTC 1298 because the stamp folks used them in several example projects and the code was available. | Pin 1 | CS | Pin 5 | DIGITAL IN |
| Pin 2 | CHANNEL 0 | Pin 6 | DIGITAL OUT |
| Pin 3 | CHANNEL 1 | Pin 7 | CLOCK |
| Pin 4 | GROUND | Pin 8 | + 5V POWER IN & REFERENCE |

| OP AMP | LTC 1298 | STAMP | OFF BOARD |
| NONE | PIN 1 | PIN 7 | NONE |
| PIN 8 OUTPUT | PIN 2 CHANNEL 0 INPUT | NONE | NONE |
| PIN 11 GROUND | PIN 3 CHANNEL 1 GROUNDED | PIN 2 GROUND | GROUND |
| PIN 11 GROUND | PIN 4 GROUND | PIN 2 GROUND | GROUND |
| NONE | PIN 5 | PIN 9 | * |
| NONE | PIN 6 | NONE | * |
| NONE | PIN 7 | PIN 8 | NONE |
| NONE | PIN 8 5V REFERENCE IN | PIN 5 5V OUT | LTC 1298 10MF CAP TO GROUND |
| PIN 9 INVERTING INPUT | NONE | NONE | OP AMP PIN 9 TIED TO PIN 8 BY 20 K RESISTOR TIED TO PIN 11 BY 1 K RESISTOR |
| PIN 4 + 9 VOLTS | NONE | PIN 1 + 9 VOLTS | NONE |
| PIN 10 ANALOG INPUT | NONE | NONE | MV SENSOR OUTPUT |

PPO BELOW .18 .....SLOW RED FLASHES
PPO ABOVE .18 BUT BELOW .8 SLOW GREEN FLASHES
PPO ABOVE .8 BUT BELOW 1.2 LONG GREEN FLASH OFF SHORT TIME



LONG GREEN FLASH
PPO ABOVE 1.2 BUT BELOW 1.6 QUICK GREEN FLASHES
PPO ABOVE 1.6 QUICK RED FLASHES| CODE | SUBROUTINE FUNCTION |
| IF AD <180 THEN ANOXIA | Flashes Red Led Slowly |
| IF AD <690 THEN SUCKING | Flashes Green Led Slowly |
| IF AD <1050 THEN CRUISING | Flashes Green Led Steady with short off |
| IF AD <1390 THEN RICHMIX | Flashes Green Led Fast |
| GOTO QUIVERING | Flashes Red Led Fast |
| CODE | FUNCTION |
| ANOXIA: | Location called ANOXIA |
| high 6 | Turns on red LED |
| pause 1000 | Wait 1 second |
| low 6 | Turns off red LED |
| pause 1000 | Wait 1 second |
| GOTO ANOXIA | Starts it again |

