Learning Electronics - Page 1
Forum section: electronics / beginners

author: PixieDust
author_rank: Frequent Contributor
timestamp: April 30, 2019, 09:28:34 am
content: Hi,I started reading about electronics and I'm a bit stumped pretty much right at the beginning. I don't understand the maths.I'm looking at the current vs time graph. There's obviously two types, DC and AC, both of which intuitively I understand. It's the flow of electrons. DC - electrons flow in one direction, AC - electrons flow in one direction, then in the other.Why however is the current equation i=dq/dt? The current graph is clearly current vs time. Where is q (charge) from?Take direct current. i = 1, so at all points in time, current is 1A. I don't understand how 1 is equivalent to saying i = dq/dt?

author: Moriambar
author_rank: Unknown
timestamp: April 30, 2019, 09:48:19 am
content: Quote from: PixieDust on April 30, 2019, 09:28:34 amHi. The current is defined as the flow of charge in the unit time.You got mixed up on the definitions. DC and AC describe a different Voltage behavior. In order for current to flow you have to have a voltage difference between two points. One of them usually is taken as a reference of being 0V, any other one can be above or below (or equal). Voltage kinda matters only in differences.DC means that the voltages are constant, while AC voltage changes with time.A voltage difference makes a current flow, ie makes charges move, ie makes dq/dt different from 0.Finally the current in many common materials has a proportionality relation with the voltage, ie I=V/R where R is defined as "Resistance".So basically i is CONSTANT in a DC circuit WITH TIME, while in AC it varies

author: pwlps
author_rank: Frequent Contributor
timestamp: April 30, 2019, 11:04:57 am
content: Current is defined as the charge flow across the conductor cross section at the point you measure it. So dq/dt stands for the amount of charge crossing the wire cross section at this point per unit time. If you want to see dq/dt as a derivative of a function q(t) you might think of a discharging capacitor, then q(t) will be the charge stored in it. Or of a battery-powered circuit, then q(t) will be the remaining battery charge.

author: Old Printer
author_rank: Frequent Contributor
timestamp: April 30, 2019, 01:54:12 pm
content: I started this journey a few years ago after tinkering with electronics related gear most of my life, just not understanding how or why much of it worked. Since then I have spent hundreds of hours watching YouTube videos, reading forums and buying/downloading the odd book. YouTube is a great resource for learning, but I found myself wandering from subject to subject, component to component, and ultimately wasting a lot of time. If you are serious about learning electronics as a hobby I would recommend a book like The Art of Electronics and start at page one and work your way through. By jumping around you will be frustrated at trying to learn things that depend on a certain basic level of knowledge you will not have learned yet. You need to master the basic theory and laws, like OHM & Kirchhoff, and work your way through the passive components first. At 66 and being math impaired I have given up on trying to learn all of the math, and instead I have tried to organize calculators for the different equations. It's like building your own library of information and tools and learning to use it efficiently. I simply don't have the years or the need to memorize all that stuff for a hobby, but your situation may be different. All that said, YouTube is a tremendous learning resource if used with some organization.

author: rstofer
author_rank: Super Contributor
timestamp: April 30, 2019, 03:33:01 pm
content: dq/dt is the instantaneous flow of charge past a point. dt is the time interval over which the charge is counted and is made arbitrarily small. In fact dt approaches 0 in a mathematical sense. The reason for taking small slices (samples) of q is that the function is really i(t) = dq/dt. The current i is varying with time and we don't want to miss oddities by having too wide a sample.This example may not help but consider charging a capacitor through a resistor from a battery. Beginning with no charge on the capacitor, once we close a switch and charge (current) begins to flow, the voltage on the capacitor will increase. Here's the point: The dq/dt value changes with the difference in voltage across the resistor - in other words, the difference between the battery voltage and the instantaneous voltage on the capacitor causes a current flow through the resistor and the resistor limits the current. If I use a small resistor, I get a high charge current.This is an important concept and there is a lot to learn from the charge and discharge equations. If you make the time constant (R*C) long enough, say several seconds, you can actually watch the capacitor voltage on a DMM. To be fair, it is easier to see on an analog meter. You will see a large change in voltage early in the charge cycle when the capacitor isn't holding any charge and you will see a very small change when the capacitor voltage is nearly equal to the battery voltage. The small change in charge is exactly the same as saying the current is small since current is defined in terms of charge flowing past a point.Attached is a graph of the charge and discharge of a capacitor scaled to 1V. You can multiply the values by any battery voltage you want. The time constant T (called tau) is 0.1 seconds. You will note that the capacitor charges to 63% of the battery voltage in the first T seconds. Funny thing, it charges to 63% of the difference between battery voltage and capacitor voltage in EVERY T interval. In the second interval, there is 37% voltage difference so we move .63 * 37 or 23%. Now, at the end of 2T seconds, we are at 63 + 23 or 86%.In the 3rd interval, we move up 63% of the remaining 14%. By 6 T intervals, we are essentially at 100% but, mathematically, we never get to 100%. We just get close enough for engineers.The graph is based on 1000 ufd and 100 Ohms, Tau = R * C = 0.1 seconds. Here is a table of Tau versus %Percent Charge:Tau = 0 Percent Charge = 0Tau = 1 Percent Charge = 63Tau = 2 Percent Charge = 86Tau = 3 Percent Charge = 95Tau = 4 Percent Charge = 98Tau = 5 Percent Charge = 99Tau = 6 Percent Charge = 100The equationsVchg = V0 * (1 - e(-t/Tau));Vdis = V0 * (e(-t/Tau));V0 is the battery voltage, Tau = R * C as aboveIf you want to try these on a calculator, just let -t/Tau be neat numbers like -1..-6Yes, I know this is a bit off the wall but just about everything you need to know about charge on a capacitor and the rate of change of charge (dq/dt) is covered in this example. You can Google for 'capacitor charge' and get far better explanations. If this is too far afield right now, just copy it off and save it for another time.

author: rstofer
author_rank: Super Contributor
timestamp: April 30, 2019, 03:45:25 pm
content: Quote from: PixieDust on April 30, 2019, 09:28:34 amYour example may hold i(t) constant but, in general, i(t) is varying with time. Even DC circuits vary with time. They may not alternate current flow direction but they definitely vary with time. Again, charging a capacitor is a DC phenomenon but the current absolutely varies.I HATE the water analogy but.. Consider pumping water into the bottom of a tank with a pump that can only produce a certain pressure. When the tank is empty, all of the pressure is lost in the short piece of pipe between the pump and the bottom of the tank. The flow will be as high as the pump can produce with essentially no backpressure. Now, consider this really tall tank to be half full. Now the pump has to pump against the pressure caused by the water in the tank and the flow rate will fall off. The tank will fill quickly when it is near empty and less quickly when it is near full. If the tank is tall enough, the pressure at the bottom of the tank will equal the maximum pressure from the pump and no more water will flow into the tank.Assuming we aren't using a positive displacement pump and a whole lot of other things that add up to make the analogy a little flaky. Like: The pump curve (pressure versus volume) is not linear like Ohm's Law for electrical circuits. It's an analogy, just go with it...

author: rstofer
author_rank: Super Contributor
timestamp: April 30, 2019, 04:03:48 pm
content: Why use capacitors to discuss charge? Because they are charge containers. You pump charge into a capacitor and you drain it out later. How much charge will fit in the capacitor is determined by the value of the capacitance and the voltage.From a Google search:QuoteThe short story: Q = C * V The charge Q in Coulombs in a capacitor is equal to the product of the Capacitance in Farads times the Voltage in Volts.

author: Old Printer
author_rank: Frequent Contributor
timestamp: April 30, 2019, 05:10:59 pm
content: Capacitor, what an amazing component. Thanks for all that detail rstofer, much of it still over my head but I am getting there.

author: rstofer
author_rank: Super Contributor
timestamp: April 30, 2019, 06:44:46 pm
content: Quote from: Old Printer on April 30, 2019, 05:10:59 pmIt's pretty easy to set up a 555 timer to provide a square wave of some suitable frequency and, given some kind of oscilloscope, verify the results. I'm a big believer in actually building up the circuits. Math is ok but it isn't hardware.The 555 won't produce a perfectly symmetrical square wave without a lot of trickery. To get perfection, run the output into a flip-flop and divide by 2. Then double the frequencies mentioned below when you pick the components for the 555.For my example where Tau = 0.1 seconds, you would want a total of 12 Tau (6 to charge, 6 to discharge) and that would be 1.2 seconds. So, 1/1.2 = 0.83 Hz. Pretty slow... The capacitor is 1000 ufd. Change it to 1 ufd and the frequency would be 833 Hz. Pick what seems reasonable. That 100 Ohm resistor is going to be too small so use 1000 Ohms. Then change the capacitor to 0.1 ufd and you get T = 0.0001 so 12 Tau = 0.0012 and F = 833 Hz (still). You just get used to dealing with time and frequency...I really like these entry level experiments. I like the math, I like using MATLAB to graph the functions, I like seeing reality on a scope, I just like every part of it.The best way to do these experiments, in my view, is with a Digilent Analog Discovery 2. It has dual waveform generators so getting a symmetric square wave is easy using just one channel. It has a dual channel scope so presenting the results is painless also using just one channel. If I were a student, I would have this tool in my backpack along with my laptop. If I only had 3 things on my laptop they would be LTspice, Digilent Waveforms and MATLAB (Student). And Chrome - all of human knowledge is on the Internet.Attached is a Digilent Waveforms experiment of the capacitor equations shown above but with completely unrelated values. The frequency is 5 kHz.The orange trace is current. You can see how the current falls off as the voltage increases. That is because there is less voltage difference between the battery and capacitor and therefore less current flowing through the resistor. It all ties together! Honestly!

author: Old Printer
author_rank: Frequent Contributor
timestamp: April 30, 2019, 07:41:57 pm
content: I will try the experiment. I bought the AD2 a couple years ago. I really wanted a digital scope, but could not make up my mind and since I had no other digital tools it filled a lot of holes, most of which I have yet to use. Last week I got my SDS1104x-e and it is a neat toy, but it gets fed the AD2 test signals. Just wish the Siglent had HDMI output, but other wise I felt it was the best buy in it's price range. Did not want to spent the extra $500 for the Rigol 5000.

author: rstofer
author_rank: Super Contributor
timestamp: April 30, 2019, 08:29:49 pm
content: Great choices! I have the DS1054Z and I'm looking at the Siglent SDS1204X-E for the additional bandwidth and more reponsive UI. Besides, I can keep my Rigol connected to my analog computer and use the Siglent as my bench scope.Near as I can tell, the waveform generator is set for 5 kHz, 1V Amplitude (2V P-P) 50% duty cycleThe resistor is 1k and the capacitor is 10 nF or 0.01 ufd. Tau = 1*10^3 * 10*10^-9 = 10 us. 12 Tau = 120 us => Tau = 10 us so a 1k resistor and 10 nF capacitor.ETA:If we assume that the waveform only extends to 5 Tau and we note that the horizontal scale is 50 us/div times 2 divisions, we get 5 Tau = 100 us or Tau = 20 us. It doesn't matter which resistor/capacitor pair we pick as long as Tau = RC = 20 us. Pick R = 2k then 20 us / 2000 Ohms => C = 10 nF. I don't want to use very small values of resistors because there is a current limit to the waveform generator and I don't want to break it. 2k and 10 nF seems good...Remember that i(t) = C dV/dt so when dv/dt is high (perfectly sharp edge on square wave) the current is similarly high and is only limited by the resistor. You can consider the capacitor as a short circuit at t = 0. So, we have 2V / 2000 Ohms or 1 mA of current, maximum. The reason for 2V is that the capacitor already has a charge of 1V when the square wave turns the input to 1V in the opposite direction.The actual values don't matter. All the equations are given so once a display is on the screen, we can verify the plot by calculating from the actual values. Fun stuff!I drew a sketch of the AD2 connections and I zipped up the workspace. I don't know how well workspaces port.ETA: I changed the resistor value in the .PDF

author: David Cutcher CEG
author_rank: Contributor
timestamp: May 01, 2019, 12:36:15 am
content: This is an invitation to you to become one of my Beta Testers, if you want to a hands on approach to electronics, not technical. I'm developing a course to present on Udemy.com. Please see attached if this interests you.David Cutcher "certified Evil Genius"

author: Old Printer
author_rank: Frequent Contributor
timestamp: May 01, 2019, 02:30:14 pm
content: Quote from: rstofer on April 30, 2019, 08:29:49 pmI was able to open the file in WaveForms. The generator was not running but the scope appeared to be. It was late and I didn't have the energy to go further, but i will try to work my way through this experiment in the next few days. I am "retired" on Fridays- hey, it's a start

author: rstofer
author_rank: Super Contributor
timestamp: May 01, 2019, 04:53:42 pm
content: Navigate to the Wavegen 1 tab, check 'Enable' and click on RunDon't expect to see anything, the scale completely fills the plot and only the vertical edge in the middle is visible - barely visible. You can change the scale to be less obtuse.Select the "Gear" in the upper right corner of the chart, select 'Manual' in the drop-down box next to the title Scale: Set the Voltage Range to 500 mv/div You will now see the complete centered square wave as output by Wavegen 1. Then switch back to Scope1 for the real display of the experiment.There's a fairly recent upgrade to Waveforms. I have it so if my instructions don't work, maybe we are using different versions.I've been retired for 15 years. I'm pretty good at it!

author: Old Printer
author_rank: Frequent Contributor
timestamp: May 01, 2019, 07:10:47 pm
content: Quote from: rstofer on May 01, 2019, 04:53:42 pmOK, thanks, that all makes sense. Would not be the first time I was zoomed in too far. I did notice they had released a major update, just don't recall If I installed it yet at home, will look tonight.15 years huh! You must be really old, or was smart when you were youngI have been doing it since the first of the year and my boss still forgets every week. Last Thursday evening he said the usual "see ya in the am" to my reply of "remember I am Fridays Retired". He commented that he was still having trouble getting used to it every week, but that I seem to be adjusting fine. It is wonderful, and I really like my job, but like my Fridays betterMy hats off to you.

author: rstofer
author_rank: Super Contributor
timestamp: May 01, 2019, 11:05:38 pm
content: Quote from: Old Printer on May 01, 2019, 07:10:47 pmReally old! 73 and counting, I retired at 58.

author: Old Printer
author_rank: Frequent Contributor
timestamp: May 02, 2019, 01:33:37 am
content: Quote from: rstofer on May 01, 2019, 11:05:38 pmAs long as you keep counting, but it doesn't get any easier does it. I hit 66 last year and took my SS hence my retired Fridays. Thanks for your input on this cap circuit, I will get my head around it.

author: PixieDust
author_rank: Frequent Contributor
timestamp: May 31, 2019, 09:42:51 am
content: Quote from: Old Printer on April 30, 2019, 01:54:12 pmTry watching this series:Maybe you'll start to see maths a bit clearer. Helps to start at the beginning.