Adding an optional external supply
You should NOT connect the internal and external supplies together, except for their ground connections.

You should use a switch or a 3-pin jumper that allows you to select whether the +5V for the external logic comes from the computer or from the external supply.


  Is having 5V on TTL input pins bad if the computer is turned off?


Possibly. You should turn on the external supply last and turn it off first. Or you could plug everything into an outlet strip that allows you to switch it all at once.

A third option would be to use the internal power to control the external power:







simulate this circuit &ndash; Schematic created using CircuitLab

SW1 represents the 3-pin jumper that selects internal (upper position) or external (lower position) power. It's OK to disconnect the external supply when using internal power.