Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 06-07-2005, 11:05 PM   #1 (permalink)
Upright
 
LED Switch

I wanted to create a circuit out of a keyswitch. When the key is in position 1, the green light is on. When the key is turned to position 2, the green light turns off, and a red light turns on. I drew up a mock up of how this is supposed to work. The lower left would be the power supply.

But I don't know how to turn off the green light when the key is in position 2. Does anyone know how?

reddog418 is offline  
Old 06-08-2005, 12:04 AM   #2 (permalink)
zomgomgomgomgomgomg
 
telekinetic's Avatar
 
Location: Fauxenix, Azerona
Well, two things. First of all, do you have the proper resistors in series with the LEDs? Otherwise they'll burn out pretty quickly.

Second, if you just connect a wire from the positive terminal of your power supply to the LED, and the negative terminal of the LED to position 2 on the switch, it should work fine...I'll sketch a circuit for you and see if I can find a spot to upload it.

Edit: There ya go...make sense? Your just switching which LED gets to see the complete circuit.
__________________
twisted no more

Last edited by telekinetic; 06-08-2005 at 12:12 AM..
telekinetic is offline  
Old 06-08-2005, 01:28 AM   #3 (permalink)
Upright
 
That's really ingenious, but the keyswitch doesn't quite work like that.

Here's what it looks like...



Basically all the keyswitch does is complete the circuit between the two nodes, not switch which node gets active. Do you think it's still possible?

Last edited by reddog418; 06-08-2005 at 01:33 AM..
reddog418 is offline  
Old 06-08-2005, 08:19 AM   #4 (permalink)
Psycho
 
Location: North America
This is what you want, excuse the poorly drawn resistors



http://img19.imagevenue.com/img.php?..._schematic.JPG

Last edited by catback; 06-08-2005 at 08:22 AM..
catback is offline  
Old 06-08-2005, 02:37 PM   #5 (permalink)
Upright
 
How would that shut off the green light once the keyswitch is flipped?
reddog418 is offline  
Old 06-08-2005, 11:21 PM   #6 (permalink)
Junkie
 
Location: San Francisco
nevermind for now, perhaps will post later
__________________
"Prohibition will work great injury to the cause of temperance. It is a species of intemperance within itself, for it goes beyond the bounds of reason in that it attempts to control a man's appetite by legislation, and makes a crime out of things that are not crimes. A Prohibition law strikes a blow at the very principles upon which our government was founded." --Abraham Lincoln

Last edited by n0nsensical; 06-09-2005 at 12:04 AM..
n0nsensical is offline  
Old 06-09-2005, 02:01 AM   #7 (permalink)
Very Insignificant Pawn
 
Location: Amsterdam, NL
catback's circuit should work if you get the resistor values right. It might work better if the LED with two resistors in the path has a diode added in series.

Idea is when the LED with one resistor is on (the LED with the switch in the path)
the current is high enough to cause a voltage drop large enough to not allow the other LED to light. Adding a diode in series with this leg of the circuit might allow the two LEDs to have a similar brightness by not requiring the first resistor to be so large.
flat5 is offline  
Old 06-14-2005, 07:13 PM   #8 (permalink)
Insane
 
Location: Austin, TX
Utilizing pull-down/pull-up resistors like this can be very tricky. You might be better off using a TTL or CMOS inverter. The circuit would be pretty simple:


Click for big version

The basic idea is that when the switch is in position 1 (and presumably closed), the inverter gets a high signal, so it outputs "0", and the red light goes off. At the same time, the green light is getting a signal, so it turns on.

When the switch is in position 2 (and presumably open), the inverter is getting a low signal, so it outputs "1", and the red light turns on. At the same time, the green light is getting no signal, so it turns off.

3.3V TTL inverters are pretty cheap (you can get them on www.digikey.com for under a dollar, and probably from Radio Shack for under 5.) Power the circuit with two AA batteries and use some 240 ohm resistors to prevent the LEDs from burning out. If you can only find CMOS (5V) inverters, then power the circuit with three AA batteries (4.5V) and use 470 ohm resistors.

The resistor values are approximations based on what I've acutally built before...I could be way off so be careful.

Last edited by skaven; 06-14-2005 at 07:18 PM..
skaven is offline  
Old 06-15-2005, 05:36 AM   #9 (permalink)
Very Insignificant Pawn
 
Location: Amsterdam, NL
Nice one Skaven!

This may not be as good but might be something to play with.
Values are not critical. R3 should be as large as possible but still allow Q1 to saturate.

Untested!

If anyone wants the circuit explained, I'd be happy to tell my version.


Last edited by flat5; 08-08-2005 at 03:27 AM..
flat5 is offline  
Old 06-22-2005, 04:00 PM   #10 (permalink)
Psycho
 
Location: North America
Honestly they are all great ways to accomplish the basic task but the best way would be to use a SPDT relay. Of course if this switch controls something electronic or something with high impedance one of our ways would be quieter. But if the switch controls something that needs a good amount of current a simple SPDT relay would be easiest. To each his own, the possibilities are endless.
catback is offline  
Old 06-23-2005, 01:59 AM   #11 (permalink)
Very Insignificant Pawn
 
Location: Amsterdam, NL
Diplomacy aside:

The problem as stated is to switch between two LEDs. 20ma or less is typical.
I happen to think (at this time) that my circuit is best because it will work off of a single supply voltage of 3 to 24 volts by changing the resistors (at the extreme voltage ends),
and not requiring any extra current, to drive a relay, for example.

For switching AC or dirty voltages and/or high current loads, yes, a relay is a very good choice. If you have a small low current relay handy and this is an automotive application then a relay is a good solution to the problem.

Last edited by flat5; 06-27-2005 at 05:00 AM..
flat5 is offline  
Old 06-23-2005, 07:36 PM   #12 (permalink)
Insane
 
Location: Austin, TX
I agree with flat5; a low-voltage, low-current circuit will be needed to drive the LEDs anyway...why not use a simple resistor/transistor network or a CMOS/TTL inverter to make the LEDs all part of one circuit with one input voltage requirement.
skaven is offline  
Old 07-06-2005, 12:18 PM   #13 (permalink)
Psycho
 
Location: North America
Quote:
Originally Posted by flat5
Diplomacy aside:

The problem as stated is to switch between two LEDs. 20ma or less is typical.
I happen to think (at this time) that my circuit is best because it will work off of a single supply voltage of 3 to 24 volts by changing the resistors (at the extreme voltage ends),
and not requiring any extra current, to drive a relay, for example.

For switching AC or dirty voltages and/or high current loads, yes, a relay is a very good choice. If you have a small low current relay handy and this is an automotive application then a relay is a good solution to the problem.
Yes if you just want to answer the question then your circuit is pretty good but really who uses a key switch just to turn on/off two LED's and nothing else. But that's just me, maybe the key is just so no one can change the lights on him but it'll be the first time I've ever encountered such idea.
catback is offline  
Old 07-06-2005, 03:11 PM   #14 (permalink)
Very Insignificant Pawn
 
Location: Amsterdam, NL
You're right, why just switch LEDs? But that was the stated problem.

You suggested two resistors. Which is very tricky to get right.
(have you tried it) :-)

I added one transistor but was unsure if it would work so added another resistor.
flat5 is offline  
Old 07-06-2005, 06:18 PM   #15 (permalink)
Psycho
 
Location: North America
Quote:
Originally Posted by flat5
You're right, why just switch LEDs? But that was the stated problem.

You suggested two resistors. Which is very tricky to get right.
(have you tried it) :-)

I added one transistor but was unsure if it would work so added another resistor.
Tried my method, yes actually I have...It's really not hard only thing about it is getting the one LED to go out but with adjustable pots you can tune it just right.
catback is offline  
Old 07-06-2005, 07:11 PM   #16 (permalink)
Very Insignificant Pawn
 
Location: Amsterdam, NL
yes variable resistors would be the only way I could find the values.
cool that you tried it.

in the dark? :-)

edit: what voltage, resistor values worked?
flat5 is offline  
Old 07-09-2005, 03:09 PM   #17 (permalink)
Crazy
 
This is a pretty cool thread, do you guys know of other places that have schematics online for different types of things?
__________________
Fight apathy! ..... or dont.
FloydianOne is offline  
Old 07-09-2005, 03:23 PM   #18 (permalink)
Very Insignificant Pawn
 
Location: Amsterdam, NL
Just Google on "circuits".
Or be more specific.

Here was the first hit.
http://www.aaroncake.net/circuits/index.asp

another good site:
http://users.pandora.be/educypedia/e...icaopening.htm

Last edited by flat5; 07-10-2005 at 05:54 AM..
flat5 is offline  
 

Tags
led, switch


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 10:47 AM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360