Grounding Rules: PIC Controller 24V Relay

Thread Starter

tigerapna

Joined Dec 14, 2011
73
If I use my PIC 16F690 to control a 24V Relay can I connect the grounds together?

Or does the PIC (5V) ground have to isolated from the 24V relay ground?
 

GetDeviceInfo

Joined Jun 7, 2009
2,196
depends on your source voltages. If the source for the logic is from the same source as your 24v power, then they'll be common returned. If they have seperate sources, keeping them seperate will reduce noise from your power side. An opto isolator works well in this case.
 

Thread Starter

tigerapna

Joined Dec 14, 2011
73
depends on your source voltages. If the source for the logic is from the same source as your 24v power, then they'll be common returned. If they have seperate sources, keeping them seperate will reduce noise from your power side. An opto isolator works well in this case.
source for 5V logic voltage source is taken from 24V regulated supply.
 

nsaspook

Joined Aug 27, 2009
13,270
source for 5V logic voltage source is taken from 24V regulated supply.
I would opt-isolate the relay drivers to break the direct ground connection from the PIC to the relay drivers even in this case. 24VDC relays and power relays in general (even with snubbing diodes) can create a large amount of RFI/EMI noise on the logic control and ground pins.

External interrupts and relays can be mess to debug so I would poll any switches if possible.
I built a PIC 8722 uC 24vdc relay based tester with all separate supplies but I was still having spurious signals and interrupts on PORTB caused by power switching until I used isolators on the digital I/O.

Prototype:
http://www.flickr.com/photos/nsaspook/sets/72157630632759744/show/
 
Last edited:

GetDeviceInfo

Joined Jun 7, 2009
2,196
they will be common then, however, you should not place the relays return between the logic ic's return and the power supply return connection.
 

panic mode

Joined Oct 10, 2011
2,749
just add transistor and diode across relay coil (reversed). if you have several relays, it is cheaper to drive them using ULN2803 for example as diodes are integrated. i've boards with 32 relays (24V coils), one or more boards are driven by same micro controller and there is a lot of switching and usually buch of relays switches at once. they all work fine.
 
Top