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: Electrical Wiring Question (Update: IT WORKS!!!!!)  (Read 5000 times)

0 Members and 1 Guest are viewing this topic.

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Electrical Wiring Question (Update: IT WORKS!!!!!)
« on: March 23, 2008, 01:09:02 pm »
Okay, I'm a bit of a newbie with electrical wiring, but I do understand most of the basics.  Therefore, I want to run this idea by some people before I implement it.  Basically, I have a coin door with two distinctly separate coin-mechs and one coin meter that counts the coins put in.  I want to hook up the coin mechs to two uniquely different inputs on my keyboard encoder, but have both of them increment the coin meter by one if a coin is put in.  My problem was figuring out how to keep the two circuits independant from each other, yet have both of them be a part of the coin meter circuit.  I think I can use diodes to accomplish this and place a diode on each circuit from the coin mech to prevent a signal from travelling in the wrong direction.  A sketch of what I'm doing is below.  Will this work?  I'm using a 4.5V coin meter with a diode in it, and standard coin switches.

My apologies for the poor quality of the sketch.  This was done with a touchpad and not a mouse.   :cheers:

« Last Edit: May 26, 2008, 08:24:05 pm by Jdurg »
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Ed_McCarron

  • Nothing worse than Picard issuing the self destruct order and the next thing you know it your apartment blows up.
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2404
  • Last login:June 20, 2022, 02:33:39 pm
  • Get your mind out of the gutter. THIS is a dongle.
Re: Electrical Wiring Question
« Reply #1 on: March 23, 2008, 02:04:51 pm »
Looks like it'd work as long as both +5v are from the same source.

Also, it looks like the polarity of the diodes in your schematic might be backwards.  If coin1 and coin2 are at +5v and go to ground when a coin is inserted, you want the positive from the coin meter to go thru the diodes to ground, right?  When the coinx line is grounded, the anode will be at lower potential than the cathode in your pic, and no current will flow.

Of course, that observation is based on my high-tech education I received from Forrest Mims, so take with a grain of salt.  Maybe someone else will verify.
But wasn't it fun to think you won the lottery, just for a second there???

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #2 on: March 23, 2008, 02:06:03 pm »
You know, I think I've figured it out.  I just needed to write everything down on paper to see how all the circuits interact.  Since electricty flows from the positive to the negative terminals, I'll have the +5V coming in to the coin meter.  The negative line is connected to both the Coin 1 and Coin 2 NO terminals with a diode placed between the negative terminal on the meter and the NO connection on each coin mech.  Therefore, when the coin mech switch is triggered by a coin moving through, the meter will have completed its circuit and the meter will increment by one.

At the same time, the coin switches work by having the positive signal from the keyboard encoder flow through the switch to ground thus completing the circuit.  I'll connect the wire from the encoder to the NO position on the appropriate switch and put a diode between the two terminals to direct the flow towards the switch only.  I think that by doing this on both switches I'll prevent any current flow in a direction I don't want, and thus keep both circuits independant, yet linked to the meter.  Any time either switch is pressed, the meter will be able to complete it's circuit thus incrementing by one, and the encoder will complete its circuit thus allowing MAME to recognize an inserted coin!  Sweet.  I think I've got it.  I just need to work on the diode types to make sure I don't hurt any of my components.
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #3 on: March 23, 2008, 02:06:40 pm »
Looks like it'd work as long as both +5v are from the same source.

Also, it looks like the polarity of the diodes in your schematic might be backwards.  If coin1 and coin2 are at +5v and go to ground when a coin is inserted, you want the positive from the coin meter to go thru the diodes to ground, right?  When the coinx line is grounded, the anode will be at lower potential than the cathode in your pic, and no current will flow.

Of course, that observation is based on my high-tech education I received from Forrest Mims, so take with a grain of salt.  Maybe someone else will verify.

Yeah.  I noticed that soon after drawing it up.  After thinking outloud for a while and drawing it down on paper, I think I've figured out how this will work.
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #4 on: March 23, 2008, 02:15:17 pm »
Okay.  I think I've now updated the schematic to one that will work.  I just wonder if it's overkill having the diodes on the switch-to-encoder line?

Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

ivwshane

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1036
  • Last login:December 24, 2022, 09:35:21 pm
    • My first mame cab! (WIP)
Re: Electrical Wiring Question
« Reply #5 on: March 23, 2008, 02:21:17 pm »
I'm sorry I can't help but you call that being a noob?


I must be retarded then:o

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #6 on: March 23, 2008, 02:29:44 pm »
Hehe.  Well, compared to some of the electrical engineers we have here on this board, I would still consider myself a noob.   ;D

I've actually been finding Wikipedia to be quite helpful as I try and figure this circuitry out.
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10093
  • Last login:May 08, 2023, 02:40:58 pm
  • Comanche, OK -- USA
Re: Electrical Wiring Question
« Reply #7 on: March 23, 2008, 02:43:56 pm »
I'm just trying to understand how to even use my counter and conjunction with the switches. It's a 12v, and I've run power to it to see if it even worked, and it did, but I don't understand how to use it in conjunction with my coin switch.

I have three males connectors on the switch. I run ground to the one closest to the door, and the IPAC to one furthest.

So what's the middle one for? (I couldn't see the use for a NC on a coin door....is that what it is?)

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #8 on: March 23, 2008, 03:00:18 pm »
What are the specs on the counter?  E.G. what make and model, what voltage, etc.?  The counter works by having a positive voltage constantly flowing through it.  When connected to a coin switch through the Normally Open terminal, if the switch is activated it is now able to complete the circuit to ground and the counter goes up by one.  So to get it to work with your coin-mechs you need to connect the Negative terminal from the counter to the NO terminal on the coin switch.

My issue that I think I may have resolved is that I want both of my coin mechs to be isolated from each other so that if I put a coin in Mech #1 it will register ONLY for Player 1 and vice versa.  However, I want BOTH mechs to register on my counter.  So I think the schematic I updated above will work as the circuits will be electrically isolated thanks to the diodes.  What I want to ensure is that the voltage drop going through the Diode won't affect the signal from being registered (which I don't think it will since it's a simple on/off and not amplitude based) and I also want to make sure that the +5 Volts coming in to my counter won't fry my encoder or switches.  So I still need to do some research and also figure out what voltage the keyboard encoder is supplying.
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Spaz Monkey

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 381
  • Last login:February 15, 2011, 11:33:55 pm
  • Hit me with a chicken quesadilla and a Coke.
Re: Electrical Wiring Question
« Reply #9 on: March 23, 2008, 04:45:25 pm »
umm....  doesn't the jamma board and harness do some of that work for you?  There's a coin counter 1 & coin counter 2 on the harness.  Just do something like:

CC1 wire from harness ----\
                                            >---- combined coin counter wire to coin counter
CC2 wire from harness ----/

With your diodes at the / and \  ?

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10093
  • Last login:May 08, 2023, 02:40:58 pm
  • Comanche, OK -- USA
Re: Electrical Wiring Question
« Reply #10 on: March 23, 2008, 04:59:04 pm »
Quote
I also want to make sure that the +5 Volts coming in to my counter won't fry my encoder or switches.
Which is exactly why I haven't hooked up the 12v on mine. I've only run wires directly to the counter to see if it worked, and then simply tapped the positive wire a few times to see the counter go up.

I've been scared to run it to the coin switches for fear of frying my Ipac.

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #11 on: March 23, 2008, 05:52:24 pm »
umm....  doesn't the jamma board and harness do some of that work for you?  There's a coin counter 1 & coin counter 2 on the harness.  Just do something like:

CC1 wire from harness ----\
                                            >---- combined coin counter wire to coin counter
CC2 wire from harness ----/

With your diodes at the / and \  ?


This isn't for an actual JAMMA arcade cab.  This is for a home built cab that I'm still in the process of making.  Not even sure why I need to hook this up, but after seeing the meter on my coin-box I just had to hook it up properly.   ;D
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #12 on: March 23, 2008, 05:53:47 pm »
Quote
I also want to make sure that the +5 Volts coming in to my counter won't fry my encoder or switches.
Which is exactly why I haven't hooked up the 12v on mine. I've only run wires directly to the counter to see if it worked, and then simply tapped the positive wire a few times to see the counter go up.

I've been scared to run it to the coin switches for fear of frying my Ipac.

In that case, you could just put a resistor in line with the 12v and drop the voltage down to a level that's safe.  Once I figure out the safe voltage for my setup, I'll include the resistors where they need to go.
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10093
  • Last login:May 08, 2023, 02:40:58 pm
  • Comanche, OK -- USA
Re: Electrical Wiring Question
« Reply #13 on: March 23, 2008, 05:56:20 pm »
Or....I just leave it alone and don't hook it up. There's no reason to have one hooked up at home anyway.

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #14 on: March 23, 2008, 06:00:31 pm »
Yeah, but when you're as anal retentive as I am, it will drive you nuts.  (Hence why even my CP isn't done yet and I've been working on it for four months now.   :laugh2:  I've got arcade parts scattered throughout my house).  When I bought my coin door, it actually came with a used one, but I wanted one that was set to all zeros and didn't feel like manually moving it up the couple hundred thousand that it needed.  So I went and bought a new meter off of E-Bay.  I guess the only reason I want to hook it up is to see just how much I've been playing my cabinet.  It's weird.  I know that I really have no good reason to hook it up, but then again, I also had no real good reason to put a fully functional coin door in there either.  (While I wait to build the cabinet, the coin-door has become an awesome piggy bank because any time I get a quarter in change it ends up going in through my coin door.  I must have forty of fifty dollars in quarters in there now.)   :cheers:
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

stan2323

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 262
  • Last login:January 13, 2023, 06:05:19 pm
  • Major Retired USS Enterprise Commanding
    • My home page
Re: Electrical Wiring Question
« Reply #15 on: March 23, 2008, 06:31:20 pm »
(While I wait to build the cabinet, the coin-door has become an awesome piggy bank because any time I get a quarter in change it ends up going in through my coin door.  I must have forty of fifty dollars in quarters in there now.)   :cheers:

Do not finish your cab too soon you may make your money back.   :laugh2: :laugh2: :laugh2:
Careful what you wish for you may get it!!
There are 10 kind of people in the world those that understand binary and those that do not!!

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Electrical Wiring Question
« Reply #16 on: March 23, 2008, 07:06:40 pm »
-- Removed as I did not read the question properly --  :banghead:

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10093
  • Last login:May 08, 2023, 02:40:58 pm
  • Comanche, OK -- USA
Re: Electrical Wiring Question
« Reply #17 on: March 23, 2008, 07:29:21 pm »
Jdurg:
Just making sure you understand that I meant there's no reason for ME to have one.
If you get yours working proper, that's awesome, I just don't need it.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Electrical Wiring Question
« Reply #18 on: March 24, 2008, 08:35:51 am »
I really dont think I would attach the ground of the power supply to the ground of the keyboard encoder.
Your drawing with the two diodes would probably work, as long as the power supply's ground is the same as the keyboard encoder's ground. But even then you are sending the high current of the counter through the keyboard encoder.
Although the way I would do it is a bit more complicated, I think it is a better way to do it.
This will work if the keyboard encoder supplies a +5vdc bus (I know the keywiz encoder does.)
Anyway, i would pick up a couple of very cheap opto isolators, 2 330 ohm resistors, and a diode and wire it like this.
Any way you wire it, you should use a diode across the counter (D1). The counter has a relay like mechanism. This produces a very high counter EMF surge, which can destroy electronics. The diode kills this back surge.
(your counter may already have one wired in.)
« Last Edit: March 24, 2008, 08:40:01 am by DaOld Man »

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #19 on: March 24, 2008, 09:55:41 am »
Thanks.  This is pretty much what I was looking for.  The meter I have does have a diode built into it.  I am certain of that.  When looking at the voltages, I was thinking about placing a resistor in there after the diode to lower the voltage down to a level that the encoder could handle.  I'm just not sure how much heat would be generated if taking it from +5V down any further, and how long that would last.

However, I do notice that both the IPAC and the Keywiz keyboard incoders have USB connections, therefore they should readily be able to handle the 5V that USB provides.  Therefore, the +5V coming from the coin meter should in no way cause any damage at all since the encoder itself is taking in +5V.  I even see that the KeyWiz encoder has a 5V connection if needed.
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Electrical Wiring Question
« Reply #20 on: March 24, 2008, 10:06:12 am »
You should be concerned with how much current the counter draws.
I would be afraid that it would be too much for the Ipac.
You can hook an amp meter to it and see how much it draws.
I would say that more than 20-50 ma might be dangerous for the Ipac, but I really dont know.
Im not sure how much the keywiz can source. i asked randy of GGG once but I dont think he ever answered it.
If you use opto isloators, or at least transistors, you should be ok.
Opto isolators are very small, and very easy to hook up. (4 connections)
Just consider them as a normally open relay. But they are limited to how much current they can switch.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Electrical Wiring Question
« Reply #21 on: March 24, 2008, 10:22:20 am »
Here is another way you can do it.
This uses the same diode arrangement to turn on the counter as yours.
im using 2 opto isolators to switch the encoder inputs.
Im not showing the surge diode on the counter, since yours has one built in.

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #22 on: March 24, 2008, 12:39:08 pm »
Yeah.  I'm using a Kessler-Ellis KE610AF model counter rated at 4.5/6V DC and 2 Watts, so with the good old Amps x Volts = Watts, we have something on the order of 2.25/3 amps which is well above the specs you put there.  I guess I'll just need to do something to reduce the current.  Thanks for all the help by the way.   :cheers:

Oh yeah.  As a side note, the power supply would only be providing power to the counter and is not going to be providing power to the encoder.  So the only connection in the entire circuit to the power supply is the +5V connection.  Is that going to work, or will I somehow need to connect the negative from the power supply cable?  Ugggh.  I can't believe I completely ignored the negative terminal from the power supply.  (Though it's actually a ground from the power supply feed).
« Last Edit: March 24, 2008, 12:45:57 pm by Jdurg »
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Electrical Wiring Question
« Reply #23 on: March 24, 2008, 03:28:37 pm »
Actually the formula to find amps is watts/volts
So
2 watts / 4.5 volts =0.44 amps (or 440 MA)
Or if you use a 5vdc power supply:
2 watts / 5 volts =0.40 amps or 400 ma

The second drawing, using the opto isolators to trigger the encoder inputs should work very well.
I would not switch the counter with the opto isolators like I show in my first drawing. it may overload the optos.
The coin switches should be good for at least a couple of amps.
You will need to use 1 amp diodes.
also the resistors for the opto isolators need to be around 200 ohms, not 330 as I originally posted.

If you do something to reduce the current, you will reduce the voltage too.
If you get much below the 4.5 volt rating, you may harm the counter, or it may not work properly.
With the currents you are looking at, i dont think i would feed the ground or the pos for the counter through the encoder.
But if you go with your first drawing, you will need to tie the ground of the power supply with the ground of the encoder, since the coin switches are breaking the ground.
Good luck, and keep us posted..

Ed_McCarron

  • Nothing worse than Picard issuing the self destruct order and the next thing you know it your apartment blows up.
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2404
  • Last login:June 20, 2022, 02:33:39 pm
  • Get your mind out of the gutter. THIS is a dongle.
Re: Electrical Wiring Question
« Reply #24 on: March 24, 2008, 03:35:36 pm »
You should be concerned with how much current the counter draws.
I would be afraid that it would be too much for the Ipac.

Wha?

In Jdurg's schematic #2 way up there, the IPAC input sits at 5v, most likely via a pull up resistor.  The (-) side of the counter will be at 5v when idle, so no current at all will flow.

When the switch is triggered, both will be pulled to ground.  No current will flow from the ipac other than what would normally flow when you ground it's input.

Unless i'm missing something (which is very possible) the optoisolators seem like overkill - unless you are worried about the inductive kick from the coil field in the counter collapsing - which can be handled by the reverse biased diode shown later.
But wasn't it fun to think you won the lottery, just for a second there???

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #25 on: March 24, 2008, 05:09:57 pm »
In my updated drawing, the +5V would be coming from the power supply.  The GND/Coin1/Coin2 wires would all be going into the IPAC/Keywiz which would get their power from the connection to the computer.


You should be concerned with how much current the counter draws.
I would be afraid that it would be too much for the Ipac.

Wha?

In Jdurg's schematic #2 way up there, the IPAC input sits at 5v, most likely via a pull up resistor.  The (-) side of the counter will be at 5v when idle, so no current at all will flow.

When the switch is triggered, both will be pulled to ground.  No current will flow from the ipac other than what would normally flow when you ground it's input.

Unless i'm missing something (which is very possible) the optoisolators seem like overkill - unless you are worried about the inductive kick from the coil field in the counter collapsing - which can be handled by the reverse biased diode shown later.
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #26 on: March 24, 2008, 05:14:25 pm »
Actually the formula to find amps is watts/volts
So
2 watts / 4.5 volts =0.44 amps (or 440 MA)
Or if you use a 5vdc power supply:
2 watts / 5 volts =0.40 amps or 400 ma

The second drawing, using the opto isolators to trigger the encoder inputs should work very well.
I would not switch the counter with the opto isolators like I show in my first drawing. it may overload the optos.
The coin switches should be good for at least a couple of amps.
You will need to use 1 amp diodes.
also the resistors for the opto isolators need to be around 200 ohms, not 330 as I originally posted.

If you do something to reduce the current, you will reduce the voltage too.
If you get much below the 4.5 volt rating, you may harm the counter, or it may not work properly.
With the currents you are looking at, i dont think i would feed the ground or the pos for the counter through the encoder.
But if you go with your first drawing, you will need to tie the ground of the power supply with the ground of the encoder, since the coin switches are breaking the ground.
Good luck, and keep us posted..

Thanks for the help.  This is something that I should be able to test out using my older meter first to ensure that it will work with my new meter.  I'll also be able to test it when I finish building my CP over the next month or two and can hook it up to my coin door and to my desktop computer. 

However, in looking at my second drawing, the diodes being used to control the flow of electricity from my encoder to my switches should prevent any large voltages or current from going to my encoder.  I'm guessing that your concern is with voltage flowing through the ground wire and creating issues there?  If that's the case, shouldn't i be able to just ground the coin switches to the gnd line on the power supply yet still have them register on the encoder?
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Electrical Wiring Question
« Reply #27 on: March 24, 2008, 06:00:11 pm »
You can try that.
if the encoder ground is the same as the power supply ground, that should work.
(You can use an ohm meter to check that.)
If they are not connected somewhere already, then you will need to put both power supply and encoder grounds on the common of the coin switches.
I would not use the ground from the encoder to power the counter.
The current will be the same from the power supply ground, through the coin switch, through the counter and back to the power supply positive.
You want to insure that the counter current cant feed through the encoder ground.

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #28 on: March 30, 2008, 04:54:48 pm »
Problem solved.  The KeyWiz keyboard encoder has a +5V output on it that can be connected to the coin meter for the +5V, and the the use of some simple diodes to direct the flow of electricity will keep things working.  Since the +5V is coming from the encoder, I am certain that there will be no issues.  I can then use the power supply of the computer to light the coin-door LEDs and the trackball's LED.   ;D
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #29 on: May 25, 2008, 12:09:17 am »
Small update here.  The CP is built and the wiring to the coin-door is ready to start.  (For testing purposes).  I recalled that the USB port can provide 5.0 volts at 500mA which is just above the ~440 mA that the counter will require.  As the KeyWiz I bought connects through PS/2 (which also requires +5V and works with a USB Adapter therefore taking advantage of 500 mA), I am VERY confident that the amperage going through the KeyWiz from USB will not harm it.  Plus, hacking a USB cable to power the meter will be pretty easy to do and make for a quick connection in the base of my cab.

Tomorrow I hope to pick up the diodes I'll need to direct the electrons in the right direction and will fire up Gauntlet to see if it works out alright.  I was going to use the +5V connection on my KeyWiz, but I can not see how anybody could solder a wire on there without destroying the encoder.  WAAAAAAAAAAAAY too small for someone like me to do anything.

Once the wiring is complete, I'll let everybody know how it turned out.

« Last Edit: May 26, 2008, 04:29:11 pm by Jdurg »
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question
« Reply #30 on: May 26, 2008, 04:45:25 pm »
Today was a first for me.  The first time I've EVER used a soldering iron and soldered a connection.  I can't believe how easy it was and how strong the soldered connection is!  I went to Radioshack and picked up a 15/30 Watt adjustable soldering iron, four 1000 mA-200V diodes, and a small thing of silver/tin rosin core solder.  Pointing the current flow from the diodes towards the NO Connections on the coindoor microswitches, I soldered a diode in line between the microswitch and where the KeyWiz connection comes from, as well as from the NO Connections towards the solitary line that connects to the coin meter.  I then took the lines from Coinswitch 1 and Coinswitch 2, that connect to the meter, and soldered them together.

It was quite interesting learning how to solder a connection.  Basically, I took a shot glass full of pure grain alcohol to dip my fingers in, let the alcohol evaporate, then see that my fingertips were completely dry and free of oils.  (Ethanol does a damned good job of drying out your skin and that allows you to work with the wire without any oils or greases from your body screwing things up).  With ultra dry hands, I went and twisted some of the copper wire around the leads on the diodes after using some fine grain sanding papers to clean up the surfaces.  With all connections twisted together, I plugged in the soldering iron at 30 W to let it heat up pretty quickly and strongly. 

I took the iron and put it on the twisted wires and let it heat up until the solder that tinned the tip of the iron began to flow and smoke a bit.  I then removed the iron and quickly applied my silver/tin solder.  It was pretty cool seeing the solder flow from the solid wire into the little gaps between the twisted wires, then solidify.  I repeated this until the soldered joint appeared to be secure without too much solder on there.  It cooled almost immediately and it is now a nice solid mass.   ;D

Sadly, I didn't have a spare USB cable lying around so I couldn't actually test my connections this weekend.  (I don't feel like driving out to pick up another cable today).  Next weekend I hope to be able to test out the wiring and see if it works.  I need to also decide how long I need the wire from my coin door up to my KeyWiz needs to be so I can finish soldering that line.  I may just end up attaching some very long wires to the diodes now and shrinking them down later on when I see how long they actually need to be.  Much easier to make a cable shorter than it is to make it longer.   ;)

I think this will all work out and using a USB connection to provide the voltage and current to the meter and then back out through the encoder shouldn't cause any harm at all.  (Since the encoder is able to connect via USB, it must be able to safely handle the 500mA that the USB connection supplies).
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question (Update: IT WORKS!!!!!)
« Reply #31 on: May 26, 2008, 08:31:55 pm »
Alrighty, I got it to work!!!!!  I didn't think I had a spare USB cable lying around, but I did have a spare USB gamepad that doesn't work anymore so I could just use that cable since the controller doesn't work.  So I cut off the cord and saw the standard four wires.  I soldered the red wire to the positive side of my old coin meter.  (The one that is not set at 000000).  I then soldered the connections from the coinswitches to the negative end of the meter with the diodes already soldered inline.  (I used a total of four 1-amp diodes.  One between the KeyWiz and the NO connection, and one between the the meter and the NO connection).

Using some throw-away cable, I then hooked up the ground to the KeyWiz and both inputs.  I hooked everything up to my desktop computer (since if hacking the USB blew the system, my desktop can be the martyr  :P )  I threw on Gauntlet, Rampage, Teenage Mutant Ninja Turtles, etc. and tested it out.  When I put a coin in Slot 2, a credit registered for Player 2 and the meter incremented by one.  If I threw a credit in Slot 1, a credit registered for Player 1 and the meter incremented by one.  IT WORKED!!!!!!!!!  On a few occasions, if I put money in really quickly, MAME would occasionally fail to register the credit but the meter would still increment.  So that can be a bugger, but not a killer.  I am just happy that four simple diodes worked to get this coin-door to function like I wanted it to.   :applaud:
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200

Arshad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 16
  • Last login:August 07, 2011, 08:12:05 pm
Re: Electrical Wiring Question (Update: IT WORKS!!!!!)
« Reply #32 on: May 26, 2008, 09:42:41 pm »
Awesome work!  Was your eventual solution what you had in your second diagram?  I have the exact same problem as yours... I want to connect up two independent mechs for coin1/coin2, but have a common counter.  Unfortunately my electronics background is pretty much zero.  I can see myself wiring up what you showed in your second diagram but the one with opto-isolators etc is way over my head.  I'm planning on using an iPac2 over PS/2 which I'm assuming will work similarly to your KeyWiz.  One big difference is that the KE610 that I have is rated for 12V/2W.

Jdurg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1127
  • Last login:October 04, 2020, 09:26:27 pm
  • A young guy feeling older than sin......
Re: Electrical Wiring Question (Update: IT WORKS!!!!!)
« Reply #33 on: May 26, 2008, 09:56:53 pm »
Hehe.  I JUST replied in your thread.   ;D

Yes, the 2nd diagram I drew is the one I ended up using.  For your setup, the 12V will be a problem.  A USB cable only provides 5V of power and the meter will need 12V to work.  The 2W means that it uses about half the amperage that my setup does, but still the volts are a problem.  The one thing I'd be worried about if you went the Power Supply connection method is how much amperage the power supply provides on its 12V line.  A PS/2 connection runs off of a 100mA, +5V power capacity, but the ground should be able to handle the amperage provided by the USB cable.  (I didn't encounter any problems).

So if you could figure out the amps being provided by your 12V rail on your power supply, then figure out how to lower the voltage between the counter and the coin-switches, you should be able to work this out.

In the end, it might be easier if you were to get a brand new coin-meter.  They are only about $10 or so and you'll also get one that is set at zero. 
Donkey Kong High Scores:
1): 49,500
2): 35,600
3): 30,100
4): 29,400
5): 28,200