Thursday, December 6, 2007

Controller / DAQ interface



Above is a partial schematic of the hybrid controller and the relay box. I'd like to discuss some of the gritty technical details behind the black box. It serves as a central interface between human input (arming, manual control), the control computer (timing of ignition & flow), the relay box (and in turn the nitrous solenoid and pyrogen igniter) and finally the data acquisition unit and its computer.

Its this last interface (controller/DAQ) that has been recently added and was giving us trouble on #9 and #10. It is already on its third iteration. The first was a parallel hookup identical to the lines going to the relay box. This proved problematic since this interface betweens float (logic low) and ground (logic high). While it may be possible for the DAQ to sense this, it isn't ideal since it adds the potential for a malfunction in the DAQ or the associated wiring to trigger an event.

The second iteration provides that needed layer of isolation through the use of a quad NAND gate (CD4011). It also provides readable voltages that is easier for the DAQ to handle. This is the 5v logic low and 0v logic high mentioned in the previous post. The oscillations shown in that graph are because the operating voltage of the NAND gate (5v) is lower than the operating voltage of the relay box (9v). The NAND operating voltage has to be higher, so the easy thing is to up the voltage to 12v or even the 18v that the controller's lamps run on.

Of course, the solution creates a new problem. The DAQ can only accept 0-5v, so the output of the NAND gate has to be bumped down somehow. The solution is a op amp configured as a comparator (LM339). Combined with a resistor bridge (voltage divider) across the NAND's power source, the op amp will check whether the op amp's input is higher or lower than the divider's halfway point. Its output will thus be either 0v or 5v accordingly.

Phew! And that's what is necessary to safely get the controller's logic into the DAQ.

No comments: