The NEW Build Your Own Arcade Controls
Main => Raspberry Pi & Dev Board => Topic started by: Marcoqwerty on April 16, 2018, 04:44:36 am
-
There is any way to detect output (only coin blink will be enought) trought raspberry GPIO?
-
Im sure there is. Do you want the Pi to detect when the coin switch is activated?
Or do you want the Pi to turn on one of its outputs when it detects the coin switch being activated?
-
Ehi master of scripts!!! thank you for the reply again! :notworthy:
I think it would be nice the PI turn on some of their outputs when the coin was detected, my aim is turn on a small light (6v), maybe directly trought PI (from some pinout are get out 5v).
My project actually miss space inside of the control panel...so i cant use or add realy or other control led boards.
-
Ehi master of scripts!!! thank you for the reply again! :notworthy:
I think it would be nice the PI turn on some of their outputs when the coin was detected, my aim is turn on a small light (6v), maybe directly trought PI (from some pinout are get out 5v).
My project actually miss space inside of the control panel...so i cant use or add realy or other control led boards.
All the outputs on the RPi are 3.3 volts. And probably not enough current to safely power a incandescent lamp, you could however have the Pi turn on a transistor, which would then turn on the lamp with 5 volts.
Or just use an led instead of the 6 volt lamp.
How is your Pi detecting the coin switch?
Is it through a GPIO input pin, or are you using a keyboard encoder?
-
All the outputs on the RPi are 3.3 volts.
Sorry but the GPIO 2 and 4 are not 5v output?
(https://www.myelectronicslab.com/wp-content/uploads/2016/06/raspbery-pi-3-gpio-pinout-40-pin-header-block-connector-.png)
How is your Pi detecting the coin switch?
MINIPAC an external keyboard encoder who also throw out 5v at some of their pins.
Is it through a GPIO input pin, or are you using a keyboard encoder?
Keyboard encoder trought PI usb.
-
Those pins are 5 volts, but they are on whenever the Rpi is on, and cannot be turned off or on using script.
If you only want to blink the bulb when a coin is detected, you could just hard wire the bulb to the switch, like this:
-
I see now where you are using a keyboard encoder. Do your pushbuttons and coin switches connect back to ground, or 5 volts?
You also may not need the blocking diode.
-
Ok, Ive never messed with the mini-pac so i went to the ultimarc website and did some research.
The switches do connect back to the ground that is on the minipac.
This ground is PROBABLY the same ground that is on the RPi, but using that incandescent bulb may be a bad idea.
The bulb will draw quite a bit of current. That current will have to flow through the minipac and the USB cable to get back to the RPi.
Also the bulb has a "warm up" period, where it has to be on long enough for the filament to glow brightly.
The time the coin switch is on may be too short for the bulb to come to its complete brightness.
So you may not see the bulb come on at all.
Now if you use an LED instead of a bulb all the above problems would be solved, except I still wouldnt like the idea of running that 20 ma of power back through the minipac and the USB ground.
Dont know if that would be safe for the minipac or not.
-
Now if you use an LED instead of a bulb all the above problems would be solved,
Ok..there is no problem about bulb or led...i said bulb because actually its the only lamp of this type i have at home...but forget i will bought a 5v led to avoid this mess.
except I still wouldnt like the idea of running that 20 ma of power back through the minipac and the USB ground.
Dont know if that would be safe for the minipac or not.
Exacly...this is the same doubt i have! Obliviously i cant test to solve it... :lol
-
You could use a transistor to turn on the led.
-
With this i can control the LED LIGHT with a PI script?
Inviato dal mio iPad utilizzando Tapatalk
-
No
-
Then just detect a pression and turn the light on, right? and they never goes off after? Also do not blink?
It should be nice after the pression: bink and turn of after pression of the player 1 button; if is not possible detect any output from MAME.
I found this link from BYOAC:
http://forum.arcadecontrols.com/index.php?topic=155149.0 (http://forum.arcadecontrols.com/index.php?topic=155149.0)
-
In the circuits I posted the light will be on steady as long as the switch is made.
No blinking, however the button or switch press may be so quick that the light blinks once.
switch made: Light on
switch not made: light off.
I will look into some script that maybe can detect the coin button (should be 5 on the keyboard for player one, 6 for player two), and turn on a GPIO output for a set amount of time, or blink it if thats what you want.
If you find another way to do it, please let me know.
-
Good...
Yes! i think a script would be the better shortcut...a fake output s detection; because, how ive read at link posted above, Mame 106 do not support yet outputs like the newer version. But if youre interested to investigate i can write a mail at the italian (as me) developer of advmame106.
For the "fake" options maybe it should follow some rules...before the pressing of the CREDITS button activate the PLAYER 1 LIGHT (blinking)
- first detect is running MAME
- detect the credits are no 0
- after press the PLAYER 1 BUTTON the script check again if the credits reach the 0 value
BTW :notworthy: i appreciate a lot your work and to listen all my requests...but REALLY do not waste to much of your time to think about my ideas (if its hard or too longer)....for me its good enought, an easy light turned on after a button pression.
Thank you for all!
-
I dont mind working on things like this, but I have no idea how I would get the amount of credits that mame has registered.
Your better bet may be to contact your friend who is a developer of advmame106.
If I can help in any other way Id be glad to, but i have done nothing with mames code, and honestly, wouldnt know where to start.
???
-
Thank you for all!!!! i check i there is some other way to add this fake feature...
:notworthy: