Quote Originally Posted by Melanie View Post
You won't need Diodes across the Relays, or any other components with the ULN2004 - they're all built-in to the chip, which makes it neat and easy to connect. Download the Datasheet for the chip. The pin with all the Diodes internally connected to it is wired to +12v. +12 also goes to one side of your Relay. The other side connects to one of the seven Output channels. The input to the channel connects to the PIC I/O. Drive High for Relay ON, and Low for Relay OFF. Unused channels can simply be left unconnected. Good practice states you ground the unused inputs, but you don't have to on this part.

There's nothing wrong with putting Relays on your 5v line if your 5v PSU is solidly built (and it looks like Dave builds solid gear!). Most folks on this list are hobbyists or new to electronics. The chances of building a crappy supply are high, putting a heavy load (Power Relay Coil) onto the same voltage line that becomes a REFERENCE for your ADC or Comparators is asking for trouble at best, and at worst is going to start resetting your PIC by tripping it's MCLR or corrupting EEPROM.
I will download the datasheet for the ULN2004 in the next few minutes, before I place my order for these parts. As for the power supply, could I get by with installing an additional 5V regulator (7805, LM2931T-5.0, LM2940CT-5.0, etc) to power a seperate 5V rail for the 5V relays that would be pretty much isolated from the PIC's 5V supply?

Don't get me wrong, I'm going to take your advice and install the 12V relays on this prototype, but I've got a lot of the 5V versions of the relays and figured that if the additional regulator would allow me a "clean and solid" power supply, then I could go that route for the next project I build using the 5V relays.

I usually always install both a 10uF (50/63V electrolytic) and a 0.1uF (200V ceramic) input cap on the inlet side of the regulator (and in this case, from +12V to ground), as well as the same type and value capacitors on the output side of the regulator as bypass caps. Is this sufficient for a solid power supply; it will be connected to the vehicle's ignition hot or to a constant hot fused position by means of a SPST switch so it only operates when the owner wants it to. I know that sometimes the alternator can cause voltage spikes and current surges throught some components, so I really plan on getting my hands on some good automotive 5V regulators like the LM2931T-5.0 (only 500mA in a T0-220 package) or the LM2940CT-5.0 (1-1.5A in a T0-220 package), which both have built-in protection designed for these types of spikes and surges...