Page 1 of 2

air compressor to control UCcnc

PostPosted: Wed Nov 28, 2018 2:20 am
by Rad
Would it be possible to get an output from my air compressor's pressure switch to pause UCcnc when the compressor turns on?

I would normally pause the motion manually to allow the air compressor to build back up, then I would resume cutting again. However it would be nice to do this automatically. The trick is I would need to pause the motion Not when the compressor comes on (because most of the time it would come on during a cut) but when it comes on and goes to the next pierce, this is where I would want to Cycle Stop the motion wait for the air to build back up, then I would Cycle Start when the compressor turns off.
I would do this multiple times during a job.

I would like to automate this process, I want to walk away from the the machine grind some plasma cut parts etc.

Any advice?

Re: air compressor to control UCcnc

PostPosted: Wed Nov 28, 2018 7:11 am
by Robertspark
Yes.

But I would do it via an Arduino type board and an air pressure sensor (0-10bar)

If you don't care what it looks like and just wants something that works I would suggest using an Arduino Uno and a shield to offer isolation to the UC board along with a 4-20ma > 5v board and a 10bar air pressure sensor 4-20ma output.

I can't do it now but I can do it this evening (I'm on UK time) I can provide you with a bill of materials and I can also do a sketch for you no problem if you are interested.

Re: air compressor to control UCcnc

PostPosted: Wed Nov 28, 2018 7:12 am
by dezsoe
Save the following macro. Call it when you move to the next pierce.

Code: Select all
bool isCompressorRunning;

do {
  isCompressorRunning = exec.GetLED(12);
  // See LEDs_by_number.htm for LED number
  // If the input is low when compressor is running then write "!" before exec.GetLED
  exec.Wait(10);
} while (isCompressorRunning);

Re: air compressor to control UCcnc

PostPosted: Wed Nov 28, 2018 12:02 pm
by Rad
Robertspark wrote:Yes.

But I would do it via an Arduino type board and an air pressure sensor (0-10bar)

If you don't care what it looks like and just wants something that works I would suggest using an Arduino Uno and a shield to offer isolation to the UC board along with a 4-20ma > 5v board and a 10bar air pressure sensor 4-20ma output.

I can't do it now but I can do it this evening (I'm on UK time) I can provide you with a bill of materials and I can also do a sketch for you no problem if you are interested.


I am very interested and would be very thankful for your help. My email riyadfali@yahoo.com should you need to send any attachments.

Re: air compressor to control UCcnc

PostPosted: Wed Nov 28, 2018 12:26 pm
by Rad
dezsoe wrote:Save the following macro. Call it when you move to the next pierce.

Code: Select all
bool isCompressorRunning;

do {
  isCompressorRunning = exec.GetLED(12);
  // See LEDs_by_number.htm for LED number
  // If the input is low when compressor is running then write "!" before exec.GetLED
  exec.Wait(10);
} while (isCompressorRunning);


Thank you, unfortunately I don't understand macros and such but I am willing to.
So... can I implement this macro in addition to the electronics (hardware side?) that robertspark spoke about?

As I would only like the motion to pause when the compressor comes on and the torch moves to next pierce location. This would allow the cut to finish un-interrupted in the event that the compressor comes on during a cut.

Re: air compressor to control UCcnc

PostPosted: Wed Nov 28, 2018 12:35 pm
by dezsoe
This macro checks an input and if it is active then waits for it to become inactive. The input can be connected to anything that shows that the compressor is running, so it can be an Arduino or anything else. E.g. you save the macro as M1234.txt in your profile's macro folder. Your g-code needs a line "M1234" at the beginning of a new pierce. You may need to edit the postprocessor of your CAD to insert this line at the beginning of each new pierce.

Re: air compressor to control UCcnc

PostPosted: Wed Nov 28, 2018 1:22 pm
by Rad
thank you for the explaining, I have a much better understanding now.

I will use your macro. Now just to acquire the parts based on robert's bill of material and try to make things work.

Re: air compressor to control UCcnc

PostPosted: Wed Nov 28, 2018 4:59 pm
by Robertspark
You can do it with a pressure switch, but I did think that a sensor would provide you with a more resilient and adjustable signal which may allow you to log and approximate your airflow

I'll loot at it tonight.

Re: air compressor to control UCcnc

PostPosted: Fri Nov 30, 2018 9:42 am
by Robertspark
I've had a long and hard think about this, the simplest way is to get 1 relay, and use the contacts to provide an input to the cnc controller (via an optoisolated input to avoid electrical noise).

All you do is get a relay which has a coil the same voltage rating as your current compressors pressure differential switch (it will probably look something like this).

Image

The wiring is essentially the same they have a dual pole switch (3-pole if 3 phase.... but then you would not have a lack of air availability if it was 3 phase) internally which will switch the live and neutral (or if you are in america and running 220V, it will switch the two hot wires) that run from the mains to the motor.

What you do is simply wire a relay between the two contacts and then on the relay you use the normally open contacts to switch an input to the cnc controller (uc300/400/100 etc).

This way the "ok to run" signal will only be active when the compressor is not running (i.e. when the reciever is fully charged and when the reciever is being discharged).

Yes, the "ok to run" signal will also be active when the compressor was turned off..... but normally the plasma cutters have an internal pressure switch so that if the incoming air pressure is too low they won't attempt to fire (the spark won't travel across the gap, and if its a blowback start the gap wont be formed.... so it wont start the arc).

So..... all you need is a single relay of whatever COIL voltage your compressor is supplied with.

Re: air compressor to control UCcnc

PostPosted: Fri Nov 30, 2018 3:27 pm
by Rad
thank you, I was going to try the second pressure switch as Vmax549 suggested as that seemed simpler, but a relay might be even more simple.

My compressor is 220V. So guess I am looking for a 220V relay switch?