# Can I drive an optocoupler input with just 0.5mA (500 microA)?

Im trying to interface a keypad button in a device with a MCU, and they need to be in different circuits, with no shared GND.

This keypad button has 5V DC when not pressed, and 0V when pressed. I want to use an optocoupler to "sense" when the button is being pressed (or released) so I can send a signal to an MCU.

But when pressing the button, the amount of current that flows is only 0.5mA. Is this current enough to "turn on" the internal led of an optocoupler, and then it switches the internal transistor?

I tried an ordinary led in series with the keypad button wiring, and although it allows current to pass and the button works, it never lights. The current in the led is even less, it's 0.32mA.

So, if an ordinary led doesn't light, would the optocoupler work?

The optocoupler I have is the 4N25. I can't find if there's a min input current in its datasheet.

If not, is there another way for me to do it?

I added a diagram of "what I wanted to happen" and "what I did for testing", to be more clear.

Thanks!

• That datasheet is quite straightforward: Fig. 4 answers this question. However, I don't think this really solves your problem, which you sadly forget to fully explain: why on earth would the current through the button be so severly limited? Commented Mar 18, 2020 at 20:18

There is no minimum current but there are some graphs and you've fallen off the end of the curve.

But when pressing the button, the amount of current that flows is only 0.5 mA. Is this current enough to "turn on" the internal led of an optocoupler, and then it switches the internal transistor?

This suggests to me that you are wiring the opto-coupler in series with the button. (The 0.5 mA suggests a 10 kΩ pull-up resistor.) That's a bad idea because the 'low' voltage will now be the voltage across the opto-LED and this may make the original circuit unreliable.

simulate this circuit – Schematic created using CircuitLab

Figure 1. (a) The original circuit? (b) The proposed opto-isolator modification?

If D1 is inserted as shown in Figure 1b then the voltage at 'A' can no longer be pulled to zero.

simulate this circuit

Figure 2. A fix?

Instead, add an external, strong pull-up in series with the opto-LED and tie the cathode to the switch. Now you can get as much current as you want through the LED. With 330 Ω you should get about 10 mA.

• Ok, So I need to find the 5V DC source line before it's own wiring to the switch, to allow more current to flow through the led without interfering with the current allowed to the button switch. is it right? Commented Mar 18, 2020 at 21:38
• You need to find the 5 V supply (the power supply - not the keypad input) on the keypad and wire that to R1 as shown in Figure 2. Commented Mar 18, 2020 at 21:42
• it worked! I managed to find a 5V source before the logic circuit and it worked perfeclty. Thanks a lot for taking your time for help me! Commented Mar 27, 2020 at 12:50
• Good. Thank you for taking the time for the feedback and marking the problem as solved. Commented Mar 27, 2020 at 12:57