How is this negative voltage being generated - Page 1
Forum section: electronics / beginners

author: techninja80
author_rank: Regular Contributor
timestamp: November 21, 2024, 05:11:03 pm
content: So I am self taught so I probably don't know some core concept that I require here. But I am very confused as to how the negative voltage is being generated on at tp25 (-8.1v) on this schematic (see powersupply section at the bottom right for tp25). This is for one of those DIY dso138. I am trying to fix mine, and I am not getting the right negative voltage at that test point. Looking at the schematic it accrued to me that how its making that voltage does not make sense to me. I tried to replicate it with modeling it, and I am not getting a negative voltage. Can someone explain this to me. Below is both the schematic, and my attempts to model it.

author: Kim Christensen
author_rank: Super Contributor
timestamp: November 21, 2024, 05:36:09 pm
content: The problem with your sim, is that V2 needs to be a 3.3V squarewave and not a 800mV DC voltage.I think what they've done on the original diagram is show what you'd measure with a DMM on it's DC scale. Therefore, a 24% duty cycle 0-3.3V squarewave (@ 3.3V for 24% of the time) would read apx 0.8Vdc on a DMM which gives you the average DC voltage. A true RMS meter would give a higher reading so 0.8V on that would mean an even lower duty cycle.So try your SIM with V2 set as a 0-3.3V 100Khz squarewave with 24% duty cycle...

author: schmitt trigger
author_rank: Super Contributor
timestamp: November 21, 2024, 05:50:16 pm
content: If you have access to s scope, probe around the different nodes.It is fascinating (and a learning experience) to watch how the voltage becomes inverted in such a simple circuit.

author: coromonadalix
author_rank: Super Contributor
timestamp: November 21, 2024, 05:55:05 pm
content: any generated signal square or sine can be rectified as positive and or negative, and normaly the signal should cross a zero reference of some sortif not maybe some sort of pulses ...

author: Ian.M
author_rank: Super Contributor
timestamp: November 21, 2024, 06:02:33 pm
content: Seehttps://en.wikipedia.org/wiki/Buck%E2%80%93boost_converterIts an inverting Buck Boost, with all the control loop handled inside the MCU, probably in software, with PWM output as Kim described from PB9, and a potential divider (between V- and +3.3V to get the feedback signal above 0V) going to PA6, which I assume has either ADC or analog comparator functionality - see STM32F103C datasheet for which.

author: techninja80
author_rank: Regular Contributor
timestamp: November 21, 2024, 06:54:11 pm
content: Wow my mind is BLOWN Away. So first off. Thank you for the information. First off I was skeptical, once I made the changes I did not see too much on the initial simulation until I started to probe around and found the below mindblown2 shows a definite drop of voltage on every pulse. Which was fascinating to see. I extended long enough to see that by 3milliseconds the voltage had started to settle at the right voltage see mind blown 3, and 4 for the time state and scope.First off why does this happen!!!!!!! Now I can see it working what is causing this. I assume the slight negative voltage keeps getting resisted by the inductor on each pulse, but does not have enough time to drain before the next pulse adds some more neg voltage??How did you know that it was not .8V Dc but a pulse. I did not see that written on the diagram. Can you point it out for me. It will be important to learn how not to make that mistake again. Once again. Thank you soooo much @Kim Christensen, and everyone else.WOW!!!!! JUST WOW!!!!

author: techninja80
author_rank: Regular Contributor
timestamp: November 21, 2024, 07:04:08 pm
content: Quote from: Kim Christensen on November 21, 2024, 05:36:09 pmHow did you know this from the diagram. See my thank you above, you were right on this. Also would this be a suitable supply for a negative rail on an op-amp. I have been searching a way for provide a +/- rail from a single DC supply. Curious if this would work?

author: techninja80
author_rank: Regular Contributor
timestamp: November 21, 2024, 07:09:09 pm
content: Quote from: coromonadalix on November 21, 2024, 05:55:05 pmWhat is fascinating to me is that in this circuit. The generated signal is a DC pulse 0-3.3 never below, however we can get a -8.6v, from a 9v supply. That is the part that I find very confusing.

author: Harry_22
author_rank: Frequent Contributor
timestamp: November 21, 2024, 07:27:06 pm
content: Yes, wonderful scheme!The plus source accelerates current in L1, which cannot suddenly stop and sucks the voltage through the diode D1 to a negative value.However, for "self tought" you are too fuent with Microcap.PSTake into account that Microcap diode may be broken down by high reverse voltage like a real one.

author: Kim Christensen
author_rank: Super Contributor
timestamp: November 21, 2024, 08:28:00 pm
content: Quote from: techninja80 on November 21, 2024, 07:04:08 pmIn the original diagram, they show the end of R40 going to a label named VGEN. VGEN also connects to pin 46 of the MCU (U1) which is powered by 3.3V. Therefore we can infer that the digital IO pin on the chip can only swing between 0V and 3.3V max.Another clue that they were using a DMM on DC range comes from their -1.4V voltage reading on the base of Q2. The negative sign is a clear indication that its a mis-measured DC voltage and not an AC one. Normally, with a DC biased transistor, you'd see a voltage of around 0.7V. If it is being used as a DC switch, either 0V or 0.7V. Basically, the base-emitter junction of Q2 is acting likea negative unbiased clamp(Bit of a side effect) as well as driving the 2nd transistor. (Main role)The 100Khz was just a ballpark guess. It could be actually running at a lower frequency like 30Khz or 50Khz, but not too low because otherwise the inductor would need to be larger. I didn't do the math.Finally, yes, these types of circuits can be used to power the negative rail of OpAmps. You can also buy dedicated chips to do this where all you need to add is an inductor and some capacitors.

author: David Hess
author_rank: Super Contributor
timestamp: November 21, 2024, 09:46:20 pm
content: While transistor Q1 is turned on, an increasing current flows through the inductor from the +8.6 volt supply to ground. After Q1 turns off, the current through the inductor must continue in the same direction, forced by its collapsing magnetic field. In order for this to occur, the voltage at the transistor end must fall, because that is the direction from which the current was flowing, until diode D1 switches on. At that point, the current is being pulled out of the output across C1, through D1, until the magnetic field of the inductor collapses. With current being pulled through D1, the output must move negative.

author: techninja80
author_rank: Regular Contributor
timestamp: November 22, 2024, 12:06:08 am
content: Well thank you all again. Now I have to figure out why I am getting only -3.6V at that test point on my actual dso138. This is my first electronic repair that was not my design so I am excited to see where this goes. I don't have inductors so I ordered an assortment kit. I plan to check the IC pin 46 to see what I get out of it.

author: Kim Christensen
author_rank: Super Contributor
timestamp: November 22, 2024, 01:43:20 am
content: The dso138 is probably not fast enough to properly measure the switching waveform. Looked briefly at their site, but they don't get a sample rate for the dso138 so can't say for sure what the max usable frequency you can view. ie: You won't be able to 100% trust it for troubleshooting this part of the circuitry.That said, the first failure suspects would be the filter capacitors (C24 & C25) having high ESR.Another possibility is there's nothing wrong with the negative power supply, but rather whatever it is powering is defective and is drawing too much current.

author: techninja80
author_rank: Regular Contributor
timestamp: November 25, 2024, 01:19:42 am
content: Here is how the saga, ends. After using probing the actual broken ISO board, and referencing what the simulation provided. The two likely component c24 (c1 on simulation), and q1. as the actual voltage I was reading at TP24 was -3.4, and not -8 as it should be. So I removed and tested them, and they were both good. I had already checked the voltages of the PWM coming out of mcu, and they were good. I decided to plug the actual frequency I measured on my scope which was 17.5khz and not the 100khz that the legendary @Kim Christensen suggested. Well as you can see by the results of the simulation we found the problem. So it turns out the MCU is not on the right frequency. My first repair runs in a dead end. Turns out I don't care enough about it to buy another MCU. I guess I can play around with the inductor values to get it to work but we will see.But yeah so broken MCU

author: techninja80
author_rank: Regular Contributor
timestamp: November 25, 2024, 01:23:58 am
content: Quote from: Harry_22 on November 21, 2024, 07:27:06 pmI have yet to find another program to even comes close to what it can do. I used its very handy slider feature to check what component could possible drop the voltage from -8 to -3. When I tested those components IRL and they were all good. I plugged in the MCU frequencies in the microcap and immediately showed me that with good components, and that frequency you will get -3v. Love this thing. (see above post to see how that went). Its like having a lab with unlimited components. HAHA. All my designs have been smoke tested by microcap another great feature.