Q:

12V device to a Raspberry Pi

For my school engineering project, I have a coin acceptor device which I would like to link to the Raspberry Pi. However the device requires 12V in power. I have an idea of what to do to power the device, however I have heard that there is a risk of blowing the Pi when I hook the device up to the GPIO ports/breadboard.
Is there anything I can do to get around this? Or is this not likely to happen?
Here's the link to the coin acceptor I'm hoping to use:
http://www.amazon.co.uk/Sintron-Acceptor-Vending-Machine-Message/dp/B00C16P03I/ref=sr_1_1?ie=UTF8&qid=1385370033&sr=8-1&keywords=coin+acceptor

A:

As I read your question, you need to power the Coin Acceptor using 12v, and reading the output using your RPi.
To power the Coin Acceptor it is best you use an external power supply, as the coil in the acceptor might reset the RPi as it draws a relative large ammount of current when it operates.
Find a 12v power supply, connect - on the PSU to a common ground and + on the PSU to the coin acceptor. That should allow you to configure the coins that should be validated.
I have a similar coin validator, and mine works by connecting the COIN pin to ground or leaving it unconnected (not entirely, it just has a large resistance). Depending on your setting on the switch, COIN is either NC/Normally Closed (default GND) or NO/Normally Open (default not connected). When the acceptor delivers a pulse, the mode switches and you can detect the change using the RPi.
In order to be able to detect the change, you need to drive the COIN pin to a higher voltage, else it will be a voltage comparable to GND at all times.
Wire the COIN pin to the input on the RPi, through a resistor (try 1k ohm).
To pull up (when COIN is on the acceptor is open), wire the 3.3v on the RPi to the input on the RPi (I suggest you use the same resistance).
That will lead to a voltage of ~3.3 v when the contact is open, and a voltage of about half when the contact is closed. If the RPi becomes unstable, you might be drawing too much current, so try to move it up. If the RPi can't detect anything on the pin, try to go with a smaller resistor.
Make sure to measure everything before you connect it to the RPi, as your coin acceptor might work in a different way. If you can find another 3.3v or 5v source, try to connect instead of 3.3v on the RPi, and measure over GND and the RPi input using a multimeter or oscilloscope.
You can get a really good help with any of this on the electronics stackoverflow - they can help you with wiring and components, so you make sure you don't blow anything up. :-)

