Adding a relay module

This Section is for users to discuss hardware

Adding a relay module

Postby DavidT » Fri Sep 24, 2021 6:48 pm

Hi,
I thought this would be straight forward but it apparently isn't. :?

I'm trying to add a relay module but I've been unable to activate a relay.

The motion controller is a UC300ETH, the board is a C94 from CNC4PC.
The relay modules I have in hand are:
- a Seeed Studio arduino shield v3 | 4 relays | powered by 5V
- a MASSO Relay Module v1.2 | 6 relays | powered by 24V

The connections:
I powered the module from an external power supply (+5V, GND). I double and triple checked, the polarity is good.
I wired the board output pin to the relay module input pin. (Port2_Pin1 or Port2_Pin14 to Input 4,5,6 or 7 of the module)

Trigger test:
I used a simple macro to activate a port, wait 3 seconds, deactivate the port. (See attached macro M12)
I see the physical LED on the board light on, then off after 3 seconds but nothing happens with the relay.

I tried the same thing with the MASSO module with the same results (or I should say the same "no result" ;) ).
Since it works on 24V I would prefer to use another option that works only on 5V.

Lastly, using the Seeed module, I tried to use the output pin1 from port3 (wired to the C94 IDC26 connector ... not directly to the UC300ETH) but that didn't work either.

Please help, thank you!
Attachments
M12.txt
Simple macro to activate an output port, wait 3s, deactivate the port
(103 Bytes) Downloaded 414 times
User avatar
DavidT
 
Posts: 13
Joined: Fri Sep 24, 2021 5:51 pm
Location: Montreal, Canada

Re: Adding a relay module

Postby DavidT » Fri Sep 24, 2021 8:43 pm

Well, to answer my own question!

I'll summarize what I understood in case anyone need the info as well... Feel free to correct me if anything of this isn't right.

From a conversation with Arturo @ CNC4PC I found that:
- the output of the C94 are Open Collector (they close the circuit by connecting the ground when activated)
- In other words by activating them you send no voltage out but you open the door for voltage to get in.
- this is useful to close a circuit (that will per example activate a relay) but it won't activate a relay found on a module that has its own power.
- to activate a relay with this method, you supply the required voltage directly to the relay coil & link its ground to the input of the board. By activating the OUTput port it will let the current... IN! That sounds weird but as long as it works I'm fine with it! :D
User avatar
DavidT
 
Posts: 13
Joined: Fri Sep 24, 2021 5:51 pm
Location: Montreal, Canada

Re: Adding a relay module

Postby spumco » Fri Sep 24, 2021 11:09 pm

Do an internet search for "Sinking vs Sourcing" circuits. After you read a few different sites, you should (hopefully) get your head wrapped around the concept. Some devices 'sink' current and others 'source' current. And you have to pair them opposite - i.e. your C94 acts like a 'sinking' device (outputs), and you connected it to a powered relay module that is in this case acting like a 'sourcing' device.

It gets confusing, especially when you're looking at a diagram with NPN/PNP transistor symbols. Just remember that you need opposites at either end of the circuit if you don't want to resort to pull-up or pull-down resistors.
spumco
 
Posts: 306
Joined: Mon Oct 03, 2016 10:10 pm

Re: Adding a relay module

Postby ger21 » Sat Sep 25, 2021 12:12 am

Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: Adding a relay module

Postby DavidT » Thu Sep 30, 2021 2:45 am

Thank you spumco for the quick course. It made me think of the enigma from a movie my kids were watching: Two creatures (I think they were trees) at the junction of two paths, both creatures know which one is the right path (there's only one because Stihl didn't exist at that time). One creature always tell the truth & the other one always lie. The enigma was to figure the question to ask to know for sure which path to take? (There may be no relation with the information you gave... for that I would blame my brain. :lol:)

Gerry, thank you for the link. I didn't know that there were relay modules that could work on low trigger... and this one works on either one! That's pretty cool.
User avatar
DavidT
 
Posts: 13
Joined: Fri Sep 24, 2021 5:51 pm
Location: Montreal, Canada

Re: Adding a relay module

Postby cncdrive » Thu Sep 30, 2021 3:47 am

We have a similar relay module with 8 relays: http://shop.cncdrive.com/index.php?productID=1041
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Adding a relay module

Postby DavidT » Thu Sep 30, 2021 4:19 am

Cool, good to know. That looks like a common multi-relay module. I never really paid attention to the details of such modules before... never really needed to actually!

But since we're at it: I'm pretty sure that I've read that the output on the UC300 are TTL outputs. How come it didn't work when I used an output pin directly from port 3 (which, I believe, is directly linked to the port 3 pin of the UC300)? Or are they all configured to work the same way and it's defined by the mainboard manufacturer? Or I got it all wrong (again)... please enlighten me :)
User avatar
DavidT
 
Posts: 13
Joined: Fri Sep 24, 2021 5:51 pm
Location: Montreal, Canada


Return to Hardware

Who is online

Users browsing this forum: No registered users and 16 guests

cron