user2967: I'm building a control box to provide logical control of power outlets. 
I'm using a 4 channel 5V optically isolated relay system to control 4 separate outlets.
To use optical isolation you connect arduino +5V to the VCC line, and logic inputs to the 4 channels of the relay unit, and connect a separate +5V supply to run the coils of the relays.
To energize one of the relays, you pull that control line LOW. To de-energize the coil, you drive the line HIGH.
If I power on the relay but leave the Arduino unpowered, all the relay coils energize.
Do Arduino pins float when it is powered down, or are they grounded? 
Could I wire a pullup resistor to the inputs? And how would I do that without losing optical isolation? If I connect my pullup resistors to the +5V for the relays, the relay's +5 is connected to the Arduino's logic lines. If I instead use the Arudino's +5 rail, then when the Arduino is powered down, it's +5V line is dead.

user42539: The pins have input protection diodes that clamp the pins to Vcc and Gnd. If a pin gets to >VCC +0.5V the positive diode clamp conducts and Vcc is powered via the internal Vcc bus, and if a pin get to < -0.5V the negative diode clamp conducts.  With Vcc = 0V, the pin could act as if it were a low, but more generally folks see the chip acting like it was phantom powered and attempting to run code with perhaps unpredictable results.  That's why the datasheet says to not drive the pins when th chip is unpowered.  If the clamp current becomes too much, the diode can blow, and either just the one pin is impacted, or the whole chip dies and it will feel warm/hot to the touch when powered up.
So don't power up the relays without also powering up the Arduino.

2967: <p>I'm building a control box to provide logical control of power outlets. </p>

<p>I'm using a 4 channel 5V optically isolated relay system to control 4 separate outlets.</p>

<p>To use optical isolation you connect arduino +5V to the VCC line, and logic inputs to the 4 channels of the relay unit, and connect a separate +5V supply to run the coils of the relays.</p>

<p>To energize one of the relays, you pull that control line LOW. To de-energize the coil, you drive the line HIGH.</p>

<p>If I power on the relay but leave the Arduino unpowered, all the relay coils energize.</p>

<p>Do Arduino pins float when it is powered down, or are they grounded? </p>

<p>Could I wire a pullup resistor to the inputs? And how would I do that without losing optical isolation? If I connect my pullup resistors to the +5V for the relays, the relay's +5 is connected to the Arduino's logic lines. If I instead use the Arudino's +5 rail, then when the Arduino is powered down, it's +5V line is dead.</p>
 42539: <p>The pins have input protection diodes that clamp the pins to Vcc and Gnd. If a pin gets to >VCC +0.5V the positive diode clamp conducts and Vcc is powered via the internal Vcc bus, and if a pin get to &lt; -0.5V the negative diode clamp conducts.  With Vcc = 0V, the pin could act as if it were a low, but more generally folks see the chip acting like it was phantom powered and attempting to run code with perhaps unpredictable results.  That's why the datasheet says to not drive the pins when th chip is unpowered.  If the clamp current becomes too much, the diode can blow, and either just the one pin is impacted, or the whole chip dies and it will feel warm/hot to the touch when powered up.</p>

<p>So don't power up the relays without also powering up the Arduino.</p>
