Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HX616 coin inhibit proper #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ThomasFarstrike
Copy link
Contributor

The coin inhibit of the HX 616 is the bottom pin header with 2 pins, labelled "SET" on my device. Of those 2 pins, the botton one is ground and the top is the coin inhibit pin.

The manual describes it as: "Signal of forbidden energy inputting. Up PIN means signal inputting, voltage is more than 4V means OK, 0V means forbidden. Down PIN means ground wire."

The above translation is hard to understand but experimentation shows that:

  • if the HX616 coin inhibit pin is connected to ground (0V), then coins are refused
  • if it's connected to more than 4V or is left floating, then coins are accepted
  • if it's connected to 3V3 then coins are sometimes accepted, sometimes refused, so that's unreliable

The way I implemented this is by connecting the ESP32's coinInhibit output pin to a low level trigger relay. The relay drives the connection between the HX616 coin inhibit wire and ground in "NO" (normally open) mode.

So when the ESP32 sets the coinInhibit output pin to LOW, the relay becomes active and connects the HX616 coin inhibit wire to ground, and coins are refused. And when the ESP32 sets coinInhibit output pin to HIGH, the relay becomes inactive and the HX616 coin inhibit wire is left floating, so coins are accepted.

It might be possible to implement this in a different way, for example by using a MOSFET or transistor as a switch, or perhaps by using a 3V3 to 5V level converter or some kind of step-up/boost converter.

@karliatto
Copy link
Member

This PR would probably make the job of allowing HX616 inhibit with the extension of a relay.
But I would suggest to make it modular creating a new file that will represent the relay in order to follow the structure of this project devices.
And we would need to add also some documentation with connections and type of required relay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants