PDA

View Full Version : Unusual use of M8/M9 to control a compressor



ngwagwa
21-09-2020, 12:51 PM
Well Doddy said I would be back - and here I am.

Some of my toolpaths take a day or so to run and I want to turn a compressor on for certain operations to blow away the swarf, hopefully using M8/M9. To slightly complicate things the compressor in the workshop is currently wired with a 2 way switch so it can be turned on and off from either upstairs or downstairs and I need to keep this fuctionality.

Can anyone suggest a wiring circuit that would enable my AXBB_E controller to seamlessly turn the compressor on and off?

Hope this makes sense and looking forward to suggestions.

Carl

Doddy
21-09-2020, 12:56 PM
Bypass the 2-way Upstairs/Downstairs switches entirely by using a relay, triggered from AXBB_E. That just means that AXBB can override the manual switches to power-up the compressor - and have the switches turned off in this mode. You could use another output from the AXBB and a M9999 macro to automatically isolate the manual switches when UCCNC starts up, if that tickles your fancy. All do-able, just need to understand the exact control logic that you're looking to implement.

ngwagwa
21-09-2020, 01:34 PM
Thanks Doddy - I did think this would be right up your street.

Regarding the logic I only need the compressor on certain parts so whatever I do I would like it to work in a way so I don't have to re-programme existing parts so don't think having UCCNC take control on startup would be the right way to go. Is there a relay available that when an M8 call is made the manual switches are isolated and power supplied to the compressor. If it makes any dfferece when an M8 call is made there will be at least 30 minutes before the compressor is turned off

EDIT: I have found this OMRON MK2P-S relay left over after my retro-fit. With my limited electrical knowledge I think it fits the bill? 28887

Doddy
21-09-2020, 07:27 PM
Something like

28888

All depends on your use-case. In this example UCCNC simply bypasses the manual switches to force the compressor on. Set the M8 command pin/port on setup/spindle page.

You would still be able to turn on the compressor with the existing switches, but not turn off the compressor with the switches if enabled by the AXBB.

That relay?, if it's the right coil voltage and current to suit the AXBB?

EDIT: You could glam up the circuit but there's a certain KISS approach to the above.

ngwagwa
21-09-2020, 08:26 PM
I had a play and came up with this 28889
It does what your diagram does but also isolates the live from the 2 way switches when UCCNC has control.

John11668
21-09-2020, 10:31 PM
The old way with household wiring was to use an "intermediate" switch . Could you not wire a relay to provide similar
http://www.lightwiring.co.uk/wp-content/uploads/2013/03/3-way-switching-schematic-wiring-diagram.jpg

ngwagwa
22-09-2020, 07:40 AM
The old way with household wiring was to use an "intermediate" switch . Could you not wire a relay to provide similar
http://www.lightwiring.co.uk/wp-content/uploads/2013/03/3-way-switching-schematic-wiring-diagram.jpg

That would give me a circuit like this (I think) you will have to forgive me I have some sort of mental block when it come to even the simplest wiring.
28890

An intermediate would work but I would prefer it so that when UCCNC is calling to air it can't be overridden.

Doddy
22-09-2020, 07:43 AM
Couple of caveats -

You don't 'need' to isolate the switch circuit. But doing so does no harm.

You'll be back - I reckon within a couple of weeks - to complain that, whilst under UCCNC control someone switched the compressor on accidentally, and after UCCNC has quit that the compressor has been left operating. That's a more complicated problem!

Doddy
22-09-2020, 07:46 AM
Couple of caveats -

You'll be back - I reckon within a couple of weeks - to complain that, whilst under UCCNC control someone switched the compressor on accidentally, and after UCCNC has quit that the compressor has been left operating. That's a more complicated problem!

You could use a C/O contact on the relay to gate the building wiring into a contact that, if M8 is active, and the building wiring "live" (i.e. it would hold the compressor on after M9) that it illuminates a lamp or sounds an alarm, or something. But that would require that you isolate that circuit from the compressor under M8 control.

ngwagwa
22-09-2020, 07:58 AM
Couple of caveats -

You don't 'need' to isolate the switch circuit. But doing so does no harm.

You'll be back - I reckon within a couple of weeks - to complain that, whilst under UCCNC control someone switched the compressor on accidentally, and after UCCNC has quit that the compressor has been left operating. That's a more complicated problem!

Doddy - is my circuit in post #5 feasible? If so UCCNC has control so the manual switches have no effect.

Regarding the compressor being left on I already have a signal lamp which comes on when the compressor is powered - this was put in before the 2 way switches as the compressor was often left running! The lamp is visible from our in workshop CCTV camera and we have a networked smart switch so the compressor can be turned off remotely

Doddy
22-09-2020, 08:05 AM
Perfectly viable.

Although anything that bypasses the switches (e.g. my first post) takes the manual switches out of the equation. I'd look at the installation effort.

ngwagwa
22-09-2020, 08:12 AM
Perfectly viable.

Although anything that bypasses the switches (e.g. my first post) takes the manual switches out of the equation. I'd look at the installation effort.

Thanks. As one of the 2 way switches is next to the compressor and power supply the installation effort is easy regarding mounting the relay, the wiring may take longer due to my electrical dyslaxia!

Doddy
22-09-2020, 11:40 AM
Cautionary note - I can't recall previous conversations and the details of the relay and whether it has an integral diode - just remember to add a diode if not part of the relay to protect the AXBB against back-emf - pretty sure it's covered in the AXBB documentation.

ngwagwa
22-09-2020, 12:14 PM
Cautionary note - I can't recall previous conversations and the details of the relay and whether it has an integral diode - just remember to add a diode if not part of the relay to protect the AXBB against back-emf - pretty sure it's covered in the AXBB documentation.

I did mean to ask why you had a diode on, thanks. The manual doesn't mention anything about back-emf or diode when connecting a mechanical relay to the isolated outputs.

Doddy
22-09-2020, 12:38 PM
I did mean to ask why you had a diode on, thanks. The manual doesn't mention anything about back-emf or diode when connecting a mechanical relay to the isolated outputs.

Hmmm, you're right - it instead refers to a relay coil with a +/- nomenclature on the coil - okay if the relay integrates a back-emf diode - I've seen relays with these - but never experienced them myself. Worth being vigilant on that topic - otherwise you can risk damage to the AXBB. Or drive the relay through a transistor amplifier (I'd always belt-and-brace that solution - but that's just me) - either way the solution requires a back-emf diode to protect the switching device.

The MK2P-S does not integrate a diode - you need to add one. Psst, if you don't have one PM me your address and I'll pop a couple in the post - I'm heading to the PO this afternoon anyway.

ngwagwa
22-09-2020, 12:50 PM
Hmmm, you're right - it instead refers to a relay coil with a +/- nomenclature on the coil - okay if the relay integrates a back-emf diode - I've seen relays with these - but never experienced them myself. Worth being vigilant on that topic - otherwise you can risk damage to the AXBB. Or drive the relay through a transistor amplifier (I'd always belt-and-brace that solution - but that's just me) - either way the solution requires a back-emf diode to protect the switching device.

The MK2P-S does not integrate a diode - you need to add one. Psst, if you don't have one PM me your address and I'll pop a couple in the post - I'm heading to the PO this afternoon anyway.

Thanks, you have PM

ngwagwa
24-09-2020, 02:15 PM
Thanks for all the help folks - M8 now turns my compressor on and off - next step find a cheap solenoid valve to allow air to the cutter.

Doddy
24-09-2020, 06:37 PM
Gah, if only you'd said about the valve earlier!

ngwagwa
24-09-2020, 06:53 PM
Gah, if only you'd said about the valve earlier!

It was actually an after thought to make it 100% automatic, if you have a 24V Normally Closed valve knocking around would you swap it for a Normally Open one? No problem if not as I will just wire it up so the NO valve closes when the compressor is powered on with the manual switches.

Doddy
24-09-2020, 07:16 PM
Ah!, 240VAC coil N/C (powered to open) - from memory.

ngwagwa
24-09-2020, 07:24 PM
Ah!, 240VAC coil N/C (powered to open) - from memory.

I will have to look at my wiring - 28914