title: How to correctly ground a 12v device with Raspberry Pi
body: <p>i have a (i think) very simple question.
  For my Raspberry i've bought a coin acceptor which needs a 12v power supply,
  the wiring is like this:
  <a href="https://i.stack.imgur.com/CMbiw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CMbiw.png" alt="wiring"></a></p>
  
  <p>now i'm quite unsure how i need to connect the Ground of the coin acceptor, do I need to connect it to the "GND" of the pi or to the "-" of the power supply?</p>
  
  <p>Thy</p>
  
  <p>UPDATE:</p>
  
  <p>Could i work like this?</p>
  
  <p><a href="https://i.stack.imgur.com/RVTcD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RVTcD.png" alt="enter image description here"></a></p>
  
  <p>UPDATE 2:
  Here is another setup with the exact same coin acceptor, but i'm not quite sure about that.</p>
  
  <p><a href="https://jalibu.files.wordpress.com/2014/12/advice_machine.jpg" rel="nofollow noreferrer">https://jalibu.files.wordpress.com/2014/12/advice_machine.jpg</a></p>
  
  <p>The Product is a CH-926: <a href="https://www.amazon.de/Sintron-M%C3%BCnzpr%C3%BCfer-Acceptor-Selector-Laundromat/dp/B00C16P03I" rel="nofollow noreferrer">https://www.amazon.de/Sintron-M%C3%BCnzpr%C3%BCfer-Acceptor-Selector-Laundromat/dp/B00C16P03I</a></p>
  
  <p>Edit: Any help?</p>