LED switching

Started by Ben N, March 22, 2004, 06:16:53 PM

Previous topic - Next topic

Ben N

Hi all.  I'm working on a switching project for which, due to available switch poles and throws, I need to be able to switch an LED on by breaking a connection to ground.  I guess this is a simple matter of setting up a transistor as a switch--can someone show me how to do it, or give me link to somewhere that deals with this?  (BTW, I have a bunch of N3906 hanging around.  Can I use one of them?)
Thanks,
Ben
  • SUPPORTER

niftydog


 VCC
  +
  |
  |
 .-.
 | |
 | |
 '-'
  |
  o------o
  |      |
  |      o
 *V*     '\
 *-*       \
  |      o  \
  |      |
  o------o
     |
    ===
    GND


Switch connected, 0 volts across LED, current through resistor dumped to ground.

Switch disconnected, volts across LED, current through resistor - through LED to ground.
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

Ben N

Thanks, Nifty.  You provided a very neat solution to the challenge the way I posed it, but unfortunately, it appears I left out a critical detail.  The switch that I need to perform this trick is the optional boost/buffer switch on the drain of the AMZ Mosfet Boost.  

http://www.muzique.com/schem/mosfet.htm

Because  I have the other throws of the 3PDT doing other jobs, I would like to put the unused throw of that switch to work by connecting it to the LED circuit.  That way, either the pole to ground is connected to the 5k pot, engaging the boost, or to the LED circuit, turing off the LED.

The problem I think I will have with your circuit is that Vcc would be connected through the diode to the pot, possibly screwing up the biasing of the MOSFET.  So I think I need the LED cicuit to be isolated from ground when the boost is engaged.

Or am I all wet here? :?:

Thanks,
Ben
  • SUPPORTER

niftydog

Well... ok, just trying to wrap my head around this...

With no extra switches, and without affecting the existing circuit, you want the LED ON in booster mode, and the LED OFF in buffer mode?

**fragment of booster circuit**
**with added LED modification**

          |
         --- C5
         --- 100uF
          |
          |
         .-.
VCC      | |<--o R6
 +       | |   | 5k pot (gain)
 |       '-'   |
 |        |    |
.-.       o----o
| |       |
| |       |
'-'       |
 |        |
 o----o  /o
 |      /
*V*    /  Sw1
*-*   o
 |    |
 o----o
      |
     ===
     GND


This shouldn't affect the circuit too much, if at all.  You may want to stick a decoupling capacitor accross the power supply to help when you switch to the boost, as C5 will be a short circuit for an instant before it charges.

Quote from: Ben NSo I think I need the LED cicuit to be isolated from ground when the boost is engaged.

so, when the boost is engaged, you want the LED ON but isolated from the circuit ground?  Well... that's a little difficult.

There's one problem with my solution;  There is current being drawn continuously through the LED resistor, regardless of whether the LED is on or not!  Set the current low as possible to avoid draining your battery too quickly!
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

Ben N

Thanks.  I had thought of the current draw issue, too, but I guess an efficient LED and a big resistor ought to help.  And upon reflection, I suppose that current from the LED ought not to run back up toward the FET, but I guess I'll know when I try.  Still, I think that something along the lines of RAT/Millenium switching ought to work, using a single transistor, I'm just not sure how to do it.

BTW, kudos on the ASCII schemo--I can never get those things to line up right, so I am impressed!

Ben
  • SUPPORTER

niftydog

QuoteAnd upon reflection, I suppose that current from the LED ought not to run back up toward the FET

if you've got current sourcing from ground, then you're in trouble... but that's highly unlikely if the circuit is designed properly.

QuoteBTW, kudos on the ASCII schemo--I can never get those things to line up right, so I am impressed!

Well my friend, struggle no more!  Go and get yourself a copy of ASCII circuit and make your life a whole lot easier!
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

toneman

Hey NiftyD
nice ascii art.
best i've ever seen.
will check it out after i find out what Ben is looking 4.

Ben,
U want a hi-Z circuit to turn a led off/on???
OK, 1st, what voltage U running circuit on?

what comes 2 mind after Niftyd's idea, is a tranny buffer.
if a bipolar tranny draws 2 much base current,  :-(
buff it with a MOSFET, or use a 4049 inverter  :-)
thing about inverters,
U can invert twice and have it come out rightsideup.  :idea:

if your switch switches a part of the circuit that has voltage,
U can easilly turn on a MOSFET or 4069 then use that 2
turn on the LED.  Remember, and LED *needs* a current
limiting resistor!!  :!:   :shock:
4  5V use 330ohm; 4 9V a 680 2 820ohm will work.

show us the portion of the shem U want to monitor-- :wink:
Lets all try out niftyD's ascii art....
i know i'm going 2 right now........8)

later
tone
  • SUPPORTER
TONE to the BONE says:  If youTHINK you got a GOOD deal:  you DID!

Ben N

Hey, Nifty, great tip on the ASCII program!

Toneman, take a look at the 2nd schem posted by nifty, and check the link I posted above. That should tell you what I am after.  The circuit will run on 9-18v.  And yes, I know about current limiting.  Can you point me to any schematics that show the kind of circuits you are talking about?

Ben
  • SUPPORTER

toneman

Hey Ben,

looked @ boosterwithgainswitch @ AMZ.
the article shows a DPDT for boost/noboost,
but as shown, this changes phase(?)
U mentioned U using a 3PDT(?)
by "unused throw", do U mean the "n/c" part
on the AMZ schem??
whats on the 3rd pole??

the "boost" is active when R6 tied 2 gnd.
since R6 is AC coupled, there is no DC present.
U don't want 2 "add" a DC offset, since that will
cause pops when U change sw.
what R U using the 3rd pole 4?
don't forget the 1M 2 gnd that AMZ mentions 2 prevent pops.

BTW, i found the ASCIIart exe a little difficult 2 use.
it's not intuitive....still struggling with it.
tone
  • SUPPORTER
TONE to the BONE says:  If youTHINK you got a GOOD deal:  you DID!

niftydog

Yeah, it takes a little practise, but you'll hit it on the head soon, don't worry!  Keep in mind that a right click rotates the part (or in some cases, changes it's "style")

You can also draw your own symbols.
niftydog
Shrimp down the pants!!!
“It also sounded something like the movement of furniture, which He
hadn't even created yet, and He was not so pleased.” God (aka Tony Levin)

Ben N

Toneman:

What I am trying to do is to use that out-of phase outputs to make a booster/switcher specially for Fender amps that have a Normal and a Vibrato channel, out of phase.  By connecting each of the outputs to one channel, I can have (a) the stock vibrato channel, with a buffered input; (b) both channels with buffered, phase inverted inputs, or (c) just the normal channel (preferably modified to sound a little different, maybe Marshall tone stack and cathode R/C values) driven hard by the booster.  I've got the switching down  (maybe later I'll post one of those ascii schems--I did one in Paint but I can't post it here) using a DPDT to switch between the two buffered settings (Vibrato channel alone or both channels, and between two LEDs set up conventionally), and 3PDT stomper to switch to Boost Normal channel only.  That one uses all three poles to switch the inverting output on, the non-inverting output off, and the boost control (R6) to ground.  So I think the only way to have another LED to show when the boost is activated is to use that pole that ties R6 to ground.  Instead of just switching off when the boost is turned off, I want that to tie to something else that would turn the LED off.

Does that make any sense?  Tough to follow, I know.  I have to get off now, but I will try to get that schem up, becuase it is just some switches, after all...

Thanks,
Ben
  • SUPPORTER

toneman

Hey Ben,
have ben :-) re-re-reading your last post, & i kinda C what U want.

verbal diagram---
2 channels on fender amp.
channel1 driven by top of MOSFET
channel2 driven by bottom of MOSFET

U want 2 route signal 2 chan1 OR chan2 OR both.
U want 2 step on 3PDT 2 engage boost in chan1.
Wait!,  do U already have 2 stompswitches??

i'm thinkin this might B a job 4 small, 5V reed relays.
switch as many things as U want with one sw, including LEDs.
remember, an emitter follower/or source follower has no gain.

Also, why not use 2 booster circuits??(AND relays?)
U could use a dual pot 2 have simutaineous gain control of both(?)
also, both chans would B "in phase".

not much more time with asciiart
still thinkin'
afn
tone
  • SUPPORTER
TONE to the BONE says:  If youTHINK you got a GOOD deal:  you DID!

Ben N

Oh, sure I could do it with relays or more than one transistor, but where's the fun in that??
  • SUPPORTER

toneman

Ben,
OK, no fun using another tranny or relays.
Drew an ASCIIart schemo, but can't get it 2 preview right.
finally got the hang of using it,.....
but, seems like ASCII gets "scrunched up" when posted(?)
Basically, i used a 4049 inverter to not only provide a hi-Z for the
sw, but also to provide isolation/and inversion.
When Gain sw is open, C5 & R6 are doing nothing.
Since C5 isolates the MOSFET, U *can* tie a voltage 2 it.
What i propose--
Tie 10K pullup R to bottom of R6.
Connect input of inverter 2 same point.
When sw open, inv-in pulledup, output low, LED ON.
When sw closed, inv-in pulleddown 2 gnd, output Hi, LED OFF.
U can use another inverter 2 "change the phase".
Works great on paper.
The first suggestion w/justLED&R is the simplist.
AsLongAs U want LED ON when sw is closed.
If U want opposite, U need 2 invert.
Same idea would work with PNP or NPN.
Oops, 1 more trannys........
BTW, have saved the ASCIIart as a txt file if U want.
That's all folks.
tone
  • SUPPORTER
TONE to the BONE says:  If youTHINK you got a GOOD deal:  you DID!

toneman

BEN,
got it!!!
got the ASCIIart posting figured.
check out "ASCII Test" in the Testing section.
i was usingthe  "code" term wrong.
it comes out scrambled B4 U preview.
when U preview, it alligns itself...weird!
GREAT little ASCII viewer by Andy!!
I edited it in Notepad 2 shrink the width,
once i had the general layout.
AFN
tone
  • SUPPORTER
TONE to the BONE says:  If youTHINK you got a GOOD deal:  you DID!

Ben N

Tone:
Your dedication is a thing to behold.  I believe that 4049 idea may be the ticket!
Ben
  • SUPPORTER