Grounding Rules: PIC Controller 24V Relay

Discussion in 'The Projects Forum' started by tigerapna, Jul 19, 2012.

  1. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    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?
     
  2. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    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.
     
    tigerapna likes this.
  3. tigerapna

    Thread Starter Member

    Dec 14, 2011
    73
    1
    source for 5V logic voltage source is taken from 24V regulated supply.
     
  4. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,910
    2,173
    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: Jul 19, 2012
  5. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    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.
     
  6. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    Then the supplies are safe and already share a common ground. There is no need to isolate these supplies, so just drive the relay with a transistor or fet.
     
  7. panic mode

    Senior Member

    Oct 10, 2011
    1,321
    304
    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.
     
Loading...