Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: JoyMonkey on May 24, 2005, 11:36:00 am
-
I've got these cathode lights hooked up behind my cocktail cabinet's control panels, they work great, but I'd like to add a relay so they only light during gameplay. I can use an AdvMame script to set the Scroll Lock LED to only light up when a game is being played.
My question is how do I get the scroll lock LED to control the cathode light? What kind of relay do I need?
-
I would use a SPST relay, but a SPDT or DPDT would work fine also. It will need to switch off of a 5V supply but it will need to draw a low amount of current, I would find one that is rated at a nominal wattage of 200 milliwatts or so. As far as the current flowing thru the relay to your cathode lights, a rating of 1 amp should be fine.
-
Do you think this relay (http://www.radioshack.com/product.asp?catalog%5Fname=CTLG&category%5Fname=CTLG%5F011%5F002%5F013%5F000&product%5Fid=275%2D232&MSCSProfile=745D84CBF04D14A48AA6FF9C89D722C0BA68C1B04FE384678A5285FCD6E056B17AF21627FDABE316B90B3C038D68EBD6B7F9F3BD1712EAA9951ACB2590A05C6517EFE46941FEFDD1985D4EFD6321F5E70B4DE9B6C1D45512DCD9FB3DBCACB947C1F58ECBBD95B8379168CF4CABBD45ECE5286039345577CBD7EA1BC1C4730DDFF1BA4D4DCFA4E441) would do the trick?
Sorry, I'm a little clueless when it comes to this electronical lark.
-
That should be perfect.
-
Cool. Thanks!
-
Isn't this really a job for a transistor?
-
You should probably be using a relay AND a transistor. Driving a relay from the keyboard lights will probably destroy the LED driver circuitry eventually.
-
Sorry to butt in on this thread but is it possible to have a relay do a push button action (short 2 pins) for a second then go back to normal when 12v is applied?
Like say i turned on a 12v device can a relay short the power button pins on my pc for 1 or 2 seconds then stop shorting them while the 12v stays on?
-
No, not without inventing some kind of RC charging circuit to cause a delay. You're on your own for this one. And please stop jacking threads.
I second the transistor idea. Have the transistor amplify the current from the LED, and then use that to drive a relay. My guess is that the lamp is 10 watts or over, in which case I would not drive it directly from the transistor. That should keep you out of trouble.
-
You should probably be using a relay AND a transistor.
-
You should probably be using a relay AND a transistor.
-
You should probably be using a relay AND a transistor.
-
Alright, I'm going to try and take this a step further. I thought that seeing as how I'm using the CAPS and NUM LED's anyway, I might as well make up a modified LED board from Oscar's LED Driver Board diagram (http://www.oscarcontrols.com/led/). The only problem is, I'm still electronically challenged.
Here's a drawing of what I've got so far. The idea is that when the IPac sends the Scroll Lock signal, the relay sends 12V.
I was about to finish this diagram when I had a major brain-fart. Where does the 5V go after it passes through the relay?
And does the rest of this diagram make sense to anyone?
Edit: I shot the 5V out of the relay into an LED just for the hell of it (kind of makes sense in my tiny brain)
-
I put this thing together last night- only problem is, I'm a little worried that I wired the relay completely arse-ways so I don't want to test it out until someone says it looks right. Can anyone confirm that the above diagram should work?
There was a wiring diagram on the reed relay's package, but it didn't make any sense to me; so I'm a little worried that I might have the 5V going into the relay where the 12V should be and vise versa :'(
-
Anyone? ???
-
Scan the diagram for the relay. I can't find it online.
RandyT
-
Good idea. Here's the relay's diagram...
-
That's a good start.
Now, are there any labels on the relay at all ?
If so, post what pin does what.
RandyT
-
yeah, if oyu can get t he marking of the relay that would help.
With my assumption on how relays work.. You send the required voltage through the coil, it creates a magnetic force which "flips the switch" for the NO circuit.
So if I read that pic correctly it can take up to 125V to flip the switch for a 5v rated switch? or do I have that backwards?
Err, got it backwards, just read the specs on RS's site.
-
That's a good start.
Now, are there any labels on the relay at all ?
If so, post what pin does what.
RandyT
Unfortunately, there are no markings on the relay itself. Here's the photo from the RS website (don't think it's very helpful though). I looked all over for markings and found nothing.
-
Do you have a meter?
You should get continuity between the 2 coil leads.
RandyT
Why didn't I think of that!!???
I checked and AB is closed, CD is open
So this means I've got it wired correctly, right? :o
-
Would it also be wise to put a diode across the switch of the relay to not allow feedback on that circuit?
I have to find my parallel port circuit again when I was looking at making my qbert knocker. There was a spike protection circuit on it because relays are notorious for creating spikes when triggered.
-
Would it also be wise to put a diode across the switch of the relay to not allow feedback on that circuit?
I have to find my parallel port circuit again when I was looking at making my qbert knocker. There was a spike protection circuit on it because relays are notorious for creating spikes when triggered.
That's what the diode is there for. IIRC, when power is removed from a coil, the magnetic field collapses and a spike can feed back and damage the circuit.
I think these are referred to as "snubbing" diodes.
(apologies to the EE types if I explained this wrong.)
If you were driving a solenoid (another coil) with the relay, a diode on the switched line would probably be a good idea to help protect the PC power supply. I don't think a CCFL is an inductive load, so it's probably not a problem here.
RandyT
-
Right, but I thought (I need to find that schematic) there was a diode or some sort of spike protection on the switch because when that switch is closed a spike can occur.
I know the diode across the coil is there to prtoect feedback from the coil.
Thinking about it, wouldn't a capacitor inline on the switched circuit supress spikes?
-
Right, but I thought (I need to find that schematic) there was a diode or some sort of spike protection on the switch because when that switch is closed a spike can occur.
That would probably be for inductive loads. I updated my post while you were typing ;)
RandyT
-
You are limiting current with the resistor on the other side of the coil because you haveoyn series with the LED. so make sure that the value is proper to run both the LED and the relay. I think the relay needs 20ma from the specs I looked up.
Also, make sure the LED is connected properly. If it's backwards, the relay won't work.
RandyT
Thanks for all the help Randy!
One last question (then I'm done, I swear). I'm not too good at figuring correct resistor values, so what if I removed that resistor and LED completely, what would I connect relay point B to on the LED driver circuit?
-
Thinking about it, wouldn't a capacitor inline on the switched circuit supress spikes?
A capacitor will help to protect the contacts of the relay by reducing the arcing that can occur when the contacts are opened and closed a lot.
This is usually only a problem when there is a lot of current flowing through the contacts.
RandyT
-
Cool, tha tmakes sense.
So, to answer my other question. This is the relay I need if I want something from my computer, which most likely will be a 5V source, to trigger the 27V pinball solenoid?
There's a radio shack on my way home. I might see what they have for power supplies too...
-
One last question (then I'm done, I swear). I'm not too good at figuring correct resistor values, so what if I removed that resistor and LED completely, what would I connect relay point B to on the LED driver circuit?
You may want to put a current limiting resistor in between the B connector and ground. I'd try about 150ohm for starters and see if it works. It may not be necessary, but I don't know enough about that relay to know for sure. The specs I saw called out a 20ma switching requirement, so limiting it to something around there would probably be a good idea.
BTW, don't blame me if it goes *poof*, this info is "AS IS". But I'm telling you what I would do in this situation and would be comfortable doing ;).
RandyT
-
Cool, tha tmakes sense.
So, to answer my other question. This is the relay I need if I want something from my computer, which most likely will be a 5V source, to trigger the 27V pinball solenoid?
There's a radio shack on my way home. I might see what they have for power supplies too...
According to the specs on the relay (for some reason, I think the ones you posted are different than the ones I got from the RS website) it should be fine. But I would recommend the diodes and a capacitor for that setup. You'll be driving an inductive load with a fair amount of current, so better safe than sorry.
RandyT
-
Thanks Randy! Once again, you're my hero! :P
-
Make sure you go back and re-read some of the posts. The edits were flying on this one ;)
RandyT
-
Cool, tha tmakes sense.
So, to answer my other question.
-
One last question (then I'm done, I swear). I'm not too good at figuring correct resistor values, so what if I removed that resistor and LED completely, what would I connect relay point B to on the LED driver circuit?
You may want to put a current limiting resistor in between the B connector and ground.
-
This particular relay is only rated at .5amp. Depending on how much your pinball solenoid draws you may need something rated a little higher.
Here's the "other" spec sheet on that relay:
Compact 1-amp SPST Reed Relay
(275-0232) Specifications Faxback Doc. # 35144
Coil: ......................................................... 5 VDC
Coil Current: ................................................. 20 mA
Pick up Voltage: ...............(70% max)................... 3.75 VDC
Drop Out Voltage: ...............(10% min)................... 0.5 VDC
Max. Voltage: ............................................... 7.5 VDC
Coil Resistance: ........................................... 250 Ohms
Temp. Rise: ........................................ 30 degrees C Max
Operate Time: .............................................. 1.5 mSec
Release Time: .............................................. 1.5 mSec
Service Life: ............................ 5,000,000 Operations @ 1 A
Contact Rating: ............................................... 1 Amp
1 Watt
125 VAC
Contact Resistance: .................................. 150 milli Ohms
(EB 10/25/96)
It shows a 1-amp at 125volts AC rating for the contacts. Maybe the half amp rating is for DC?
But based on the other specs, I stand corrected as it appears to handle even less than .5 amp. It calls out the power switching spec at only 10 watts!
That would mean that the 30v solenoid (if that's the voltage the solenoid is driven with) could draw only 1/3 of an amp to be used with this relay. But without knowing the specs of the solenoid, it's hard to say what it draws. There's also the fact that the solenoid won't really be doing any "work" as a "knocker", just slamming into the wood to make a noise. So, the current used would just be enough to momentarily push the rod out of the coil. I think the current requirement goes up with higher resistance againt the actuator, but this stuff isn't my forte' :)
RandyT
BTW, SirP, will gravity be used to reset the rod or is there a spring loaded return?
-
BTW, SirP, will gravity be used to reset the rod or is there a spring loaded return?
See the pic in my qbert thread
http://forum.arcadecontrols.com/index.php/topic,37834.0.html
I can get all the text off the knocker. I don't think anything about specs was on it.
I will have to ask OscarControls and 1UP where they got it from.
Long story about the knocker. I think it started in the hands of Kelsey (OscarControls) when I was first talking about this a couple years ago. I said I'd do the software side (urebelscum was going to include it into analog+ mame) if he did the hardware. Well, busy guy he is he handed it off to 1UP. 1UP, I suspect, was busy planning his cabinet venture. So he now sent the knocker ot me.
If I remember that's how the story goes, but it has been going VERY slow over the last couple of years :)
Hey Randy, not to get off topic, but have you looked at the dartboard thing some more?
-
Doing a quick search all the pinball supply places carry it, but don;t list specs :(
All I could find is
http://members.shaw.ca/cfpinball/gottliebcoil.html
-
I just tried out the circuit and I've got a problem (hopefully nothing major).
Right now I've got it wired just like the cut-n-pasted diagram above; I hooked up a 150 ohm resistor and a random LED to point B - and they work fine when I hit Scroll Lock, but the relay isn't giving me 12v like I expected. I checked all my connections and everything appears fine.
Could I have picked the wrong resistor? Should I try a higher or lower value resistor?
I was delighted when the LED lit up, but now I'm stumped. :'(
-
I just tried out the circuit and I've got a problem (hopefully nothing major).
Right now I've got it wired just like the cut-n-pasted diagram above; I hooked up a 150 ohm resistor and a random LED to point B - and they work fine when I hit Scroll Lock, but the relay isn't giving me 12v like I expected. I checked all my connections and everything appears fine.
Could I have picked the wrong resistor? Should I try a higher or lower value resistor?
I was delighted when the LED lit up, but now I'm stumped. :'(
First thing, disconnect the 12v lines from the relay. Energize the circuit and check for continuity through the switching part of the relay (where the 12v lines were) No continuity means the relay isn't working.
Popcorrin says you shouldn't need a resistor in there (except for the LED) so I would try taking the LED and the resistor out of the circuit and take pin B straight to ground. There might be a voltage drop or something that the relay doesn't like.
Something to try, anyway.
RandyT
-
First thing, disconnect the 12v lines from the relay. Energize the circuit and check for continuity through the switching part of the relay (where the 12v lines were) No continuity means the relay isn't working.
Popcorrin says you shouldn't need a resistor in there (except for the LED) so I would try taking the LED and the resistor out of the circuit and take pin B straight to ground. There might be a voltage drop or something that the relay doesn't like.
Something to try, anyway.
RandyT
Okay...
There's no continuity in the relay's switch. I removed the LED and resistor and I've still go the same result.
Could it be the transistor I'm using? I just used what I had at hand (a PNP to 92 transistor 2N3906) which is different to the one's that Oscar uses in the LED driver circuit (http://www.oscarcontrols.com/led/), but he does say that any general purpose PNP transistor should do.
What happens if I take the 1k resistor out of the equation?
Edit: Just for clarity, here's what I've got right now
-
Could it be the transistor I'm using? I just used what I had at hand (a PNP to 92 transistor 2N3906) which is different to the one's that Oscar uses in the LED driver circuit (http://www.oscarcontrols.com/led/), but he does say that any general purpose PNP transistor should do.
What happens if I take the 1k resistor out of the equation?
The relay doesn't take much power to actuate it, so I don't think it's the transistor. The 1k resistor should stay in place as well.
About the only thing I can think of to do at this point is swapping the A and B connections. I know a coil doesn't care about polarity, but the diode across the contacts throws in something different that I'm not fully versed in. The way it's wired right now, the diode appears that it would be conducting, which might be creating a short circuit. If you wire it the other way, current should only be able to flow through the coil.
Remember, "AS IS" info :)
RandyT
-
I'll try flipping the diode around tonight. Thanks!
(I wish I made this thing on a breadboard first)
-
I removed the diode and the relay is working great now!
I haven't had the chance to put it back on in the opposite position, but do I really need it?
-
I removed the diode and the relay is working great now!
I haven't had the chance to put it back on in the opposite position, but do I really need it?
No clue. You probably want to ask the guy who designed the circuit ;)
I'm pretty sure it was there to protect the other circuitry from spikes and such. I'd flip it around and put it back just in case. It isn't huting anything by being there, you just had the polarity reversed..
RandyT
-
Flip it around, make sure it works in that position, and leave it there.
The coil is an electro-magnet, and having a current through it "energizes" it, or creates a magnetic field. When you suddenly stop the current, the field collapses, creating a current. This back EMF consists of a big single spike. The diode just acts as a mini surge suppresor.
-
Flip it around, make sure it works in that position, and leave it there.
The coil is an electro-magnet, and having a current through it "energizes" it, or creates a magnetic field. When you suddenly stop the current, the field collapses, creating a current. This back EMF consists of a big single spike. The diode just acts as a mini surge suppresor.
ShinAce,
Since you are an EE type, could you please tell me how that diode in parallel with the coil prevents back feed? I would have thought that to do that, it would have to have been in series, not parallel (which is why I said to ask the guy who designed the circuit)?
Just hoping to learn something from this one myself. :)
Thanks,
RandyT
-
If the diode is in parallel, we have 2 possible cases.
1) Current is flowing through the relay coil in the proper direction(with respect to the diode, since the relay has no sense of direction), and the diode is basically not even connected.
2) Power is interrupted to the coil, yet it wants to get rid of its stored energy really quickly. In this case, the diode acts as a resistor(nearly a short circuit, actually), absorbing the load.
If the diode were in series, it would allow the relay to work properly. But when the power is turned off, I don't know what will happen. I'm guessing here, but my gut feeling is that it will PREVENT surges, instead of absorbing them. Which sounds great, but that energy still needs to go somewhere, and you're not letting it do that.
BTW, in case 1), if the diode is wired backwards, the relay will not engage, and you are basically faced with a short circuit scenario. The diode will not enjoy this.
However, I've used diodes as temperature sensors, and took a lighter to them when testing. At 200 degress celsius(internal temp of the diode), the diodes will still work. I'm sure you've heard that passing power through a diode will cause about a 1/2 volt loss. That loss is temperature dependant. At higher temperatures, the voltage drop becomes lower. That's right, diodes work better when they're hot.
-
I just flipped the diode around and sure enough it works perfectly now! Even with the resistor and LED included! Yaaayyy!
Thanks Randy, Popcorrin and ShinAce for holding my hand through this- couldn't have done a thing without you!