PLC Interfacing with PIC


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    How would a 7805 be a problem? I would think it would actually clean the signal with a cap or two.
    It will clean up one a bit, but PLC's are typically used in the most notoriously dirty environments, from an electrical standpoint. It may work for many applications (i.e. a quick & dirty fix), but an opto-iso is a better choice.

  2. #2
    Join Date
    Dec 2007
    Location
    Cd. Juarez, Mexico
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    Hi, I think a 7805 could be a solution for the output from the PLC to the PIC, but what about the output from the PIC to the PLC?
    I still prefer the optocoupler solution for both sides.

    Alfredo

  3. #3
    Join Date
    Jan 2006
    Location
    Toronto
    Posts
    109


    Did you find this post helpful? Yes | No

    Default

    Please don't go with the 7805. I tried this and was bad idea, i couldn't hunt down a counting problem i was having and it turned out to be the regulator. Regulators will only work if your inputs don't change very fast, the regulators are kinda slow. I used it to interface to a gear sensor and was losing a lot of pulses. Def stay with the optos. Good isolation and reliable.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Does your PLC have some kind of monitor function from a serial port? You could just hook up the PIC to the PLC serially then and just process the monitor codes the PLC sends out.
    Or are you planning to use the PIC to watchdog the PLC?

    Otherwise, using optos is the best way. All the signals to the PIC would be inputs, because you are monitoring the inputs and outputs of the PLC. So the optos would be all connected the same way, with the LED connected to the PLC signals on the anodes through a current limiting resistor, and gnd on the cathodes. Pick your resistor so you get minimum on current for the LED with about 5VDC and less than maximum with 24VDC. Remember that the LED has a forward voltage that needs to be subtracted before you calculate the current though the resistor. On the PIC side, connect the emitter to gnd and the collector to +5VDC though a 500-1k ohm resistor. Connect the PIC pin between the resistor and the opto collector. This will create an inverter, so remember to invert the signals in the PIC code.
    Tim Barr

Similar Threads

  1. Interfacing DS1603 to PIC 16F877
    By hackableFM in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 25th February 2009, 21:37
  2. Interfacing two PIC micros
    By sajid in forum General
    Replies: 12
    Last Post: - 26th May 2007, 06:58
  3. Motor Control PLC with a PIC
    By sougata in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 2nd November 2006, 07:59
  4. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14
  5. PIC vs PLC (programmable logic controller)
    By pondindustrial in forum Off Topic
    Replies: 4
    Last Post: - 17th December 2004, 21:11

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts