Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Marce on July 10, 2020, 05:44:27 PM

Title: Mach3 experimental inputs circuit protection with opto couplers for HW-356 CB
Post by: Marce on July 10, 2020, 05:44:27 PM
Dear Friends:

I am inexperienced in the world of electronics, so I ask for your help.I need to make a protection circuit for the digital inputs of my mach3 Circuit Board. This is for the purpose of protecting digital inputs. because they have been burned previously. Due to increased accidental voltages of unknown origin. I have developed an experimental circuit with opto couplers PC817 according to the attached image. The problem that appears to me is how to connect the output of the opto coupler to the digital input of my circuit board mach3. The optocoupler output generates 3 output pins. One is the operating voltage which is 9v supplied by the GND pin of the mach3 circuit board. The second Pin is the logical output that corresponds to the circuit board input of mach3. The third pin is the GND of the opto coupler output circuit. This is the pin that is difficult to know where to connect. I hope you can help me.

Best regards
Title: Re: Mach3 experimental inputs circuit protection with opto couplers for HW-356 CB
Post by: joeaverage on July 10, 2020, 07:14:08 PM
Hi,
your very close but there is a small issue with your circuit.

In particular you have placed an LED and a resistor in the emitter circuit of the phototransistor. When the phototransistor conducts
the output goes low as desired but will be one LED voltage drop (approx 2V) plus the drop across R4 (approx 180mV) plus the saturation
voltage of the photodiode (typical 100mV). Thus the logic 'low' will be about 2.2V above GND, and that's too high. You should aim for
a logic low of 1V or less, ie you should remove the LED and the resistor in the phototransistor emitter.

Craig
Title: Re: Mach3 experimental inputs circuit protection with opto couplers for HW-356 CB
Post by: Marce on July 10, 2020, 08:11:29 PM
Hi Craig:

Thank you very much for answering my question. In relation to your contribution. I tell you that it is not a problem to eliminate the LED diode and the resistance at the output of the emitter of the optocoupler. I incorporated this LED diode into the circuit with the experimental objective of seeing that the optocoupler conducted a voltage at the output. Anyway. To make all these modifications. I still do not know how to connect the emitter of the optocoupler to the circuit board.
Title: Re: Mach3 experimental inputs circuit protection with opto couplers for HW-356 CB
Post by: ZASto on July 11, 2020, 05:28:59 AM
Ahmmm...
You already have optocouplers on the inputs of your BOB. Why would you put another ones?
Figure out the series resistor on the BOB and, if needed, adjust their values to your needs.
It's easy to calculate suitable resistor if you assume that the current through IR diode in optocoupler should be, nominally, 5mA.
Second, check thoroughly your wiring and connections to find "unknown origins" of excessive voltages. OR, place 4-pin DIP sockets on your BOB for optocouplers, for easy replacement when they fail.
Title: Re: Mach3 experimental inputs circuit protection with opto couplers for HW-356 CB
Post by: Marce on July 12, 2020, 04:26:26 PM
Dear Sir:

Thanks for replying to this post.as well I said. the purpose of this experimental circuit is to protect the BOB inputs from being damaged? Unfortunately because of my lack of experience. I can't get the right way to connect this circuit in my head. After much thought, design the attached diagram. I think it is better than the previous one. But I find the problem of calculating the resistors R3 Value. The model of the optocoupler used is PC817. Some of the values in the datasheet are confusing to me.  These are the current values in mA. in the transistor stage. These are the current values in mA. in the transistor stage which are several. I don't know which one to use to calculate resistance R3. The ones that confuse the most:

Collector Current = IC = 50mA
Current transfer ratio = CTR = IF = 5mA, V CE = 5V
Collector-emitter saturation voltage = VCE (sat) = IF = 20mA, I C = 1mA.

Depending on the value that I choose. The results are very different and confusing.

I hope you can help me.

Best regards

Title: Re: Mach3 experimental inputs circuit protection with opto couplers for HW-356 CB
Post by: ZASto on July 12, 2020, 04:42:53 PM
As I already wrote, you HAVE optocouplers on inputs of your BOB, something817 (prefix irrelevant).

Here is schematic of your board, or very very similar.