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: strange wiring question  (Read 1133 times)

0 Members and 1 Guest are viewing this topic.

EggZilla

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 78
  • Last login:January 17, 2004, 04:44:20 pm
strange wiring question
« on: October 13, 2003, 09:21:22 pm »
Okay, here's one for you all, though I must admit it's only peripherally related to my actual MAME cabinet. I want to take a picture of my cab, have it printed on vellum or backlit film, and hang it on the wall. However, I also want to make a custon frame for it so that, when I press a normal arcade button mounted in the frame, an LED that I've mounted behind the frame lights up for the duration of that button press, illuminating the picture. (Please don't ask me why--I've just got an image in my head of a picture of the cab hanging on the wall right next to the actual cabinet, and I'm driven to see if I can do it.)

I'm left with two questions, and forgive me if both are naive: First, can I power a five-volt LED using a normal 9 volt battery and some resistors? If so, is it logical math, such that I can just say "9-5=4, so I need a 4V resistor?"

Secondly, could the button be wired in as part of the red, "hot" line, or would that be bad? In my mind, that's the easiest way to do it, but I don't want to fry the microswitch or shock the person pressing the button, even a little.

Thanks in advance for anyone's advice.

Cheers,

Eric
Like a bird on a wire,
  Like a drunk in a midnight choir,
   I have tried, in my way,
      To be free.
          - Leonard Cohen

grafixmonkey

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 743
  • Last login:October 16, 2010, 08:16:50 pm
  • must... tear self... away from... Tron...
    • My graphics/arcade/circuits site!
Re:strange wiring question
« Reply #1 on: October 14, 2003, 02:02:57 am »
If you're just wanting a special button that lights up that LED and that's it, then yeah it's cake.  The only tricky thing about wiring the LED to the 9-volt battery is that the 9-volt battery has an internal resistance that is difficult to figure out...  you would need to know that info to figure out the best resistor to use on the LED.  That is, you would if it's the usual kind of LED...

One thing about the LED...  you said it's a "5 volt LED".  LEDs are confusing things...  usually you don't have a "5 volt LED", you have a "20 mA LED" or a "30 mA LED" - they specify the current needed, not the voltage.  But, if you bought the LED in a little package by itself and it said "5 volt LED" on it, that usually means that the LED has an internal resistor that lets you hook it directly to 5 volts without needing any other components.  If that's the case, you're good to go - I just had to make sure there wasn't any confusion about it.

If you have the internal-resistor-5-volt-LED thing, all you need to do is put a 4v Zener diode next to the LED and you can hook it up to 9 volts.  That, or you can put five or six normal diodes in series, and put that between the battery and the LED.  Same thing.  (try six, if too dim, cut one out and use 5.)  Normal diodes are easier to get, but putting five or six in is extra work - if you can get a 4 volt Zener diode it saves you a little bit of soldering.

In terms of shocking people, you just can't do that with only 9 volts.  You can't even do it with 12 volts.  110 volts gives you a strong but not very damaging buzz in your arm, and leaves the muscles kind of twitchy for five minutes or so, so I guess somewhere in the 35 to 60 volt range is where you start feeling that there's electricity present.  However, there's several inches of plastic between the surface of the button and the microswitch, and even more plastic between the surface of the microswitch and anything connected to electricity, so even if you had the button connected to 200 volts nothing would happen to people pushing the button.  

Finally, you can put the components in any order you want.  You can do (battery+) --> (diodes) --> (LED) --> (switch) --> (battery-),  or you can switch those around in any order.  The only important thing is the diodes and LED - the sides of the diodes that have the little stripe on them have to point towards the negative lead on the battery.  (That is for normal diodes.  If you found a 4v Zener diode, it is very important that its little stripe point in the other direction - towards the positive side of the battery.)  Also look at the LED, and you will notice a flat side - the LED wire that is close to the flat side must go towards the negative lead on the battery.

If you are using normal diodes, then nothing happens if you wire it wrong.  If anything is in backwards, the LED just won't light, and you just flip a component around and try again, see if it lights, repeat until it works.  If you have a zener diode and you wire it in backwards, the LED might burn out when you push the switch.

And, that will get your LED to light using a 9 volt battery.  However, I don't think that a single LED will be enough to light up your picture.  You can put several LEDs in parallel if they are the 5v-internal-resistor kind, and they will all light up at once.  Just use larger diodes if you do.  (like 1/2 watt diodes, 1-watt diodes, 2-watt diodes...  you need 1 watt for every 9 LEDs.)

You can also use the 5v connector in your computer, and not need to use diodes at all.  You would connect between the red and black wires.
« Last Edit: October 14, 2003, 02:04:26 am by grafixmonkey »
-----------
-- See my grafix, circuits and cab on my
-- new arcadey page:  http://www.bkgrafix.net

EggZilla

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 78
  • Last login:January 17, 2004, 04:44:20 pm
Re:strange wiring question
« Reply #2 on: October 14, 2003, 12:03:49 pm »
Thanks for all your advice! I'm going to try to look up the "real" pwer requirements for this particular LED. It's a pre-packaged model that came pre-wired with a molex connector that utilized the 5v line, so I just assumed it needed the full 5 volts. Perhaps it has some hardware inside its little plastic shell. Oh, and it doesn't actually have to light up the whole picture - just one particular part, so I think you're right that it wouldn't light the whole thing, but it should still serve its intended purpose.

thanks again!
Like a bird on a wire,
  Like a drunk in a midnight choir,
   I have tried, in my way,
      To be free.
          - Leonard Cohen

Wienerdog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 569
  • Last login:December 08, 2020, 06:28:51 am
  • If it's worth doing, it's worth overdoing
Re:strange wiring question
« Reply #3 on: October 14, 2003, 12:30:07 pm »
This opinion was created from 100% post consumed information.

grafixmonkey

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 743
  • Last login:October 16, 2010, 08:16:50 pm
  • must... tear self... away from... Tron...
    • My graphics/arcade/circuits site!
Re:strange wiring question
« Reply #4 on: October 15, 2003, 09:34:28 pm »
Thanks for all your advice! I'm going to try to look up the "real" pwer requirements for this particular LED. It's a pre-packaged model that came pre-wired with a molex connector that utilized the 5v line, so I just assumed it needed the full 5 volts. Perhaps it has some hardware inside its little plastic shell. Oh, and it doesn't actually have to light up the whole picture - just one particular part, so I think you're right that it wouldn't light the whole thing, but it should still serve its intended purpose.

thanks again!

If it had a PC power connector on it and everything, then it's gotta be a 5V LED with the resistor inside.  And if it's not, and you plug it into 5 volts and it burns out, the mistake is probably only worth about $0.20 or so.  I have a plastic bin full of bright red LEDs that I can tack the necessary components onto and mail to you if you burn it out.

All you need is the diodes to hook it up to a 9v battery and it'll work great.
-----------
-- See my grafix, circuits and cab on my
-- new arcadey page:  http://www.bkgrafix.net