# Using an optocoupler + NPN transistor to drive a 24V PLC digital input from a 5V logic signal — is this topology correct?

**URL:** <https://forum.arduino.cc/t/using-an-optocoupler-npn-transistor-to-drive-a-24v-plc-digital-input-from-a-5v-logic-signal-is-this-topology-correct/1453825>\
**Category:** General Electronics\
**Created:** [July 30, 2026, 6:23am UTC](https://forum.arduino.cc/t/using-an-optocoupler-npn-transistor-to-drive-a-24v-plc-digital-input-from-a-5v-logic-signal-is-this-topology-correct/1453825 "2026-07-30T06:23:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul-00](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul-00/32/1126831_2.png) [@paul-00](https://forum.arduino.cc/u/paul-00)\
**Post date:** [July 30, 2026, 6:23am UTC](https://forum.arduino.cc/t/using-an-optocoupler-npn-transistor-to-drive-a-24v-plc-digital-input-from-a-5v-logic-signal-is-this-topology-correct/1453825/1 "2026-07-30T06:23:25Z")

</div>

I'm building a small isolated interface board that takes a GPIO output from an Arduino Uno and needs to ultimately drive a 24V digital input on a PLC. I'm using a digital optocoupler (Broadcom ACNT-H61L) for isolation, followed by an NPN transistor stage to step the signal up from the optocoupler's 5V logic output to the PLC's 24V input level. I want to confirm whether this overall topology is electrically sound before I finalize the PCB. Can someone please review the schematic.

The optocoupler I am using needs its own power supply on the output side, so the 5V\_Isolated and GND\_Isolated are from a separate DC - DC converter. I connected the PLC\_GND and GND\_Isolated because without them being connected, the loop in PLC Digital Input won't be completed, is that right? However, the optocoupler does isolate the MCU side from the Transistor side.

Thanks.

 ![Screenshot 2026-07-30 135305](https://europe1.discourse-cdn.com/arduino/original/4X/8/0/8/808d6103655dc1ff602db611cffbce6779afe8fa.png)

---

<div class="post-metadata">

**Author:** ![build\_1971](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/build_1971/32/689930_2.png) [@build\_1971](https://forum.arduino.cc/u/build_1971)\
**Post date:** [July 30, 2026, 6:46am UTC](https://forum.arduino.cc/t/using-an-optocoupler-npn-transistor-to-drive-a-24v-plc-digital-input-from-a-5v-logic-signal-is-this-topology-correct/1453825/2 "2026-07-30T06:46:26Z")

</div>

If you connect grounds, it is not isolated anymore...  
No problem, since you seem to want to isolate the left hand side.  
Your schematic seems ok. Labeling is not.  
An opto without 5V feed would have been an easier choice (but may need inverted logic).

---

<div class="post-metadata">

**Author:** ![InquisitiveMind](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/inquisitivemind/32/1272398_2.png) [@InquisitiveMind](https://forum.arduino.cc/u/InquisitiveMind)\
**Post date:** [July 30, 2026, 7:00am UTC](https://forum.arduino.cc/t/using-an-optocoupler-npn-transistor-to-drive-a-24v-plc-digital-input-from-a-5v-logic-signal-is-this-topology-correct/1453825/3 "2026-07-30T07:00:10Z")

</div>

> [@paul-00](#):
>
> I want to confirm

Before discussing whether the grounds should be connected, could you tell us what PLC input you're driving? A part number or the input wiring diagram from the PLC manual would help. PLC digital inputs are implemented in different ways, so whether PLC\_GND and GND\_Isolated need to be connected depends on how that particular input is referenced.

---

<div class="post-metadata">

**Author:** ![build\_1971](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/build_1971/32/689930_2.png) [@build\_1971](https://forum.arduino.cc/u/build_1971)\
**Post date:** [July 30, 2026, 7:09am UTC](https://forum.arduino.cc/t/using-an-optocoupler-npn-transistor-to-drive-a-24v-plc-digital-input-from-a-5v-logic-signal-is-this-topology-correct/1453825/4 "2026-07-30T07:09:36Z")

</div>

Since the transistor base is driven from the opto, grounds need to be connected.

---

<div class="post-metadata">

**Author:** ![InquisitiveMind](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/inquisitivemind/32/1272398_2.png) [@InquisitiveMind](https://forum.arduino.cc/u/InquisitiveMind)\
**Post date:** [July 30, 2026, 7:32am UTC](https://forum.arduino.cc/t/using-an-optocoupler-npn-transistor-to-drive-a-24v-plc-digital-input-from-a-5v-logic-signal-is-this-topology-correct/1453825/5 "2026-07-30T07:32:19Z")

</div>

> [@build\_1971](#):
>
> grounds need to be connected

@build_1971 You're right. In this circuit the common ground is required because the optocoupler output directly drives the NPN transistor base. Without a common reference between GND\_Isolated and GND\_PLC, the transistor cannot be driven properly. My previous comment was therefore misleading.

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [July 30, 2026, 7:34am UTC](https://forum.arduino.cc/t/using-an-optocoupler-npn-transistor-to-drive-a-24v-plc-digital-input-from-a-5v-logic-signal-is-this-topology-correct/1453825/6 "2026-07-30T07:34:28Z")

</div>

I can't see a problem with your circuit except that it seems a little over-complicated.

It seems odd to have resistors on both the anode and cathode, but I did see the same thing done in the datasheet for the ACNT-H61L.

A more common opto-isolator like PC817 has a max emitter-collector voltage of 80V, which might make the separate npn transistor unnecessary.

Are there reasons you choose these components that you haven't mentioned yet?

---

<div class="post-metadata">

**Author:** ![sciroccotorc](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sciroccotorc/32/1126463_2.png) [@sciroccotorc](https://forum.arduino.cc/u/sciroccotorc)\
**Post date:** [July 30, 2026, 9:15am UTC](https://forum.arduino.cc/t/using-an-optocoupler-npn-transistor-to-drive-a-24v-plc-digital-input-from-a-5v-logic-signal-is-this-topology-correct/1453825/7 "2026-07-30T09:15:53Z")

</div>

PLC DI's are usually externally powered, so your setup looks okay once the grounds are connected, but obviously it wouldn't work if it's an internally powered PLC DI.

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [July 30, 2026, 9:51am UTC](https://forum.arduino.cc/t/using-an-optocoupler-npn-transistor-to-drive-a-24v-plc-digital-input-from-a-5v-logic-signal-is-this-topology-correct/1453825/8 "2026-07-30T09:51:46Z")

</div>

> [@paul-00](#):
>
> I want to confirm whether this overall topology is electrically sound before I finalize the PCB.

The topology is sound but the circuit will **never** work.  
Did you read the opto datasheet?  
What is the min and max LED current?  
Have you met those requirements?
