Best way to e-stop spindle and VFD?

The VFD I have does allow for a breaking resistor, 300 watt, 100 ohm.

I will get that ordered and may ask some question related to settings when using them. Their seems to be quite a few parameters involved.

Thanks

Matti

Hey Matti,

there is some information on the relays used inside Control Panel here and here

I wonder if those who were commenting here would be able to help me out, or at least tell me if I’m on a (somewhat) right track.

I’d like to use the pin23 soft estop on the breakout board in two different ways:

  1. Wire it to a hardware estop button like this (https://www.automationdirect.com/adc/shopping/catalog/pushbuttons_-z-_switches_-z-_indicators/emergency_stop_pushbuttons/gcx1136)
    I’m controlling the spindle through Modbus to the VFD, so I’m hoping that the soft estop will trigger a modbus communication error and stop the spindle too.

  2. I found out the Hitachi VFD has an internal relay output that has an alarm signal as default for trips and power loss. I’d like, if possible, to also have that relay output to the same pin23 soft estop on breakout board. Is that something that can be done? That way if the VFD has problems it could potentially shut down the controller movement too.

I know very little about electronics, so please feel free to explain on kindergarten level!

Not sure if you have come across this video, but it may be useful.

I am using it as a guide for my ATC/Hitachi WJ200 022SF, and am finding it helpful for the initial setting of parameters. Just past the 12 minute mark he talks about programming the relay function, although for a different purpose.

Clough42 - ATC spindle part 10

2 Likes

Very nice - thanks. I’ll take a look.
From your experience, what do you think about the concept?

I appreciate you asking, but I am just teaching myself as I go, using online videos and text resources. I am not familiar with the 1F controller or the BOB. I am sure those with experience will add to the conversation.

Ok, same here! The video was great. The author is very clear in explanations. He did something similar to what I’d like to do at the end of the video, so that makes me think it is very possible. I would have a few questions on wiring and interference, but maybe I can run by an electronics buddy. Thanks

1 Like

Hey Martin,

that’s a good idea. With the link you provided you show a ‘normally close’ (NC) switch. If you connect a “Normally closed” switch (NC), in the I/O Configuration Tab, “estop” must then be set to “normally closed”. If you connect a “Normally open” switch (NO) you must set it to “normally open”.

When “estop” mode is entered (by triggering pin 23, or by clicking/touching the red/yellow symbol on the upper right of web interface display of the controller software), the controller will send the spindle a stop command.

The updated IEC 60204-1 standard now explicitly states that the activation of the stop function of a VFD may be regarded as a ‘category 0’ stop. As such, this function may be used to stop the movement of a machine during emergency switching-off.

That is possible. However if you want to connect both, i.e. you already connected a ‘normally closed’ emergency switch, you will have to wire the switch and the relay contact in series. If you use ‘normally open’ for both, you would have to wire them in parallel (and set “estop” setting in the I/O Configuration Tab to “normally open”).

1 Like

Thanks @Aiph5u. This is great info! I was hoping to get some confirmation, and you obviously from your posts know a whole lot about these subjects.

Seems most people’s preference for an emergency stop is normally closed so that in case wires separate somehow you would know it, so I planned on going with that.

It’s interesting to know the function of the estop mode to send stop command. There was a gentleman online that argued he didn’t want to depend on a software communication to the VFD/spindle, so he hardwired the emergency stop to both the VFD and the controller. (I’m sure there are 100s of opinions on emergency stop set-ups). But I like that the estop “stop” command is legit, and I think I’ll go with that. I had planned on going that way anyway. I just thought that the communication from estop mode would be a Modbus communication error, not a stop command.

If you’re willing to bear with me just a little more … :slightly_smiling_face:

  1. So is it as simple as wiring VFD relay output common (AL0) and normally closed contact (AL2) to the estop button, then estop button to pin23 (estop) and pin25 (ground) on breakout board? Do the VFD common and the breakout ground terminal play in to which wire goes to which? Then I would set to “normally closed” on the I/O configuration tab as you mentioned.
  2. I have a bunch of leftover RS485 shielded twisted pair cable (https://www.automationdirect.com/adc/shopping/catalog/wiring_solutions/bulk_multi-conductor_cable/rs-485_-a-_rs-422-z-rs-232_cable/q8302-1). Is that appropriate and all I need to wire up this circuit in series?

In electronics, I often don’t know what I don’t know, so this advice is invaluable.

Hey Martin,

Gladly, but I can’t always answer promptly. But in general I always reply, especially to people who have previously used the search function to benefit from what is already written :slight_smile:

It wouldn’t work this way. If you look at the specification of the relay outputs AL{0..2} in the VFD manual, then you can determine (already without having to open the VFD) what kind of relay is behind these connectors:

As you can see there is a minimum load current and that is a sure sign that it is a solid state relay. Unlike electromagnetic relays, a solid-state relay can only hold its state when a minimal load current is flowing. That’s because they’re not really switches, they’re thyristors (a specific type of semiconductor). With electromagnetic relays however, there is no requirement for a minimum amount of load current, because they are really just a switch, i.e. mechanical contacts.

You can also see from the further technical data of the AL{0..2} connectors that these are outputs for higher voltage and current loads:

Terminal NameDescriptionRatings

AL0
AL1
AL2

Relay common contact
Relay contact, normally open
Relay contact, normally closed

250VAC, 2.5A (R load) max.
250VAC, 0.2A (I load, P.F.=0.4) max.
100VAC, 10mA min.
30VDC, 3.0A (R load) max.
30VDC, 0.7A (I load, P.F.=0.4) max.
5VDC, 100mA min.

You should always first consider what you actually want to switch here: You want to trigger “Estop” (pin 23) on the DB-25 I/O port of the Onefinity controller, which means you want to set an input of the AVR microcontroller to logical high or low directly which practically means connect pin 23 (estop) to pin 25 (ground). Only an extremely small amount of current flows for this, which means that a solid-state relay is ruled out and the electromagnetic relay that you would use for this only needs to be as small as possible. Also with an electromagnetic relay, the switched contacts are galvanically isolated from control coil (even without using an optocoupler) which means you don’t have to worry about ground.

As you may have already read in the manual, you can assign all output functions, including a logical combination of several functions (thanks to the built-in logic unit available inside the VFD) that you can assign to the AL{0..2} outputs, to the other outputs as well, these are terminals 11 and 12 on the Hitachi WJ200 aka Omron MX2 VFDs. These are open collector outputs (see also schematic below). This means that here you can do without a driver transistor for controlling the control coil of the relay, because the transistor is practically already built-in inside the VFD.

The manual also states explicitly for what to use the different output terminals:

Use an open collector output (terminal [11] or [12]) for a low-current logic
signal interface or to energize a small relay (50 mA maximum). Use the relay output to interface to higher voltage and current devices (10 mA minimum).

– Source: Hitachi WJ200 Series Inverter Instruction Manual

You can however use the outputs 11 and 12 for relays as strong as you want, als long as you provide an appropriate driver circuit in front of the control coil.

A suitable relay for your application would be, for example, the Omron G5V-1 Ultra-miniature, Highly Sensitive SPDT Relay for Signal Circuits (datasheet):
DSCN5149__Relay_Omron_G5V-1_25pct

As you can see, it is very, very small! The coin in the background is approx. one inch in diameter (25.75 mm to be exact). Shown is the 12 V version but here I would use the 24 V version. However this is a single electronics component, made for being soldered into a circuit board. I don’t know if you are able to do this, you could have someone who can do this for you, but there also could be other solutions e.g. buying a DIN-rail 24 V relay. In this case there is a driver transistor in front of the relay coil inside the relay module.

Because of open collector output on the VFD, the wiring of the bare relay is therefore very simple, as shown here on page 4-51:

Hitachi_WJ200_Manual__4-51_Using_Intelligent_Output_Terminals_PDF254_cropped1_Relay

You can use either of the outputs, 11 or 12. Apart from the relay you only need a voltage source (a separate power supply) and a flyback diode.

Note that output 11 on Hitachi WJ200 aka Omron MX2 can also be used as part of EDM (external device monitoring) if you want to comply to ISO 13849-1 and want to use a safety relay like Omron G9SE. See Appendix E-2 of your Hitachi VFD Manual or the safety wiring shown here.

Basically, if you want to operate relays, for example even fatter ones later, for example to switch your spindle water cooling or the dust extraction system automatically on and off, you should buy a power supply for relays right away.

A 24 V switching power supply for DIN Rail is usual here. You don’t use 5 V or 12 V because the higher the voltage, the lower the currents (with the same power), so 24 V is usual here. The WJ200/MX2 also has an internal 24 V power source, but its power is very limited and not designed for driving higher loads.

:warning: Note: Attention! Operating a relay here on an output of the VFD does not require any additional components like a driver because this is an open collector output. However if you want to drive a bare relay from one of the pins configured as outputs on the DB-25 I/O port of the Onefinity controller, which mostly are direct in- and outputs of the AVR microcontroller and that are not open-collector outputs, a transistor driver circuit is required!

Shielded and twisted, you can’t do it any better.

This serial connection is a balanced line, which means it already should work relatively well without twisting and shielding, but with it it’s perfect.

You connect the positive terminal of the VFD (SP) to the positive pin (pin 13) of DB-25 I/O port of the Onefinity Controller and the negative terminal (SN) to the negative pin on the other end (pin 14).

1 Like

Good morning @Aiph5u Again, thanks for the very detailed explanation. A good bit of it went over my head! But the main concepts, I think, give me a good framework for what I’m trying to do. I’ve spent a little time in the VFD manual on the output functions, although I can’t claim to understand a whole lot of the electronics. A learning process.
So I understand that the appropriate VFD output to trigger pin 23 on the controller is one of the open collector outputs (11 or 12). This would also require an external 24v power supply, a very small electromagnetic relay, and a flyback diode. I’m not able to solder up circuit boards, but maybe can find someone to do that, or find an alternate way. If I can figure this out, then it could also be wired in series with a physical estop button to the same pin23?

And the relay contact outputs are for higher voltage and current.
So on the relay contacts, I see that some people are using the multi-output (normally open I believe) on their Chinese VFD to trigger this Digital Loggers IoT relay (IoT Relay Frequently Asked Questions - FAQs), which is more plug-and-play for those of us who are not too electronically savvy. However, they also tie in to internal 24v power on the VFD, and run a cable from a separate DCM terminal on the VFD to the negative input on the IoT relay.
Even though the relay contact on the Hitachi seems similar to the multi-output on the Chinese VFD , I’m not sure if it could function in the same way.

So a basic summary of what I’d like to potentially do:

  1. open collector output terminal 12 on VFD set to trigger on trip or power loss, wired in series to controller pin 23.
  2. possibly relay contact output (normally open) set to trigger on run command and wired to Digital Loggers IoT relay. This would be for spindle water pump and enclosure fans.

Anything you’re able to contribute to this novice CNCer’s baby step progress would be great! Thanks

Hey Martin,

yes, as explained above:

yes, but

  1. only to what it’s rated, not more (see excerpt of manual shown above), and also
  2. only if the load fulfils the needs of a solid-state relay, i.e. a load that constantly draws the required minimum load current when on.

As the specified maximum currents for the AL{0..2} terminals are not that high (a professional dust extraction system would draw much more current), their use is somewhat limited. That’s why I said above:

And just in case you should run out of outputs, you could also wire an external relay to a relay output, as long as the external relay’s control input meets the requirements 1 and 2 above.

Yes, if you are not an electrician or an electrical engineer, you have to use things that you can easily plug together. But that does not mean that it cannot be dangerous! With electricity, you always need to acquire some knowledge since it can be harmful, at least to your hardware (if not to your house and your body) :slight_smile:

I don’t know the Internet-of-Things relay you linked to. You have to look at the spefications, always, of what you connect on one side and of what you connect on the other side. So keep in mind that on the Hitachi aka Omron, the relay output has a maximum and a minimum current because it’s a solid state relay.

The “Multi-Outputs” DRV and UPF / DCM on Huanyang HY Series are open collector outputs. The KA/KB and FC/FA outputs seem to be internal relay outputs. But the manual of such cheap chinese manuals is poor. But I have seen on photos that they have at least one electromagnetic relay on the pcb. So the limitations of a solid-state relay (their minimum load current, and their risk of being destroyed more easily by excessive currents or voltages) would not apply there, but certainly they do with the Hitachi/Omron AL outputs.

Again, before you connect something to an internal 24 V source of a VFD, be sure that the current that the electromagnetic relay coil or the solid-state-relay input that you wish to connect only draws less than the maximum current of this output (and be aware that it could also be in use by other additional functions). The maximum current of a power source should always be found/be looked for/be looked up in the datasheet or manual. If you connect things, you are always responsible for having read the specifications in order to make sure your things don’t vaporize :wink:.

By the way, if you start studying datasheets you will learn a lot. And if some hardware lacks useful datasheet, better not use it.

If you have an open collector output, this means that a part of the circuit is missing, and you have the opportunity (and the necessity) to provide this missing part. This is usually done with a pullup resistor and a power source, and of course the load. But since the pin 23 “estop” of Onefinity Controller is programmed inside the AVR microcontroller as an input with internal pullup resistor (AVR’s feature this), you could wire Hitachi’s/Omron’s pin 11 or 12 to pin 23 “estop” on Onefinity Controller, and “CM2” to pin 25 “ground”. But I would rather use the small signal relay solution I described above because it gives you galvanic isolation and you don’t have to worry about ground. The wiring would be as explained in the picture above: Terminal 11 or 12 wired to the control coil of a small signal relay like Omron G5V-1 24 V, the other coil pin supplied by a 24 V power supply which in turn has its ground connected to CM2, not forgetting the flyback diode backwards over the relay coil. And then on the other, galvanically isolated side of relay (not shown in picture above) wiring the relay contacts to pins 23 (estop) and 25 (ground) of the CNC Controller.

I had a quick look at the IoT relay WWW link you provided:

Q: How much current does it take to trigger the control port?
A: About 0.2mA, the input is constant current. 12-120VAC or 3.3-48VDC will trigger the relay. DC trigger input is polarity sensitive. Pay attention to the positive(+) and negative(-) markings above the trigger connector.

– Source: digital-loggers.com: IoT Relay II FAQs

So it says it sucks 0.2 mA constant current on the control input. Whether this is enough for the requirements of the solid state relay behind the Hitachi’s AL{0..2} relay outputs, you already can tell yourself now with the information I gave you above. See the specification of the AL{0..2} outputs of Hitachi VFD above. It’s not said for 24 V DC explicitly but is says “5 V DC, 100 mA” minimum, and 100 mA with DC is usually what you need at last as a rule of thumb for a load with a solid state relay.

However if you were forced to use this AL relay output of the Hitachi VFD because the other outputs are already in use, you could of course wire a driver in front of the IoT relay input that ensures consuming 100 mA. But then again you would be wiring electronics then, not just plugging things in.

But, you still have the other output, “11/EDM”. If you don’t use extended device monitoring (EDM), output 11 is free to connect any relay on it. And if you do use EDM, you don’t need to call “estop” on the CNC Controller, since the EDM would take care of it, so output 12 would be free then.

1 Like