
Originally Posted by
Melanie
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.
Bookmarks