Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: cholin on February 13, 2005, 12:42:20 am
-
After seeing all the posibilities of LED lighting, I thought of something. This may have already been done, but it resembles the idea of DDR. I want to drill a small hole in my control panel, under the overlay, and put some LEDs in there right by the joysticks. Around the joystick, there are arrows. These arrows will light up during gameplay. What I wanted to do is make a switch where you have three options: On, Game and Off. On will light all the LEDs at all times. Off will turn them off. Game will make it so if you push up on the joystick, the UP arrow will light.
What do you guys think? I will also be putting a rope-light and lighted 1 + 2 player START buttons on too.
-
Sounds pretty cool!! ;D
-
Nothing crazy about it. You could do it using just about any type of 2-input digital gate.
I'd go with NAND gates myself. What you do is short the first input of each gate together, and that's your control. 0 volts on that line will cause all lights to light up. 5 volts will light them when the button is pressed. To turn them all off permanently though, would require some extra steps. A multiplexer, or something along those lines. It doesn't seem worth it to me.
What you need to do is choose which 2 setups you want. Because all 3 will take some serious man hours to implement.
-
Well getting all those components is much more expensive than my origional plan, which I already have worked out. It doesnt require any gates, just common knowledge and switches, oh and quite a bit of wire.
-
Exactly, switches. How many switches are you going to use?
I'd have 1 switch, and about 2 IC's. Which means I can do it for under 5$.
There's always dip switches, but that's not my style.
-
How exactly would you do that? My idea was just to use one switch with 2-3 selections. Mine would just be simple wiring, and one switch.
Is there any way you could perhaps make a schematic or something simple?
-
How are you going to wire up the led's for the 'game' function?
-
I was going to connect them directly to the mircoswitches. For a switch to activate, you press the button right? So I will wire them to the button so when it's pressed, a circuit is complete, therefore, a LED will be lit.
-
I was going to connect them directly to the mircoswitches. For a switch to activate, you press the button right? So I will wire them to the button so when it's pressed, a circuit is complete, therefore, a LED will be lit.
I could be wrong, but I don't think microswitches draw enough juice to power an LED (20 milliamps or so are needed) You're planning on wiring an LED in parallel with the microswitch, right?
Seems like the "flash" would be too brief to see very well. But if you try it, please post the results.
-
Well I can't really try right now because Im in the planning stage, but using transistors or something, Ill draw the actual power from a 12v computer connector. When a signal is passed through the microswitch, it will allow the 12v to pass to the LED. Gonna be one hell of a circuit! Either way, cant try now because 1) Im still planning 2) I dont have parts until I plan and get cash 3) I dont have a job because im still in highschool :)
-
I was going to connect them directly to the mircoswitches. For a switch to activate, you press the button right? So I will wire them to the button so when it's pressed, a circuit is complete, therefore, a LED will be lit.
That's not really a good way to think about how your encoder works, though. It doesn't detect a "closed circuit" so much as it detects a change in voltage level. Typically, the inputs will be on pull-up resistors that keep them at +5V, and that voltage will connect to the switch which leads to ground. When the circuit is closed, current will flow from +5V, through the pullup resistor, through the switch, to ground, and the current going through that resistor will be great enough that the voltage on the input pin will drop to zero.
If you put an LED in series with your switch, here's what will happen: When the switch closes, current will flow through the LED and resistor. This means that both the resistor and LED will have a voltage drop. So the voltage at the input will reflect the voltage across the LED. If it's only a volt or two that might be OK, depending on the circuit reading the input. If it's three, that might be enough for the encoder to think the input is still "high".
A better way would be to have another circuit which reads the same voltage as the input. One way to do this would be to wire the LED from the input, through a resistor to +5V. Then the LED will turn on when the voltage at the input goes low.
High School Physics classes sometimes have a good introduction to electrical circuits. Soak it up if you can.
And microswitches will have no problem passing a couple hundred mA. Typically they're rated for at least 1 amp.
-
Heres what I came up with over the last few days, and I only understood half of what tetsujin said because, well, im an idiot in electronics.
-
I'm a long way from being a transistors 'n diodes guru, but.. a microswitch has 3 terminals- NO, NC, and GND. If the I-Pac is connected to NO, then you ought to be able to build a circuit that will send power to the LED whenever the NC terminal opens. That way you don't have to worry about messing up your I-Pac inputs with your LED stuff. Won't work for leafswitches, though.
If I've got my head up Myanus (21st moon of the planet Uranus), feel free to tell me.
-
What Im going to do, is connect the switches normally, there will be NO change to them at all. When you press the switch (NO I think) it will close. When a switch closes is when it will send the signal. Dont worry, I dont need advice on this becausse I drew up a circuit in Geography today and it should work, I just need to know how much power goes where and stuff like that.
-
Kremmit, if the COM tab is connected to ground, that will work.
Ok, so now you've actually thought up a circuit. How are you going to switch between ALL ON and GAME?
You should just learn some digital electronics. www.allaboutcircuits.com . That way, you could use my initial suggestions of logic gates.
-
I have done this before. It works quite nicely, and you don't need any transistors of ICs.
Just a diode, resistor, and LED.
-
Kremmit raises an excellent point: most microswitch controls have a normally-closed terminal in addition to the normally-open one. Connect the "common" terminal to ground, (as you probably will with most encoders) and "N.O." to the encoder input, and then you can use the third, "Normally Closed" terminal to create your LED circuit.
You can make the LED circuit completely passive - no gates or transistors or anything. Just connect the cathode side of each LED to ground, and to the NC terminal connect the anode side of the LED and also a resistor going to +5V. This is what will happen:
When the switch is not pressed, the "NC" terminal will be connected to ground. The pull-up resistor on that line will pass current straight to ground. Because both sides of the LED will be at zero volts, it will not light.
When the switch is pressed, the "NC" terminal will no longer have a direct connection to ground, so the current flowing from +5V through the pull-up resistor will flow through the LED, lighting it.
Of course, the +5V source may have to come from your encoder board for this to work... The +5V has to be +5V relative to the ground node, and since you're connecting the switch's common terminal to the encoder's ground line... well, there you go.
You needn't wait to have a physics class to learn this stuff - you probably have access to teachers and textbooks which can help you with this. You can also look for basic electronics tutorials on-line - though I'm a bit wary of that approach because there's so much bad information out there.
Here are some basics.
First of all, you can think of the entire circuit as a collection of "nodes". Any part of a device that has a lead sticking out, that's a circuit node. When two nodes are connected together with a wire, they're basically the same node. (Certainly for our purposes that's a fine assumption.) At any given time, a particular node will have a particular voltage level relative to the circuit's "ground" node.
Voltages are always measured relatively between two nodes. It's meaningless to say that a node has a particular voltage without making some kind of statement about what the measurement is taken relative to. Commonly it'll be taken relative to ground, but it's also helpful sometimes to measure two nodes relative to each other. This is useful when you're talking about two nodes on the same device: for instance, the voltage across the two nodes of a resistor can tell you how much current is passing through the resistor. (The greater the voltage difference, the greater the current...)
Current represents the flow-rate of electrons in the circuit. Current flows through wires, and between terminals of multi-terminal devices. The basic rule of current is called Kirchoff's Current Law, which states that the amount of current flowing into a node must equal the amount of current flowing out of a node.
Building simple circuits is sometimes a matter of balancing simple math problems, making sure the amount of current flowing through devices is great enough to operate them (when desired) but not so great that they burn out. Different devices have different relationships that determine how much current will pass based on how much voltage is across them. Resistors and light bulbs and such are generally linear, meaning that if you double the voltage drop, you roughly double the current. LEDs are different, however. They have a particular voltage operating range. If you exceed that, the current increases greatly. Double an LED's voltage and you'll likely burn it out rather quickly.
IMO understanding the basics of nodes, voltages, and currents is critically important in building circuits and understanding how they work. You can muddle through without it, lots of people do, but you'll fare better if you know the mechanics of the devices you're using.
I'm doing similar work for my cabinet, and this thread has raised some good points for me, too. In particular, the need for the LED driver's ground to match the game encoder's ground in order for the LED driver and game encoder to monitor the same signal from the controls was something I hadn't thought of. (If I have two USB devices doing the two jobs, the two grounds should be the same... probably both being connected to the shielding and, eventually, indirectly, to the computer's casing and the AC line ground... So maybe my design is OK... But what happens if I want to drive some stuff from a separate AC-DC adaptor? I figure it's best to give that one some extra thought.)
-
See the problem with me is that I got an idea, but I dont have the knowledge of currents or how they are divided or any components! I forget what it's called but I think its called a transistor. Anyways, I saw one of these transistors in a circuit and I learned basically what it does. I figured, since my iPac will have an output for Keyboard lights, which is +5v, and a ground (-5v), I could just connect a simple circuit consisting of nothing more than some of these transistors and terminal strips. I know I may come off stupid trying to use the same idea, but just look at this and tell me whether or not it will work. Thanks to Kremmit for telling me how to post a picture! By the way, this was designed with a MOLEX in mind, so just pretend that isnt there. The gray circles are transistors that draw 5 volts if some is passed to it's base. Please keep in mind Im trying to keep this cheap, not blow any LEDs and well, yah. This would be alot easier if I knew that the iPac gave out so many volts at each connection...does anyone know? For example, how many volts does it put out on PLAYER 1 UP?
-
What about my idea? No transistors, and it doesn't even need a SPDT switch.
Plus, I currently use it. It works.
It can even use independend power sources. I'm using a 3v battery pack with a keyboard encoder. Just tie the grounds together. The diode takes care of the rest.
(http://forum.arcadecontrols.com/index.php?action=dlattach;topic=31970.0;id=9822;image)
-
Kremmit, if the COM tab is connected to ground, that will work.
Ok, so now you've actually thought up a circuit. How are you going to switch between ALL ON and GAME?
"All On" is not exactly a toughie. Anybody that can't figure out how to turn on all of the LEDs at the same time needs to give up right here. You feed them power and hook it up to a switch, duh. Yes, there's a little more to it than that, but it's hardly the engineering challenge here.
You should just learn some digital electronics. www.allaboutcircuits.com . That way, you could use my initial suggestions of logic gates.
Hey, I'm not the one trying to do this project. I don't care if it ends up using logic gates, or little tiny gnomes that flip a lightswitch every time the joystick moves. ;D
Like I said, I'm not the guru here- logic gates may be the best way to implement the circuit, no matter whether you connect to the NO or the NC tab. I was just trying to help anybody building this by pointing out they don't need to muck about with using the same part of their microswitch that's connected to their I-Pac. Sending 12v to your I-Pac by mistake would be, well, a mistake. :'(
-
Okay, well I also know little about diodes, so you would need to explain how they work and which ones to get. And Trimoor, you use it? Meaning you have the same idea as me? Could you take a few photos PLEASE for me? Is it nice in the end?
-
I used the LED to indicate when the admin switch is pressed. I did not wire up a whole CP, but it would certainly work to do so. I sold the CP to a friend, so I can't get pictures right now, but it was covered in shrinktube anyway.
Diodes are pretty simple: they allow electricity to pass through only in one direction. The direction is indicated by a colored band near one end.
Diode tutorial (http://www.americanmicrosemi.com/tutorials/diode.htm)
Any old diode will work for this application. I used a pack of cheapies from radio shaft. They're called 'switching diodes', but anything will work for this.
radio shaft diodes (http://www.radioshack.com/product.asp?catalog%5Fname=CTLG&category%5Fname=CTLG%5F011%5F002%5F006%5F000&product%5Fid=276%2D1620)
Any competent employee will know what you want if you ask for a 'pack of cheap switching diodes', so you might have trouble at radio shaft.
I can modify the circuit to include an all-on switch if you want. All-off is easy--just disconnect the LED power supply.
-
The power shouldnt be too hard, neither should the off, BUT I dont see how making electricity flow one way only would help...so what? How would that do anything?
-
It prevents it from flowing in the wrong direction. It keeps it from interfering with the encoder. Inside the encoder is a pullup resistor, which makes the LED light improperly. It can keep it lit even when the button is not pressed.
If nothing else, it will help protect the encoder from damage if you wire it up wrong.
-
Exactly, it keeps it from flowing in the wrong direction, but how exactly does that replace the transistors? All this does is use a power supply, make sure it goes one way. I need to use a small voltage to allow a larger voltage...right?
-
You don't need transistors. The diode lets you use the same switch for both the encoder and the light.
-
Oh okay, I get it, so basically I just use one diode per switch and it powers the light and the switch? Could you perhaps draw a crappy diagram for me as to where in the circuit I would place the diode, and not to mention, where I would place resistors?
Just so I dont look stupid, if you see, I dont even need diodes! The only problem I was having with that is the fact that I didnt know how much the iPac gives out! For example, if the iPac sends 1 volt out and the switch has 1 volt going through it to ground when its pressed, that 1 volt will be what is hooked up to the light, and frankly, thats not enough. My only concern was that it would not supply enough power. Could someone verify the power outages from an iPac PLEASE
-
Oh okay, I get it, so basically I just use one diode per switch and it powers the light and the switch?
Yes.
The voltage of the ipac is irrelevent. The diode keeps the ipac and LED seperate. The LED is powered through a seperate power supply, which can be obtained from the PC, or from the USB cable. Powering the LED off the ipac switch readers is not a good idea.
Once again, here is the circuit. Hopefully you can understand it with labels.
-
*Colin downloads the picture*
Thanks alot, I get it! Basically, the switch works as normal, and the diode allows them to use a common ground! You're a genious! May I ask, how do you know all this?
-
GENIUS!!!
Looking at Kelseys picture of the pacman panel, it would be cool to make the red up, down, left, right triangles around the pacman stick out of a red plastic lit up from below by an LED using this method.
-
You're a genious! May I ask, how do you know all this?
I know everything. It's just easier that way.
(By the way, you misspelled genius.) ;D
An idea I had for my original cabinet was to light up the arrows and buttons as Weinerdog says, but have them controlled by the frontend. When you highlight Galaga in the frontend, only the left and right arrows and one button light up. When you highlight Defender, the up/down arrows illuminate, as well as five buttons.
This would be relatively easy to control with the parallel port, but no one has this coded yet. If they did, it would probably only be for windows. (Insert long rambling hatred of microsoft here)
If anyone needs electronic or circuit help, just ask me. (bribes will help me work faster)
-
Wienerdog, thats exactly what I was going to do :D Thanks alot for the help. Is there any specific diode I need or anything like that?
-
You're a genius! May I ask, how do you know all this?
An idea I had for my original cabinet was to light up the arrows and buttons as Weinerdog says, but have them controlled by the frontend. When you highlight Galaga in the frontend, only the left and right arrows and one button light up. When you highlight Defender, the up/down arrows illuminate, as well as five buttons.
This would be relatively easy to control with the parallel port, but no one has this coded yet. If they did, it would probably only be for windows. (Insert long rambling hatred of microsoft here)
My plan is similar: when a game is loaded, the available controls will light up (including the diagonals on the stick, if it's an 8-way). But then I'll have them light brighter when the control is actually activated. (But not light at all if they're not active for the game.) And when a diagonal direction is pushed for an 8-way game, rather than lighting up the "up" and "right" buttons for instance, I'd light a diagonal "up+left" direction light. And then if a diagonal direction is pressed in a 4-way game, nothing will light. Processing diagonals could be done with logic gates, of course, but I'll most likely use a cheap microcontroller for it for simplicity's sake.
Programming simple circuits on the parallel port isn't too hard on Linux or most anywhere else for that matter - you send bits to the port, and those bits go high on the parallel port. The only real trick for this application is activating the right buttons' lights, because that requires information about the game. Controls.dat doesn't do the job, IMO, since it works according to button numbers as they're understood by the game. For that reason I plan to take my data on what controls should be lit from the Mame control configuration for the game.
I'm planning to control my lights with USB. To save I/O lines on my USB microcontroller I'm going to use the microcontroller to drive a shift register, and that'll be what actually controls the LEDs. You might want something similar when using the parallel port, to get around the limited number of I/O lines there.
For some reason I was thinking that I would have LEDs creating light points around the joystick... I really like Weinerdog's suggestion of making the light illuminate an entire direction triangle around the joystick. That would take some extra work (either routing out space in the CP for a lightable plastic triangle, or else using EL strip for the triangle) but I think it'd be a whole lot better. (EL Strip is a very tempting option for this application... Infinitely easier to install than an LED-lit triangle. I'm not sure what I'd need to use to switch that 100VAC from the inverter, though... Relays? I sure hope not. And for getting low- and high-intensity lighting depending on what controls are being actuated? No idea...)
-
I would find blinking lights during a game far too distracting, but I would love not having to explain the controls to everyone who uses it for EVERY single game. USB might be difficult. What would you register the device as? You would probably have to write your own drivers, which means we'd be stuck with windows again. I think the serial port is a better option. It's easy enough to access in software, and every microcontroller knows how to read serial data. Good luck on the MAME end of it...
I don't think lighting a triangle with an LED would be hard at all. Route out a shape larger than the triangle, and the black border of the vinyl will do the rest. If that doesn't work, cut a triangle mask out of aluminum foil and glue it to the bottom of the overlay.
For the EL idea, a triac should be used. It's a solid state device very similar to a transistor, except it can handle high AC voltages and even large currents.
-
I would find blinking lights during a game far too distracting, but I would love not having to explain the controls to everyone who uses it for EVERY single game. USB might be difficult. What would you register the device as? You would probably have to write your own drivers, which means we'd be stuck with windows again.
I don't think lighting a triangle with an LED would be hard at all. Route out a shape larger than the triangle, and the black border of the vinyl will do the rest. If that doesn't work, cut a triangle mask out of aluminum foil and glue it to the bottom of the overlay.
Well, maybe the LED idea isn't hard, but it's definitely a hell of a lot more work than either drilling a single hole for an LED, or using EL strip. But I don't know if EL strip will be bright enough.
Your point about blinky lights is well taken - with that in mind I may decide not to do the two-level lighting. But I've always thought it'd be nice in games like Street Fighter to have some clear indication of what direction I'm moving the stick. It makes it a lot easier to figure out why my Shoryuken isn't working. :) I am also very interested in making sure people never have to wonder which button is which. When each stick has between six to eight buttons, that's important.
There are USB HID profiles for indicator lights. I may use that, or I may make it a more generic device type, like a virtual serial port or something, and just send bits to it. If I were to go the virtual serial port route, I could choose to use generic, off-the-shelf chipsets like the FTDI chips. It's basically a USB->RS232 on a chip, with driver support in Windows, Mac, and Linux. But I'd more likely use a PIC, since I don't need the full functionality of the FTDI chip (it provides functions like the flow control lines, which aren't needed on USB, and therefore not part of the standard USB communications class.) I'll take all these USB devices I want to build as an opportunity to learn USB programming. On Linux. Not Windows. :)
I don't see why the MAME side of this would be particularly difficult. I'll have a front end. It'll know what game I'm running, because it will be responsible for running the game. So when the game is being loaded, I can make the front-end run a script to handle checking the game control configuration and updating the LEDs.
RS232 would be another relatively easy solution. I'm interested in doing this with USB, though. I've decided I don't want to have to deal with RS232 and the Parallel port any more. :)
-
If you think about all the work and money involved in doing this, you would have to create a custom device to handle all this, and alot of people would want in on it, therefore, you would probably end up making a PCB. I think it would be very nice to use the full functionality of this project, and what it will become. I started wanting the buttons to light as you pressed them, but all this stuff about gaming sounds cool. Someone should go spend an hour or so and think up a board for this. I would, but I don't know enough :( I hope this will progress, so people can build their ultimate cabinets! The *ONLY* bad part about this is that the controls and the lighting will be connected through different circuits. My origional intent was to be able to do it all through a PS2 port, which I could do. Therefore, I think the game-lighting is out for me. I would rather create one of those "ATTRACT-MODE" things to flash random buttons when the machine isnt being used. If anyone actually does anything listed here, please show me :) Im very interested!
-
I don't care if it ends up using logic gates, or little tiny gnomes that flip a lightswitch every time the joystick moves. ;D
I'd definitely recommend elves over gnomes for this type of application.
Gnomes tend to be way too grumpy, and finicky.
You could use wizards (ala Microsoft), but they are notoriously lazy, and only work part of the time.
I'm guessing it's something to do with their guilds.
The elves worked really well for Apple, until they stopped using them in the transition to OSX because it was *nix based.
My cab, with OS 9.2.2 in it, is rock-solid.
I attribute that, in very large part, to the elves inside.
Given their track record, I wouldn't trade my elves for all the gnomes in the world.
That's personal preference though, so feel free to use whatever mythical creatures you want in your own cabs.
-
That was umm...odd :) I got a little email saying the topic im watching got a reply, I look at it, and its telling me which elves to use LMAO. You're a funny guy there NoOne.
-
I don't care if it ends up using logic gates, or little tiny gnomes that flip a lightswitch every time the joystick moves. ;D
I'd definitely recommend elves over gnomes for this type of application.
Gnomes tend to be way too grumpy, and finicky.
I think the Gnomes on Linux have come a long way in the past few years, but they seem like such an odd group, one wonders if they can really work together at all.
-
Trimoor,
How were you planning to implement the "All ON" function of this?
If you have a switch that grounds all the LED circuits, it will have to break the connections to the buttons, or it will ground all the inputs to the I-pac as well, causing it to read every button as though it was pressed.
-
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.
-
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.
-
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.
-
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 :)
-
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 (http://electronics.howstuffworks.com/digital-electronics.htm)
Boolean Logic (http://computer.howstuffworks.com/boolean.htm)
-
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?
-
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?
-
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.
-
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 :)
-
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?
-
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..
-
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 :)
-
In light of this news story (http://news.bbc.co.uk/2/hi/uk_news/england/cumbria/4263761.stm), 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?
-
Perhaps if you explained these switches to me, I could see what you're talking about.
-
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 (http://www.kpsec.freeuk.com/components/switch.htm)
Cheap LEDs. (http://lsdiodes.com/) 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.
-
Okay, what I plan on doing as of now is to use Trimoor's second circuit.
-
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.
-
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 (http://metku.net/index.html?sect=view&n=1&path=mods/ledcalc/index_eng)
forward voltage=voltage drop
-
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.
-
I used 3.8 "typical" forward voltage. 12Ω won't make much of a difference. Use 50 or 68, whichever is convinient.
-
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.
-
Actually, now that im thinking about it, shouldnt the resistor be on the other side of the LED where the +5 is coming from?
-
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.
-
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 :)
-
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.
-
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.
-
Electronics Basics (http://www.epanorama.net/links/basics.html)
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.
-
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
-
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.
-
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.
-
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.
-
Electronics Basics (http://www.epanorama.net/links/basics.html)
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.
-
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! ::)
-
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.
-
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.
-
Trimoor, thanks personally for all the help you've given me. I think Ill let this thread die now :)