+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Full Member level 5
    Points: 2,762, Level: 12
    Achievements:
    7 years registered

    Join Date
    Jul 2012
    Posts
    287
    Helped
    20 / 20
    Points
    2,762
    Level
    12

    How to relieve analog part for digital input?

    I pardon myself in advance for a partially philosophical question.
    Have me any device powered with 230V to 24DC and 5V DC , for standard home and office safety level, ground of device is connected to PE. In device is MCU and any digital input, we need to take them out of the device for general use, for example foot switch, for driving device with any PLC , etc.
    I always wonder how to reliably implement such an input?
    Any as on in the picture above or in the bottom or the other way?

    Click image for larger version. 

Name:	FIO.jpg 
Views:	6 
Size:	116.0 KB 
ID:	158549

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 85,239, Level: 71
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    14,024
    Helped
    4669 / 4669
    Points
    85,239
    Level
    71

    Re: How to relieve analog part for digital input?

    Both ways will work but one side of P1/P2 is connected to ground or supply so you not have real isolation.
    In general, it is safer to ground one side of an external connection than have both sides 'live' so the bottom solution would be better. However, with a small change in circuit you can still use the top circuit with P1 linking to ground to avoid the higher cost of an AC optocoupler.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   AltAdvertisement

        
       

  3. #3
    Advanced Member level 5
    Points: 15,655, Level: 30
    Achievements:
    7 years registered
    schmitt trigger's Avatar
    Join Date
    Apr 2013
    Posts
    2,603
    Helped
    833 / 833
    Points
    15,655
    Level
    30

    Re: How to relieve analog part for digital input?

    Put your optocoupler inside a diode bridge and a plain vainilla optocoupler.
    It will be cheaper than an AC optocoupler, specially if the bridge is made with common 1N4148 diodes.
    My batteries are recharged by "Helpful Post" ratings.
    If you feel that I've helped you, please indicate it as a Helpful Post



--[[ ]]--