I am in developing process of creating/ designing a device that will launch a projectile remotely. The solenoid is being used to open the valve and allow the projectile to be shot. To remotely trigger this I plan to use infrared since I found a receiver laying around and my phone has uses infrared as well. I have an IR receiver however it connects via 3.5mm.Is it worth it to use this one I have now or get a different receiver. How does one go about include am IR receiver and/or a solenoid valve to a project involving the Raspberry Pi.
I can give you some pointers, but not a full answer as that would be me designing this solution for you - you need to do some more basic research as what you are asking is very common technology solved in thousands of blog posts, instructables.com articles and more (I know because I recently added an IR receiver to my rPi for Media Center purposes).
First of all, let me assuming you want the phone to be the controller, and the rPi to be attached to the projectile launcher (you're not spelling this out in your question - maybe you could edit it in).
- Go look at IR receivers online. Adafruit sells one, so does Radioshack (in the remaining locations they have in the US, you just have to browse through their component racks yourself as their personnel is totally clueless). If you're not from North America, there are tons of hobbyist electronics stores in Europe and Asia that sell these, either in store or online. Adafruit also has a short tutorial on how to wire it up, just forget about all the LIRC setup they mention.
- Most IR receivers have three pins - a ground pin, a VCC pin (you need a 3V3 source) and an output pin which contains the received information. Just wire those up to GND, 3V3 and one of the GPIO pins.
- I don't know your solenoid, but it will likely have a VCC input and a signal input, as well as a ground. If the VCC is 3V3 and the current requirement is very small (<100mA) you can connect to the rPi's 3V3 pin. If the VCC is 5V and the current requirement is 0.5A or less, you can use the rPi's 5V pin. If the VCC or the current requirement is not within those specs, you need to look for articles on how to use a relay with an rPi (thousands abound, just google).
- Now, using a library like RPi.GPIO, you can read the incoming signals from your IR receiver GPIO pin, do your logic and then send the right signal to your Solenoid. Again, boatloads of documentation on this at uncle Google.