2 Attachment(s)
Wiring Optocoupler Isolation Board
Hello,
I apologize in advance if my question is too basic and the solution too obvious. I have very limited experience dealing with electronic components.
What I would like to do is using optical switches for the Homing operation of my CNC.
----------------------------------------------------
THE OPTICAL SWITCHES:
The optical switches are NPN and run on 24V. They have 3 connectors - GND (Ground), +24V and S1 (Signal).
In NC (Normally Closed) mode the S1 port is connected to the GND. Triggering the switch (interrupting the LCD light) would disconnect GND and S1.
In NO (Normally Open) mode S1 is disconnected. Triggering the switch would connect GND to S1.
THE CONTROLLER:
The CNC controller runs on 5V DC. It requires the GND port to be in NC (normally closed) mode with P1 (Port 1). If the line between GND and P1 is disconnected by a homing switch the controller would begin the homing operation.
----------------------------------------------------
I tried using a 24V relay. This solution works, however it introduces a significant signal delay that reduces the accuracy of the Homing operation.
I ordered 2 different Optical Isolation Boards online (see below), unfortunately I can’t figure out how they operate, how to wire them and whether or not I need additional components.
Please advice.
https://www.cnczone.com/forums/attac...d=481934&stc=1 https://www.cnczone.com/forums/attac...d=481936&stc=1
1 Attachment(s)
Re: Wiring Optocoupler Isolation Board
First off.
You will need to be sure you have an optocoupler module capable of 24v input and 5v output.
They are fitted with different resistors to suit the voltage needs.
Then on the switches:
24+ psu to switch 24+.
GND psu to switch GND.
Opto IN1 to psu 24+.
Opto GND to switch S1.
On the controller:
5v+ goes to Opto VCC.
Control Input# to Opto OUT.
Control GND to Opto GND.
Now when switch operates it will operate the control input used.
Be careful with some of these modules, some share GND's etc where you don't want them.
These are the ones I am using for these types of uses:
https://www.aliexpress.com/item/4000...266af19c9hzQXK
I drew this up a while ago for something else:
This example uses a 24v in / 5v out opto board of npn output type. The 5v controller port is an IDC26 port that is input switched from a UC300eth.
https://www.cnczone.com/forums/attac...d=481942&stc=1
Re: Wiring Optocoupler Isolation Board
Quote:
Originally Posted by
Storen
Hello,
I apologize in advance if my question is too basic and the solution too obvious. I have very limited experience dealing with electronic components.
What I would like to do is using optical switches for the Homing operation of my CNC.
----------------------------------------------------
THE OPTICAL SWITCHES:
The optical switches are NPN and run on 24V. They have 3 connectors - GND (Ground), +24V and S1 (Signal).
In NC (Normally Closed) mode the S1 port is connected to the GND. Triggering the switch (interrupting the LCD light) would disconnect GND and S1.
In NO (Normally Open) mode S1 is disconnected. Triggering the switch would connect GND to S1.
THE CONTROLLER:
The CNC controller runs on 5V DC. It requires the GND port to be in NC (normally closed) mode with P1 (Port 1). If the line between GND and P1 is disconnected by a homing switch the controller would begin the homing operation.
----------------------------------------------------
I tried using a 24V relay. This solution works, however it introduces a significant signal delay that reduces the accuracy of the Homing operation.
I ordered 2 different Optical Isolation Boards online (see below), unfortunately I can’t figure out how they operate, how to wire them and whether or not I need additional components.
Please advice.
https://www.cnczone.com/forums/attac...d=481934&stc=1 https://www.cnczone.com/forums/attac...d=481936&stc=1
Why do you need this Opto board, most Breakout Boards already have Opto isolation, and you can connect your proximity switches direct.
1 Attachment(s)
Re: Wiring Optocoupler Isolation Board
@ dazp1976:
Thank you for the explanation! I guess I don't quite understand the principle of optocoupler operation. I assumed it functions similar to electromagnetic relay with simple On-OFF state, but instead of electromagnet it uses light sensor to switch. It turns out this is not the case. In addition to the switching function the optocouplers can reduce the voltage similar to a transistor. Depending on the voltage applied to the Anode and Cathode ports the optocoupler will increase/reduce the resistance between the Emitter and the Collector ports and therefore the output voltage.
Is it possible to reduce the resistance between the Emitter and the Collector to zero so the optocoupler would act as a simple switch? I assume for this to work I will need to apply the max. voltage to the Anode and Cathode ports. I downloaded the spec. sheet for the exact optocoupler model - PC817 link
As I mentioned earlier, I am not familiar with terminology and the parameters. I am not sure which parameter to look for. Is it the one called "Forward Vf"? Would the TYP. 1.2V open (remove the resistance) completely or I need to use the MAX. 1.4V value?
@ mactec54:
The problem is I don't know what module should I use in my particular scenario. I would like to use NPN 24V optical switches to interrupt the 5V homing signal between GND and P1 on the controller. Interrupting the signal will start the homing operation. Using an electromagnetic relay is not an option because it introduces significant delay which lowers the accuracy of the homing. I need something faster and more responsive. If I can't figure out how to do this with an optocoupler I am planing to try a solid-state relay.
The controller I use does't have a universal interface for a Breakout Board so I have to do this with a custom module.