3-Way Valves for Vacuum and Vent

181 views
Skip to first unread message

ja...@tetontechnology.com

unread,
Feb 15, 2016, 3:34:33 PM2/15/16
to OpenPnP
Hello,

In our current design, we use 4 valves same as @Jason's machine.  We have been playing around with some three way valves that seem to work pretty well.  Instead of using a switch for exhaust and a switch for vacuum, the three way valve should provide both functions with just an on/off signal from one switch. Our goal is to use one switch for each nozzle (turn it on to pick, turn it off to place), one switch for LED, and one switch to turn on the vacuum pump. 

SW1 - Vacuum / Exhaust 
SW2 - Vacuum / Exhaust 
SW3 - Vacuum Pump On / Off
SW4 - LED's

 I just need help to editing the drivers, config, and whatever else needs to be edited for this functionality.

Thanks!

 

Jason von Nieda

unread,
Feb 15, 2016, 4:14:46 PM2/15/16
to OpenPnP
Hi Jason,

You'll need to edit the OpenBuildsDriver and change the various functions that control vacuum and exhaust. These are all very self explanatory, so just take a look at the driver file. They are all right at the bottom.

The functions to look at are:

    private void n1Vacuum(boolean on) throws Exception {
    private void n1Exhaust(boolean on) throws Exception {
    private void n2Vacuum(boolean on) throws Exception {
    private void n2Exhaust(boolean on) throws Exception {
    private void pump(boolean on) throws Exception {
    private void led(boolean on) throws Exception {

If you are planning to set up the plumbing in the way I imagine you are, you can probably just comment out the code in the two exhaust functions and call it a day.

I'm planning to make the same switch soon, using something like http://world.taobao.com/item/18725050829.htm?spm=a1z3o.7406521.0.0.lTUXHk

Jason


--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/2a933717-bd97-434a-b256-e8fd205c724c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ja...@tetontechnology.com

unread,
Feb 16, 2016, 12:24:07 AM2/16/16
to OpenPnP
Jason,

Thanks!  I followed your tutorial on how to rebuilding the .jar file.  I installed Java JDK 8, Maven, and Eclipse on my mack book and was able to rebuild.  Our actual PNP machine runs on a Windows computer.  I deleted the old .jar file and replaced it with the new openpnp-gui-0.0.1-alpha-SNAPSHOT.jar file.  It seemed to work kind of.  Nozzle 1 worked great using the pick and place buttons in the jog control window.  When Nozzle 2 was selected, it would pick once ant then become unresponsive to the place button.  Also when I tried to load an old job, it gave me an error saying something about the dimension of the board?  Sorry I didn't jot that down.  The changes to the code were kept simple as shown below.  I edited the pick() and place() functions simply not call the exhaust function.  I reverted back by updating Open PNP and everything worked normal. 

    public void pick(ReferenceNozzle nozzle) throws Exception {
        if (((ReferenceNozzle) nozzle).getName().equals("N1")) {
            pump(true);
            //n1Exhaust(false);
            n1Vacuum(true);
            n1Picked = true;
        }
        else {
            pump(true);
            //n2Exhaust(false);
            n2Vacuum(true);
            n2Picked = true;
        }
    }

    @Override
    public void place(ReferenceNozzle nozzle) throws Exception {
        if (((ReferenceNozzle) nozzle).getName().equals("N1")) {
            n1Picked = false;
            if (!n1Picked && !n2Picked) {
                pump(false);
            }
            n1Vacuum(false);
            //n1Exhaust(true);
            Thread.sleep(100);  // Changed from (500) to (100)
            //n1Exhaust(false);
        }
        else {
            n2Picked = false;
            if (!n1Picked && !n2Picked) {
                pump(false);
            }
            //n2Vacuum(false);
            //n2Exhaust(true);
            Thread.sleep(100);  // Changed from (500) to (100)
            //n2Exhaust(false);
        }
    }

Jason von Nieda

unread,
Feb 16, 2016, 12:26:47 AM2/16/16
to OpenPnP
Jason,

It looks like you commented out n2Vacuum(false); in the place function, possibly by accident?

Jason


Jason Parmenter

unread,
Feb 16, 2016, 9:36:02 AM2/16/16
to ope...@googlegroups.com
Jason,

Ha, yes that is the mistake and obviously my bug!  Also, is it OK to replace only the .jar file?  As I mentioned after I rebuilt the project I simply replaced that file on our other machine in the openpnp file and fired it up.

Thanks!


For more options, visit https://groups.google.com/d/optout.



--



JASON PARMENTER 

Electrical Engineering | 208.339.0822
ja...@tetontechnology.com
tetontechnology.com 





Jason von Nieda

unread,
Feb 16, 2016, 12:05:59 PM2/16/16
to ope...@googlegroups.com
Yep, the jar is all you need to replace.

Jason


Reply all
Reply to author
Forward
0 new messages