CNC shield with a suction cup vacuum

So I have a setup with a CNC shield with 3 motors. I'm very new to all of this but was wondering how I could power one of the vacuum suction cups on AliExpress with a relay chip while using this board.

First get a vacuum device driver. Okey, relay adviced. Make it a relay board. Then get a suitable powersupply for the relay module and the vacuum device.

Like this? Fits on an Uno.

This shows the pin mapping between an Uno and the CNC shield V3 pictured above.

The relay could be wired like so:

The SpnEn (Spindle Enable) is mapped to pin 12 on the Uno so to control the servo use the digitalWrite() function on pin 12.

The relay will need a driver. Relay modules are sold with the driver.

MOSFET relay driver.

1 Like

Perfect, I will give it a go. Ty :slight_smile:

What relay do you have? Some relay modules are active LOW (meaning the relay is activated with a LOW to the input) and some are active HIGH (HIGH to turn on). The driver in the previous post is active HIGH, a HIGH to the MOSFET gate activates the relay.

I have not purchased a relay yet so suggestions are most welcome. Building a sorting machine which I will also need to at some point attach a camera to the build as well

I was potentially looking at


And

Do you have a data sheet for the pump?

The relay module should work fine.

You will need an external power supply for the pump and for the relay coil. No Arduino is a power supply for more than some low current sensors or a few LEDs.

Using a relay is fine, but if the pump is powered by DC, you may want to consider using a MOSFET driver in lieu of the relay. The relay requires constant current to keep it actuated. The MOSFET, since it is voltage operated, requires current, only briefly, when turned on. And you can PWM a MOSFET to control motor speed if desired. Relay can't do that.

In relation to the suction cups and vacuum pump, think about how long it will take to release an object from the suction cups. How will you reduce the vacuum to zero and how long will that take?

What software will you be running on the Arduino? If you have a cnc shield that suggests grbl, in which case you would probably have to control your relay as if it were a spindle using the M3 / M4 / M5 codes.

Unfortunately I won't really be able to answer any specific questions as I am completely new to all of this including electrical diagrams. I have a lot of homework to do before I'll even understand most of this. I do at least have a direction now and I appreciate that

So I assume you are looking at some sort of manipulation system where the motors are moving something and the suction cup picks it up and releases it? The shield is designed to hold stepper motor drivers typically for a 3-axis CNC machine like a router or mill, but there is nothing specific. It can also control a spindle, on/off and speed. So you could use the 3 axis drives to move things around in x and y and up and down in z, and the "spindle" could just be the vacuum controller via a relay as discussed so far.

When it comes to the code, you need to be able to control all the stepper motors and the suction in a coordinated way. This is not trivial! Yes there are libraries to control stepper motors and stuff but putting all these together so they work can take a long time. Fortunately, there is this free standard package called GRBL that has already done all that and it works very well and can run on a basic Arduino. It knows about the shield (the shield is designed for GRBL), you don't have to know anything about Arduino coding (though it can help if you do).

To make GRBL moves things around you send it commands in a standard machine control language called G-Code. So for example to make your grabber move from say the origin X=0, Y=0, Z=0 to say (10, 20, 30) at 40 units/minute you just send it G01 X10 Y20 Z30 F40.

Search for GRBL and find their Wiki and all will be revealed.

1 Like

Yup, this is precisely what I'm doing. I will also be using some python code and a camera to identify and compare the picture taken to known objects to sort into their appropriate bins

Right - sounds like an interesting project! You will probably need to run the Python on a different processor, as the GRBL code space and real-time requirements are quite hungry. But that could be something like a Pi issuing G-Code via a serial port to the Arduino. Keep us updated!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.