Logic Relays on the screw terminals?
The screw terminals on the breakout board are used to drive relay coils. As such, they are set up as an open collector output and used to pull (sink) current from +V through the coil to ground when activating the relay. To use simple TTL style input for Solid State Relays or powered relay boards I recommend using the pin headers labeled for TTL/SSR. However, a lot of people want to use the screw terminals so I am writing this to show how it can be done.
Here is the circuit diagram for a single relay output. The output driver is two transistors in a Darlington configuration and supports up to 500 mA of current. It is set up to pull current from a positive voltage source through the relay coil to ground. As such, there is no ground terminal provided because it is connected via the driver circuit internally to the breakout board. You can see a small +V near the relay terminals on the breakout board.
Since the output signal has no actual reference to ground, it cannot be directly used as logic input to a powered relay board or solid state relay. But, it can with the addition of an external resistor to pull the output up to 5V when there is no output and when there is a signal, pulls the output to 0V. Below you will see the circuit used this way. The recommended resistor value is 10K ohms but you can use any value from 2.7K up to about 50K. Any power value can be used - the common 1/8W resistor is good. You will need to find a ground connection on the breakout board - any available one will do. There are a number on the breakout board and they are all labeled with "G", for ground. Also, be sure to take the signal from the side of the resistor that is NOT connected to the +V terminal.
For those with electronics background, I have shown the Darlington driver circuit without freewheeling diodes. Rest assured, they are in the interface IC (ULN2003) on the board. I just chose to omit them in the drawing for simplicity. By the way, some people have pointed out that TTL is incorrect/misleading terminology. I am using the term to denote any 5 volt logic signals mainly because it fits in the space available on the PCB. I am happy to hear of any 3 letter alternative suggestions. I thought about using 5V but that would probably cause more confusion.
About Me.
I'm Phil Barrett, a long time CNC enthusiast. I run a small company, Brookwood Design, that makes several breakout boards for grblHAL and love to help people get the most out of their CNC machines.
Hello again ! I do not understand the meaning of where the the relay signal is connected according to your design. If there is no resistance between this signal and the board ground, the tension there will remain nule, no ? Ah, ok, I think while asking you I start understanding. It means we need to revert the relay output between NO and NC, right ? What looks as obvious for electronicians is not for mortal commoners !
Glad it helped. I will probably put the pull-up resistors on the board in the next turn. I do not think think they will affect the performance of relay coils so it makes sense.
Thanks a lot for this blog post. I'm in the latest "wiring"phase of T41U5XBB and was a bit confused how to connect SSRs to the screw terminal. I'll try this tomorrow. I wanted to use the screw terminal since on my older machine which I have build 7 years ago I have slight problems with pin headers on SSR module. They sometimes lose the contact, so I generally trust the screw terminal more even though you have to tighten them from time to time - but that is easier fix than to replace them or try to clean and de-oxidize them.