Project #1: LED slow rise.

Thread Starter

AcousticBruce

Joined Nov 17, 2008
58
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!

 
Last edited:

#12

Joined Nov 30, 2010
18,224
You are only providing about 12 ua to 20 ua to the base of the transistor and hoping for a current gain of 4000.
 

crutschow

Joined Mar 14, 2008
34,386
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
 

Thread Starter

AcousticBruce

Joined Nov 17, 2008
58
You are only providing about 12 ua to 20 ua to the base of the transistor and hoping for a current gain of 4000.
This is great. I will look into that. I probably will have lots of questions.

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...
View attachment 65128
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.
 

Papabravo

Joined Feb 24, 2006
21,217
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.
*** 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 ***
 

wayneh

Joined Sep 9, 2010
17,498
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.
 

crutschow

Joined Mar 14, 2008
34,386
.................

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.
.......................
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. ;)
 

Papabravo

Joined Feb 24, 2006
21,217
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.
 

Thread Starter

AcousticBruce

Joined Nov 17, 2008
58
*** RANT ALERT ***
Excuse me for living, but that is manifestly the wrong approach. ....
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 :)

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.
Yes sir :)

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. ;)

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

Papabravo

Joined Feb 24, 2006
21,217
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
 

takao21203

Joined Apr 28, 2012
3,702
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.
 

wayneh

Joined Sep 9, 2010
17,498
Well, it's wired correctly but will short the battery if it is turned on.

Oops, nevermind. V2 is not grounded, as PB noted.
 

#12

Joined Nov 30, 2010
18,224
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.
 

crutschow

Joined Mar 14, 2008
34,386
Since when is this the correct way?

NPN emmitter to Ground.
LED cathode to NPN collector.
The switching is occurring in the collector circuit with the emitter grounded. That's high side switching for an NPN.
 
Last edited:

takao21203

Joined Apr 28, 2012
3,702
That's true but I don't see how that applies to the op's circuit. His circuit is high side switching (even if the power source is floating).
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).
 
Top