8-way motorized lab valve control
The Pharmacia IMV-8 is an 8-way selector valve. Reading the data sheet it should work as follows:







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Test circuit.


Wire up as shown. The valve GND and 24 V common and 5 V common should all be connected together.
Switch on the power.
Press the start switch. The valve should run anti-clockwise. The LED should blink every time the valve moves into a valid position. The position number can be read from the valve LEDs.
Release the button when the desired position is reached.




Micro control







simulate this circuit

Figure 2. Interfacing with micro.

The data sheet says 'a 10 kΩ pull-up resistor to +5 V must be connected to pins 3, 7, 8 and 9'. Use the internal pull-ups of your micro for this and you won't need external components.



Understanding the data sheet


Pin 1: +24 V power.
Pin 2: if pulled high by the 10k pull-up resistor the valve will rotate anti-clockwise. If shorted to GND it will rotate clockwise. The shorting device will carry 30 mA.
Pin 3: open-collector transistor outputs This is open-circuit when out of position (off) and connected to GND when in-position (active).
Pin 4: GND / negative for both the 24 V motor and 5 V logic signals.
Pin 5: +5 V supply for the logic.
Pin 6: probably the motor negative wire. The motor + is connected to +24V. Connect to GND to start. The motor will draw 1 A when starting, falling to 0.3 A when it gets up to speed. All you have to do is supply 24 V. The data sheet says 'short to pin 1 to stop'. Effectively this is connecting both ends of the motor together which will short circuit the motor to give a dynamic brake for rapid stop.
Pin 7, 8 and 9: valve address binary code. These work the same as pin 3.




Pseudo code

int moveTo; // desired stop position
int posn;   // actual position

// convert the three binary bits into decimal value
posn = 0;
if(bit0) {posn += 1;}
if(bit1) {posn += 2;}
if(bit2) {posn += 4;}

// motor control
if((moveTo != posn) || !posnMatch) {
    motorRun = true;
} else {
    motorRun = false;
}


I have assumed positive logic for clarity. The valve outputs are active low so you may need to invert all the input signals. e.g., if(!bit0){ ...