Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Opto-isolator with MCP-23017

  1. #1
    Junior Member
    Join Date
    Aug 2018

    Opto-isolator with MCP-23017

    Dear members. Could someone help me with the following issue?

    I would like to control a optocoupler from an output of the MCP23017. When i search the internet i see so many diverent optocouplers i dont know which one i should select.

    Important for me is that i can control him with 5Vdc, is 4pins pcb and that the emitor and collector is like a potential free contact like relay. Voltage true the E and C is maybe 24Vdc and low current.

    I guess it isnít difficult but I donít know which optocoupler (opto-isolator) i should use.

    Thank you in advance!!

  2. #2
    I'm dealing with a few project for my layout. The present one is utilizing JMRI and Arduino CMRI library for turnouts, signs, etc. I additionally have Legacy control tied in. I would be keen on discussing with you about your task.

  3. #3
    Senior Member
    Join Date
    Mar 2015
    One general purpose 4 pin device is PC123 ( Cheap on ebay if you look around. They have an isolation voltage value up to 5Kv and are physically small.

    All the optos I have come across need a resistor in series with the input diode (see Fig 14 in the datasheet). Ohms law is used to calculate a suitable value of resistor. The drop across the input diode itself is around 1 volt to 1.5 volts, so taking a mid point value of 1.25 then the remainder to be dropped is "5 volts - 1.25 volts = 3.75 volts". For maximum transfer ratio, you need about 10 mA (0.01 Amps), so 3.75/0.01 = 375 ohms. Use your nearest practical value. Its not critical.

    Notice the load resistor also in the output collector. This could be a resistor or some other device, such as a mechanical relay, but if it is, then ensure you put a diode (reverse biased) across the coil to take away the inductive energy when the relay switches off. If not, then the back emf generated will be higher than 24 volts and could blow the output transistor in the optocoupler. A general purpose diode type would work here.

    Many other general purpose optocouplers/optoisolators will work just as well - its probably what is easiest to get hold of.

Tags for this Thread

Posting Permissions

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