Faster rise time than fall time for Electrolytic capacitor - Page 1
Forum section: electronics / beginners

author: rHermes
author_rank: Contributor
timestamp: December 28, 2020, 01:38:42 pm
content: Disclaimer:I'm a total beginner with electronics and this is my first post, so please bear with any formatting mistakesI bought my first oscilloscope for Christmas, a Siglent SDS 1104X-E, and I've been experimenting with very simple circuits. This morning, I wanted to look at RC circuits and after a bit of browsing the goal became: Create an RC circuit and estimate the Rise, 10%-90%, and Fall, 90%-10%, times and measure to see if I was correct.I foundthis pagewhich describes the following circuit:.I've implemented this with R being 150Ohm and the capacitor being 1uF. I had to implement the switch with two buttons, since I don't have a switch. The Green button would connect A on the circuit and red would connect B.To measure I hooked my probes earth to the negative terminal on the capacitor and the probe to the positive side. To measure the rise time, I enabled the rise time measurement on the scope and set the trigger to edge with rising slope. I would then press the red button to discharge the capacitor and then quickly switch to the green button to charge it. Via versa for fall time.Here are a screenshot of an average trigger:andFrom my calculations: (1uF × 150 ohm)×ln(9) = 329.583 686 6 μs so about 320us. The fall time is quite close to this with around 309us, but the rise time is much shorter with around 267us.Possible error sources I can think about is my probes, but I don't know how they would affect this. But from what I've read, the rise and fall time should be the same. Can anyone explain why there is a difference?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 28, 2020, 01:53:32 pm
content: Try zooming in a bit, and also averaging a few edges. It could be numerical error in the scope, which has to calculate from a series of points (samples), making some assumptions about the waveform in the process.Also, could be different contact resistance of the two switches. Which might not be repeatable, another good reason to use averaging.Tim

author: rHermes
author_rank: Contributor
timestamp: December 28, 2020, 02:04:10 pm
content: Quote from: T3sl4co1l on December 28, 2020, 01:53:32 pmHey Tim!I've measured the resistance between the switches, and they are within 2 ohms of each other.I repeated 20 rising and 20 falling and had the statistics on on the scope. Here are the results:andReading from the mean we get 285.28us for the rise time and 305.56us for the fall time. Does this clear anything up?

author: rHermes
author_rank: Contributor
timestamp: December 28, 2020, 02:05:20 pm
content: Another question I have is: Why are both of these time lower than what I calculated? In an imperfect system, shouldn't both of these be higher than expected?

author: Tom45
author_rank: Frequent Contributor
timestamp: December 28, 2020, 02:09:09 pm
content: As Tim says, your switches might not be the same resistance when closed. You can check this by swapping the two switches.Also, use a faster sweep rate for your scope to get better time resolution. And adjust the vertical position down and raise the vertical gain so that the trace fills more of the screen in the vertical axis.If you increase the resistor value from 150 ohms to something like 10K ohms, your test circuit would be less affected by any resistance in the switches, wires, or breadboard.

author: Tom45
author_rank: Frequent Contributor
timestamp: December 28, 2020, 02:15:36 pm
content: Quote from: rHermes on December 28, 2020, 02:05:20 pmThe tolerance for capacitor values is usually not very good. So your 1 uf capacitor could be more than 1 uf and still be in tolerance.As for rise vs. fall times, I see that you used a faster time base in your latest post. Adjust the vertical to also get a larger vertical display. Then turn on the scope's grid and manually measure the rise and fall times by using the grid to do your own measurements. See how this compares to what the scope reports.

author: rHermes
author_rank: Contributor
timestamp: December 28, 2020, 02:46:24 pm
content: Quote from: Tom45 on December 28, 2020, 02:15:36 pmI did what you said and these are my results:andNow they are both above the expected value and very close!I am having a bit of trouble figuring out what is happening here. Is the reason zooming in works, because the the measurement functions of the scope is making assumptions about how the curve looks?

author: Tom45
author_rank: Frequent Contributor
timestamp: December 28, 2020, 04:11:34 pm
content: First, I would like to compliment you on doing this experiment as a learning experiment. Not every beginner would start with experiments such as this, and would question the results as you have.Now the rise and fall times are pretty consistent and point to the RC time constant being 2% greater than expected. That is well within the tolerances of the resistors and capacitors you used. So your calculations are good. In fact, if you can get an accurate measurement of the resistor value, you can use this setup to measure capacitor values.This set of tests also teach something about digital scopes. The scope is sampling the input at some set number of samples per second. Roughly speaking you can think of it as a total of N samples for the width of the scope's screen. You could look into the scope's specifications, and the settings that determine sample rate and memory depth to determine what N might be in each case. But that isn't necessary to understand the general principles here.In your first test, the rising trace went from 0 to 5 volts in about a half division. There are 14 divisions in the time axis. So the scope had 0.5/14 * N samples to use to calculate the rise time.In the last test, the 0 to 5 volt rise took about 7 divisions. So the scope had 7/14 * N samples to use to calculate the rise time. In other words, it had 7/0.5 or 14 times as many samples to use. Obviously having 14 times as many samples is going to give a more accurate result.The same thing applies for the vertical axis, but to a lesser extent. In that case, N is always 256 for most digital scopes in default mode. But the time axis is what has the most effect for your experiment.With analog scopes, the user has to measure values by counting divisions on the screen. So a rise time spread over more X axis divisions can be measured more accurately than one that takes less than a single division. In that case it's pretty obvious.Digital scopes, as you have found, suffer somewhat from the same problem of less data. But they don't warn you and just crank out 5 digits of something even if the data only warrants one or two digits of precision.Good luck in your learning and experiments.

author: rHermes
author_rank: Contributor
timestamp: December 28, 2020, 06:10:02 pm
content: Thanks Tom, those comments really made my dayYour explanation of the sampling makes a lot of sense, especially when paired with the analog scopeanalogyI guess that the number N is theSaon the upper right part of the screen.Final question I guess becomes that if I knew the level it was going to and I wanted a really good result, I would zoom in even further and calculate the values by hand, since I only need the part of the graph until it hits 90%. Is this correct?

author: rstofer
author_rank: Super Contributor
timestamp: December 28, 2020, 06:35:15 pm
content: Visually finding 10% and 90% is unlikely to be as precise as the DSO's calculation. Especially out on the tail where the plot is essentially flat.With a spreadsheet (or just a calculator), plot values of 1-e-t/Tauand you'll get numbers like this (just assume Tau = 1 for the calculation):t = 0 Tau Percent Charge = 0.00,t = 1 Tau Percent Charge = 63.21,t = 2 Tau Percent Charge = 86.47,t = 3 Tau Percent Charge = 95.02,t = 4 Tau Percent Charge = 98.17,t = 5 Tau Percent Charge = 99.33,t = 6 Tau Percent Charge = 99.75,You are looking for values between 0-1 Tau (for 10%) and 2-3 Tau (for 90%). Tau= R in Ohms * C in Farads.Specifically, you are looking for time = 0.105 * Tau and 2.30 * Tau.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 28, 2020, 06:56:58 pm
content: Indeed, we can fit exactly that function (with some added factors for time offset, time constant, amplitude and offset) to the waveform in question, and get what looks like will be a very confident result.But if we did so, we'll notice there's this tiny step change at the beginning, that 1. frustrates our quest for a perfect fit (do we exclude the samples just before it? do we take amplitude as the initial and final values, or from the initial value after this step?), and 2. could be further modeled (in this case, the obvious next step would be modeling the capacitor's ESR), but at what point are we solving for something that's actually there, or just fitting to noise?Or also, solving for something that's actually there, but not actually what we're after -- namely, the waveform seems to rebound just the tiniest amount, about half a pixel, after 2-3ms. This may be probe compensation, which can itself be modeled as an RC-RC network. Or maybe it's part of the scope's internal (front end) response, who knows; precision is hard to design!Furthermore, solving for a waveform doesn't give us much information about the thing we're really after, which is just the crossing points -- typically risetime is 10%-90% or something like that. In general, the waveform will dither up and down, due to noise, so it's not a great idea to simply look for the first point (from the left) where a sample crosses each threshold -- it'll be sooner than average, and how soon depends on the amount of noise and the rate the overall waveform is moving at. What's more, if there were bounce or ringing on that waveform, should it be suppressed, or used as part of the measurement?So, we could easily use this as an introduction to numerical and statistical analysis, if we wish to take a really close look into it.Hopefully, the scope designers did their work here, but as you can see, it is a difficult problem, and you need to give the instrument every chance you can to make a good measurement -- because automating these things really is a tough problem!Tim

author: Tom45
author_rank: Frequent Contributor
timestamp: December 28, 2020, 07:32:25 pm
content: Quote from: rHermes on December 28, 2020, 06:10:02 pmThe number in the upper right corner is samples per second. You need to take the sweep rate into account. At 1 msec/div and 14 divisions, the time span visible on the display is 14 msec. So you are only looking at 14 msec, not a full second.Quote from: rHermes on December 28, 2020, 06:10:02 pmAs has already been said, the scope can probably measure with better precision than you could by looking at the display. Consider that the display on your scope is 800x480 pixels. So the best you could do would be 1/800thof the sweep time. And you probably couldn't do as well as that.The scope has available the internal sampled data in time, voltage pairs. Whether it uses those internal values, or uses display coordinates to calculate rise and fall time I don't know. We of course hope it is the former.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: December 28, 2020, 10:19:39 pm
content: Quite some time ago I bought a Rigol DS1052E and was quite disapointed that the calculations were only done from the screen data. (Note that this older scope has a small screen with something around 320*240 pixels).Some scopes do all calculations on the real captured data instead of the screen buffer. Things like this are probably part of the differences between a EUR500 oscilloscope and a EUR1500 oscilloscope.Extremely simple experiments as this are useful for beginners, to both verify the theory and to get to know your measurement equipment.Quick variations of this are to remove the capacitor from the circuit and then measure the contact bounce of the switches. And to use a bit smaller capacitor, and then use the scope calibration output as a square wave to measure the RC time repeatedly without the switches (This is even more useful for an analog scope that does not have single capture mode).Next step up is to get some hands-on experience with transistors. Use a simple potentiometer to generate a variable voltage and put that alternately on a N-channel MOSfet and an NPN transistor (with extra series resistor to prevent shorts), and use the transistor to switch a LED, and observe the differences.A lot of small SMT components (such as SOT-23) can easily be soldered to single row 2.54mm headers for easy use on a breadboard.

author: vk6zgo
author_rank: Super Contributor
timestamp: December 29, 2020, 12:31:21 am
content: Another thing to remember about CR time constants, is that theoretically, the capacitor never fully charges or recharges.This is why the approximation of 5CR is used as the time it takes to charge toeffectivelyfully charged, or to discharge toeffectively"zero" charge.A cap may be sitting with a bit of charge still on it, so it will take a shorter time to charge toeffectivelyfully charged.Discharge toeffective"zero" charge will probably take longer.On the next cyle, they may, or may not, have pretty much evened up.This causes a bit of "jitter" in the timing, but in most cases it may be neglected.

author: vk6zgo
author_rank: Super Contributor
timestamp: December 29, 2020, 12:44:11 am
content: Quote from: rstofer on December 28, 2020, 06:35:15 pmIf you are looking to see if the waveform display agrees with the numerical value displayed, it probably may not matter, if you can't get great accuracy.If "counting squares" also shows a difference between rise & fall times, it implies there is no conflict between the two.An obvious possibility is the CR network is doing exactly what your DSO is reporting.

author: vk6zgo
author_rank: Super Contributor
timestamp: December 29, 2020, 01:34:14 am
content: This is getting to be a sort of " stream of conciousness" thing for me, as vague memories pop up.Several things limit the simple circuit's utility.(1) The internal resistance of the power supply on the "charge" cycle.(although this would tend to have the opposite effect to that reported).(2) Possible switch "bounce".(3) Variation in switch series resistance.Another thing, not associated with the circuit itself:-Electrolytic capacitors are quite complex devices, compared to polyester, mica, or whatever, capacitors, as the dielectric is not a solid material.(This is not the place to launch into a description of the internal operations of these wondrous devices, but I suggest you look up such on the Internet)In the meantime, try a 1uF conventional type of capacitor, to see if your problem remains.Over the years I have noticed a strong disinclination by EEs to use electros in timing circuits, or even large value conventional capacitors.Often, a more complex circuit, using much smaller values of C offers far better accuracy & stability.

author: radiolistener
author_rank: Super Contributor
timestamp: December 29, 2020, 03:07:09 am
content: Quote from: rHermes on December 28, 2020, 02:46:24 pmYou're needs to setup vertical and horizontal resolution to fit your curve with maximum available ADC scale and sample count. Try to fit it with full screen size. In such way you can get better resolution for measurement.Also you're needs to take into account input resistance and input capacitance of the probe (usually about 10 MOhm / 7 pF for 1:10 probe).Also you're needs to take into account parasitic resistances, capacitances and inductances in your circuit

author: The Electrician
author_rank: Frequent Contributor
timestamp: December 29, 2020, 10:11:16 am
content: rHermes, try this. Set up to measure the rise time and make the measurement. Now select the option to invert the channel you're using. The waveform should now look like a falling exponential. Let the scope measure the fall time of that waveform. It should be the same as the rise time of the waveform when not inverted.If it isn't, then the scope is to blame.