0

i'm a software developer and a noob in electronics. I've built a photobooth for a friend of mine that runs by an ice cream stand.

The wiring is like this;

Coin acceptor | --> signal --> voltage regulator (out +)| -> rpi gpio 17
              |                                  (out -)| -> rpi gpoi gnd
              | + and - 12v adapter + and -                                                

enter image description here

When we plug the photobooth into electricity at home everything works fine, but when we plug it in by the ice cream stand the program does not receive pulses from the coin acceptor or receives 1 pulse after trying multiple times.

how can i overcome this issue and make coin acceptor connection stable?

engvrdr
  • 103
  • 2

2 Answers2

2

There might be other things wrong with your design, but one that jumps out of the figure in your question is the Voltage Regulator step down to 3 V.

You don't need a "voltage regulator" per se - you simply need an interface to deliver either 0V or ~3.3V to the GPIO from the coin line. There are several ways to do this, the two most obvious are:

  1. resistive voltage divider

  2. zener diode

The voltage divider may be easier, but it depends on having a known and consistent voltage produced from the coin line. You have not told us what that voltage is, and without that the resistor values cannot be determined.

The zener diode interface replaces one of the resistors with a zener diode. The breakdown voltage (aka zener voltage) should be ~3.3V; a 1N5988B is one part that will provide this voltage.

Schematically, here's how they look:

schematic

simulate this circuit – Schematic created using CircuitLab

For the voltage divider option, the values of R1 & R2 may be calculated using the voltage divider equations.

For example if Vcoin line is a 12 volt signal, these values should work for R1 and R2:

R1 = 1 kOhm
R2 = ((1,000 * 12 V)/(3.3 V)) - 1,000 = 2.6 Kohm

For the zener diode option, the calculation is simpler; we must set the zener current to a reasonable value (~10 mA in this case). Ohm's Law advises:

R3 = (Vcoin line - 3.3 V)/.01 A

Again assuming Vcoin line is a 12 volt signal:

R3 = 870 Ohms

Seamus
  • 23,558
  • 5
  • 42
  • 83
2

The "Coin acceptor" GND (or minus) needs to be connected to the Raspberry Pi's GND.

And replace the voltage regulator with a voltage divider (https://en.wikipedia.org/wiki/Voltage_divider).

enter image description here

Where Vin is the voltage from the ""Coin acceptor", I assume its 12 volt and the 3,3 volt that the Raspberry Pi accept.

So the formula is Z2 = 3.3 volt and Z1 = Vin -Z2.

How to calculate the values is well described in wikipedis voltage divider URL

Mats Karlsson
  • 979
  • 5
  • 11