Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Correct relay to use with KeyWiz  (Read 2146 times)

0 Members and 1 Guest are viewing this topic.

cyapps

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 82
  • Last login:January 04, 2011, 02:51:31 pm
Correct relay to use with KeyWiz
« on: September 06, 2010, 10:28:04 pm »
I am using a teensy usb development board to capture data read from a mag swipe reader and then I need it to activate a relay that is connected to my keywiz. The relay will be connected to the credit connection on the keywiz and will just act like a smart push button.

What I am needing to know is what kind of relay I would need and maybe the cheapest place to order it in the US. I believe the teensy board outputs 5v.

Any help is appreciated!

Thanks

BobA

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5943
  • Last login:July 11, 2018, 09:52:14 pm
  • What Me Worry?
Re: Correct relay to use with KeyWiz
« Reply #1 on: September 06, 2010, 11:06:49 pm »
A small 5v relay such as this one from digikey would work.

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=PB285TR-ND

cyapps

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 82
  • Last login:January 04, 2011, 02:51:31 pm
Re: Correct relay to use with KeyWiz
« Reply #2 on: September 07, 2010, 06:29:26 am »
Would something like this be okay? http://www.radioshack.com/product/index.jsp?productId=2062480
 I hate to pay $8 for shipping on one tiny item.

BobA

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5943
  • Last login:July 11, 2018, 09:52:14 pm
  • What Me Worry?
Re: Correct relay to use with KeyWiz
« Reply #3 on: September 07, 2010, 08:21:38 am »
Should be just fine for your application.   Remember to place a 1n4001 diode across the coil in rev bias to prevent inductive spikes from damaging your processor.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Correct relay to use with KeyWiz
« Reply #4 on: September 07, 2010, 11:14:57 am »
You can use a transistor for this.  Drive the base of an NPN transistor from your signal source via a resistor to limit base current (about 250 ohms is right), ground the emitter, and hook the collector up to the keyboard encoder input.  Same function as a relay with no moving parts.  You might well need a transistor to drive the relay coil, anyway.

If you've got a GPIO output from a microcontroller (sounds like you do for driving your relay) and the logic levels are compatible, you can just hook the output from your signal source up to the input on your keyboard encoder.  I'd recommend a series resistor of about 100 ohms to limit the current in the event something "weird" happens, but it's not required, and I suspect the Keywiz already has one (it's good practice in this application).

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5165
  • Last login:August 15, 2025, 02:14:21 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Correct relay to use with KeyWiz
« Reply #5 on: September 08, 2010, 03:59:58 pm »
A optoisolator would work just like monmotha suggested, but may be simpler than the transistor.
Either circuit would be a lot cheaper than a relay, and be less energy using and no "clicky noise."

cyapps

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 82
  • Last login:January 04, 2011, 02:51:31 pm
Re: Correct relay to use with KeyWiz
« Reply #6 on: September 08, 2010, 08:11:58 pm »
I was just going with a relay because I thought it would be easier but as this is all new to me I am not sure which way would be easier :). I would like to use this same swipe card device on my other cabs such as my Golden Tee. I figured it would be fun to log when people play what game and maybe have my nieces and nephews playtime controlled a bit. But of course the main reason to do this is to have a little fun hacking something together and learn a few things along the way :).

So I guess my question is which of these options would work to close the circuit on a coin input on a regular cab just like the little micro switch is currently doing when the coin is inserted. If I don't need to order to much I would prefer to get the stuff from radio shack to save on the shipping but either way I appreciate the input.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5165
  • Last login:August 15, 2025, 02:14:21 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Correct relay to use with KeyWiz
« Reply #7 on: September 10, 2010, 03:22:27 pm »
I'm not sure if Im getting the full picture here, but I think any of the mentioned methods would work, but the relay BobA suggested would probably be the simplest.

cyapps

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 82
  • Last login:January 04, 2011, 02:51:31 pm
Re: Correct relay to use with KeyWiz
« Reply #8 on: September 10, 2010, 04:03:24 pm »
I just posted my last post to fill in what I was doing a little more I didn't want to end up using a solution that would only work with the keywiz, but would also work with any original arcade pcb. I just want my solution to bridge the wires that are connected to the switch that is used to credit a game when the coin comes through. I am very new to this stuff but I am trying to understand what I can. I am having a hard time following exactly what parts I will need for each solution.

Relay Solution:
Relay: http://www.radioshack.com/product/index.jsp?productId=2062480
Diode: http://www.radioshack.com/product/index.jsp?productId=2036268
Is this all I would need?

I would also like to know what parts I would need for the transistor and the optoisolator solutions.


Thanks again for your time.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5165
  • Last login:August 15, 2025, 02:14:21 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Correct relay to use with KeyWiz
« Reply #9 on: September 10, 2010, 05:50:07 pm »
Here is a quick circuit using a TIL119 optoisolator and a 300 ohm resistor.
Radio shack probably wont have the optoisolator, but you can search the web for a dealer.
Or pm me your address and I will give you a couple of them. I bought several on ebay back a couple of years ago when I was experimenting with my rotating monitor circuit.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5165
  • Last login:August 15, 2025, 02:14:21 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Correct relay to use with KeyWiz
« Reply #10 on: September 10, 2010, 06:01:26 pm »
Thought I would post a pic of the TIL119, just to give you an idea how small these things are.
Its next to a USA quarter to give you an idea of size.

cyapps

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 82
  • Last login:January 04, 2011, 02:51:31 pm
Re: Correct relay to use with KeyWiz
« Reply #11 on: September 11, 2010, 12:55:52 pm »
Here is a quick circuit using a TIL119 optoisolator and a 300 ohm resistor.
Radio shack probably wont have the optoisolator, but you can search the web for a dealer.
Or pm me your address and I will give you a couple of them. I bought several on ebay back a couple of years ago when I was experimenting with my rotating monitor circuit.

I think that will work perfectly. That really helped me understand thanks so much! PM sent.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5165
  • Last login:August 15, 2025, 02:14:21 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Correct relay to use with KeyWiz
« Reply #12 on: September 11, 2010, 03:03:20 pm »
Pm received.
Im working this weekend, will try to get the pacakage mailed Monday.

cyapps

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 82
  • Last login:January 04, 2011, 02:51:31 pm
Re: Correct relay to use with KeyWiz
« Reply #13 on: September 11, 2010, 11:02:12 pm »
Appreciate it thanks!