MechMate CNC Router Forum

MechMate CNC Router Forum (http://www.mechmate.com/forums/index.php)
-   70. Control Systems (http://www.mechmate.com/forums/forumdisplay.php?f=28)
-   -   Solid State Relay (SSR) for switching Router under control of Mach3 (http://www.mechmate.com/forums/showthread.php?t=290)

Gerald_D Thu 22 February 2007 23:44

Solid State Relay (SSR) for switching Router under control of Mach3
 
Reza asked the following in another thread:

"I am making my board today, and I have some dumb questions. The relay that I got has four terminals marked Input (3 +) and (4 -_) 3-32v
and Output (2 and 1) 24-280VAC. I am using 110 electricity and I plan on using the relay for the router. So I supposed my line voltage will go through terminal 1 and 2 on the output and my switch legs would go through terminal 1 and 2 to operate the relay. It's a Magnecraft (model#SSR225DIN-DC).
The other question is what size fittings are you using going from control panel out carrying the various cables and what type are they (I like them) but I couldn't find them in the local store.
Thanks and I will try to upload some pictures tommorrow."

Gerald_D Fri 23 February 2007 00:16

Regarding the relay, I have zero experience of that type (SSR) and I'd better keep my big mouth shut.

Those plastic (or metal) fittings we call "cable glands" and any old electrical shop on the corner has them. But you guys may have a different system or name.

Gerald_D Fri 23 February 2007 00:25

What I do know of SSR relays is that PMDX recommended this type for the router. Their PMDX-122 can drive certain SSR's directly. You might want to mail your query and data sheet to them?

Mike Richards Fri 23 February 2007 03:21

Terminals 3 and 4 are for the DC control voltage, with terminal 3 normally connected directly to 5VDC and terminal 4 normally connected to an electronic circuit that goes to 0VDC when the relay is supposed to turn on (TTL active LOW).

Terminals 1 and 2 are wired exactly like you would wire the terminals from an AC switch to an electrical outlet. One terminal is connected to the AC Line and the other is connected to the AC Load. The "outlet" is wired so that its AC hot terminal is connected to the SSR's load terminal and its AC neutral terminal is connected to AC neutral.

The way that it works is that when a DC voltage from 3 to 32 volts is applied across terminals 3 & 4, current flows through an internal LED. When that LED turns on, the SSR acts as if an internal switch had been turned on that allows the AC voltage on the Line terminal to be passed to the Load terminal.

An added advantage of this SSR is that the AC side turns on or off as the AC sine wave passes through the zero voltage part of the sine wave, which means that there will NOT be any abrupt surges sent to the router when it is turned on or off.

Gerald_D Fri 23 February 2007 03:24

Mike, are these SSR's fairly foolproof if the input polarity is reversed?

Mike Richards Fri 23 February 2007 05:44

Gerald,
I've never damaged a SSR by reversing the DC control inputs. All that happened was that the device didn't work. Changing the DC lines to be correct allowed the device to work.

(The Opto-22 brand SSR and the Potter-Brumfield brand SSR have 'steering diodes' built in to keep reverse polarity on the DC side from causing any damage.)

Sometimes the AC side also needs to be wired correctly; however, I haven't used an SSR in almost 25 years where I needed to worry about line and load. If Line and Load are marked on the device, it would be best to connect the Line to the AC HOT and the Load to the AC device.

Mike Richards Fri 23 February 2007 08:54

Reza,

Here's a schematic that might help you understand how to hook up a Solid State Relay to the PMDX-122. If you're already using PMDX's J8-2 for another device, you can substitute J8-3 or J8-4 for J8-2. Of course, you'll have to 'turn on' the ports by correctly setting up the pins in Mach3.

http://www.mechmate.com/Forum/messages/832/3513.gif
(Many thanks to Gerald for converting my bitmat schematic to GIF.)

Gerald_D Fri 23 February 2007 09:11

Here is the PMDX-122:

http://www.mechmate.com/Forum/messages/832/1904.gif

J8 is at the top right. J8-1 is the "+5V Aux Out" and J8-2 is the "Pin 14". As Mike says, you will have to tell Mach3 (Config > Ports & Pins) that your router is at Pin 14.

The PMDX-122 has a relay built in on the card, but this is limited to 10 Amp only - you could not drive a 15Amp router from this. But you could use it to drive a bigger relay (or contactor) that will handle the 15 Amp.

reza forushani Fri 23 February 2007 16:06

Can we use the built in relay for the power to other stuff (other than router)?

Gerald_D Fri 23 February 2007 20:44

Yes, it is there on the PMDX-122 for your convenience (It is the black cube in the bottom right corner). But the contacts can handle 10 amp max....and it is not easy to replace if you burn it.

Accessed at J7. Typically "line" would go to "Rly Com" and "load" would go to "N/O"
Under Mach3 ports&pins this is Pin 1.

reza forushani Fri 23 February 2007 21:10

I just pluged the PMDX board into my USB bus just to power up. Some LEDs like 3 are on and some like 7 and 9 are blinking.. LED# 5 is not on or blinking. Is this normal?

Gerald_D Fri 23 February 2007 21:15

In general LED's on or blinking is normal, smoke is not normal. http://www.mechmate.com/Forum/clipart/happy.gif

Seriously though, I don't remember the numbers and first behaviour - play with it a bit longer to see if you really have a problem and then maybe we can spend time in my dusty brain.

reza forushani Fri 23 February 2007 21:39

Right I just used my usb port for power. This computer does not have parallel port. I will use another computer with Parallel port tommorrow and let you know which lights (LEDs) blink on start up.

reza forushani Sat 24 February 2007 21:49

Mike or Gerlad, I think the relay is not working right. Passing half the voltage when it is off and full voltage when it is on. IAm I doing somerthing wrong?

Gerald_D Sat 24 February 2007 22:01

Reza, that is normal for a "SSR" type relay. That is one of the reasons I have never used them (the other reason is the price over here). Apparently they are perfectly okay with routers.

reza forushani Sat 24 February 2007 22:21

You mean it's OK

Mike Richards Sat 24 February 2007 22:23

Reza,
Gerald is right, a SSR 'leaks'. So if you read the voltage with no load connected to it, you'll get a false reading.

I've used SSRs for years in all kinds of process control situations and never had a problem when I used an SSR; however, a SSR will leak enough current to give you a good 'tingle' so be sure to either turn off the power or use a mechanical relay/switch as a fail safe device to cut all power from the circuit.

Mike Richards Sat 24 February 2007 22:40

"Also something is not right with my relay. I used a light bulb to check it out. When it is energized (LED on with 24v) the bulb is on. When LED is off (no control voltage) the light bulb is half lit. I checked with an ohmmeter and I get 120v when LED is on and 60vac when LED is off. Shouldn't it not pass anything when the relay is off?"

Reza,
I should have read this thread before responding on the other thread about your SSR. Something is NOT right. You should not have 60 VAC when then SSR is OFF and when you have a light bulb connected to the load.

Have you checked the wiring to make sure that you have everything wired correctly? (Even with 30+ years of experience, I still FREQUENTLY make wiring mistakes.) Be sure that the control inputs are NOT floating. When the relay is OFF, both the + and the - inputs should be at the same voltage. (Depending on whether you are SOURCING current or SINKING current, both inputs could be at 0-VDC or at 24-VDC.)

Also, some SSR require an additional resistor to be put in series with the control voltage + connector if you're using a voltage higher than 5VDC. A opto device usually needs about 10ma to turn fully on, so a 5V circuit would use a 390 ohm resistor (remember that the LED will drop about one volt), a 12V circuit would use a 10 to 12K resistor and a 24V circuit would use a 22K resistor. The Potter-Brumfield SSRs that I use don't require an external resistor, but it's always good to check the documentation to make sure.

reza forushani Sat 24 February 2007 23:41

Right now I am just playing with things. Feeding one leg per your drawing into the relay (110v). Connecting a regular light (110v bulb) when the LED is off the light bulb is half lit. When the LED is on (voltage applied either 9 or 24v) the light bulb is full on. I was going to use a status light on the relay through the control panel door, showing no voltage passing through the realy or voltage being present. But with this relay's leak and light being dim or bright, that's not going to work. I guess either I'll use a different relay or something.

What relay are you guys using?

Gerald_D Sun 25 February 2007 00:11

Somehow people don't worry about the leak. I like your relay - I like also that you are the guinea pig on another continent...http://www.mechmate.com/Forum/clipart/happy.gif

What I would try out here: Leave the light connected. connect a solid wire (paper clip) across the + and - input. See how the bulb glows. (oh yes, make sure it is an old-fashion high current bulb). Measure the bulb voltage.
Then connect a 9v battery over the + and - and see what happens. Tell me if you are going to try this - I want time to crawl under the bed and put my fingers in my ears.

reza forushani Sun 25 February 2007 01:30

YES. I will try anything. Worst case I have to buy more fingers.

Mike Richards Sun 25 February 2007 12:06

Reza, you've really got me puzzled. I just connected an old grayhill SSR to a light bulb, just like you described. I used a nine-volt battery, just as Gerald sugested. Everything worked perfectly. With the battery disconnected (nothing attached to the input terminals) the light bulb was OFF. With the battery attached to the input terminals, the light bulb was ON.

When I looked that the catalog page for the SSR that you're using, it states that the leakage current for the 225DIN-DC model that you're using is 10mA, which would not be enough current to light up a light bulb. The minimum load current has to be at least 120mA, so you probably can't use that SSR to drive an indicator lamp, but, with the 25-Amp rating, it would be more than adequate to run a router.

Tomorrow when I can get a few other parts, I'll try another experiment or two to see if I can figure out why your SSR is behaving the way that it does.

Gerald_D Sun 25 February 2007 12:13

Mike, I am suspicious that he used some fluorescent type lamp (maybe with electronic "excitation") which sometimes start glowing under mysterious circumstances. And I suggested the paperclip to make sure there is no difference in voltage between the input terminals. My feeling is that relay is absolutely perfect for the router, and that it will work fine when connected to the PMDX-122.

reza forushani Sun 25 February 2007 13:05

Gerald

I emailed a couple of pictures I couldn't upload.
It shows the light bulb and relay set up.

reza forushani Sun 25 February 2007 13:25

I had an electrician check things out and we have concluded that the realy is BAD. We will order another relay and test it and let you know.

Gerald_D Sun 25 February 2007 21:59

Got the pic, thanks.

http://www.mechmate.com/Forum/messages/832/3548.jpg


That "light bulb" looks suspiciously like a neon indicator lamp. Try and change it for a real light bulb, or a power drill, or something else that really draws a lot of power.

Gerald_D Mon 26 February 2007 00:20

Looked a bit more at neon indicator lamps and it would appear they run off the 10mA leakage current that Mike spoke of. This example of a data sheet says to add a 47k series resistor to a 125V indicator used on 250V - that means this example only draws 3mA! I don't think your relay is faulty. Explain my theory to your electrician and see if he changes his opinion.

reza forushani Mon 26 February 2007 00:42

You are right. We used a radio/clock and it would not turn on. The little LED uses very samll amounts and that's why it glows a little. So we should be fine with the relay. Thanks to you and also Mike for his patience and testing the relay. I was going to mount this LED on the door to indicate power flowing through the relay but that is not going to work, so I have to come up with another solution for that.

Gerald D Mon 11 June 2007 06:06

Quote:
Originally Posted by Art View Post
The AC outlet is controled by a solid state relayid that turns on with a M03 command and turns off with M30 command. This turns on/off the dust collector and router. Interesting fact on solid state relays is that they need to have a load on them to work. This led to some real head scraching when the lamp I used in testing worked and when the router and DC were plugged in they worked but when the electronic controled router by it's self didn't work.
An very important observation. Some (electronically-controlled) routers will not be switched on by a solid state relay. You will need to give the relay extra load. Like adding a lamp to the circuit.

Gerald D Mon 27 August 2007 09:59

And Art Ransom is discovering that sometimes he can't turn the solid state relay off!

Reference

"I use M3 to energize a solid state relay which applys 120V to router and dust
collector. M30 turns them off. Normally everything works great. Ocasionaly
they fail to turn off. Once this happens, reruning the program fails to turn
them off. Usually if I unplug both of them and wait 30 seconds and plug them
back in the power has dropped om the plugs and everything is back to normal.
Also if machine hits a limit switch they fail to turn off."

Richards Mon 27 August 2007 12:06

If the control circuit of the SSR has too light of a load on it, the relay may fail to turn off. Most SSRs only pull about 5 to 10 mA from the 5V DC supply. Some relays pull a lot less. Those are the ones that can latch on.

Just add a low value resistor between the + terminal and 5V. (Be sure it is the control terminal and NOT the output Line or Load terminals or you'll see sparks and smoke.) You may need to experiment a little, but a 1/2W resistor with a value of 50 ohms, 100 ohms, 220 ohms, 330 ohms, or 470 ohms would probably work. All you need to do is to increase the resistance of the internal L.E.D. circuit enough so that the L.E.D. stay lit up enough to activate the photo detector part of the circuit when the L.E.D. is supposed to be turned off.

Adding resistance reduces the amount of current flowing through the L.E.D., which reduces the amount of light produced by the L.E.D. Too much reistance will keep the L.E.D. from working - so experiment a little if necessary until the SSR turns ON and OFF as expected.

(According to Ohm's law 5V - 1V for the L.E.D. diode drop = 4V and 4V / 330 ohms = 0.012A or 12mA. So, if the SSR didn't already have a resistor built in, you would be allowing the L.E.D. to pull 12mA with the 330 ohm resistor, which gives average brightness for most L.E.D.s. But, because the SSR has a resistor built in, you will be adding the resistance of the external resistor to the resistance of the built-in resistor to reduce the amount of current being drawn through the circuit. That's why you may need to play around a little before you find a resistor that works properly.

If you have a current reading multi-meter, put it in series between Vcc and the + terminal of the SSR. Read the amount of current flowing through the control circuit of the relay when the relay is on. I'm assuming that Vcc is 5V and that the SSR has an average voltage drop of 1V across the L.E.D., so divide 4V by the value of the current reading from the multi-meter. That number is the resistance value of the built-in resistor. Add an external resistor that is 25% to 75% of that value and the SSR should work perfectly.)

Gerald D Mon 12 November 2007 10:25

The PMDX-122 has 4 outputs, one of which has a relay mounted on it. The other three need to go via SSR's before they become useful.

In the last month I experimented with SSR's a bit. I used one to turn on some security lights (3 X 150 Watt halogen lamps on 230V supply). The SSR's were rated at 3 Amp. Strangely, the lamps only produced an orange glow. After reading of Art's experience, I wonder if we are really ready to switch devices like routers and dust collectors with SSR's? I would think that we restrict ourselves to switching contactor coils with the SSR's . . . .

Even the relay on the PMDX-122 should be treated with care, because it is not easily replaceable. I wouldn't put the router current through it, I think the relay is fine to drive a contactor to power the router.

Contactors are cheap, reliable and easy to mount and to replace or upgrade.

Gerald D Sat 19 January 2008 14:38

1 Attachment(s)
JR, I think you are looking to make the green tick, plus add 1 and 1 as port and pin, on this screen:

Attachment 782

And I think that is all there is to it - the relay will then respond on the M03/M05 commands

Doug_Ford Sat 19 January 2008 19:29

J.R.,

I found some pretty good instructions for basic setup of the program at http://www.machsupport.com/documentation/

If you download the basic setup of Mach3Mill, it discusses setting the ports and pins for the charge pump and the relay you are using to control your router. Good luck with it.

Greolt Sun 20 January 2008 14:38

1 Attachment(s)
Just to add to Gerald's post above

Also the second part of setting the spindle control is on "Spindle Control" page.

Make sure "Disable Spindle Relays" is not checked. Set Clockwise to output 1.

Set the delays you need in "General Parameters"

Greg

Gerald D Sun 20 January 2008 22:09

Greg, thanks very much for posting that page - I completely forgot about it :o:o

That is the page where you say the router/spindle is controlled from Output #1.

On the page I showed earlier, is where you say that pin number 1 (to which the relay is soldered on the PMDX) shall be designated as Output #1.

(Could of course have #2 etc., but then both pages must correspond)

Gerald D Fri 03 July 2009 01:47

Retief, in your case you have connected the SSR onto J81&2 of the PMDX, which corresponds to parallel pin #14. Therefore, on the screen I showed in post #35, you need to enter pin number 14 alongside the green tick.

martin77pl Tue 28 July 2009 11:34

The more I spend reading the more confused I get. So forgive my question but I better ask before I do something silly. You can use SSR to turn spindle on in mach3?

Gerald D Tue 28 July 2009 11:46

The spindle is controlled by a Variable Frequency Drive (VFD)

The control signals needed by the VFD are only milliAmps. Your PMDX can directly control the VFD (and the spindle)

martin77pl Tue 28 July 2009 12:27

I knew I should ask first. Thanks a lot Gerald.


All times are GMT -6. The time now is 03:28.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.