Controlling Large Voltage with Smaller Voltage or Using Transistor/MOSFET as Switch

Discussion in 'General Electronics Chat' started by elec_mech, May 24, 2011.

  1. elec_mech

    Thread Starter Senior Member

    Nov 12, 2008
    1,501
    196
    Hobbyist, yes, I want to be able to toggle on and off the flashing of the LEDs and have them remain lit when the flashing pulse is off or otherwise removed.

    Audioguru, I see what you are saying. Particularly last night when I added the pull-up resistor which prevented the LEDs from going fully off during pulses. That came as a big duh. Should've seen that sooner.

    Well, I added a transistor to the ground portion of the 555 flasher so I could turn the flasher on and off and, for better or worse, I noticed the 555 outputs a steady high signal (didn't measure, but I assume 4-5V) with the transistor turned off. See attachment. This kept the LEDs on when the flasher was off which is my goal. However, I don't know why this is the case and don't feel it to be the safest method, so I'm going to try Hobbyist's circuit this weekend. In effect, I think I'm looking for a SPDT which looks like it can be accomplished with two transistors.

    One question regarding the circuit in the attachment - I measured just less than 280mA between the common cathode of the LEDs and the collector pin, but the 2N2222 transistor was very hot to the touch. The 2N2222 is rated, I thought, to at least 600mA. Should I use a transistor with a higher current rating like a TIP or is there another problem I've overlooked?

    Thank you, thank you, and thank you again everyone. I immensely appreciate the help.
     
  2. hobbyist

    AAC Fanatic!

    Aug 10, 2008
    887
    88
    Hi,

    There are several ways this can be done.

    This one will use only one transistor, it is an inverter, the led's get full current from the supply, and the transistor is used to turn the LED's off according to 555 pos. going input.

    pulse led2.jpg

    Also bear in mind these drawings are mainly proof of concept, the actual working circuits may require additional components, depending on input and output requirements, impedances ect...
     
  3. Audioguru

    Expert

    Dec 20, 2007
    11,055
    1,278
    With a current of 280mA and a hot 2N2222 then it doesn't have enough base current to turn on completely. Most small transistors need a base current that is 1/10th the collector current to saturate completely.

    You probably want more than 280mA so the base current should be more than 28mA.
    If the output of the 555 is 3.5V and the base voltage of the 2N2222 is 0.9V then the base resistor has 2.6V across it and its value should be 2.6V/28mA= 93 ohms. Your base resistor value is more than 10 times too high and with a collector current more than 280mA then the value of the base resistor must be less than 93 ohms.

    DO NOT use the circuit in post #20 because it wastes a lot of power making heat.
    Instead you can stop the 555 from oscillating by making its reset pin4 low. Then its output goes low. But the next time the 555 output oscillates high its will be a little longer duration than normal.
     
  4. hobbyist

    AAC Fanatic!

    Aug 10, 2008
    887
    88
    Hi,
    Elech mech

    The circuit in post #20, will only waste power if the proper component values are not used.

    Just as any circuit configuration, you design a circuit, considering all the factors neccesary, current consumption, voltage drops ect... so as to attain the proper amount of power consumption.

    The circuit of post #20 will work in its least amount of power consumption, according to choosing the proper values for components, the same way all circuit designs are implemented.

    These drawings are for proof of concept only, as I stated before, there are many parameter factors in considering the design of a properly working circuit, but a proof of concept could be one foundation of which to build upon using components more or few based upon performance requirements.
     
  5. Audioguru

    Expert

    Dec 20, 2007
    11,055
    1,278
    Oh.
    A 15V supply and a 280mA current equals a waste of 4.2W. But when the entire load is shorted by your transistor then the current will probably be much higher. Then the wasted power (and heat) will be much higher.
     
  6. elec_mech

    Thread Starter Senior Member

    Nov 12, 2008
    1,501
    196
    Hobbyist and Audioguru,

    Thank you both. I will keep in mind the provided examples serve as examples only and not a complete solution.

    The reset pin, ah-ha! I've attached a circuit showing the connection of the reset pin to ground through an NPN transistor with a pull-up on the collector side. Does this look kosher?

    When you say the 555 will go high a little longer than usual, do you mean the output pulse? If so, do mean the first output pulse only or all of them, meaning the high pulse will become longer than what I have it set at? The first time is no problem.

    Ah, the 'ol 1/10 current rule. I apologize, I'm going to have to beat my head against the wall a few times before this sinks in and sticks. That makes sense. I plan to use a wallwart to power this, so current draw isn't too big a concern. However, if I wanted to consume less current (overall, I'm keeping the LEDs at 20mA), would a MOSFET be a better choice?

    Are there any advantages or disadvantages when using a MOSFET in place of a transistor for switching applications? I'm only using transistors at the moment to a) get my feet wet and b) keep the parts list simple with items most us have on-hand anyway.

    Thanks again!
     
  7. Audioguru

    Expert

    Dec 20, 2007
    11,055
    1,278
    It should work fine except the oscillator runs when the new transistor has a low input and is reset when the transistor has a high input.

    Yes, only the first pulse will be a little longer following a reset. The same thing happens when power is applied to the oscillator.

    [quore]if I wanted to consume less current (overall, I'm keeping the LEDs at 20mA), would a MOSFET be a better choice?[/quote]
    An ordinary Mosfet needs 10V on its gate to turn on completely. A Logic Level Mosfet needs 4.5V so both might not work since your 555 output does not go high enough.

    A transistor needs base current. A Mosfet has no gate current.
     
  8. elec_mech

    Thread Starter Senior Member

    Nov 12, 2008
    1,501
    196
    Thanks Audioguru! I'll give this a shot and also try a PNP transistor at the reset pin.
     
  9. Audioguru

    Expert

    Dec 20, 2007
    11,055
    1,278
    Then the resistor that pulls the reset pin low for a reset will waste a lot of power when the PNP transistor holds the reset pin high so that the 555 can oscillate.

    Do not use a PNP emitter-follower because it will not pull the reset pin low enough.
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,201
    1,807
    Your 93 Ohm resistor that you're using on the base of the 2N2222 will result in around 32.2mA current through the base, which will saturate the transistor for up to ~320mA current.

    The 555 timer's pin 3 output is a Darlington emitter follower, so the highest it'll go is around Vcc-1.3v, or 5v-1.3v = 3.7v
    The base-emitter junction will drop around 0.7v, so you're left with 3v to drop across the resistor, hence 32.2mA base current.
    93 Ohms is not a standard value, but 91 Ohms is.
    You could also use 100 Ohms for 30mA base current.
     
  11. elec_mech

    Thread Starter Senior Member

    Nov 12, 2008
    1,501
    196
    All,

    I forgot to bring my modified schematic, but I will post it. I ended up using a 2N2907 PNP transistor to control the LEDs with a 47 ohm base resistor. The transistor did not get hot, maybe a little above ambient, but that could be in my head.

    I ended up tying pin 4 (reset) of the 555 directly to the output of the CD4050 level converter with a pull down (I believe) resistor to keep reset low and the flasher off until the CD4050 puts out a 5V signal.

    Discovered a new problem when I tried powering the circuit from a wallwart in place of my bench supply, but I'll start a new thread for that as I'm reasonably confident that it is not a transistor problem.

    Please accept my thanks and gratitude for all of your help and advice. I've learned much over the last week which I'll carry on to future projects. I plan to post the completed circuit shortly in the projects section - just as soon as I get a handle on the power issue.

    Thanks again everyone!
     
  12. Audioguru

    Expert

    Dec 20, 2007
    11,055
    1,278
    I have no idea why you are using a non-inverting CD4050 buffer to drive the pin 4 reset pin of the 555.

    The CD4050 output goes high or it goes low so a pull-down resistor on its output is not needed.

    Please post your latest schematic.
     
  13. elec_mech

    Thread Starter Senior Member

    Nov 12, 2008
    1,501
    196
    Hi Audioguru,

    Attached is the complete circuit to date. The CD4050 is serving two purposes including:

    1. Changing the 3V signal from the remote circuit and converting it to a 5V signal to work with the rest of the circuit.

    2. Acting as a debounce switch for the remote signal inputs.

    The 3V signal from the remote goes to the CD4050 which outputs a 5V signal. There are four inputs & outputs.

    Two go to independent 555 timers set up in astable mode to tell the CD40110 to count either up or down. The timing of the pulses is such that the user can simply press the remote switch up or down once and the counter is incremented or decremented once. If the user holds the switch in either the up or down position, the counter will proceed to increment or decrement at a decent pace until the user lets the switch go.

    The third input resets the counter to zero by sending 5V to the reset pin of both CD40110s.

    The fourth input is the tricky one. It sends a signal to a 555 configured as a latching output. Everytime the 555 receives a 5V pulse, it changes state, either high or low. This circuit uses a momentary input to turn power on or off to a device. In this case, I'm using it to control the reset pin of another 555 timer, also in astable mode, used to flash the display. In reviewing this briefly Audioguru, I don't think I need to go from the toggle 555 to the CD4050 back to the flashing 555. I can probably go directly form the output of the toggle 555 to the reset of the flashing 555. I'll give this a shot.

    The toggle 555 currently uses a MOSFET - I'm going to try to change that to a transistor after everyone's help here.

    I did attempt to connect the 3V output from the remote circuit to a transistor in order to eliminate the CD4050. I don't immediately recall whether I stuck with 5V or 15V, but the bounce from the remote circuit sent the count flying! I could probably eliminate the CD4050 and go with a transistor for each input/output, but then I'd have to add a debounce circuit of some type which is just going to add more parts and connections, so currently I plan to stick with the CD4050.

    I was also going to attempt to eliminate the 7805 and run everything from 15V, but then I have to bump up the input voltage (3V from the remote circuit) to +8V to the CD4050, which again means more parts.

    I double-checked the voltage drop across the 2N2907 and the UDN2982 and discovered I could still power the LEDs off a 12VDC source. I used a 12V, 1000mA wall wart which put out about 13.1V and, once I changed the LED resistors, the circuit and display appear to work great.

    I am open to suggestions for simplifying the circuit if anyone has some advice. I'm at a point where I need to shoot the engineer in me and submit this before I think of any more features (dual color display, minimum power consumption, etc.). I wanted to build a working model first and I have learned a lot along the way, much in part thanks to people on this forum.
     
  14. Audioguru

    Expert

    Dec 20, 2007
    11,055
    1,278
    You are lucky that it works because a CD4050 is not a level shifter.
    With a 5.0V supply, an input must be at least 3.5V for it to be a valid high and you have only 3.0V or less.

    I don't see a debounce capacitor in the CD4050 circuit.
     
  15. elec_mech

    Thread Starter Senior Member

    Nov 12, 2008
    1,501
    196
    Hi Audioguru,

    My apologies, I thought the CD4050 was a level shifter. The datasheet says it is a logic level converter, but I won't claim to know the difference. On the Fairchild datasheet (the only one I can quickly find), it states at 25°C, the typical high voltage is 2.75V. It also states the minimum is 3.5V which does not make a lot of sense to me.

    Would a CD4504 work or could you recommend a CMOS level shifter that will work to interface 3V to 5V? I know I'm using 5V so a TTL, 74XX series would work, but I've read CMOS consume less power, but more important for this application is that I've found CMOS typically cost a lot less.

    I would like to say I planned this, but the fact of the matter is, the CD4050 *appears* to act as debouncer of sorts based strictly on the fact I've rarely seen any hiccups when operating the switches, especially as of late. Supported moreso when I attempted to use a transistor without any debouncing circuitry.

    Not knowing much about debouncing capacitors or finding a quick, simple example on Google, do I need to add a capacitor between each CD4050 input and ground? Would a ceramic 0.1uF suffice or do I need to go with more of something like a 1uF electrolytic?

    Thanks again!
     
  16. Audioguru

    Expert

    Dec 20, 2007
    11,055
    1,278
    Very old fashioned TTL ICs have a fairly high input current and might load down your 3V system too much. Cmos has no loading.

    The CD4050 converts a high logic voltage like 15V into a low logic voltage like 5V. You need the opposite.
    A properly designed transistor circuit can easily convert 3V logic to 5V logic.

    Many years ago I made a circuit and debounced its switches with a debounce IC that is not made anymore. Usually a series resistor (1k) and capacitor to ground (0.01uf to 0.1uF ceramic) filters the bounces then feeds a Schmitt-trigger IC. Your CD4050 circuit does not have a resistor-capacitor and does not have a Schmitt-trigger.
     
  17. elec_mech

    Thread Starter Senior Member

    Nov 12, 2008
    1,501
    196
    Audioguru,

    Thank you for the information. I found a debounce Schmitt-trigger circuit online and I'm planning to modify it as shown in the attachment. The top circuit is the one I found with the website address provided for proper credit and reference.

    The middle circuit is the one I plan to use if it tests out successfully. The remote circuit I'm using actually outputs 3V, 0V, or nothing (is that what you would call a tristate output?). The outputs are actually H-bridges originally connected to motors. I can simply use the 0V instead of the 3V as my input signal. I've added a signal diode to prevent the 3V signal from entering the circuit when the switch is in the opposite position.

    The bottom circuit will serve as a back-up plan and, if I did it correctly, will hopefully help someone trying to do the same thing - convert 3V to 5V and debounce.

    Open to suggestions if you have any. I'll post my results once I have them.

    Thanks again!
     
    Last edited: Jun 2, 2011
  18. Audioguru

    Expert

    Dec 20, 2007
    11,055
    1,278
    If the 3V input signal goes OPEN, then the transistor might be turned on by heat or by local radio signals. Connect a 10k resistor from its base to 0V to ensure it is off when it is supposed to be off.
     
  19. elec_mech

    Thread Starter Senior Member

    Nov 12, 2008
    1,501
    196
    Audioguru,

    Thank you again. I completely forgot about ensuring the transistor stays off until needed. I didn't know heat or radio waves could set off a transistor - I mean, I know something could cause an unconnected input to go arwy, I just didn't know what.

    Attached is the corrected diagram.

    I forgot to bring a 4093 home, so I did not get to test last night. :( But, rest assured, I intend to this weekend.

    Thanks!
     
  20. Audioguru

    Expert

    Dec 20, 2007
    11,055
    1,278
    The transistor inverts the logic signal.
     
Loading...