3
\$\begingroup\$

I have a PCB board that I'm trying to repair, the principle of this circuit board is to switch an oven relays one at a time only with a constant rest time, and the switching time is predefined by the oven user.

The PCB is constituted of a PIC16F84A interfaced with 2 multiplexed 7-segment displays, and with two relays, there is also the pin RA4 connected to the collector of the optocoupler 4N25. I bought a new PIC16F84A and burned on it my self made program, and i simulated first the whole PCB circuit on Proteus, in simulation everything is working fine as expected except the optocoupler part which i found weird.

Relay_PIC

To be clear, i attached a screen-shoot of the Optocooupler part with the PIC16F84A in Proteus.

The Optocoupler play the role of a door logic open/close in an oven represented as a switch in the above simulation, however, some issues have been encountered:

1/ The PIC seems to reset infinitely as you can see the MCLR of the PIC is connected directly to the collector of the PNP transistor B327 which is grounded via the Emitter of the photo-transistor via a resistance R18, is this normal? note that it is not my circuit design, i just made it in Proteus depending on the PCB on hand to test it.

2/ When i connect the MCLR to the +5V with a 10k resistor, the circuit seems to work fine, however, i don't understand the purpose of using Zener Diode on the BC327 Emitter ?

3/ At the input of the 4N25, i found a current limiting resistor equal to R17=33k, and knowing that the 4N25 has a 20% CTR we get low current at the input , and the optocoupler will never get anything at the output ! to resolve this issue, i assumed an If=20ma and changed the R17 = 200 and now the optocoupler started to output the necessary 1 logic to the PIC, i want to know please if there is any purpose to use such high R17 from the designer?

\$\endgroup\$
  • 1
    \$\begingroup\$ Welcome to EE.SE! By all accounts this is a very good 'first question'. \$\endgroup\$ – Adam Lawrence Nov 26 '14 at 11:55
1
\$\begingroup\$

Not trying to be offensive, but are you 100% sure your simulation agrees with the board you're debugging? Is this a production-released board that works, or someone's design concept that hasn't been proven yet?

The _MCLR connection definitely isn't normal-looking to me. Being an active low signal it needs a pull-up (as you've discovered). I also am not totally confident that the voltage divider created with that 1.9k and your 10k pullup is going to work over a large population of parts.

You are also right in that the 4N25 biasing current is way off with the original resistor. The Vishay datasheet only specs CTR at a test condition of 10mA, so your expectation of 20% CTR with 33k is not valid. I generally stick with current that matches the test condition and avoid going higher than that if possible, to avoid premature aging / CTR degradation over time.

\$\endgroup\$
  • \$\begingroup\$ This is a production-released board, and it was already used in an oven. \$\endgroup\$ – Vander_kw Nov 26 '14 at 12:29
  • \$\begingroup\$ For the design, i draw the PCB circuit connection on a paper and followed each PIN and connection point by point and cross checked them many times, i was surprised to see such connection, the owner of the PCB board told me it was working before. \$\endgroup\$ – Vander_kw Nov 26 '14 at 12:31
1
\$\begingroup\$

Adam is correct, you have made some error in transcribing the reset circuit, which is a standard (but crappy) zener-based brownout detector. The 1.9K value is likely not correct.

Here is the likely configuration:

enter image description here

As to the 4N25, if you read the datasheet and interpret the curves in figure 3 along with the minmum CTR of 20%, you will see that a minimum LED current of about 1mA is required for 0.4V saturation before accounting for temperature and aging, so 3mA would be more reasonable, implying a resistor in the 1K to 1.5K range with a 5V supply.

\$\endgroup\$
0
\$\begingroup\$

Thank you Adam and Sphero for your help !

Problem resolved, i double checked again my schematic transcript with the PCB circuit, there is no wrong transcript, the schematic i submitted is correct, i don't know if it is another configuration of a brown-out protection circuit based on Zener diode, however, when i changed the optocoupler by a new one and changed the 33K LED resistor to a 10k one, and took the risk to put the PIC16F84A that i have programmed on the circuit, everything started to work as expected, i tried it for more than 48 hours, it still on duty and O.K hopefully.

\$\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.