Relay basics

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

BillB
Posts: 447
Joined: Thu Jul 15, 2021 1:43 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Relay basics

Post by BillB »

Richards wrote: Sat Sep 25, 2021 7:34 am Here's a simple circuit that shows how an Acorn relay can control an external relay or contactor. It shows that the external relay or contactor is controlling the coil on another device (solenoid, relay, contactor, etc.).
.

Acorn_to_relay.png
.
When the Acorn relay is turned ON, it lets current flow through the coil on the external relay or contactor. When the Acorn relay is turned OFF, the Diode diverts the voltage spike that is caused by the coil back to +24V. That limits the amplitude of the spike to +24.7VDC (instead of 50 to 100 VDC).

When the coil of the external relay or contactor is turned ON, it controls current flow through the other coil (solenoid, relay, contactor, etc.). That coil also has a snubber diode to control the voltage spike when that coil is turned OFF.

Note that I'm using 24VDC devices. There are two reasons for using 24VDC devices. (1) They allow the use of the Acorn's 24VDC power supply. (2) Because they are DC devices, a diode can be used as a snubber. If they were AC devices, then a resistor/capacitor snubber would need to be used. I like to keep things simple.

Using this type of circuit, the load on the Acorn is small. It only has to control enough current to turn on an external coil. The external relay or contactor can handle much larger loads, or even a third coil, like the schematic shows.

If the Acorn controlled a contactor, then the second device would normally show three SPST circuits. A SPST (Single Pole, Single Throw) circuit consists of the common (pin 2 in my schematic) and a N/O contact (Pin 3 in my schematic). In that case, Pin 2 might be connected to AC Line and Pins 2 and 3 would act as an electronic switch to turn AC power On/Off to a 1-phase motor or other device.

The top photo of the solenoids in the first post in this thread showed a 12VDC device that can take a full second to turn on. It also has a limited ON time duty cycle. I would try to find a 24VDC device that turns on in 50msecs or less. I would also look for something that can remain ON indefinitely.

Thanks for the info I appreciate it. I think I’m leaning toward just using the existing Acorn board relays. BUT if I do decide to go this route can you tell me if this 4 pole relay is a good choice?

https://www.automationdirect.com/adc/sh ... s)/rs4n-de
Richards
Posts: 692
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Re: Relay basics

Post by Richards »

Bill,

Those relays MIGHT work. The approach that I would take is to first decide what the relay has to drive. Once you know the electrical load, what type of load (inductive or resistive), the voltage required and the duty cycle, then you look for a relay or contactor that can handle that load. Those particular relays are N/O SPST (Single Pole, Single Throw) with a very light load rating. Granted, the individual "blades" are inexpensive and easy to replace, but will they do the job that you need them to do? They light duty relays that I use are more like AutomationDirect's 782-2C-24D (plus DIN rail base). I currently use their CWC016-10-30L03 contactor with the CWC016-10-30L03 diode module. That contactor has an auxiliary N/O contact that is perfect when using a Start/Stop latching circuit.

It might help to go on EBay or Amazon and buy a few inexpensive relays with 24VDC coils, a few 1N4004 diodes to control surge/spikes, and a few toggle switches to experiment with on your test bench. Use the toggle switch instead of the Acorn relay board to control current to the relay's coil. After you're familiar with how the relay functions and after you've tried controlling some real loads with the relay's contacts, then use the Acorn and its relay board to replace the toggle switch. If you buy relays with clear plastic covers, you'll be able to see any arcing when the contacts toggle. If you see arcing, you'll need to do further experimenting with some contact surge suppression circuits. The test bench has always been my most valuable tool when I've designed process control computers and controllers. I prefer to find the problems at the test bench and not in the field.
-Mike Richards
BillB
Posts: 447
Joined: Thu Jul 15, 2021 1:43 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

u

Post by BillB »

Richards wrote: Sat Sep 25, 2021 9:05 pm Bill,

Those relays MIGHT work. The approach that I would take is to first decide what the relay has to drive. Once you know the electrical load, what type of load (inductive or resistive), the voltage required and the duty cycle, then you look for a relay or contactor that can handle that load. Those particular relays are N/O SPST (Single Pole, Single Throw) with a very light load rating. Granted, the individual "blades" are inexpensive and easy to replace, but will they do the job that you need them to do? They light duty relays that I use are more like AutomationDirect's 782-2C-24D (plus DIN rail base). I currently use their CWC016-10-30L03 contactor with the CWC016-10-30L03 diode module. That contactor has an auxiliary N/O contact that is perfect when using a Start/Stop latching circuit.

It might help to go on EBay or Amazon and buy a few inexpensive relays with 24VDC coils, a few 1N4004 diodes to control surge/spikes, and a few toggle switches to experiment with on your test bench. Use the toggle switch instead of the Acorn relay board to control current to the relay's coil. After you're familiar with how the relay functions and after you've tried controlling some real loads with the relay's contacts, then use the Acorn and its relay board to replace the toggle switch. If you buy relays with clear plastic covers, you'll be able to see any arcing when the contacts toggle. If you see arcing, you'll need to do further experimenting with some contact surge suppression circuits. The test bench has always been my most valuable tool when I've designed process control computers and controllers. I prefer to find the problems at the test bench and not in the field.
Richards, I bench tested the Amazon selenoid I purchased, using my DC power supply. I wired it directly to the power supply without the diode as I have not ordered any yet, Worked great. This will be used for air for just air blast or I may use it for mist.

Questions
Do the diodes you recommend and the Quencharc ("Snubbers") (Centroid PN: 1819 Manufacturer Part Number: 104M06QC100) Centroid recommends perform the same function to control sudden spikes in voltage and noise issues? Are they the same thing?

When wiring this selenoid to Acorn do I use the diode or snubber on the Acorn relay?
Attachments
IMG_9170.jpg
BillB
Posts: 447
Joined: Thu Jul 15, 2021 1:43 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Relay basics

Post by BillB »

Is this wiring correct it's not working. Using output 7, its a NC selenoid, hitting mist in VCP triggers the LED in IO but the valve does not open, Yes the air is on, What am I doing wrong? :oops:

Worked when hooked up to DC power supply using a simple limit switch to trigger it.
Attachments
IMG-9174.JPG
IMG-9173.JPG
tblough
Posts: 3073
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: Relay basics

Post by tblough »

Diodes are for DC; Quencharcs are for AC. Your solenoid has a 24VDC coil, so you would use a diode on the Acorn side.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
Richards
Posts: 692
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Re: Relay basics

Post by Richards »

BillB,

As far as using a diode or a snubber (Centroid PN: 1819 Manufacturer Part Number: 104M06QC100) goes, they serve two different purposes. In a DC circuit, a snubber diode is placed across the coil of the solenoid or relay to suppress the voltage spike caused by the coil when power is removed from the coil. Because current only flows in one direction in a DC circuit, an inexpensive diode can remove the surge. A Quencharc is placed in series with relay contacts to reduce the chatter generated when a relay contact opens or closes. Because a relay contact is mechanical, it acts as if it were a spring. Typically, it "bounces" open and closed many times before the contacts settle. The Quencharc removes most of the electrical noise that the "bouncing" induces. In your case, because you're driving the coil of a solenoid, a 1N4004 (or similar) diode will work. Note that the diode appears to be wired "backwards" in the circuit. That's the way that it should be. It only passes current that is stored in the coil.

As far as the other problem with the solenoid not turning on when wired through the Acorn relay board, it looks like you've wired an incomplete circuit. The current through the solenoid needs to have a +24VDC source connection and a GND connection. I can't see in the photos that you have both connections.

I'm attaching two simple schematics. One schematic shows how to wire +24VDC through the Acorn's relay. The other schematic shows how to wire GND through the Acorn's relay. Either will work. I usually wire my circuits to control voltage going to a device (similar to how a light switch is wired). That way, I know that if the relay is OFF, I won't get shocked if I poke around the device I'm driving. You shouldn't poke around any device with power applied, but accidents happen. In either schematic, current flows through the Acorn's relay when the relay is turned on.
.
solenoid.png
solenoid.png (9.54 KiB) Viewed 2075 times
-Mike Richards
BillB
Posts: 447
Joined: Thu Jul 15, 2021 1:43 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Relay basics

Post by BillB »

Mike, Do you think you could draw out exactly where all wires go for wiring this solenoid? Im just not getting it. I have been reading and starring at your drawing, and also looking at this page from the relay board manual. I'm feeling SO electronically challenged, Man just frustrating! I have to laugh at myself cuz I'm not getting it and I'm not finding the right documentation showing me exactly how to wire up a simple 2 wire solenoid.

I had both wires going directly into the relay board from the solenoid thinking the actual board had 24 volts going through it. And now your saying I need a ground so even more unsure.

question, are the buttons for flood, mist vac preconfigured, and ready to go? Once I set up the output I should be seeing output #7 turning ON which I am not. I thought yesterday when I was working on it it was coming on but now its not?
Attachments
9.JPG
Richards
Posts: 692
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Re: Relay basics

Post by Richards »

Bill,
I should have some time later on this afternoon to wire up my spare Acorn V.4 and it's relay board to a single relay or a solenoid. If things go as planned, I'll try to post something by 5:00 pm MDT.
-Mike Richards
suntravel
Posts: 1967
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: Relay basics

Post by suntravel »

DC Solenoid hookup is described here:

https://www.centroidcnc.com/dealersuppo ... 004.r1.pdf

The buttons are configured, just assign the function in the Wizard to the used Out on the relaybord and it works.

Regards

Uwe
Richards
Posts: 692
Joined: Sun Sep 16, 2018 9:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: South Jordan, UT

Re: Relay basics

Post by Richards »

Let’s start with the basics. When building a simple controller using an Acorn board, we deal with two types of electricity, AC and DC. AC is alternating current. It is the power that we get from a wall outlet. In North America, it is 120 VAC. In other parts of the world it is 220, 230, or 240 VAC. Common examples of AC power are light bulbs and 1-phase motors. DC is direct current. Direct means that it flows in one direction. Using conventional notation, we say that direct current flows from its positive side to its negative side. Common examples of DC power are flashlights.

Voltage is the pressure that forces electricity along its path. The higher the number, the greater the pressure. The lower the number, the lesser the pressure. A 24VDC circuit has more pressure than a 5VDC circuit.

Current is the amount of electricity flowing through the circuit. Motors can handle the flow many amps. Indicator lights and opto-couplers can only handle the flow of a few thousandths of an amp.

Think of electricity as water in a hose. Voltage compares to the water pressure. Current compares to how much water is flowing through the hose.

Those basic concepts must be properly understood before going on.

The next concept is Sinking and Sourcing circuits. We’re not going to bother with Sinking circuits right now. We won’t be using a Sinking circuit when using the Acorn’s relay board. A Sourcing circuit “sources” or provides current from the plus side of a DC power supply. That current flows from the source, through the device that needs power, and then to the negative side of a DC power supply. Compare it to water running downhill.

Next, we must understand what an electrical circuit is. In our case, it is the full path that electricity follows from the plus side of a DC power supply, through the device being powered, and then on to the minus side of the power supply. The circuit that we’re going to build starts at the +24VDC side of the power supply, goes through the coil of a solenoid (or the LED indicator lamp that I’ll be using to test the circuit), to the minus or negative side of the power supply. Note that some power supplies might be marked +24V and -24V. That does NOT mean that it is a 48V power supply. It means that the + and the – sides of the power supply are marked with the total voltage of the power supply. Sometimes, particularly when the power supply produces several voltages, the minus or negative is marked COM or COMMON. That’s because it is the common reference point for all voltages produced by that power supply.

The relay is next. A relay is just a simple switch with an electromechanical toggle instead of a manual toggle. A relay has two major components, a coil (electromechanical switch) and a set of contacts. The coil and the contacts are separate. The voltage that controls the coil is not the same voltage used by the contacts unless you wire it that way yourself. A relay is labeled by the number of “poles” that it has. A pole is just another word for “separate circuit”. It is also labeled by the number of “throws” it has. The relay board supplied with the Acorn has eight individual SPDT (single-pole, double-throw) sets of contacts. Each set of contacts is controlled by its own coil.

The relay’s coil is configured by Centroidcnc to be controlled by the Acorn board. All we have to know is which instructions to use to turn it On and Off.

We need to know more about relay contacts before we can use the relay board. The relays have three terminals, N/C, Common, and N/O. N/C (normally closed) means that the N/C terminal is in contact with the Common terminal when the relay’s coil is NOT activated. N/O (normally open) means that the N/O terminal is NOT in contact with the Common terminal when the relay’s coil is NOT activated. When the coil is activated by the Acorn, the N/C contact opens and is no longer in contact with the Common terminal. The N/O contact closed and is in contact with the Common terminal. Both the N/C and the N/O contacts can be used, if needed. For example, the N/C terminal could source current to a Red LED indicator lamp. When the relay is OFF, current would flow from the power supply to the relay’s Common terminal, to the N/C terminal, and then to the plus side of the LED indicator lamp. That would provide a source of current for the Red LED indicator lamp. The minus side of the LED indicator lamp would be connected to the power supply minus. That would provide a complete path from the power supply’s positive voltage to the minus, negative, or voltage common on the power supply. By wiring things that way, the Red LED indicator lamp would be ON when the relay’s coil was inactive. If a Green LED indicator lamp were used to show when the relay was active, it would be connected to the relay’s N/O terminal. Current would be sourced to the Red LED indicator lamp via the relay’s Common terminal when the relay’s coil was active.

That’s the mechanical side of connecting something to a relay. We’re not finished yet. We still have to use the Wizard to assign that relay to something. Because the VCP has a button to turn Flood Coolant On/Off, we could assign Flood Coolant to output #2. Then, after saving the configuration, powering down the software and the Acorn and restarting the Acorn, if we turned on manual mode on the VCP and then toggled On the Flood button, output #2 would turn on. If we toggled the Flood button again, output #2 would turn off. We can also control the outputs using G-code. Look at the list of M codes to see which ones to use. If the outputs have not been assigned to another purpose, then codes M61 through M68 turn on outputs 1 through 8 and codes M81 through M88 turn off outputs 1 through 8. Because we assigned Flood Coolant to output #2, we would use code M8 to turn on the Flood Coolant output and code M9 to turn off the Flood Coolant output.

.
OUTPUTS.JPG
Use Wizard to assign an Output to a VCP device
.
.
Indicator_1.jpg
The DC device is a simple LED indicator Lamp. It could have been a solenoid, a contactor, or other DC device.

Connect power supply GND to (-) side of DC device (Black wire)
Connect power supply +24VDC to Relay Common terminal (Yellow Wire)
Connect Relay N/O terminal to (+) side of DC device (Blue Wire)
.
.
wiring_1.jpg
For this test, click on VCP Flood Coolant to turn on LED indicator
-Mike Richards
Post Reply