Logic control by BJT's.

Why don't you make the circuit in such way that every pin controls one coil?

would be easier to program I think?