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: Q*Bert + MAME + Knockers  (Read 32925 times)

0 Members and 1 Guest are viewing this topic.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #40 on: February 28, 2011, 02:22:36 am »
If you need a 24V supply, Marlin P Jones & Assoc. is currently running a sale.  Item # 18235-PS is a 24V/2.5A SMPS for only $12.95.  www.mpja.com

ids: Note that milhouse did post a link to a large SSR for a reasonable (though still higher than the cost of the components in my circuit) price earlier in the thread.  Digi-Key is not usually the cheapest place to get that sort of thing, though they are reliable.  Likewise, you can probably also find the components for my circuit cheaper elsewhere (feel free to sub the opto and the darlington for comparable parts).

Do not forget the diode across the coil (anode to the grounded side, cathode to the supply side) to prevent damage to the transistor.  1N400x series should be fine.
« Last Edit: February 28, 2011, 02:27:08 am by MonMotha »

milhouse

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:March 02, 2023, 08:03:32 pm
Re: Q*Bert + MAME + Knockers
« Reply #41 on: February 28, 2011, 07:45:50 am »
I'm not really looking to build and sell, but putting it together is pretty trivial.

Requirements:
  • Q*Bert Knocker Assembly, available here, or build your own out of a pinball solenoid.
  • 30V DC Power Supply (I used one I had lying around from an old unused cable modem)
  • Solid State Relay (I used this one)
  • LedWiz or PacDrive or any output device supported by Mame Hooker
  • Mame Hooker

Run a wire off the 12V (yellow) wire from a standard PC hard drive power connector to the Input (+) connection on the Relay.  This wire should also have a 500mA fuse installed in-line.
Run a wire from the Input (-) connector to any available port on the LedWiz.
Cut the DC power supply plug off and, after checking the polarity, connect it to the Relay (+) and (-) connections.
Install Mame Hooker and run Q*Bert, jumping off the board so the knocker, in theory, triggers.
Edit the qbert.ini file generated by Mame Hooker (Knocker0 is the output) and add the appropriate code (will post later as I don't have it in front of me).

Am I blind or did you leave out where to hook up the solenoid? Sorry, it's 4am.

Not blind.  Should be:
Cut the DC power supply plug off and, after checking the polarity, connect DC (-) it to the Relay (-) connection and DC (+) Solenoid (+) (the line with the solenoid in-line fuse).  Connect the Solenoid (-) to the Relay (+).  The + path of the DC power should go 1. into Solenoid (+) (fuse) line; 2. out of Solenoid (-) to Relay (+); 3. Relay (-) back to DC Power.


ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #42 on: February 28, 2011, 01:24:17 pm »
MonMotha - I did see the link for the cheaper SSR, but shipping it to Canada gets expensive.  The DigiKey parts, plus shipping, still works out much better (threw in some other odds'n'ends since shipping is a flat $8 either way).  Your comment about subbing for comparable parts seems to assume I have some inkling of what I am doing - sorry, haven't a damn clue.  I'm just following your schematic, and hoping not to injure myself or burn the house down.  ;D

I've recreated the schematic, adding a fuse where I'm guessing it belongs, the diode across the solenoid (as mentioned), and changed voltage to 28.  Validation would be hugely appreciated.

I'm going to check some local shops for power supplies.  Otherwise, I'll see what MPJA offers for shipping up this way - thanks for the link.



afaik, the voltage for the fuse is not very important, so long as it is greater than the supply - is that right?  e.g. I can use a 120/240VDC fuse, no problem?

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #43 on: February 28, 2011, 01:59:52 pm »
Your schematic looks good.  I'd change the notation on the GND (-28V) node, as that may imply that it's an actually -28V node (and the supply is +28V).  That ground is "the ground from the 28V power supply", which I think you've got down, but the schematic may be a bit misleading for anyone who sees it in the future.  I see that you also corrected the pin numbering on my optoisolator :)

Yes, the voltage on the fuse is relatively unimportant as long as it's higher than what you're working with.  Somewhat like capacitors, the voltage rating on the fuse is a "most it can handle" type thing.

It may be necessary to decrease R3 some for reliable operation.  You can go all the way down to 100 ohms if necessary.

ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #44 on: February 28, 2011, 04:04:30 pm »
Thanks a lot for the feed back - diagram updated.  Prior post should show new schematic (refresh your browser if not).

I found a 24V/1.6?A supply nearby (didn't change diagram to reflect it, however).  Hopefully that will be enough to power the coil.  Got some 120V/1A fuses.  And, my DigiKey order has arrived.  You'll know when the knocker arrives as I'll be unable to post updates from the hospital ;D

ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #45 on: February 28, 2011, 04:17:28 pm »
One more (last?) thing.  I googled to see what gauge wire is good for the 24V/1A supply.  First relevant link was this: http://www.epanorama.net/documents/wiring/wire_resistance.html

About mid-way down, is the Copper wire resistance table.  If I'm reading that right, then 24 gauge should be enough.  Fortunately I have a lot of that handy (or is it 22 that I have?  I'm good either way).  I'm thinking this table is the right one, as house wire is typically 14gauge for a 15 amp line and 12 gauge for 20A, which matches this table perfectly.

Thanks again everyone for all the info!

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #46 on: February 28, 2011, 09:00:20 pm »
Typical rule of thumb for arcade applications is that you should use 22AWG for signals and 18AWG for power.

In this case, 22AWG should be fine, especially if your runs aren't more than a few feet, but it never hurts to use something larger (note: lower AWG numbers are larger wire).  I don't know that I'd use 24, simply because it's so small it can break easily when subject to vibration and rough handling (like, say, a knocker firing all the time), but it shouldn't be a big problem electrically.

ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #47 on: March 01, 2011, 12:28:09 pm »
Sorry - one more question: for the resistors, what Wattage?  I realize I've been stuffing in the ones I use for LED's (1/4 Watt) - they are probably not going to cut it, especially on the coil side of the circuit (but what the hell do I know?)

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #48 on: March 01, 2011, 03:47:43 pm »
The only resistor that sees any power is appreciable R1.  It'll actually burn about 1.5W when it's on with the 500 ohm value shown currently.  Rule of thumb is to double the actual power in the resistor to get the rating, but given the low duty cycle, you'll probably do fine with a 2W.

You can increase it substantially to bring this power down, but going too far will leave the transistor in the linear region and blow it up :)  I erred on the very conservative side making sure the transistor would be "very on" not knowing what the knocker current (amperage) was originally.  If the knocker is only about 2A or less (which it sounds like it is), you can very safely bump R1 up to a 2.7k resistor.  At 2.7k, R1 will burn a little over a quarter watt, so use a half watt resistor.

R2 and R3 can be quarter watt.  100 ohms is a little low for R3 (and puts it right at 1/4W), but it should be fine.  I'd probably make it closer to 270 ohms.  That's about right given the 2.7k above and a ~1:1 optoisolator.  R2 can stay 10k in any case.

ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #49 on: March 01, 2011, 04:46:27 pm »
Sorry to OP for hijacking thread - I really want a Q*Bert knocker too  :cheers:

Many thanks again to MonMotha - if I got it all straight, the following is the final diagram (also added B/C/E labels on Q1).  Hopefully others will find this useful.



At this point, I have most of it laid out on a breadboard.  When I get the solenoid and a few new resistors, I'll be able to test and then solder up the final circuit.

Thanks.

milhouse

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:March 02, 2023, 08:03:32 pm
Re: Q*Bert + MAME + Knockers
« Reply #50 on: March 01, 2011, 05:19:11 pm »
As promised, here is the code I use in mamehooker:
Code: [Select]
[General]
MameStart=
MameStop=
StateChange=
[Output]
Orientation(\\.\DISPLAY1)=
knocker0=lwp 1 16 100,lws 1 16 1,wat 5000,lws 1 16 0

The knocker is on LedWiz-1 connected to Port 16.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #51 on: March 01, 2011, 05:35:32 pm »
Looks good to me.  Again, you may need a heatsink on the transistor.  Depends on how long you use it and long it's on vs. off (the so-called "duty cycle").  Radio Shack sells, or at least used to sell, various TO-220 heatsinks.

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=HS112-ND or similar is a decent option.  I think Allied Electronics may sell these, too, and probably at a lower cost.

whammoed

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2307
  • Last login:Yesterday at 09:24:35 am
  • Crack don't smoke itself
    • NiceMite
Re: Q*Bert + MAME + Knockers
« Reply #52 on: March 01, 2011, 05:59:06 pm »
Here's a page with a mame q-bert knocker.
Don't know why he took it off his site, or maybe it just moved.  Anyway, found in with the wayback machine.
http://replay.waybackmachine.org/20080916190048/http://www.johnsretroarcade.com/hardware_knocker.asp

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #53 on: March 01, 2011, 07:53:02 pm »
The circuit in the above link assumes your control output can source current and is a good option if that's the case.  The LED-Wiz and similar devices can only sink current, so the NPN low-side switch is not an option, necessitating the use of the PNP high-side switch discussed earlier in the thread.  The cap across the transistor is something of a snubber device and, while probably not mandatory, isn't a bad idea in either case.

(Of course, there are a million ways to do this)
« Last Edit: March 01, 2011, 08:01:01 pm by MonMotha »

ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #54 on: March 09, 2011, 09:03:33 pm »
Fuse blew after a few test runs.  I'm actually using a 36V supply (DMM says 36.3V) rated at 1.7A (the supply i mentioned earlier turned out to be a dud).

So I'm stumped.  Set DMM to measure Amps, and bypass fuse - not sure how much the rest of the circuit could handle, so I've keeping it on only for very brief moments (less than a second).  The DMM takes time to catch up, it seems, but I saw it go as high as 1.4A.

I'm guessing a resistor could be used to limit current here - but what is the criteria for choosing one?  Or is there a better solution?

Some pics...

Circuit (diode not visible, but it's there)


Solenoid (also has a diode, kinda redundant i think, but safe)


Power supply - 36V, 1.7A - I think it was for a printer or something, dont care, was cheap



whammoed

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2307
  • Last login:Yesterday at 09:24:35 am
  • Crack don't smoke itself
    • NiceMite
Re: Q*Bert + MAME + Knockers
« Reply #55 on: March 09, 2011, 10:43:21 pm »
You would need a 1 amp slo blo fuse for 30v supply.  Not sure if that would change for higher voltage.  Note the slo blo (time delay).  It is important.  A regular fuse at 1 amp will blow.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #56 on: March 09, 2011, 11:31:23 pm »
Yes.  The coil will initially spike at several amps.  A normal "quick" fuse will blow.  You want a time delay or slow blow fuse.  Also probably a good idea to drop that supply to a 28 or 24V.  36V will just raise the spike even higher and may even run out of the range of what the transistor can handle without biting it.

milhouse

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:March 02, 2023, 08:03:32 pm
Re: Q*Bert + MAME + Knockers
« Reply #57 on: March 09, 2011, 11:36:23 pm »
I can confirm that a 1A fuse will blow.  I went through 4 or 5 until I switched to a slowburn which has now lasted over a week with daily use.  It even survives LedBlinky's startup animation which causes it to fire 3 times in rapid succession.

ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #58 on: March 10, 2011, 08:35:56 am »
Thank everyone.  I do have slow-blow fuses.  I should have mentioned how I am testing - it's by hand, not via LED-Wiz.  It seems that if I connect it very briefly, it's ok.  A bit longer and the fuse blows.  A bit longer than that (and without the fuse) and the power supply itself shuts down (unplugging it seems to reset it).  So I am wondering if this will be an issue once it's driven from the LED-Wiz, which should be providing a very brief "on" time.  Alternatively, perhaps a resistor to control current flow?

Thanks

whammoed

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2307
  • Last login:Yesterday at 09:24:35 am
  • Crack don't smoke itself
    • NiceMite
Re: Q*Bert + MAME + Knockers
« Reply #59 on: March 10, 2011, 10:18:22 am »
Maybe just get a proper supply instead.
I have tested with this and it is inexpensive and effective:
http://www.mpja.com/prodinfo.asp?number=17186+PS

ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #60 on: March 10, 2011, 12:19:46 pm »
MPJA wants too much coin to ship to Canada, but I did have that exact unit in my cart for a while.  Was your testing via an LED-Wiz (or equivalent), or by hand, as was mine?  It seems that a very quick "on" time is not a problem, so a pulsed signal from some controller is probably fine, and will always be fine.  I used a 5V wall wart to trigger the circuit; +5V screwed in, and touching the Ground/Negative to the appropriate terminal (on the green screw-terminals in my picture above).  The longer I held it, the more problematic it became.  I was hoping for a more technical/electrical discussion/solution - as electronics is not my strong point.  From my standpoint of ignorance, and the fact that the coil is showing me only 4ohms of resistance, it would seem that a fair bit of current could be drawn here.  If Ohms law applies, 36V/4Ohms = 9A, and the linked power supply: 28V/4Ohms = 7A.  Looking at the schematic (see above), I would assume the only other resistance, apart from negligible amounts from the wiring, in terms of driving the coil, could possibly come from the Darlington.  However, reading the spec sheet for that (http://www.fairchildsemi.com/ds/TI/TIP105.pdf) I see "high DC current gain".  While it does show resistors as part of its internal circuitry, it does not list any value with Ohms elsewhere in the spec, so I'd assume, given this and the statement "high DC current gain," that if anything, it's more like anti-resistance (I'm sure people in the know are laughing at me now :-[ ).

I believe this circuit, as conceived by MonMotha, can handle a good deal of Volts and Amps, however, this thread also contains notes of using a 1A slow blow fuse.  I'm just trying to get my head around how this all comes together - and perhaps if being driving by a quick pulse from a controller is all I need to resolve this.


Thanks.

whammoed

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2307
  • Last login:Yesterday at 09:24:35 am
  • Crack don't smoke itself
    • NiceMite
Re: Q*Bert + MAME + Knockers
« Reply #61 on: March 10, 2011, 12:33:05 pm »
I played around with it both manually and by triggering it with MAME and the parallel port.  It took at least several seconds manually triggering for the 1amp slow blow to go.  I'll take a measurement of the knocker coil I have tonight.  It's an actual Q-Bert knocker.
Might be better to use a different coil than to find the right resistance and wattage resistor if you keep having trouble, but it will probably be ok once you put in the slow blow fuse.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #62 on: March 10, 2011, 09:32:12 pm »
The circuit you build should be good to about 7 amps, though the transistor will get quite warm if you leave it on all the time and probably needs a heatsink.

Ohm's law doesn't perfectly apply to this situation.  The coil is very inductive.  This means that quick on/off pulses won't have a chance to ramp the current all the way up to the 7A+ that you calculate using ohm's law, but in "steady state" operation (i.e. leaving it on for a long time), the only thing to limit the DC current is indeed the coil's resistance, so it'll eventually get up there.  Short pulses may only see an amp or two, which is why a slow-blow 1A fuse is about right.

There is also an initial spike due to the secondary capacitance of the coil, and that's even harder to model, but it's also fortunately not likely to be a big deal as it's a fairly minor effect.  Again, the slow-blow fuse is appropriate.

You don't want to size the fuse all the way up to the 7A because the coil itself probably can't take that for very long.  It will get quite warm and may melt the enamel insulation off the wire that forms the coil resulting in an internal short.  If the coil accidentally gets left on for more than a little bit, you WANT the fuse to blow to protect the coil, transistor, and power supply.

I would recommend reducing your supply voltage down to about 24-30V and stick with a 1A slow blow fuse.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Q*Bert + MAME + Knockers
« Reply #63 on: May 02, 2011, 01:07:03 pm »
Sorry for not chiming in  (I don't check the main forum as much).  Somebody brought this thread to my attention.

Your script command is slightly incorrect....

"knocker0=lwp 1 16 100,lws 1 16 1,wat 5000,lws 1 16 0"  Will fire the knocker if it is on OR off.  It fires when the game starts up yes?  Not supposed to do that.  ;)

If you need the wait command to get the knocker actiavtion just right you need to tell mamehooker to do nothing when the state is off... so use a vertical bar to divide and states and a nll command for state 0 (first slot)

something like this:

knocker0=nll |lwp 1 16 100,lws 1 16 1,wat 5000,lws 1 16 0


HOWEVER

My guess is that if you set it up properly this won't be needed.

Let's use the vertical bar to ix it
It should probably look like this:

knocker0=lwp 1 16 0,lws 1 16 0|lwp 1 16 100,lws 1 16 1

I'll be honest though.... I don't have a clue why you are messing with the lwp command AND the state command.  The way ledwizzes work when you set the power level to anything other than 0 the state is automatically turned on.  But I don't know how the ledwiz handles relays, so you might know best.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Q*Bert + MAME + Knockers
« Reply #64 on: May 02, 2011, 01:12:18 pm »
Btw... as for your circuit... the fuse is the redundant (and useless) part.  The diode is absolutely necessary and is what will save your device. 

That much current going into a pc will instantly fry it and fuses, due to their analog nature, don't blow quick enough to prevent that.  The diode will take care of the back-flow voltage though and that's a more constant danger.


ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #65 on: May 02, 2011, 01:18:34 pm »

just before I could hit post, Howard responds...oh well, I went through the trouble of typing this, I may as well post it:


I finally got around to installing the knocker and  MameHooker, then did a quick lookup for this thread, and in particular, this entry:

As promised, here is the code I use in mamehooker:
Code: [Select]
[General]
MameStart=
MameStop=
StateChange=
[Output]
Orientation(\\.\DISPLAY1)=
knocker0=lwp 1 16 100,lws 1 16 1,wat 5000,lws 1 16 0

The knocker is on LedWiz-1 connected to Port 16.


I tried this and found it doesn't work as I expected.  Different versions?  Anyway, what I've learned:
  • The last value for "lwp" should be <= 48 for most uses, tho 100 seems to work anyway
  • The comma separated list of commands is sent each time state is changed, so it runs twice; when Mame turns on the knocker, and again when Mame turns it off.
  • The 5s wait seems kinda long to leave the solenoid on for, but ymmv

I got a lot of great help from "Howard_Casto" - a much simpler entry (last line of your file) would be:
Code: [Select]
knocker0=lws 1 16 %s%
The "%s%" will be replaced by the state sent from Mame - so in the case of the Q*Bert knocker, it will run twice in quick succession, turning it on, then off.

One more small point for anyone else trying MameHooker for the first time  -- each time you run Mame with a new game, MameHooker will create a game specific ini file in it's ini directory.  If you want to set this up and haven't yet run Mame + MameHooker + the rom (e.g. qbert) - simply create a file in the ini dir called, for e.g., "qbert.ini" to hold this info, for e.g.
Code: [Select]
[General]
MameStart=
MameStop=
StateChange=
[Output]
Orientation(\\.\DISPLAY1)=
knocker0=lws 1 16 %s%

Replace the "16" with the LED-Wiz pin number you wish to control.


fwiw, in my circuit, the fuse is really protecting the knocker and the power supply for it - these are isolated from the PC via the opto-coupler - thankfully, as I accidentally left that pin high on the LEDWiz recently; fried the fuse rather than my PC/LEDWiz.


MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #66 on: May 02, 2011, 08:59:29 pm »
Btw... as for your circuit... the fuse is the redundant (and useless) part.  The diode is absolutely necessary and is what will save your device.  

That much current going into a pc will instantly fry it and fuses, due to their analog nature, don't blow quick enough to prevent that.  The diode will take care of the back-flow voltage though and that's a more constant danger.

The diode is there to protect the switching transistor from the inductive voltage spike and is generally required, yes, though omitting it will just (possibly substantially) shorten the lifespan of the big transistor.

The fuse is there to prevent a FIRE due to overheating of various things (power supply, solenoid, etc.) if something goes wrong.  Depending on your power supply it may or may not be strictly necessary.  I wouldn't take such chances over a dollar worth of parts that are so easy to install.

The fuse is also likely to prevent damage to the solenoid due to overheating (which may or may not be enough to catch it on fire) if you were to accidentally hold it on for a long time.

Given that there's an optoisolator between the power side and the signal side, I don't think there's any worry whatsoever about damage to the PC.  If you've got enough potential to break down the isolation gap on those things (easily good to a kV or so),  you've got bigger problems.
« Last Edit: May 02, 2011, 09:02:34 pm by MonMotha »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Q*Bert + MAME + Knockers
« Reply #67 on: May 04, 2011, 08:25:42 pm »
Well if a solenoid is activaed with the proper voltage/amperage it should be able to stay on indefinately without fear of overheating or fire.  This is why you don't have to worry about your washing machine catching fire even though a solenoid value is held on for several minutes while it fills with water. ;)

I'm a big fan of redundancy, so I would probably use a fuse as well... couldn't hurt, my comment was in response to you downplaying the diode, which in imho is the most important part.  Seriously which would you rather damage?  A hacked laptop powersupply and a crappy old solenoid or your 40 dollar ledwiz and potentially your usb port and entire pc?

ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #68 on: May 04, 2011, 09:57:52 pm »
afaik, solenoids have rated duty cycles and max. on times to avoid overheating and other problems (some can be always on).  I had assumed that the valve types, as you mention (and like the one I recently replaced in my dish washer) are designed for the duty cycles and on-times they receive..  However, a qbert (pinball) knocker is activated for very, very brief moments, and not very often.  Such a device is not necessarily designed to remain on very long.  Also, as I understand things, a solenoid will offer very little resistance after the inductance settles, and so controlling current (amps) can be an issue.

Here's an example of several duty rated solenoids: http://media.digikey.com/pdf/Data Sheets/Pontiac Coil Inc PDFs/M-22.pdf

Note in the linked spec sheet the Pulse rated one says On for 100ms, Off for 900ms.  I'm assuming you'll run into problems if you push it a lot harder than that - even with proper voltage, etc.  It's just a property of its construction.

Of course, a fuse, whether redundant or not, is always good.  I've blown several, so it's been good having it there to protect other components.  I'm blowing it partly because I don't have specs for the solenoid, and mostly because don't know what the hell I'm doing :)  Afaik, this thing is used in pinball tables at higher voltages than I'm feeding it, so maybe it's just meant to eat more current than I'm allowing for or...?  Anyway, it's been running fine for a while, thanks to many people who've contributed to this thread, MonMotha, MameHooker, etc.

also - the diode on the solenoid is a must, regardless - I think we're all agreeing on that.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #69 on: May 05, 2011, 04:16:10 am »
Well if a solenoid is activaed with the proper voltage/amperage it should be able to stay on indefinately without fear of overheating or fire.  This is why you don't have to worry about your washing machine catching fire even though a solenoid value is held on for several minutes while it fills with water. ;)

I'm a big fan of redundancy, so I would probably use a fuse as well... couldn't hurt, my comment was in response to you downplaying the diode, which in imho is the most important part.  Seriously which would you rather damage?  A hacked laptop powersupply and a crappy old solenoid or your 40 dollar ledwiz and potentially your usb port and entire pc?

While some solenoids are built to be continuously energized such as those used for failsafes to close valves and such, I wouldn't think a pinball solenoid would be rated for 100% duty cycle.  Given the steady state current draw on the thing (~7A calculated, though it might saturate lower than that depending on construction) and the fairly small wire it appears to be using, I'd suspect that the enamel would eventually melt causing shorts and increasing the current draw further (and rendering the thing useless).  Now, if your supply is reasonably sized and will shut down above a couple amps, you're probably fine, but if you've got a biggun, you might have problems.  The transistor is also not heatsinked, and, while it can handle 7A or so, it'll get pretty toasty after a while with no heatsink.  Would it catch fire?  Probably not, but I haven't done a thermal analysis on it and don't care to, so I'll pay the dollar for the fuse.

As to the lack of diode, as I suspected, there's already one on the solenoid, so it is effectively redundant.  However, even without it, the transistor specified has an antiparallel diode which will cause any kickback to be clamped pretty close to the positive rail.  Since that's well within the breakdown limit of the transistor, it'll probably be fine, which is where my downplay came from.  Now, how much your supply will appreciate it is another story...  Like the fuse, it certainly doesn't hurt to have it, and not all power transistors have it at all, so I'd recommend it always be installed.

Again, with this build, it's virtually impossible to damage anything on the "left" side of the optoisolator.  Breaking down that thing in a manner that allows any appreciable current flow would be a pretty impressive achievement, so my focus as far as protection goes would generally be on the power side.

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 6882
  • Last login:March 26, 2024, 03:33:28 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Q*Bert + MAME + Knockers
« Reply #70 on: May 05, 2011, 01:15:37 pm »
While some solenoids are built to be continuously energized such as those used for failsafes to close valves and such, I wouldn't think a pinball solenoid would be rated for 100% duty cycle. 

While mostly unrelated to the discussion, some pinball solenoids, such as those on the flippers, get full power only on the leading edge of activation.  This allows for a good, strong hit of the ball, but also allows the player to "hold" the ball almost indefinitely, without burning up the solenoid, by cutting the voltage to about half of the initial pulse.  This approach is a good one for any solenoid that needs strength to activate, but not much just to hold it in place.

Regardless, I agree that fuses are always a good idea where larger currents are concerned.  I have seen a situation in my own pinball machine where the flipper solenoid and wire insulation melted, due to the failure of a component responsible for the approach I just mentioned.

Dudeman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:December 30, 2023, 06:30:25 pm
  • Ecky ecky ecky ecky P'Tang! Zoop-boing mmmzoesm...
Re: Q*Bert + MAME + Knockers
« Reply #71 on: November 18, 2011, 07:13:11 pm »



What changes would I have to make for this to work off 1.9VDC for the control voltage? I want to try and make this work off the NumLock LED.

ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #72 on: November 18, 2011, 07:55:14 pm »
You've quoted me but I think we need someone like MonMotha to answer, as I really dont know enough to provide an answer with any confidence.  While I do have a working qbert knocker, thanks to MonMotha, MameHooker and its author, and others, I am far from knowledge about electronics - I know just enough to be dangerous.  I suspect there are chips or relays that might activate with such low voltage, but this is all beyond me.  Hopefully someone who really knows this stuff can help.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #73 on: November 19, 2011, 06:52:45 am »



What changes would I have to make for this to work off 1.9VDC for the control voltage? I want to try and make this work off the NumLock LED.

Decrease R3 to ~27 ohms and use an LTV-815 instead of an LTV-816.  If you've already got a current limiting resistor (i.e. what you have has been designed to directly drive a bare LED), then omit R3 entirely.  Everything else should be able to stay the same.

If you are trying to hook up an existing LED output that already has an LED on it, be aware that won't work right since that's a current limited source.  If you remove the existing LED and substitute instead the LTV-815's input LED, that should work.

Dudeman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:December 30, 2023, 06:30:25 pm
  • Ecky ecky ecky ecky P'Tang! Zoop-boing mmmzoesm...
Re: Q*Bert + MAME + Knockers
« Reply #74 on: November 19, 2011, 10:08:12 am »
Decrease R3 to ~27 ohms and use an LTV-815 instead of an LTV-816.  If you've already got a current limiting resistor (i.e. what you have has been designed to directly drive a bare LED), then omit R3 entirely.  Everything else should be able to stay the same.

If you are trying to hook up an existing LED output that already has an LED on it, be aware that won't work right since that's a current limited source.  If you remove the existing LED and substitute instead the LTV-815's input LED, that should work.

You, sir... are my hero.

koolmoecraig

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1433
  • Last login:April 05, 2014, 07:07:20 pm
    • My Intervention
Re: Q*Bert + MAME + Knockers
« Reply #75 on: August 18, 2012, 02:52:50 am »
Bringing this back from the dead a bit.....

I can run both the control voltage and the input voltage off of the same 12v source from the PC power supply, right?

Thanks!

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Q*Bert + MAME + Knockers
« Reply #76 on: August 18, 2012, 03:38:47 am »
Bringing this back from the dead a bit.....

I can run both the control voltage and the input voltage off of the same 12v source from the PC power supply, right?

Thanks!

You're using an SSR I take it?

You certainly can do so if your SSR is rated for 12V control (most are).

ids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 732
  • Last login:April 16, 2023, 05:43:28 pm
  • Fighter Captured
Re: Q*Bert + MAME + Knockers
« Reply #77 on: March 11, 2013, 02:30:02 pm »
Apologies for reviving such an old thread....

When I boot, this knocker goes off three times (really annoying).  I do not think it's the LEDWiz causing it, as there are no other indicators that the LEDWiz is turning anything on.  For example, no LED's flash.  This is well before Windoze is fully booted, and long before any opening animation sequence.  The first knock is during POST or thereabouts, the other two are early in windoze boot.  If it were just a single knock, I'd assume some sort of instability as the circuit is first powered up.  But three knocks?  It also knocks on power-down - but just once in that case.  IIRC, I did probe the LEDWiz output with a meter and saw nothing - though a very quick spike would go unnoticed.

Any advice/suggestions?  I do have a multimeter and scope I could apply if it will help.

mcseforsale

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1471
  • Last login:August 18, 2023, 08:49:34 am
  • Creepy Mario Dude
Re: Q*Bert + MAME + Knockers
« Reply #78 on: March 12, 2013, 10:10:35 am »
subscribed.

AJ

Bad_Bard

  • Trade Count: (0)
  • Newbie
  • *
  • Offline Offline
  • Posts: 1
  • Last login:August 03, 2014, 01:02:50 pm
  • I want to build my own arcade controls!
Re: Q*Bert + MAME + Knockers
« Reply #79 on: August 03, 2014, 01:02:37 pm »
Nice work guys!  I did this many years ago by building a custom version of MAME and using the IPAC LED interface to trigger the knocker. 

Shouldn't the Q*BERT or Coily AHHHHHHH sound cut off immediately when the knocker is triggered?  That is another modification I did to MAME and it gives a much better effect.  I'm pretty sure this is how the original Q*BERT machine works also.

Bad_Bard