Author Topic: RC charging delay circuit help  (Read 2184 times)

0 Members and 1 Guest are viewing this topic.

Offline ManlishPotatoTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: se
RC charging delay circuit help
« on: August 19, 2020, 10:51:59 am »
Hi!
Just a newbie over here trying to understand the basics of electronics :)
An idea that's been stuck in my head for long is to create a delay using only a capacitor, resistor and a bjt. The problem i'm having is that in idea the bjt would abruptly and quickly turn on the collector current when reaching nominal voltage at the base. But instead what happens is that it gradually comes on when it's nearing the correct voltage. So rather then having the delay and then turning on the LED, it instead wait's a little bit, and the gradually turns it on. Is there anyway i could achieve my goal with only using more jellybean components like resistors, capacitors and transistor for example? In other words no micro controllers or ICs in general.

Thanks in advance!
//Benji

 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19562
  • Country: gb
  • 0999
Re: RC charging delay circuit help
« Reply #1 on: August 19, 2020, 12:36:46 pm »
You need a more complex circuit than that. As the voltage slowly falls, the current through the base gradually falls, causing the collector current to slowly go down, gradually reducing the brightness of the LED.

To get a definite on/off, you need two transistors and positive feedback, forming a monostable.

EDIT: If forgot the all important diode, D2, which is required to stop the capacitor discharging into the switch. It sort of works without it, but the delay will be much shorter, than it otherwise would be and is more dependant on the supply voltage and temperature.

« Last Edit: August 20, 2020, 09:33:47 am by Zero999 »
 
The following users thanked this post: ManlishPotato

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1425
  • Country: ua
Re: RC charging delay circuit help
« Reply #2 on: August 19, 2020, 02:14:30 pm »
'Slow opening' is a natural way for simple circuits with RC-controlled transistors. But you may add a positive feedback (from output) to you circuit to it was fast.
 

Offline ManlishPotatoTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: se
Re: RC charging delay circuit help
« Reply #3 on: August 19, 2020, 03:19:35 pm »
That's a good start, is there a way to do the opposite?
In other words i want it to be like this:

I press the button
delay
The LED turns on
unimportant delay
The LED turns off / fades off

The delay after the LED is turn'd on is not important, it may fade off too.
The important thing is that you press the button, there is a certain amount of delay, and then it turns on. Right now it turns on immediately, and after a delay it turns off.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12875
Re: RC charging delay circuit help
« Reply #4 on: August 19, 2020, 04:02:21 pm »
To do what you want with only BJTs and other discrete components, (without kludging it by driving the LED via a large capacitor so it only gets enough energy to stay on for a limited time), you'd need to either cascade two RC delay + BJT switching blocks, or start both delays at the same time but have them of different periods and connect the LED (+ series resistor) between the two BJT switching block outputs, or implement a discrete window comparator so the output is only on while the capacitor voltage is in a defined range. 

Another topology for a well defined threshold and snap action switching that may be easier to cascade:



Its a non-inverting Schmitt trigger.  Q1 acts as a comparator with its threshold set by Zener D1 + its own Vbe voltage drop.  R3 keeps D1 biased.  Positive feedback via R4 provides Hysteresis.  The ratio of R2 to R4, and the voltage swing at Q2 collector set the width of the hysteresis band.  R5 limits Q2 base current, and R6 'mops up' any leakage current in Q1 when off so Q2 turns off properly.

If you wanted an output that drives high hard, you could flip the whole circuit from R2 onward upside-down, swapping NPN for PNP transistors and visa-versa and keeping the Zener cathode positive.  Swap R1 and C1 to change from initially low, goes high to initially high, goes low.

LTspice simulation attached.

Keywords:
BJT (Bipolar Junction Transistor)
Comparator
Hysteresis
Schmitt Trigger
« Last Edit: August 19, 2020, 10:58:58 pm by Ian.M »
 
The following users thanked this post: Simon_RL

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3039
  • Country: us
Re: RC charging delay circuit help
« Reply #5 on: August 19, 2020, 10:24:29 pm »
Hi!
Just a newbie over here trying to understand the basics of electronics :)
An idea that's been stuck in my head for long is to create a delay using only a capacitor, resistor and a bjt.  ...

CMOS logic gates (especially those with Schmitt trigger inputs) are often used in this kind of configuration.

Here's a web page with various timer circuit ideas:

http://www.zen22142.zen.co.uk/ronj/cmt1.html

And here's another one with more oscillator type circuits:

https://makingcircuits.com/blog/simple-multivibrator-circuit-projects-astable-bistable-monostable/


« Last Edit: August 19, 2020, 11:47:26 pm by ledtester »
 

Offline ManlishPotatoTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: se
 

Offline ManlishPotatoTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: se
Re: RC charging delay circuit help
« Reply #7 on: August 27, 2020, 03:48:59 pm »
« Last Edit: August 27, 2020, 03:51:43 pm by ManlishPotato »
 

Offline Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3350
  • Country: ca
  • Place text here.
Re: RC charging delay circuit help
« Reply #8 on: August 27, 2020, 04:08:57 pm »
Here's the problem. It's 2020. A microcontroller is a jellybean part now!  >:D
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3350
  • Country: ca
  • Place text here.
Re: RC charging delay circuit help
« Reply #9 on: August 27, 2020, 04:13:52 pm »
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3039
  • Country: us
Re: RC charging delay circuit help
« Reply #10 on: August 27, 2020, 04:26:14 pm »
Remember the OP's intent for starting this thread:

Quote
Hi!
Just a newbie over here trying to understand the basics of electronics :)
An idea that's been stuck in my head for long is to create a delay using only a capacitor, resistor and a bjt.
...
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19562
  • Country: gb
  • 0999
Re: RC charging delay circuit help
« Reply #11 on: August 28, 2020, 08:19:52 am »
Hey!
For anyone seeing this thread asking the same question, here is the final schematic i've come up with.
It's essentially a schmitt trigger with a capacitor charging up to the target voltage creating the delay. I have tested it in reality and it works! Only replace the 100 ohm resistor in series to the capacitor to something like 1k ohm instead, this was only to make the simulation go faster.
//Benji
I'm glad the circuit does what you want it to, but it isn't a Schmitt trigger. There's no positive feedback and hysteresis: the on and off thresholds are the same. It's two NOT gates in series, which has a much higher gain than a single BJT, so the LED has a much sharper on/off characteristic, than you got with a single transistor. It can be made into a Schmitt trigger, by connecting a resistor from the collector for the right hand transistor, to the base of the transistor on the left. Please use designators Tr1, Tr2, C1, R1 next to symbols, it makes it easier to refer to components.

That circuit also has a few quirks which might be undesirable:
It uses more power when the LED is off, than when it's on, because the transistor short circuits it to turn it off.

The delay increases, with ingreasing supply voltage, because if the capacitor is charged up to a higher voltage, it will take longer to discharge to the 2.6V, required for it to turn off. Why 2.6V? It's because a transistor typically requires a base-emitter voltage of 0.6V to turn on and there's a potential divider consisting of 3k3 & 1k on the base, which divides the capacitor's voltage by 4.3, so the transistor won't turn off until the voltage on the capacitor falls below 4.3*0.6 = 2.58V, but there's no point in using more than one significant digit for the calculation, as the base-emitter voltage isn't that precise.

The delay is temperature dependant. The threshold is set by the the base-emitter voltage, which varies with the temperature. At room temperature it's around 0.6V, but it can vary significantly from hot to cold. The higher the temparature, the longer the delay, because it has a negative temperature co-efficient, which means the threashold voltage drops, with increasing temprature. The lower the threshold voltage, the longer it will take for the capacitor to discharge to that votlage.

The other circuits posted by Ian.M and me are somwhat sensitive to temperature and supply voltage fluctuations, but temperature is less of an issue.
 
The following users thanked this post: Ian.M

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12875
Re: RC charging delay circuit help
« Reply #12 on: August 28, 2020, 09:53:47 am »
Here's my version in Falstad.

The lamp is on for about 0.8 seconds before the capacitor charges past the reference voltage.  Reset the sim to repeat.

OT: My opinion of Falstad is virtually unprintable.  :'(  When compared to LTspice, the only good things I can say about it, is its online and animated!
« Last Edit: August 28, 2020, 10:01:21 am by Ian.M »
 

Offline ManlishPotatoTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: se
Re: RC charging delay circuit help
« Reply #13 on: September 04, 2020, 09:54:02 am »
Hi guys sorry for the delay!
I wanted to complete the ultimate version of the circuit i was trying to design, i went ahead and learned ltspice as that seems to be preferred :)
So far i think it definitely has a learning curve, but its a powerful tool in the end.

I attached pictures of sim and schematic down below, as well as the asc file. Sorry if my schematic is a little messy :)
The circuit has a latching circuit to the left, and a comparator / two NOT gates in series on the right. The latching circuit charges up the capacitor until it reaches the target voltage of the two NOT gates which switches on the output LED and powers off the latch, this has an additional smaller capacitor to give a little delay of about 0.5s until it switches off. The circuit also has in the middle a inverted latch output which immediately discharges the capacitor after the latch is powered off.
In the sim the latch is powered on with a 0.5s pulse from V3, you can then see how it charges up to about 2.8V when the LED or output is powered on, the cap about 0.5s later discharges as the LED powers off.

I have tested the circuit on a breadboard and it works as intended! It is in no way exact, but it was a personal challenge for me to keep it as simple as possible, precision and practicality wasn't a concern for this project. In retrospect it would have been way smarter to have the delay on the discharge, not on the charge of the capacitor. That way would have been way easier i think to get a long delay, but i wanted to see if i could do it this way and you certainly can.

Your welcome to roast my circuit haha, but hey it works right?
//Benji
« Last Edit: September 04, 2020, 09:56:24 am by ManlishPotato »
 
The following users thanked this post: Ian.M

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12875
Re: RC charging delay circuit help
« Reply #14 on: September 04, 2020, 11:35:10 am »
You've designed it, simmed it, breadboarded it, and confirmed it operates as designed in real life,  I'd count that as 100% win!  :-+  :clap:  Maybe even 110% for weaning yourself off Falstad!  :-DD

I've seen a lot worse schematic layout from LTspice novices.  Some of my early layouts were impenetrably dense.  You've already got the hang of the conventions of left to right signal flow and for power rails, most positive at the top, most negative at the bottom, which is more than some young graduate EEEs seem to manage!

 A couple of things that will help you avoid crowded hard to read layouts are:
  • Always use a minimum of 1 'unit' of wire length inline with the pins of two pin components before you go off at a rightangle.
  • Vertical text is generally an abomination:
    • Try to avoid creating vertical net labels.
       A one unit horizontal bend or T from a wire lets the label be horizontal. A two unit T centered on the wire lets the label be horizontal above or below the end of the wire and centered on it.
    • When you rotate a part 90 degrees don't leave the designator, value and other attributes vertical.  Edit each to horizontal and reposition them appropriately, for easy readability.   Also I recommend changing their alignment to the side closest to the component so they don't wander off as the relative font size jumps as you scale the schematic!
  • Avoid making four wires meet at a point - if you don't notice there's a little dot its far too easy to see it as two wires crossing.  Offset one of them min. one unit, or see if it makes more sense to move stuff around so you've only got T junctions.
  • Try to avoid unnecessary zigzag bends in wires - if you space stuff out a lot more you can often reduce it to one or even no bends
  • Try to avoid sideways and upside-down ground symbols, and upside-down voltage sources.
  • Detach sources that wont be part of the  'as-built' schematic, put them somewhere out of the way and hook them up with (meaningful) net labels.
« Last Edit: September 04, 2020, 11:49:25 am by Ian.M »
 
The following users thanked this post: ManlishPotato

Offline ManlishPotatoTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: se
Re: RC charging delay circuit help
« Reply #15 on: September 05, 2020, 08:18:40 am »
Thanks that means a lot Ian.M!
Great tips appreciate it! :-+
//Benji
 

Offline ManlishPotatoTopic starter

  • Regular Contributor
  • *
  • Posts: 52
  • Country: se
Re: RC charging delay circuit help
« Reply #16 on: September 09, 2020, 12:48:44 pm »
Hi guys!
This is the final perfboard circuit that i soldered. It took quit a while because for some reason one of the transistors i used, BC550, is supposed to be a NPN transistor, and yet it lets current pass from collector and emitter to base, not the other way around, which normally NPN transistors do. Took quit a lot of head scratching to figure that out haha!
Anyway happy that it finally works!
//Benji

Video: https://drive.google.com/file/d/1ErM8BkVOwt2m9ApOKUi-BZ3G0KMr8skR/view?usp=sharing
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf