I own a table top game where the objective is to place all the States in the correct place before the 60 seconds is up, otherwise it drops the pieces and you have to start over. The problem I'm trying correct is the amount of user effort it takes.
Currently, you press START and the timer begins. Once you finish hanging the States you have to press STOP. If you're slow or can't get to the button quickly you loose and the pieces fall. You then have to press RESET to start over.
I'd like to automate this process with an Arduino so that a player only has to press START. I've already written a simple sketch to handle it, but I've got questions on the hardware side of things.
The game is powered by a 12v DC transformer. The control board converts that down to 5v DC for the button pushs.
My question is... Can I hook the GND from my Arduino to the COM (both 5v DC) on the game's board and just control the START, STOP, & RESET functionality directly from my Arduino pins? Or, do I need to use a DC-DC relay in between for each button?
Yes, with the caveat that you can't have the Arduino connected if either it or the game is powered while the other is not - depending on the specifics of the wiring, this could cause damage to one or both of the devices (you can't apply an external voltage to a pin which is lower than ground or higher than the supply voltage; if it isn't powered, the supply voltage is zero). There is some margin for error here (if the current that could flow through the unpowered pin is externally limited to a low enough value, it's okay), but you'd need to trace out the circuit to know if it was okay (and you probably don't have specs on the microcontroller in the game, which may be some anonymous blob-of-epoxy-on on the PCB (though that board doesn't look like the sort of cheap consumer crap that uses them), which complicates checking whether it will be okay if the arduino is powered but the game is not, though if they have the buttons wired like they ought to, you could ensure that your code prevented this).
DrAzzy:
Why not power the Arduino from the 5v supply too?
Are you suggesting running the Arduino w/ 5v DC power supplied through the game's board as opposed to the 12v DC coming in from the transformer? I've always used 12v DC via the power jack so I'm not sure how I'd do that... Isn't the USB connection the only way to power w/ 5v DC?
Brittio:
Are you suggesting running the Arduino w/ 5v DC power supplied through the game's board as opposed to the 12v DC coming in from the transformer? I've always used 12v DC via the power jack so I'm not sure how I'd do that... Isn't the USB connection the only way to power w/ 5v DC?
No, if you have a regulated 5V power supply, you can connect it directly to the 5V pin on the arduino to power it. It isn't just an output pin
blh64:
No, if you have a regulated 5V power supply, you can connect it directly to the 5V pin on the arduino to power it. It isn't just an output pin
I was reading that you have to have a regulated 5v DC to use the 5V pin... I'm not sure how regulated the 5v DC coming off this board is.
I assume the USB jack puts power through the Arduino's voltage regulator. Would it be safer to cut a USB cord, in order to connect to the game's 5v DC, and power it that way?
Brittio:
I assume the USB jack puts power through the Arduino's voltage regulator. Would it be safer to cut a USB cord, in order to connect to the game's 5v DC, and power it that way?
Nope. Look at a schematic. If voltage is detected on the USB pins, the arduino takes power directly from that. The voltage regulator is out of the picture. If there is no voltage detected, the Vin pin goes to the voltage regulator and the output of the voltage regulator then powers everything. The +5V pin is tied to the output of the voltage regulator so if you power that pin, it is "downstream" of the regulator
Brittio:
I was reading that you have to have a regulated 5v DC to use the 5V pin... I'm not sure how regulated the 5v DC coming off this board is.
A valid concern. I'd examine the circuit board in the map game and try to figure out how the power supply is done. I'd bet that you'll find a 5v regulator somewhere providing the 5v that runs the microcontroller that controls the game
I hooked the game up to my Arduino via the 5v pin as discussed and had mixed success. It would actuate the "reset" button, but nothing else. I checked the voltage and my buttons were getting 3.4v DC where they had been getting 4.9v DC without the Arduino using the 5v DC from the board.
The board shares the (-) leg from the 12v DC across the buttons. (which are 5v DC) I verified it to be the same by checking continuity and swapping (+) leg between 12v & 5v DC. After some debate I connected the Arduino to the 12v DC from the board and checked the pins going to buttons, which now read 4.9v DC. I tested my sketch and everything works as desired, but I haven't left it plugged in longer than a couple minutes for testing.
Do you think it's probable I'll damage the game board by running it this way?