Where is this voltage coming from? - Page 1
Forum section: electronics / beginners

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 12, 2023, 12:48:35 am
content: See the attached diagram.5 V DC power supply. (Take a look at the attached picture for the type of supply used)1K resistor.The circuit is put together on a breadboard.Positive lead of oscilloscope and multimeter is on point A.Common lead on multimeter and ground on oscilloscope is connected on point B.With the switch open the voltage peak to peak on an oscilloscope reads around 1.1 V and it oscillates between positive and negative.The voltage reading on the multimeter fluctuates between positive 2.9 mVDC and negative 2.9 mVDC.Turning the power supply on the breadboard on and off makes no difference in these measurements.I then disconnected the resistor from the switch, leaving one end connected to positive on the power supply and the other end completely disconnected.Same exact readings.As soon as I removed the power supply from the breadboard everything pretty much zeroed out.I then switched to a linear power supply set to the same 5 V. (HP power supply).The same thing occurred but the voltage peak to peak was less.So where is this 1.1 V peak to peak coming from if the resistor is disconnected on one end completely?I was wondering if anybody in the community could give me an explanation that would help with my understanding of what is going on.

author: Jwillis
author_rank: Super Contributor
timestamp: December 12, 2023, 01:48:11 am
content: What is the frequency of the oscillation? Does the 3.3V give any kind of oscillation in the circuit? Just thinking that maybe the 5v regulator might be the problem.I have a couple of those. One is broken and only gives 2.8V. The other has very clean regulation at both voltages.

author: Manul
author_rank: Super Contributor
timestamp: December 12, 2023, 02:00:02 am
content: Quote from: JJ_023 on December 12, 2023, 12:48:35 amThat's exactly the thing you are missing. Resistor is not disconnected on one end. It is connected to mains earth through your scope.Probably you noticed, that a scope probe which is not connected to a circuit easily picks up electrical noise? That's because it's input impedance is very high, so capacitively coupled noise is very visible. Now what you done here is essentially connected 1k resistor in parallel with your scope probe. So it does not have its typical 10M (with 10x probe) input impedance, but roughly 1k. But still 1k input impedance is not very small. From your measurement it seems that there is around 1mA of noise current leaking into point A from a power supply side. It goes through resistor, through scope's ground clip and into mains earth. Probably some power supply switching noise or filter capacitor leakage (although for filter capacitors 1mA is quite high).

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 12, 2023, 04:41:18 am
content: Quote from: Jwillis on December 12, 2023, 01:48:11 amI am not sure of the frequency as I have not checked. You know I didn't try that 3.3 V but just swapped directly to a different linear power supply.These are all good questions. I will have to reproduce and see what I get.

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 12, 2023, 04:45:41 am
content: Quote from: Manul on December 12, 2023, 02:00:02 amThank you, that is a great point about being connected in parallel. I follow everything you're saying and it does make sense however you didn't give an explanation to a DMM showing voltage as well in the same exact set up. Any ideas on that?

author: RoGeorge
author_rank: Super Contributor
timestamp: December 12, 2023, 05:22:34 am
content: It's the fault of that power board. The 1117 voltage regulators will self oscillate and will heat even without any load if ceramic capacitors are used at the output of the AMS1117. It is specified so in the datasheet, they recommend tantalum caps (for their bigger ESR when compared to MLCC caps). The exact value is not critical, 10-22uF will be OK. Normal electrolytic will also work, but MLCC type are too low ESR to work with 1117 type of voltage stabilizers.To get read of the parasitic oscillations, replace the very low ESR ceramic caps with normal electrolytic capacitors, or with tantalum caps if you want to keep all parts SMD.

author: liaifat85
author_rank: Regular Contributor
timestamp: December 12, 2023, 03:54:11 pm
content: Quote from: RoGeorge on December 12, 2023, 05:22:34 amWhat can be a good alternative to the power board altogether for this application?

author: RoGeorge
author_rank: Super Contributor
timestamp: December 12, 2023, 04:51:46 pm
content: That board is OK if you replace the 2 capacitors, like seen in the attached jpg.If replacing the capacitors is not possible, maybe use a lab power supply, a wall adapter, a battery. A 9V battery would be the safest. Preferable a recheargeable 9V, so you won't waste money on alkaline 9V batteries. It depends what you have available.Keep in mind that the ground of the oscilloscope can not be connected anywhere in a schematic, it must always be connected to ground. Then, if you want to measure voltage between A and B, you measure A, then B, then you subtract them. The DMM can be connected between any arbitrary 2 points.From where, or what did you used to power your 5/3.3V breadboard power supply?

author: Manul
author_rank: Super Contributor
timestamp: December 12, 2023, 05:32:17 pm
content: Quote from: JJ_023 on December 12, 2023, 04:45:41 amYou mean DMM as the only instrument connected? Scope probe disconnected? Or connected? Not sure which scenario you are refering. Generally, on DC voltage DMM will integrate it's reading over some period of time (normally multiples of mains cycles) and give you that. So what you see is the result of that itegration. If the noise is not related to mains frequency or it's harmonics it is normal that the end result of integration is a fluctuating value. There is obviously some AC currents passing your resistor and the meter shows what it shows (meaning it's not very meaningful).

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 13, 2023, 01:12:35 am
content: Quote from: Jwillis on December 12, 2023, 01:48:11 amSo I just rechecked everything. Both circuits put out the proper voltages of 5 V and 3.3 V. The frequency is all over the place, but the average is around 50 KHz with the switch open. With the switch closed you get about 160mVpp.With the switch open you get about 2 Vpp

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 13, 2023, 01:23:25 am
content: Quote from: RoGeorge on December 12, 2023, 05:22:34 amSo I tried electrolytic capacitor 10uF. It did not really make a difference in terms of what I am seeing. Any ideas as to where the 2Vpp is coming from?

author: Jwillis
author_rank: Super Contributor
timestamp: December 13, 2023, 06:59:10 am
content: Quote from: JJ_023 on December 13, 2023, 01:23:25 amLets try to eliminate possible problems step by step.1. Check equipment with a battery. A 9V battery will give stable clean voltage. If readings on Oscilloscope and DMM are clean and stable then you can skip step 2 and 42. Have you tried using a different channel and/or probe to the oscilloscope. Is the ground clip damaged? Check continuity between ground clip and test ground on the front of scope. A fraction of an ohm is fine.3.Test your board with the oscilloscope only. Vpp may not change but there should be no frequency. A small Vpp is normal noise and can be ignored. This is dependent on the magnitude of out of circuit influences.House wiring and a SMPS close by can create problems in readings with poor ground connections and/or at very low Volts/Div settings.4. Are the probes for the multimeter OK. Check for loose connections and/or broken leads. Check with continuity setting an wiggle probe wires.5. Check voltage of the board with only the DMM. Is the voltage stable?6. Try operation the power supply board with a battery. A 9V battery is fine. That will guarantee a clean supply to the board. retest with just oscilloscope then just the DMM.7. If your taking reading from wires connected to bread board, reposition the power board to different spot on bread board. It may be a bad bread board connection or bad jumper wire.Check voltages on power board directly.8. If all your equipment of functioning properly and the voltages of the power board are clean when measured directly Then the circuit on the bread board has poor connection to power board and/or to the instruments. Try repositioning the circuit.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 13, 2023, 07:05:25 am
content: 50kHz is in the range of a SMPS. Can be from anything, from LED lights you might have around, or from the PC source or maybe from some other device.Might be something wrong with the setup, too. Put a picture of your breadboard, with the oscilloscope probes connected to the breadboard, and another picture with what the oscilloscope displays.

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 15, 2023, 02:53:48 am
content: Quote from: Jwillis on December 13, 2023, 06:59:10 amBefore I get to the results of what you requested let me reiterate that you look at the schematic at the very 1st post one more time. The switch is open.The oscilloscope was set to 500mV per division.1. The same circuit replicated with the battery yields roughly 32mVPP. Without the battery it generates the same result. What is odd is that the frequency counter is all over the place often times exceeding 1 MHz.2. Similar results with all channels.3. Something is generating 1 MHz.4. Multimeter is okay.5. Voltage is steady and shows almost 0 V.6. Skipped this test.7 and 8. Remember that the oscilloscope is essentially connecting across the 1K resistor, with one end in the breadboard and the other hanging mid air. The noise is lessened when I remove the USB power supply from the Breadboard.

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 15, 2023, 03:12:10 am
content: Quote from: RoGeorge on December 13, 2023, 07:05:25 amGreat suggestion. Here you go. As you can see in the picture the resistor is only connected on one end to the breadboard.

author: Jwillis
author_rank: Super Contributor
timestamp: December 15, 2023, 08:27:44 am
content: Your oscilloscope has no proper ground reference. The 1K resistor has dropped your probe impedance down to 1K. The signal could be coming from anywhere. Basically when you remove the power board your shortening a potential antenna.

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 15, 2023, 03:30:24 pm
content: Quote from: Jwillis on December 15, 2023, 08:27:44 amThank you for that explanation. It makes sense.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 15, 2023, 06:24:33 pm
content: The ceramic caps near the 117regulators looks like they were never desoldered. Did you desoldered the existing ceramic capacitors when you tried the 10 uF you said they didn't make any difference?In case you only applied 10uF in parallel with the existing ceramic caps, that wouldn't help. The too small ESR (Equivalent Series Resistance) is inside the ceramic capacitors. In case the power supply oscillates, then the existing ceramic caps have to be removed from the board, and replaced with electrolytics or with tantalum caps.- 1. You still didn't answer what you used to power the +3.3/5V breadboard supply. What is plugged into the 3.3/5V board?- 2. Connect the ground clip from the oscilloscope to the GND (-) of the supply board, and the tip of tghe oscilloscope probe to the +3.3V. Put the oscilloscope to the AC mode. What did you see on the oscilloscope in this case, still oscillations?- 3. Unplug the barrel connector from the +3.3/5V breadboard supply and measure the 1kohm resistor like in the firast post. Are the oscillations still present?

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 16, 2023, 02:28:19 am
content: Quote from: RoGeorge on December 15, 2023, 06:24:33 pmI did not disolder them. I placed them in parallel just like you hypothesized.I am actually going to be ordering some stuff and was wondering what ESR value tantalum caps I should get?Based on the datasheet that I read that you supplied for the 117 I was going to order the following.0.1 µF Conformal Coated Tantalum Capacitors 50 V 26Ohm. Any thoughts on this selection? I assume that these would be better than the Electrolytic.To answer your other questions.I am using a 9 V 1 A Wall Wart.The oscilloscope reads on AC around 0V with 29 mVPP.The oscilloscope reads on DC around 5 V with 26mVPP (the board is set to output 5 V)Unplugging the barrel and leaving the board on the breadboard with the original set up the noise disappears considerably, it is still around 180mVPP.Clearly the noises coming from the Wall Wart.Thank you for walking me through this. But I still don't quite understand the 1.5 VPP that I get with the resistor just hanging out in midair on one end. I understand that it's essentially an antenna and is picking up the noise , unfortunately my lack of knowledge is keeping me from connecting all of the dots.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 16, 2023, 10:07:04 am
content: Quote from: JJ_023 on December 16, 2023, 02:28:19 amI've never hypothesized to place capacitors in parallel.I've wrote toreplacethem, look:Quote from: RoGeorge on December 12, 2023, 05:22:34 amand in the attached picture there are only the electrolytic capacitors, the previous ones were removed:The instruments plugged into mains are not floating (floating means totally isolated from each other), they have a common ground, and they have inside a so called "Y capacitor" inside their power supply, too. That's why it is important to always connect the GND of the oscilloscope to the GND of the device under test. An oscilloscope probe can not be placed with its GND any ware, like it would be a handheld multimeter/DMM.A typical wall adapter should be fully isolated (floating), but yours behave strange, so maybe yours is not isolated, or maybe it's defective and now produces oscillations.Anyway, if these explanations looks like they don't make sense, just use a rechargeable 9V battery to power your circuits, instead of a wall adapter. It'll make sense later, when you'll have more info, so you can connect the dots.If you still see the 50kHz oscillations after replacing the 9V wall-adapter with a 9V battery, then remove the 2 ceramic capacitors, and solder two normal electrolytic capacitors, like the two 10uF caps seen in the picture above. Doesn't has to be tantalum, anything but ceramics should work.Keep experimenting!

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 18, 2023, 04:20:26 pm
content: Quote from: RoGeorge on December 16, 2023, 10:07:04 amCould you please elaborate on the wall adapter behaving strangely. It's definitely not grounded. So what would be your suggested method of checking to see if the adapter is functioning properly (to me it seems like it is).As far as the capacitors go I am going to go with tantalum based on the datasheet recommendation. You never answered my question on what ESR value would be best as there are several options for tantalum.Thank you for your help.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 18, 2023, 05:39:47 pm
content: Grounding is common for bench instruments, like a lab power supply for example. Wall adapters don't have grounding. I've just wrote how to check if your wall adapter works properly:Use a rechargeable 9V battery to power your circuits, instead of a wall adapter.- If all come to normal with battery + breadboard power supply, it means the wall adapter was the culprit.- If you still see oscillation, it means the culprit is the breadboard power supply. Replace its output capacitors.- If after all these it still shows oscillations, then it's something else, we'll see laterWhat ESR value to buy was not answered because it's not a precise value.ESR is not like the number of uF, or the max voltage, which are well defined values. Manufacturers specify ESR as a range, or some ballpark value at most. ESR depends of the type of the capacitor, and depends of the number of uF, too, between others. Sometimes the ESR is not specified at all by the vendors.We are overthinking this. As said before, anything but the ceramics would be a better match for this particular type of voltage regulator.If you insist to buy new capacitors, then order 22uF solid tantalum, as in the datasheet example:http://www.advanced-monolithic.com/pdf/ds1117.pdf

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 19, 2023, 01:56:09 am
content: Quote from: RoGeorge on December 18, 2023, 05:39:47 pmWhat you described is a concise way to figure out where the oscillations are coming from. Let's forget that for a moment, and take all of those things out of the equation. Let's focus on the wall wart. How would you go about testing that to see if it is operating properly.I am curious to see what your methodology would be so that I could learn from it.I understand everything that you are saying about ESR. Having said that most of the tantalum capacitors have an ESR claimed by the manufacturer. Some are on the lower end and others are on the higher end (say 2 Ohm to 600 Ohm), towards what end what you make the selection.Thanks for your input.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 19, 2023, 12:37:39 pm
content: Quote from: JJ_023 on December 19, 2023, 01:56:09 am1. Inspect the adapter visually - should have no cracks, no dents, no dirt, no signs of mechanical abuse, no traces of liquids on it (either still wet or dry traces that indicate a former spill), the jacket for wires must be intact, the connector without visible damage.2. Read the label (or the embossed text) on the adapter. The "Input: ....." line should specify the allowed mains voltage. Some wall adapters are for one input only, either 110V or 220V, others models are made to work with a wide range, 100V...240V AC. In US, the mains is usually 110V/60Hz AC. In EU, it is twice that voltage and at 50Hz. Also, make sure the adapter has the proper type of mains plug, the type of the mains socket varies between different parts of the world.3. Next you read the "Output: ...." part from the label. It should say a voltage and a max supported current, or a max power, for example "Output: 9V, 1A". The voltage is dictated by the wall adapter, should be 9V. The current is dictated by the load, can be any value the load is needing, but no more then the specified 1A maximum.4. Plug the adapter into the mains socket, without anything connected to it, and measure its output voltage. Use a DC voltmeter, or a DMM set to measure DC volts. You should measure 9V at the output of the wall adapter, plus or minus half a volt or so.If all good so far, then most probably the adapter is OK. Might still have some hidden defects, but highly unlikely. However, the ultimate test is to check if it works in practice.5. Connect the load to it, in your case the breadboard power supply, and see if the wall adapter still gives 9V DC when connected.Forget about the "optimal" ESR. There is no thumb rule. The "best" ESR depends on too many factors. It's a complicated topic. For now, all you need to know is that these AMS1117 chips will become unstable when the ESR of the output capacitor is too small.To stay out of trouble, follow the datasheet recommendations.Multi Layer Ceramic Capacitors (MLCC type, like the ones used in this breadboard power supply), have very low ESR, only a fraction of an ohm, so they should be avoided here. No other type of capacitor have such small ESR as the MLCC type. That is why, anything else would work, aluminium electrolytics, or solid tantalum, or something else. Anything but MLCC.In your case, whatever ESR will have a 22uF solid tantalum, it will work very well, because the manufacturer of the AMS1117 said so. You won't know the ESR value for sure, unless you measure it. What it is known for sure is that the ESR for tantalum caps can not be that small as in MLCC.Leave the ESR topic for later. Feedback-loop stability, zeroes and poles and phase margins are advanced subjects, too much to explain in a single thread. There is no silver bullet. Asking which value is better, 2 or 600 ohms ESR doesn't make sens. It depends from one case to another.If you are curious how's so, some aspects about Feedback and Loop Stability in voltage regulators are discussed here:http://web.mit.edu/sp.716/www/datasheets/AN-1148-1.pdf

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 21, 2023, 02:23:23 am
content: Quote from: RoGeorge on December 19, 2023, 12:37:39 pmThank you for such a detailed response. I appreciate you pointing me in a direction that has educated me in regards to these breadboard power supplies. I found the attached an interesting read.I do disagree with you in regards to the ESR. I understand what ESR is and I do have a way to measure it with an LCR.Since my question was not generalized in nature, but was fairly specific to this case there is definitely an ESR value that is more appropriate than another in terms of this particular AMS1117 scenario. I was asking in the hopes of educating myself further as to how one would select a more suitable capacitor. I fully understand from the gist of your writings that it is not super important as long as the ESR is higher than MLCC.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 21, 2023, 08:30:31 am
content: Glad you found the link interesting, thank you. I don't mind if we have different views about ESR. Maybe I've wrote too long indeed. And didn't even answer the main question yet.Returning to the initial question:Quote from: JJ_023 on December 12, 2023, 12:48:35 amMy best guess for it is this (it was already pointed by others, but with less details):- the breadboard supply self-oscillates (I suspect this because mine did oscillate, too, before changing the capacitor type)- these oscillations produce strong currents inside the breadboard supply PCB, current produces magnetic fields- the oscilloscope probe GND wire, when connected to the tip of the probe, forms a loop, it is like a turn in the secondary of a transformer- in the end you have a transformer, with air core, where the primary of the transformer is the breadboard supply, and the secondary of the transformer is the loop formed by the GND wire + resistor.In less words, the 1.1Vpp seen on the oscilloscope are not coming through 2 wires in direct contact, as usual, but are induced from air, into the 1 turn coil made by the probe + 1k resistor.The the 1.1Vpp are coming from the oscillating magnetic field that exists nearby. The most probable source of oscillating magnetic fields in that setup, is the current spikes produced when AMS1117 self-oscillate. Sometimes they oscillate so strong that they heat even when no consumer is attached to the breadboard supply (if you put your finger on them, they should be much hotter than the rest of the board, I mean almost too hot to keep the finger pressed on them continuously).If the above guess is correct, you should see big variation in the amplitude of those 1.1Vpp if you change the orientation of the loop relative to the breadboard supply (which we assume is the source of the oscillating currents -> oscillating magnetic fields seen by the probe+resistor loop).For example, here the loop formed by clipping the GND to the tip is used to receive the radio signal sent by that band in the middle:Picture fromhttps://hackaday.io/project/13142-sniff-the-wireless-data-of-a-sports-wrist-watchThe 1k you have in the formed loop (by clipping the probe to A and B points) is much smaller than the 1M\$\Omega\$ or 10M\$\Omega\$ of the probe, so all the induced voltage will be seen on the oscilloscope.Situations like these (in which the GND alligator wire of the probe forms a magnetic loop) is why probes come with a small spring to attach to their tip, instead of the parrot tip + alligator wires. Parrot hook + alligator GND wire can be pulled out when more sensitive measurements are to be made.In case your probes doesn't have the small spring to attach to the GND ring right at the tip of the probe, here's what you can improvise one:#111: How to make a high performance oscilloscope probe socketw2aewThe next video is very similar with your situation, except the yellow ring in your case was much larger, formed by the 1k resistor + GND alligator wire:#234: Basics of Near Field RF Probes | E-Field & H-Field | How-to usew2aewKeep experimenting,Merry Christmas and a Happy New Year!

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 22, 2023, 03:43:24 am
content: Quote from: RoGeorge on December 21, 2023, 08:30:31 amThe link was not only interesting but it was educational as well. ESR is not an opinion so I don't think we can have different views. lolActually I appreciate the amount that you wrote as you clearly are going out of your way to help further my knowledge. So thank you for that.The paper on linear regulators really did help sort out the ESR question I had. The AMS1117 is a LDO regulator. To quote the paper"Since the output capacitor is the user’s tool for compensating a monolithic LDO regulator, it must be selected very carefully. Most cases of oscillations in LDO applications are caused by the ESR of the output capacitor being too high or too low.""When selecting an output capacitor for an LDO, a solid tantalum capacitor is usually the best choice (except for parts specifically designed for ceramic capacitors like the LP2985). Tests performed on an AVX 4.7 μF Tantalum showed an ESR of 1.3Ω @ 25°C, a value that is almost perfectly centered in the stable region.""Also very important, the ESR of the AVX capacitor varied less than 2:1 over the temperature range of −40°C to +125°C. Aluminium electrolytic capacitors are notorious for exhibiting an exponential increase in ESR at cold temperatures, and are not suitable for use as an LDO output capacitor."It must be noted that large (≥ 1 μF) ceramic capacitors typically have very low ESR values (< 20 mΩ), and will cause most LDO regulators to oscillate if connected directly to the output (except the LP2985). A ceramic capacitor can be used if some external resistance is added in series with it to increase the effective ESR. Large value ceramics also have a poor tempco (typically Z5U) which means the capacitance will drop in half as the temperature is increased or decreased to the operating limits."So to answer my own question from before a lower ESR tantalum capacitor is not only better but it seems as though it is crucial for avoiding oscillations.Also based on the paper that I read, suggested by you, it seems that your selection of electrolytic capacitor is probably not ideal.I would love to hear your comments on the above statement.Now back to set up isolations. Thank you for such an elaborate explanation. Based on the knowledge I already had it seems to jell together quite well for me.I tested the temperature of the AMS1117 both with load (minor) as well as no-load and there really was not any appreciable temperature rise.I have all sorts of oscilloscope probe attachments but I also fabricate a lot of different things as I need them so the video was very helpful thank you.The other video was also very helpful and may be research some additional information.Again thank you for such elaborate responses.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 22, 2023, 11:10:26 am
content: The numbers in that AN are valid for that particular model of regulators named there, and for that particular manufacturer only. Meaning that you can not extrapolate for other models, or for other brands. Other chips might be stable with similar values, or might be unstable.However, the stability criteria based on phase margin is valid for any control loop, so why not applying that for AMS1117? If you try that, you'll notice the datasheet for AMS1117 doesn't specify the frequency response, so you can not calculate the phase margin. All you can do for this 1117, is take their word: a 22uF tantalum will work, as recommended in the datasheet.To validate if other value than that 22uF tantalum would work or not, it would mean to calculate the phase margin for AMS1117. So how did you established 10uF Al electrolytic is not optimal? You extrapolated. You took the numbers calculated for some chip in that AN, and assumed those numbers will still be valid for some other model.Estimating by extrapolation (in general, not only in electronics) is not a good practice. It is not like interpolation, where the errors are tamed/predictable. Extrapolation may give wrong results with an unpredictable error. I guess that's the true meaning of the saying "Assumption is the mother of all fuck-ups", it means "don't extrapolate".Anyway since that AN gave the kind of answers you were looking for, that's great. If interested for more about that, next step would be to search about control loop stability, in general, and about the phase margin method, which is often used in EE. Then, experiment with an opamp for which the frequency response is well known, and for which you first calculate the outcome, then verify the predictions in practice.About discovering where from it was coming those 1.1Vpp/50kHz, try what I've wrote before. Clip the GND alligator to the probe's tip, to form a loop, then move the loop around and above the breadboard regulator, to see if the signal really comes from the breadboard supply, or from the wall adapter, or maybe from something else.Or, remove entirely the parrot tip and the GND alligator wire from the probe, and make a smaller loop, one that can be attached right at the tip of the probe. Paperclip wire has just enough springiness to form it as a small current loop that can be clipped to the probe. To make it more sensitive, craft a few more attachments, either larger, or with more turns. Add isolation over the paperclip wire, against accidental short circuits with the probed PCB. Solid copper wire from a LAN cable works too as an ad-hoc improvisation, though the LAN wire is a little too soft to make reusable attachments out of it.About the heating, AMS1117 heating about the same, with or without load, doesn't necessarily mean no oscillations. The worst scenario is that's because the load doesn't add much to the total temperature, the most of the heat being produced by the self-oscillations anyway. Not saying your 1117s are oscillating or not, only speaking in general.Another funny thing, the oscillations are not always visible on an oscilloscope. A nice flat line on the oscilloscope while probing the output is a good sign, but that doesn't mean there are no oscillations. Sometimes, a circuit can oscillate at frequencies so high that they won't appear at all on the oscilloscope, and you'll only notice higher than normal temperatures.Writing all the details for those who might be needing them, sorry for the parts where I wrote what you already knew. Felt chatty these days and went overboard splitting the hair, certainly not a good writing stile. Also not sustainable, takes too much time.In case you find the exact source of that parasitic signal from the initial question, please leave a note what it was after all.

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 24, 2023, 04:18:40 pm
content: QuoteThat is a very good point. It is a different LDO, so that explanation makes a lot of sense.My follow-up question to you is how did you settle on 10uF as the optimal choice for this particular LDO especially since a tantalum is recommended? This is not meant to be sarcastic or a trick question, just trying to get some knowledge.QuoteWithout getting into philosophical debates about extrapolationcould you please recommend any good reads on the phase margin method? I can find stuff on my own but some things are written better than others and if you know of anything that is well-written it would be greatly appreciated. Again thank you for the guidance on where to go to expand my knowledge.QuoteSo I did as you suggested. There really was not any noticeable fluctuations that I could ascertain. There were some minor variations but nothing that was glaring. So I am not really sure, unless I was supposed to be looking for very minor fluctuations. I did watch the video you suggested and it was more minor than that.QuoteWhat you wrote makes a lot of sense. I only mention the heating not as a way of dispute but more of as a data point which gives us a little bit more information. My follow-up question is. If the oscilloscope you are using does not have enough bandwidth are there techniques to ascertain if oscillations exist without resorting to other equipment?QuoteI really do appreciate all of the writing. Even if stuff is already known, it being articulated in a different manner, gives something a new and sometimes better perspective.Now to the last part. I messed around with this some more and I do believe I figure out what the issue is. The short answer is it is the 9 V 1 A wall wart.Here's another interesting data point which I wasn't sure how to interpret fully. Measuring the wall wart WITHOUT the ground clamp ( i.e. removed from the probe) I got 167 Vpp at 60HZ. This is pretty much exactly half of the mains Vpp. If you have any thoughts on how this is ending up at 167 Vpp I would be very grateful.Also I did some more measuring on the actual breadboard with the proper set up and the output is around 5 V 30mVpp.I also retried my original set up, and as soon as the wall wart was removed from the breadboard the wild swings would disappear.I also retried my original set up with a 9 V battery, and although the oscillations were pronounced they were a considerable magnitude smaller then the wall wart original set up.Again many thanks for the education.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 25, 2023, 11:24:30 pm
content: QuoteNever said that's the perfect choice. Mine was acting strange, searched online for that model of supply, and found out it's a known issue for AMS1117. The 10uF electrolytic was what it happened to be at hand. Used them as a test, and the oscillations went away, and that was it.Searching what would have worked even better would have been a waste of time. Particularly for an item that was virtually free (a set of 65 breadboard wires + 830 points breadboard + 3.3/5V supply + shipping included from Aliexpress was $5.78 total).I'm not very sure why it is so important for you to use the "optimal" value. Striving for achieving the best, or striving for excellence as a life guideline is laudable, but in practice you'll have to stop optimizing once a goal is fulfilled.QuoteThat AN note was one. But that makes sense only if your background were EE, or Mechatronics, or something else where the control theory is part of the curricula.There are many free classes on MIT OpenCourseWare, or on Khan Academy, all very good. From the top of my head, I remember a YT channel I was following at some point, with a guy that also published a free e-book about control theory in case you prefer written instead of video, has video playlists, too, as if it were a semester or two of classes:https://www.youtube.com/@BrianBDouglasMy advice would be to leave these for later. Saying so because, by the original post here, I'll guess you stepped into electronics recently, and most probably this is your first oscilloscope, which is absolutely great, there is so much to explore. Maybe you are getting ahead of yourself jumping straight to control theory.Unless you already have the prerequisites for it, won't make much sense, it's an advanced topic. The EE prerequisites would be AC circuits, Laplace and Bode plots, maybe some other topics in between about feedback, filters, and the effect of poles and zeroes. All these take 1-2 years to learn in an EE university.Once you become familiar with that, it's just a matter of plotting the closed loop response against the open loop response, and measuring the angle at which the two lines intersect with each other.QuoteIn this case, looks like your breadboard supply was not oscillating.QuoteOne way could be to estimate the expected temperature of the chip, then to measure the real temperature. If the temperature is too high, it means some oscillation is heating the chip. The temperature can be estimated by the thermal resistance and the quiescent current, usually given in the datasheet. The input voltage is known (9V), so the dissipated power and the thermal resistance will give the expected temperature.QuoteWell done, congrats!QuoteThat's an interesting observation, but I guess it's only a coincidence. With only the tip of the probe attached, it would be expected the observed voltage to vary wildly with the surroundings. For example, it is expected the Vpp will vary a lot by simply putting your hand around the wire or around the wall-adapter (isolated, without even touching). It changes because the parasitic capacitance between the body and the wire. Even if you just lay down the probe on the table, and come with the hand near the parrot clip, it is expected to see a lot of induced voltage from your body.Without the ground wire, the probe acts as an antenna.

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 27, 2023, 12:49:56 am
content: Quote from: RoGeorge on December 25, 2023, 11:24:30 pmQuoteI completely agree that searching for an optimal value is a waste of time in a practical sense for this particular application. However when it comes to learning for me I like to understand the optimal value, it gives me a better understanding of the subject matter.When there is someone graciously sharing knowledge, I asked more probing questions. Sometimes I will ask questions to answers I already know simply because someone with more experience and knowledge, or simply a different way of explaining it, will give you little gems of additional knowledge. So it's not that I am trying to take a $5 breadboard power supply and turn it into the ultimate lab bench supply, I just simply enjoy the process of learning.The AN note was a great read which incorporated the phase margin method but It never really went into the subject matter, it was more an application of the subject matter.I have taken a few of the MIT open courseware courses. They were okay, the quality of the production Made it a little bit difficult to watch..I have read a few dozen books. Those were the most beneficial. I read a few hundred technical briefs from Texas Instruments and other companies such as Analog devices. Those I enjoy a lot and try to support by buying some of those components from those companies.Never got a liking for Kahn Academy.Some YouTube channels are great. I have a few dozen people I watch from time to time.I probably prefer written material the most for serious subject matters, but I think all of them have a place, and all add a little bit something extra. But once I grasp the concepts it's completely different in real world applications. That's why forums like this or access to actual people helps differentiate between real-world and textbook.Learning usually comes fairly easy to me. So even if I jump into a topic that is more advanced then where I am at I still like to give it a go. Because I ascertain some knowledge from it and then as I progress and gain additional knowledge when I go back to that difficult topic it makes a lot more sense. This is why sometimes when I read a book I will abandon something in that book midway to go research a concept that is not quite clicking and then returned back to that point.I am well aware that the oscilloscope probe without a ground will act like an antenna. 167 Vpp at 60HZ is so close to half the mains voltage that it tugs at me to try to understand where it's coming from. I'll have to play around some more. The 60 Hz is just too much of a coincidence in my opinion. Any ideas would be greatly appreciated.Again thank you for taking the time and pointing me in a few interesting directions as well as recommending that YouTube channel it looks interesting.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 27, 2023, 02:22:42 am
content: Yes, good observation about frequency. 60Hz is a strong indicator it comes from mains.Side note, change thetrigger sourcesetting of the oscilloscope, from whatever channel it is now, to 'AC'. You'll notice the parasitic signal becomes stable on the screen no matter the trigger level. This is because on 'AC' the oscilloscope synchronizes itself from the mains voltage (and not from the voltage coming from the probe), and the signal from the probe happens to come from mains, too.The fact that the signal is in perfect sync with the internal mains sync of the scope is a good hint the source of the parasitic 167Vpp are coming from mains, and not from some other source of 60Hz.About checking if 167 is because of being half or just a coincidence, try the suggestion from the previous post:"For example, it is expected the Vpp will vary a lot by simply putting your hand around the wire or around the wall-adapter (isolated, without even touching). It changes because the parasitic capacitance between the body and the wire."Is it still half of the mains voltage when you grab wire from the wall adapter (by the isolation without electrical contact)?- if it changes and not half any more, it was a coincidence, and the signal comes mostly through air, induced by the surrounding mains hum, that's why the vicinity of the hand changes the voltage, the hand is changing the surrounding electromagnetic fields- if the 167Vpp stays about the same, then the voltage is probably coming through the wires (and not by air), most probably because of the Y capacitor mentioned earlier. It's a capacitor inside the power supply of mains powered devices, those with a SMPS type of power supply. In this case, both the oscilloscope's power supply and the wall adapter are SMPS type, and expected to have a Y capacitor inside them.About stability and phase margin, it just happened today to post a link about Bode plots. It was some random search result, but has a couple of examples in it. See if it make sense:https://global.oup.com/us/companion.websites/fdscontent/uscompanion/us/static/companion.websites/9780199339136/Appendices/Appendix_F.pdfThat is only a brief, a summary of how to find the frequency response. It requires one to know about AC circuits and transfer functions. Once the Bode plots are understood, the phase margin is easy. And if that pdf doesn't make sense but you would like to learn, ask about what is not clear.

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 30, 2023, 04:04:50 pm
content: Quote from: RoGeorge on December 27, 2023, 02:22:42 amSo I did some of the experiments that you suggested.Changing the trigger source to AC made no difference. However I did not have a problem capturing the signal utilizing DC and AC triggering.Moving my hand throughout the circuit as you had suggested yielded nothing. Virtually unchanged.So just to refresh your memory this is a 9V 1A wall wart.So I attached the waveform to this post. The results are slightly different but close enough to the original.So this wave form appears when the probe is on the positive with the ground disconnected. I then decided to try the probe on the negative output and I got the same waveform.Any ideas as to what that might be? It's definitely traveling by wire and not through air unless I'm missing something.If I connect everything properly I get the proper 9V output.===========So I read that particular attachment. Thank you for that. I didn't have any problems with the math. When I studied reactants and capacitance I remembered some things that were mentioned in this paper. I didnt however understand the paper fully. It just doesn't click yet. I studied AC circuits and again it makes sense but it doesn't all click together. I just need to gain more knowledge and then the pieces will fit together.Thank you for your time, look forward to your response.

author: RoGeorge
author_rank: Super Contributor
timestamp: December 30, 2023, 07:08:56 pm
content: In this case, as explained before, it comes through the Y capacitors.Quote from: RoGeorge on December 27, 2023, 02:22:42 amThe oscilloscope displays what is between its GND and the tip of the probe, between the green points A and B. Since you left the alligator of the probe disconnected, the circuit will now close through the AC mains power lines and the Y capacitors, following the red path. C301 of 4.7nF/1kV in that schematic is the Y capacitor, and another similar Y capacitor is inside the oscilloscope, hand-drawn in green.You are probing the voltage over the red line in that picture, and that is why you see a part of mains on the screen.The voltage you are asking about is coming from the ends of that red path drawn in the picture.

author: JJ_023
author_rank: Frequent Contributor
timestamp: December 31, 2023, 10:04:36 pm
content: Quote from: RoGeorge on December 30, 2023, 07:08:56 pmYou have a great talent at explain things well. Thank you for taking the time. My follow-up question is. I know that the Y capacitor is used primarily to reduce EMI. Would a more optimal value Y capacitor, whatever it may be (I know I know I am focusing on optimal again) have any impact on the out put ripple associated with this particular power supply?

author: RoGeorge
author_rank: Super Contributor
timestamp: January 06, 2024, 10:43:40 am
content: Quote from: JJ_023 on December 31, 2023, 10:04:36 pmNo, it won't make any difference if you probe with only one wire (without connecting the GND probe to the minus of the wall adapter). Half the mains you see on the oscilloscope is not because of a low quality wall-adapter. What you see is not ripple of the wall-adapter. With only one wire you are probing the mains, not the wall-adapter. The best power supply in the world (or anything else - not only power supplies) will show about the same waveform and amplitude if you probe them with only one wire.That waveform happens because the current always goes mostly through the paths with lowest resistance. It goes through all the possible paths at once, but most of it will flow through the path(s) with the lowest resistance, so:if you probe by connecting both the GND alligator to minus of the wall adapter, and the tip of the probe to plus of the wall adapter, then the current will flow through the GND alligator, input resistance of the oscilloscope and back to the probe tip, and close the loop through the output of the +/- of the wall adapter. You are now probing the DC out voltage of the wall adapter, and you will see mostly a flat line at about 9V.if you disconnect the ground alligator, now the current cannot flow through air in order to arrive to the GND alligator like before, and close the loop like before. The next lowest resistance path (once you disconnected the alligator) becomes the path marked in red, through the mains wires. You are now probing the voltage on the red path, the voltage drop on the rectifying bridges, on the Y capacitors, and on whatever other parts might be in the red path.- The current always flows through all the possible paths at the same time, and splits between all of them.- The lower the resistance of a path, the more that path is preferred, in the detriment of the rest of other paths of a higher resistance.- The current will still flow through all the paths, higher or lower resistance, just that the paths with the lower resistance will get a bigger share from the total current.

author: armandine2
author_rank: Frequent Contributor
timestamp: January 06, 2024, 12:14:05 pm
content: 3. Next you read the "Output: ...." part from the label. It should say a voltage and a max supported current, or a max power, for example "Output: 9V, 1A". The voltage is dictated by the wall adapter, should be 9V. The current is dictated by the load, can be any value the load is needing, but no more then the specified 1A maximum.I had an application this week where a positive output was specified for the centre pin.