Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   LED Switch (https://thetfp.com/tfp/tilted-technology/90361-led-switch.html)

reddog418 06-07-2005 11:05 PM

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?

http://www.gamesaints.com/circuit.gif

telekinetic 06-08-2005 12:04 AM

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.
http://img62.echo.cx/img62/1258/circuit4ko.gif

reddog418 06-08-2005 01:28 AM

That's really ingenious, but the keyswitch doesn't quite work like that.

Here's what it looks like...

http://i20.ebayimg.com/01/i/01/68/18/b7_1_b.JPG

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?

catback 06-08-2005 08:19 AM

This is what you want, excuse the poorly drawn resistors

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

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

reddog418 06-08-2005 02:37 PM

How would that shut off the green light once the keyswitch is flipped?

n0nsensical 06-08-2005 11:21 PM

nevermind for now, perhaps will post later

flat5 06-09-2005 02:01 AM

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.

skaven 06-14-2005 07:13 PM

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:

http://www.djskaven.com/yatta/red_green_t.jpg
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.

flat5 06-15-2005 05:36 AM

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.

http://s1.simpload.com/080842f741609fd8f.gif

catback 06-22-2005 04:00 PM

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.

flat5 06-23-2005 01:59 AM

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.

skaven 06-23-2005 07:36 PM

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.

catback 07-06-2005 12:18 PM

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.

flat5 07-06-2005 03:11 PM

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.

catback 07-06-2005 06:18 PM

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.

flat5 07-06-2005 07:11 PM

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?

FloydianOne 07-09-2005 03:09 PM

This is a pretty cool thread, do you guys know of other places that have schematics online for different types of things?

flat5 07-09-2005 03:23 PM

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


All times are GMT -8. The time now is 12:53 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, 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