Project #1: LED slow rise.

Discussion in 'The Projects Forum' started by AcousticBruce, Feb 20, 2014.

  1. AcousticBruce

    Thread Starter Active Member

    Nov 17, 2008
    58
    0
    I decided to make a circuit that will use a 9 volt batter and it will slowly rise the current from dim, to full bright LED. I want it to be a couple seconds.

    So what I did:

    I created an RC circuit that uses a 20uF cap and a 50k resister. This T=RC makes 5T about 5 seconds.

    I created another capacitor circuit which controls the flow of a more amplified current but which is (supposed) to stick to about 50mA. I used a 9Volt and a 180 Ohm resister because 9V / 50mA = 180 Ohms.


    My questions:

    1) Why do I get 500uA read regardless of the resister on the transistor side.

    2) Can I use the same 9v for both sides? Maybe use a voltage divider for 1v to drive cap charge and 8 v to drive LED? All this instead of using 2 batteries.

    I got this idea from reading about common emitter amplifiers. Instead of a complete AC signal. This is just a rise and no fall.


    edit: Oops! I forgot the schematic!!!

    Edit: THE GROUND!!!! It should not be there and sorry for the confusion. It can be moved to negate node on voltage source!

    [​IMG]
     
    Last edited: Feb 23, 2014
  2. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    I am confused about how you are trying to get this delay. :confused: Post a circuit diagram of what you are trying to do.
     
  3. AcousticBruce

    Thread Starter Active Member

    Nov 17, 2008
    58
    0
    I'm sorry. I forgot to add the image. Sorry about that!
     
  4. AcousticBruce

    Thread Starter Active Member

    Nov 17, 2008
    58
    0
    is a question like this better posed it main forum? its not really a school project. im just trying to learn.
     
  5. #12

    Expert

    Nov 30, 2010
    16,252
    6,751
    You are only providing about 12 ua to 20 ua to the base of the transistor and hoping for a current gain of 4000.
     
  6. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    Below is a circuit that should do what you want. I added a second transistor to provide additional gain so you can use reasonable values of resistors and capacitors. I also put the resistor in the emitter which provides feedback that makes the LED current nearly proportional to the base voltage. This increases the rise-time for a given capacitor size and gives a more linear increase in LED current with time.

    The turn-on is shown from when the power is applied to the circuit. To reset the circuit you can add a switch to momentarily ground C1 (through a small resistor, say 10Ω, to limit the discharge current).

    If you want more LED current you can reduce the value of R1.

    LED Slow Rise.gif
     
  7. AcousticBruce

    Thread Starter Active Member

    Nov 17, 2008
    58
    0
    This is great. I will look into that. I probably will have lots of questions.

    Crutchow. I have to say, thank you for your time. Forgive me for not adding in the original post that I do not want a solution. I will look at your circuit later. Right now I want to slowly build and add what I need via questions and ideas with more questions. For instance above, #12 mentioned that I have a small amount of Amps and am wanting a gain of 4000. This makes me question and I go back and look at the circuit and come back with questions.

    For now I want to slowly build. I promise I will look at your solution later when I am more happy with my knowledge. Thank you again.
     
  8. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    *** RANT ALERT ***
    Excuse me for living, but that is manifestly the wrong approach. You don't learn anything by fumbling around in the dark with ill-formed ideas and random schematics. You learn to write by reading great literature. You learn to design circuits by analyzing and understanding good design. You waste incredible amounts of time try to make bad designs functional.

    Years as an entrepreneur have taught me that the road to success is to avoid "slow, stupid failure". By that I mean, make your mistakes early and quickly, get them out of the way, don't hang on to them, and for heavens sake move on.
    *** END OF RANT ***
     
  9. wayneh

    Expert

    Sep 9, 2010
    12,090
    3,027
    I think the OP just wants to enjoy the journey and not rush to the destination. It's good to learn by experience, and incrementally, as you go. You tend to really learn permanently this way. But PB's point is a very good one - it's important to know what the destination is, even if you want to dawdle along the way.
     
    Metalmann likes this.
  10. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    Okay, I can understand that as part of the learning process. Then there are two main problems with your circuit that you want to solve:

    1) The input resistor value to the transistor is too high to give the required base current for your desired output current, as #12 noted. (look up the minimum beta (Hfe) gain for the transistor you want to use, such as a 2N2222, in its data sheet.) Thus you either need to drastically reduce the value of R1 (and correspondingly increase the value of C1) or add more gain to the circuit.

    2) A common-emitter amplifer has a relatively abrupt turn-on at a base-emitter voltage (Vbe) of about 0.7V (one diode drop). Thus at power-on your circuit will show a significant delay with no LED current until 0.7V is reached and then rapidly turn ON. You won't get the slow ramped turn on of the LED you want from time zero.

    So you need to solve those problems. I gave you my solution. So give it a shot yourself. There is no single solution, of course, but some solutions are better than others. The interesting part of design is trying to find which one is best. You may come up with one better than mine. ;)
     
  11. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    I have absolutely no problem with dawdling over problems simple or complicated. My only issue is with dawdling over a random schematic that represents a poor approach. It seems more worthwhile to dawdle over a proper design.
     
  12. AcousticBruce

    Thread Starter Active Member

    Nov 17, 2008
    58
    0
    You are right about reinventing the wheel. I tend to want to do that at times. However, this is not random. I learned about RC filters, RC charge and discharge times and I learned about transistor as common emitter and switch. I took these and thought I would try to mix them. So its not silly random dumb waste of time.

    When you study chess, if you just study openings, you miss the heart of the game. I take the same approach when I study things as a hobby. Btw anyone up to a game of chess I am down :)

    Yes sir :)


    Thank you so much!!! This is so awesome. I cant wait to get home to figure all this out. I will be in touch. :)
     
  13. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    One more thing:
    An un-grounded power supply or voltage source should be a red flag. There may be a good reason to do this in some cases, but getting started, you should try for single voltage sources with one side grounded.

    Look at information for various transistor connection schemes: Common Emitter (CE), Common Base (CB), and Common Collector (CC). Study those circuit basic prototypes.

    Good Luck
     
  14. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    With a lot of experts here nobody spotted the transistors are not used correctly.

    NPN is used for low side switching. PNP for high side.
     
  15. wayneh

    Expert

    Sep 9, 2010
    12,090
    3,027
    Well, it's wired correctly but will short the battery if it is turned on.

    Oops, nevermind. V2 is not grounded, as PB noted.
     
  16. #12

    Expert

    Nov 30, 2010
    16,252
    6,751
    takao, I disagree. You need to name which transistor is drawn incorrectly and say why, in order to not leave the O.P. guessing about what you mean.
     
  17. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Since when is this the correct way?

    NPN emmitter to Ground.
    LED cathode to NPN collector.
     
  18. crutschow

    Expert

    Mar 14, 2008
    12,988
    3,226
    The switching is occurring in the collector circuit with the emitter grounded. That's high side switching for an NPN.
     
    Last edited: Feb 21, 2014
  19. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    If you use NPN you need a voltage rail with higher voltage.
    PNP needs a negative voltage.
     
  20. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    It is even more weird since the LED is in parrallel with the transistor. One voltage source should connect to the common ground (the inverse triangle in simulation softwares such as LTSpice).
     
Loading...