2
\$\begingroup\$

This is the first time I've done something like this so I'll be happy to get a detailed explanation. First of all could you explain how this circuit works?

Second, I have this PCB that I want to change a bit in order to use it to receive a GPIO signal from the CPU. The GPIO is of NANO-8044 and it has 12 mA sink current at 5 V signal level. The output signals have an internal weak pull high resistor, 4.7 kΩ to 5 V. Can I just change the 3.3 V to 5 V and operate as is without changing the the resistor values?

input circuit for GPIO Signals

the Photocoupler spec.

\$\endgroup\$
  • 1
    \$\begingroup\$ Is JP2 always fitted? \$\endgroup\$ – Andy aka Feb 2 '15 at 9:07
  • \$\begingroup\$ No, it will be removed.. i forgot about it \$\endgroup\$ – Alex V. Feb 3 '15 at 16:01
1
\$\begingroup\$

yes that looks ok, but increasing R6 to 470 ohms will give approximately the same LED current at 5V and the lower the current the longer the LED will last.

Why 470? The led is documented as needing 1.2V which means in the 3.3V circuit the resistor was responsible for 2.1V. as about 255 ohms it would pass a little over 8ma. in the 5V circuit the resistor drops 3.8 V so for 8 ma about 460 ohms is needed, 470 ohms is a common size in that ballpark.

\$\endgroup\$
  • \$\begingroup\$ Another question, How may I know if the source current is high enough so that that the LED would be able to draw enough current to light? Thanks \$\endgroup\$ – Alex V. Feb 3 '15 at 16:25
0
\$\begingroup\$

This looks like a "universal" input / output circuit which has multiple options. You choose the option that you desire by installing only certain components.

1) No opto: input can have either a pull-up (R5) or pull-down (R7) resistor. Install either but not both. U2 is NOT installed, JP2 is installed, R8 isn't needed but doesn't hurt if it is present. 3v3 rail can be either 3v3 or 5V with no changes.

2) With opto (U2) installed: Omit both R5 & R7, remove JP2. Note that the pin marked "Data Out" needs a pull-down resistor if it is feeding a microcontroller input pin.

Resistor R6 is specified as 255R. This is not a standard value. You can use 220R or 240R if the LED of the opto is running from the 3v3 rail. If you want to run the LED from the 5V rail, you probably want to change the value of R6 to: (5 - 1.3) / .008 =~ 470R

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.