Okay. General question. We have the pneumatics solved, to a degree, but here’s what I need help with. Our team needs help rigging the entire system up to the rc, and getting it set. How exactly would we go about rigging it?
I’ll explain what I think is right.
PWM cable from solenoid relay to PWM input slot 3
PWM cable from compressor relay to (Dunno where this should go, due to the compressor shutoff factor, which by the way, I don’t know how that’s done.)
Am I anywhere close to being right? How would we go about accomplishing setting up a pneumatics system.
BTW, if programming enters the discussion, We’re rigging it where the claw operates off of a third joystick (via the trigger), however, we are so far unsuccessful.
EDIT: We have everything assembled, from the compressor down to the cylinders, but we don’t know how to hook them to the rc and make them work. I know it sounds more like programming, but we’re still trying to figure out all of the fine parts of the pneumatics system.
Both the compressor and solenoids should be connected to the Relays(spikes). The PWM cables can go to the relay outputs. The pressure sensor should connect in the Digital inputs.
How would I go about connecting the pressure switch to the digital inputs? Do I have to split a PWM cable, like we had to do last year to wire up the light?
You are correct - you will need to split a PWM cable to connect to the pressure switch. Cut off the male end of the cable and you will only need 2 of the wires (I think we used red and white, I’ll have to look), secure them to the pressure switch using the 2 screws provided and then cover with electrical tape. Put the female end of the PWM cable into any one of the digital input ports - remember this is a switch much like a limit switch, which reads either open or closed. If you are using EasyC, there is a pressure switch command you can drag into the program, and you select whichever digital input port you used. (If you are using the default code I don’t know which input it assumes, check the documentation).
Because of the pull-up resistors on the digital I/O ports, you have to drive signal to ground when using a switch. As such, you’ll want to use the black and white wires.
Okay. I have the switch wired, and I’ll be fixing the cables momentarily. Now, when I plug in the PWM cable to digital slot 1, I get a message saying +5v Output Low on the RC. Is that because I don’t have it grounded?
Also, I have the solenoid wired up right, but now the issue is getting the compressor to act right, because right now it’s taking a fourth controller to turn the compressor on, and it only lasts while the trigger is held. What am I doing wrong? Once I fix the switch, will it run correctly? Explain.
I also have to program the trigger to keep the Spike in forward so the pneumatic rod stays extended until I press the trigger a second time. I have a programming thread in which I’m asking how, and I have the responses I think I need, but I need to know where the codes go. It’s entitled “A New Programmer”. It’s the only other thread I have created.
Well I’m not 100% sure how you wired everything but I’ll try and answer your question.
I believe the pressure switch switches on, closes the circuit (provides an output low) when the PSI drops below 95. Now it just seems like a matter of programming to get the compressor behaving the way you want. You can use the pressure switch that sees the output low, to turn on the spike connected to the compressor. You can program it to a switch on the OI as well which you’ve done. You can make it so you don’t have to hold down the button with a toggle switch or changing the code to make it toggle with each push. Maybe you can post your code. It sounds like you programmed the single solenoid right.
Programmed the solenoid? I’m laughing right now. We did exactly zero programming to the solenoid. I’ll tell you what we have done. We have the positive and negative wires hooked to the solenoid, and in turn, the wires are connected to the Spike. The Spike is wired to the circuit breaker, and the PWM cable coming from the Spike is in Relay Input 3. It works with no programming. I just have to drop in the toggle code…then work out the kinks in the switch. this is essentially how I have the compressor wired, also.
What should I do now?
EDIT: as a note, the pressure switch is wired to digital input 1. But yet nothing is happening. I still have to compile the code, put in our autonomous structuring, throw in the toggle code, and fine tune the numbers.
Well you need code to make the pressure switch work, I.E. You need to program the RC to check and see if the switch is on or off. Then respond by turning on or off the compressor
If you haven’t modified the code, then you can try plugging in the compressor spike to relay 8. I’m looking at the default code and it appears to me that they have programmed the pressure switch to work with digital input 18
relay8_fwd = !rc_dig_in18; /* Power pump only if pressure switch is off. */
If that doesn’t work, try writing you own code, including the relay you used.
like
if(rc_dig_in18)
{relay8_fwd=0;
}
else
relay8_fwd =1;
Or the same way the default code has it with the relay outputs your using.
Also, if you’re using the red and black like Gannon said, then switch it to white and black.
Okay. We have the solenoid, compressor, and, switch wired up right. Now here’s another question: will I have to use a second solenoid to run another pneumatic cylinder off of the same system so they work simultaneously, cuz if that’s the case, it may be a no go unless we can order another solenoid; the solenoid we originally had on there was defective and we had to use another one. I just need help toggling the trigger where, when it’s pulled the first time, the rod extends and stays extended until the trigger is pulled a second time.
If you want them to fire simultaneously, You can use one solenoid and just use one of those 3 holed elbow things. There are two ways that I know of to make it stay extended without holding the trigger. One way is to use the SMC double solenoid, the one you have to assemble with 4 wires connected to the solenoid. You’d be using it like a single solenoid, the double solenoid will stay in the last position you fire.
The other way is to write some code. There are probably a few ways to do it using code… umm so Here comes so code… no guarantee it works.
So I think this will extend it when you hit the trigger on p1 and retract it when you hit the top button on p1. Just one way of doing it… Of course you’ll have to make it the relay you’re using.
Yeah. Still helpful though. Just one problem though. One solenoid and a tee…Never mind. Just thought that out. That could work. I have to change some variables in the autonomous program, so I’ll get to codewriting later.