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: LED control idea  (Read 7156 times)

0 Members and 1 Guest are viewing this topic.

ShinAce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 152
  • Last login:January 16, 2007, 07:38:14 pm
  • Building the unbuildable since 2001
Re: LED control idea
« Reply #40 on: February 15, 2005, 08:01:26 pm »
www.geocities.com/alainprice/ownzord1.jpg
www.geocities.com/alainprice/ownzord3.jpg

Using 7404 inverters(as buffers).

It's basically equivalent to what Trimoor is talking about. Using the switch itself to drive the led. But in my case, I can simply swap IC's and have an ALL ON, even though that's not a feature I really want.
An ounce of image is worth a pound of performance.

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Re: LED control idea
« Reply #41 on: February 15, 2005, 09:07:34 pm »
The all-on function is a slightly different circuit.  Only two more diodes are needed, so it shouldn't be too difficult.  When the switch on the right is closed, all the lights will illuminate, leaving the encoder inputs alone.

ShinAce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 152
  • Last login:January 16, 2007, 07:38:14 pm
  • Building the unbuildable since 2001
Re: LED control idea
« Reply #42 on: February 15, 2005, 09:23:20 pm »
Wouldn't that mean you need a spdt switch for each button? :-\

That's where gates are nice. You can switch modes with a single switch.
An ounce of image is worth a pound of performance.

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #43 on: February 15, 2005, 09:58:12 pm »
Can you explain gates to me in lay-mens terms?  I have no idea what they are and I dont want to read 200 pages :)

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Re: LED control idea
« Reply #44 on: February 15, 2005, 10:01:52 pm »
Quote
Wouldn't that mean you need a spdt switch for each button?

No.  The picture above shows how two inputs/lights are linked together to a common switch on the right.  That switch is separate from the others, and only needs to be closed to activate the all-on mode.  When open, it functions just like my first design.

Logic Gates

Boolean Logic

NoOne=NBA=

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2718
  • Last login:July 23, 2011, 08:59:16 am
  • Just Say No To Taito! -Nichibutsu
Re: LED control idea
« Reply #45 on: February 15, 2005, 10:14:52 pm »
That's similar to the circuit I was playing with in my head.

Aren't the diodes coming off the encoder redundant though?

The diode nearest the button on the LED line will isolate the LED from the encoder, won't it?


cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #46 on: February 15, 2005, 10:56:15 pm »
Now looking at gates, they seem smart to use, but are they worth it?  Which is easier to implement.  Which is cheaper?  Can I find parts locally?

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Re: LED control idea
« Reply #47 on: February 15, 2005, 11:09:14 pm »
Aren't the diodes coming off the encoder redundant though?
The diode nearest the button on the LED line will isolate the LED from the encoder, won't it?
It probably is, but I left it in just in case.  I don't have an encoder to test right now, but there might be some internal circuitry that would mess this up.

Now looking at gates, they seem smart to use, but are they worth it? Which is easier to implement. Which is cheaper? Can I find parts locally?
For our purposes, discrete components are cheaper, and are probably easier to use.  You might be able to find gates at radio shaft, but they would certainly have diodes.

radio shaft sells gates at about $.80 apiece in small quantities, whereas diodes are about $.04 apiece.  You would still need resistors for the LEDs, which they overcharge at a whopping $.20 per resistor.

If you can, buy electronic parts anywhere but radio shaft.

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #48 on: February 16, 2005, 06:59:08 am »
I don't know if you mean Radio Shaft, but around here we have one called Radio Shack.  Sounds about the same, overpriced.  I dont know where to get any of these pieces though without resorting to Radio Shack.  That's why they get away with their prices, there's no competition.  Gates sound more efficient, but cost more.  Diodes sound like they'll get the job done and cost WAY less.  I figure I might as well do it right the first time using gates, but if I can wire the whole thing for like $5 with LEDs included because of diodes, sounds like a plan to me :)

ShinAce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 152
  • Last login:January 16, 2007, 07:38:14 pm
  • Building the unbuildable since 2001
Re: LED control idea
« Reply #49 on: February 16, 2005, 08:43:08 am »
Gates will be cheaper. I paid 50 cents(canadian) per IC, and used 2. Plus 1$ worth of led's, and some resistors I already had. Total cost to me, under 3$. It took me about 2 hours to get the pcb prepared, and another 2 hours to install it. But the reason I chose gates is because my controls are already connected to 2 different pads(USB and Dreamcast), so adding the gates just counts as a third system.

If I wanted to buy some 40 diodes, 10 led's, resistors, and whatnot at Rat Shack, I'd be paying over 10$. Not to mention you'll end up with a decent amount of wiring. If you think you can do it for 5$, what are you waiting for?
An ounce of image is worth a pound of performance.

tetsujin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 222
  • Last login:April 10, 2007, 05:51:25 pm
  • My controls will have programmable button labels.
    • My Homepage
Re: LED control idea
« Reply #50 on: February 16, 2005, 09:11:38 am »
If I wanted to buy some 40 diodes, 10 led's, resistors, and whatnot at Rat Shack, I'd be paying over 10$.

Yes, but it's never a good idea to buy things at Radio Shack.  They'd probably charge you 80 cents per resistor or something dumb like that.

Well, it's almost never a good idea to buy at Radio Shack.  Once in a great while the convenience is worth it.  But they overcharge by so much, it's not a good idea to buy a whole project there..
---GEC

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #51 on: February 16, 2005, 03:55:03 pm »
Quote
If you think you can do it for 5$, what are you waiting for?

The five dollar thing was just an estimate.  And im waiting for money   Im getting a job soon to start funding this project.  I then need buttons, wood, etc.  The cab will not be built for a few months because we're building a new house and I can get the wood cheaper that way.

I hate Radio Shack.  The only reason I go there is because they have those parts that people rarely need, and they're in stock often.  Also, which gates should I get then and where should I wire them?  Im guessing I just replace the extra diode in each line.  Im guessing ill need an OR gate?

Also, what type of LED should I use?  There's different brightnesses and viewing angles.  It has to light through a piece of paper and plexiglass, so low brightness ones should be fine right?  At .45 oer LED, although it seems cheap, it comes out to alot.  Ive seen a Canadian Suppliers list but it doesnt have too much.  Anyone know Canadian places that sell LEDS?  Im off to eBay  :)

Kremmit

  • - AHOTW -
  • Wiki Contributor
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3165
  • Last login:June 17, 2025, 04:07:55 pm
  • Who the heck is that?
Re: LED control idea
« Reply #52 on: February 16, 2005, 10:00:20 pm »
In light of this news story, I have to retract my earlier comments.  Gnomes are obviously too dangerous for hobby use.

Couldn't Trimoor's circuit add the All-On feature by adding a separate path to ground, wired to a common switch?  I suppose you'd also have to wire in a cutoff for the existing, button controlled ground path.  Hmm... an SPDT could handle both jobs at the same time, couldn't it?

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #53 on: February 16, 2005, 10:09:04 pm »
Perhaps if you explained these switches to me, I could see what you're talking about.

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Re: LED control idea
« Reply #54 on: February 17, 2005, 05:40:58 pm »
Couldn't Trimoor's circuit add the All-On feature by adding a separate path to ground, wired to a common switch? I suppose you'd also have to wire in a cutoff for the existing, button controlled ground path. Hmm... an SPDT could handle both jobs at the same time, couldn't it?
That's exactly what I did.  See my second circuit above.  The 'cutoff wiring' is what the diodes are for.  A DPST switch would be best, but I don't know of any microswitches like this.  SPDT is a standard microswitch.

Perhaps if you explained these switches to me, I could see what you're talking about.
Switch Types

Cheap LEDs.  Many people here have used this company.  They sell $.05 resistors too.

Gates will not be cheaper.  One gate costs more than three diodes, and you will still need resistors and LEDs.
Nor will gates be better.  The "right" way to do this would be a microcontroller.

For brightness, remember that LEDs can always be made dimmer by using a larger resistor.  I wouldn't use anything less than 1000mcd.  Never buy LEDs from rat shack.  You might as well close your eyes and pretend it lights up.

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #55 on: February 17, 2005, 05:51:41 pm »
Okay, what I plan on doing as of now is to use Trimoor's second circuit.
« Last Edit: February 17, 2005, 06:06:41 pm by cholin »

NoOne=NBA=

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2718
  • Last login:July 23, 2011, 08:59:16 am
  • Just Say No To Taito! -Nichibutsu
Re: LED control idea
« Reply #56 on: February 17, 2005, 06:30:31 pm »
well can't the wires all connect to one diode and then go to the switch?

No.

The diodes are there to prevent ALL of the LED's from lighting up when a single button is pressed.
They basically keep all the "connected together" wires from "seeing" each other.
Without those diodes, ALL the LED's would see the connection to ground through the one pressed button, and light up accordingly.

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Re: LED control idea
« Reply #57 on: February 17, 2005, 07:16:11 pm »
Adding a global dimmer is very easy.  Connect the 5V source to a potentiometer before any of the circuits, and it will control everything.

Using the calculator that LSDiodes links to, the 12,000mcd LEDs equate to 68Ω resistors.  If using the dimmer, you want the resistors to be set at the highest brightness when fully illuminated.
Calculator
forward voltage=voltage drop

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #58 on: February 17, 2005, 07:32:23 pm »
How do you get 68 OHMs?  I used 5v as supply, 4 volts as forward, and 20mA as current.  It said to use a 50 ohm resistor.  I picked 4 volts because it said that's the maximum for the 12,000 mcd white 5mm LED.  This way if I use a pot, then the highest will be the maximum which is what you said.

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Re: LED control idea
« Reply #59 on: February 17, 2005, 08:02:41 pm »
I used 3.8 "typical" forward voltage.  12Ω won't make much of a difference.  Use 50 or 68, whichever is convinient.

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #60 on: February 17, 2005, 08:14:35 pm »
Okay well Ill use 68 to be safe and so I dont fry them instantly :)  I probably wont need that much power anyway, since they'll probably be dimmed.

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #61 on: February 18, 2005, 09:37:53 am »
Actually, now that im thinking about it, shouldnt the resistor be on the other side of the LED where the +5 is coming from?

tetsujin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 222
  • Last login:April 10, 2007, 05:51:25 pm
  • My controls will have programmable button labels.
    • My Homepage
Re: LED control idea
« Reply #62 on: February 18, 2005, 11:04:13 am »
Actually, now that im thinking about it, shouldnt the resistor be on the other side of the LED where the +5 is coming from?

It doesn't matter.  As long as the resistor is in series with the LED somewhere, it'll restrict the power going to the LED to prevent it from being overdriven.
---GEC

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #63 on: February 18, 2005, 12:36:53 pm »
Well pretty much every LED circuit i've looked at had the resistor on the side where the voltage came in, which makes more sense too, so Ill put it on that side just to be sure.  Should function the same, and "resists" and risks :)

tetsujin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 222
  • Last login:April 10, 2007, 05:51:25 pm
  • My controls will have programmable button labels.
    • My Homepage
Re: LED control idea
« Reply #64 on: February 18, 2005, 01:25:09 pm »
Well pretty much every LED circuit i've looked at had the resistor on the side where the voltage came in, which makes more sense too, so Ill put it on that side just to be sure.  Should function the same, and "resists" and risks :)

Again, I urge you to take the time to learn more about electronic circuits.  I'd been building basic digital circuits since I was a kid, knew Ohm's law and all that, but I found it very enlightening when I was finally taught how voltage drops and Kirchoff's Current Law work.  That level of basic understanding really helps when dealing with circuits.  I'd feel a lot more comfortable advising you about circuits if you were committed to learning the basics, too.  As it is, it's awkward because you come back with these wacky questions that illustrate a lack of understanding of the mechanics of simple DC circuits.  That's fine if all you want to do is build a circuit someone else provides, but if you think you might want to make any changes, you should hit the books and learn the basics.

It really doesn't matter which side you put the resistor on, so long as it's in series.  In that regard, yeah, it's fine to switch 'em around.
---GEC

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #65 on: February 18, 2005, 02:24:35 pm »
Well, I agree, I do not know anything about circuits except that if you touch one side of a battery to a light bulb, and the other side of the battery to the other part of the light bulb, it glows.  That's honestly all I know.  If you have some online resources that will explain these things, they would be GREATLY appreciated since im starting to find this stuff interesting.

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Re: LED control idea
« Reply #66 on: February 18, 2005, 02:36:48 pm »
Electronics Basics
Otherwise, Google is your friend.  I hope you won't be disappointed to learn that electronics is almost entirely math.

I usually do put the resistor on the anode of the LED, but it was easier to draw it this way in paint.  Again, it makes no difference.

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #67 on: February 18, 2005, 02:45:26 pm »
Okay thanks alot.  I looked up alot of different things on google over few days, transistors, resistors, how LEDs work, that kinda crap.  I do not mind the math, because well, Im very good at math :)  Not nerdy, but its like natural.  Also, remember how I said I wanted an OFF function, I realized nobody put that, so what I figured is that on the circuit, where it says +5, I will put a switch there that will allow power off, then after the switch comes a pot to control brightness.  Im assuming that would work, right?  SEE I DO TRY :D

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Re: LED control idea
« Reply #68 on: February 18, 2005, 02:54:37 pm »
All-off is easy--just disconnect the LED power supply.
I'm afraid I beat you to it.  (I can't let you win ;D)
Yes, it will work.

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #69 on: February 18, 2005, 02:57:00 pm »
Haha smartass :P  BTW if you have any more links for electronic crap its all welcome :D  I think I know what Im going to do for this now, thanks.  I was going to ask what you used for schematics, but Paint is what you said, and wow...thats umm, pretty cool for paint.

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Re: LED control idea
« Reply #70 on: February 18, 2005, 03:08:00 pm »
http://ourworld.compuserve.com/homepages/Bill_Bowden/homepage.htm#menu
http://www.aaroncake.net/circuits/index.asp

Those are the only general electronics links I have left.  The rest are microcontrollers or specific things.  Once again, google.  A simple search for electronic circuits will yield more results than you could possibly choose from.

Oddly enough, paint is still the best program for articulate hand drawn diagrams.  There are electronic cad programs, but nothing available in a decent (read: free) price range.

tetsujin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 222
  • Last login:April 10, 2007, 05:51:25 pm
  • My controls will have programmable button labels.
    • My Homepage
Re: LED control idea
« Reply #71 on: February 18, 2005, 04:16:59 pm »
Electronics Basics
Otherwise, Google is your friend.  I hope you won't be disappointed to learn that electronics is almost entirely math.

I feel like there's a lot of bad information out there on the net.  I don't know that Google is necessarily your friend on this one.

I'd recommend finding a good book on the subject.  Electronics supply shops sometimes can help there (even Radio Shack), and any bookstore with a good technical books section might be worth a shot.
---GEC

Kremmit

  • - AHOTW -
  • Wiki Contributor
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3165
  • Last login:June 17, 2025, 04:07:55 pm
  • Who the heck is that?
Re: LED control idea
« Reply #72 on: February 18, 2005, 08:22:41 pm »
Couldn't Trimoor's circuit add the All-On feature by adding a separate path to ground, wired to a common switch? I suppose you'd also have to wire in a cutoff for the existing, button controlled ground path. Hmm... an SPDT could handle both jobs at the same time, couldn't it?
That's exactly what I did.  See my second circuit above.  The 'cutoff wiring' is what the diodes are for.  A DPST switch would be best, but I don't know of any microswitches like this.  SPDT is a standard microswitch.

Oops, I "Dyslexified" it!  ::)

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #73 on: February 21, 2005, 05:56:41 pm »
One more question before I let this thread die:

Resistors and Diodes were mentioned in this circuit, and when I decided to look into them, well theres more than just OHMS.  Theres ones based on watts too!  So I just wanted to know quickly what to use...1/4 watt, 1/2 watt, etc.  I figure 1/4 watt would do 5 volts, but im not sure.

Trimoor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 596
  • Last login:November 18, 2006, 09:01:46 pm
  • I like shooting out of helicopters.
    • Trimoor
Re: LED control idea
« Reply #74 on: February 21, 2005, 07:09:46 pm »
Resistor wattage is dependent on, well, watts.
The wattage rating is the maximum.

20mA = .02A
.02A * 5V = .1W = 1/10 Watt

1/8 watt is the minimum standard to use, but larger wattages will work fine.  Use whatever is convenient.

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: LED control idea
« Reply #75 on: February 21, 2005, 07:19:30 pm »
Trimoor, thanks personally for all the help you've given me.  I think Ill let this thread die now :)