Stepping up my AC current clipper - Page 1
Forum section: electronics / projects

author: LoveLaika
author_rank: Frequent Contributor
timestamp: September 03, 2022, 04:42:40 am
content: I was previously asked to develop a circuit that would help limit AC current being sent to a resistive load. I wasn't sure of what the users wanted, so it was kind of touch-and-go. Thanks to the wonderful users on this forum, I was led to the idea of using a linear regulator in constant current mode to clip the AC current to the load so it won't go above/below a pre-set limit. Perhaps it may not have been the most elegant or the best way to accomplish it, but the circuit was simple, didn't require any external controllers, and it was easily demo-able on a breadboard. Using an LM317, I tested the idea with fixed resistors and showcased my demo to the end users.The demo worked well (after a somewhat minor hiccup); it was liked so much, that they wanted it on an actual PCB board. Not only that, they want to beef it up to a 2 amp current limit. So, I had to keep the same concept while changing the components around in order to accommodate this task. I think I managed to accomplish this, but I had some concerns about the power that I wanted to ask about here.To recall the concept, AC voltage from the wall outlet is stepped down via a transformer to a lower voltage. It passes through a bridge rectifier, and the rectified DC output gets passed to a linear regulator in constant current mode. The output of the regulator configuration goes back to the bridge rectifier, and the AC return path of my rectifier contains the AC load that my AC current will go through. By having the regulator configured in such a fashion, the AC current will be clipped at the limit of what the regulator is configured to. All credit goes to Robert763 for the idea.In beefing up my test demo circuit, I made the following changes:Changed out transformer to one that outputted low voltage but enough current to handle the required current. In this case, the transformer will step down to 5 Vac, and will output 3 Amps RMS.Changed out the diodes from common 1N4004s to something that would handle the high current as well as have a smaller voltage drop.Changed the regulator from the LM317 to the LT1085 for the current.Considering how I theoretically could output 3 amps from my regulator, this might be a bit overkill, but going above the required specs would give me some leeway and flexibility. So, here it is, circuit v2.0. While I'm still a bit unsure about the components, the overall simulation test with the changes runs very well, especially with test loads that try to draw more current than necessary. However, one thing I'm concerned about is the increased power draw. Previously, my demo circuit simply ran with a limit of 10 mA. I wasn't worried about power then. But, with the required changes, now I am. The simulation shows that the regulator can drop a lot of power depending on the resistive load. However, since the resulting "DC" voltage to the regulator is simply the AC rectified voltage and not a true DC voltage, is this safe? Running a simulated test of 2 amps and a load of 1 mOhm, the power consumed by the regulator is an average of 7.22 watts given a 60 Hz frequency. Even though it reaches a peak of 13 watts, it's only for a millisecond at best. You can play around with my design in LTspice below. I used LT's included components and added the SPICE model in my file. Is there anything I can do to reduce this power loss? I went as low as I could for the voltage to keep it in operating range. I thought of paralleling two regulators together, but that would require two separate variable resistors for the current adjustment when I would just want to keep it to one.Aside from my concerns, what do you all think of my design? I know it's crude and maybe it's not the best way, but it was something that I could fashion quickly. This is what you get for springing this project at the last minute.

author: Ian.M
author_rank: Super Contributor
timestamp: September 03, 2022, 07:15:26 am
content: When you are dealing with amps, you cant afford to put the load current through the control variable resistor.If you add a voltage source between the bridge rectifier + terminal and the regulator input, you can eliminate the horrible crossover distortion. However this will of course increase the regulator dissipation. See attached sim.Adding a voltage source has another advantage however. It guarantees continuous current through the regulator, which allows you to replace it with an OPAMP + power MOSFET current sink, which removes the need for the control variable resistor to carry the load current.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: September 03, 2022, 03:21:25 pm
content: Quote from: Ian.M on September 03, 2022, 07:15:26 amThanks for the reply. I can see the benefits of adding an additional source, but I worry that it might not be feasible. At the test lab where the end product is intended to be used, the DC power supplies are all single-output rack-mounted programmable power supplies. It's not the type that can easily be included into a circuit like mine, especially if one needs to power an op-amp with a dual-supply. I thought of trying to use a PNPlike this circuitto make it more efficient without using a separate power supply, but the resulting current just won't stay fixed given the load. I tried to limit it to not go over a set current threshold, but it goes above that when simulated.If I may ask, what kind of crossover distortion did you notice in my original circuit? I didn't notice anything, but did you see something that stands out? I thought that my circuit simulated as anticipated, but there wasn't anything odd about the waveform.As you said, with the added voltage source, the power dissipation jumps massively. But still, if the time frame is in milliseconds, is that fine? Though, I suppose rapid increases/decreases of power across the regulator would damage in ways similar to just having it constant.Thinking about it, I can understand why shouldn't you have the current go through the variable resistor. I have a fixed resistor (4 resistors in parallel) to give the regulator a max current limit, and with the variable resistor laid out as such, the power dissipated is only limited to the portion of the resistor the current flows through. What if it was replaced with an Power NMOS with the gate tied to a voltage divider and the bridge rectifier (+) terminal such that by controlling the current through the NMOS, you can control the current that way too (without using an additional external source)? Some more work will have to be done in terms of voltage-current relationships, but this sounds like it might also work as well. Then, you can repurpose the variable resistor in a less power consuming way. (Though there is also a thing about the minimum current necessary for the regulator to function, that may be easily taken care of with fixed resistors)

author: Ian.M
author_rank: Super Contributor
timestamp: September 03, 2022, 05:40:14 pm
content: The additional source can simply be smoothed full wave rectified AC from another transformer secondary. It doesn't need to be regulated. Put it on the negative side of the bridge rectifier, and you could also use it to power a boost circuit to get a supply for the OPAMP + MOSFET current sink I mentioned. Boost to 12V with enough current to run a PC CPU fan and you can use a CPU heatsink and fan assembly to keep the MOSFET cool.Variable resistor power ratings are a bit odd. The rating is for the whole track. If you are only using 10% of the track because of the wiper position, it can only handle 10% of the max. power. This means the power rating divided by the max. resistance gives the square of the max. current for any part of the track or the wiper. Thus in your circuit, your 250 ohm variable resistor would need a 1KW rating to handle 2A through a small fraction of the track length at one end.

author: Benta
author_rank: Super Contributor
timestamp: September 03, 2022, 09:56:02 pm
content: What I think about your design? I don't like it.1: According to your limiting resistors, you expect the LM317 to dump 2 A. Really?2: your VR1 will have to be one of those wirewound ones from the high school physics lab the size of a Rubik's Cube.3: it's very wasteful and will dissipate a lot of power = a lot of aluminium needed.Ian.M's suggaetion of an opamp current sink with a "ghost" supply is good.I'd probably go for a discrete solution myself.But as you offer zero information on voltages, current and precision it's hard to say.

author: Terry Bites
author_rank: Super Contributor
timestamp: September 04, 2022, 09:44:20 am
content: It a voltage clipper no?

author: Alti
author_rank: Frequent Contributor
timestamp: September 04, 2022, 12:08:37 pm
content: Quote from: LoveLaika on September 03, 2022, 04:42:40 amThis is not an AC current any more. If this is linear load then why not simply use a regulated AC/DC voltage source? Even simpler is ON/OFF but I do not know what this resistive AC load is. It could be a heater or it could be PFC, both are resistive.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: September 04, 2022, 07:06:21 pm
content: Thanks for replying. Yes, I see that I haven't explained myself properly; project requirements have changed (always hate when this happens), so yeah, I'll try and explain better what the team wants along with the updated requirements.Scenario: We have a material sample; assume for simplicity's sake that it is a resistive load, whose resistance changes with temperature. Testing is done by sending a current through it as its temperature changes. Previously, they used a programmable DC power supply to limit the max voltage/max current the sample experiences. (Seems pretty typical; if the current is less than the max limit, sample will experience the full voltage and drawn current. Once it draws too much current, output voltage will decrease to keep the current at the set limit). However, they found that DC current is bad due to various reasons. They have an isolated AC variac, so they wanted me to find a way to control the current going out from it.Goal: to create an AC controllable voltage/controllable current supply.Sources: a programmable DC voltage supply, an AC variac (0-130 V, 10 amps).Specifications:Output voltage from 0- 12 VacOutput current capable from 0-2 ampsFrequency not as important, but 60 Hz is okayOutput voltage/current doesn't have to be a perfect sine wave, as long as it is alternating positive to negative (so a square wave should be fine). Clipping is okaySo, as a demo, I used the previously shown older circuit to step down 120 Vac to 15 Vac, pass it through a rectifier, and used an LM317 in constant current mode to limit the output current. This worked well with a set limit of 10 mA, seeing the AC output voltage clip accordingly given the current draw from the load. I thought I could do the same with a larger regulator, but given the changed project requirements as well as some comments, my old method might not work any more. (Quick note: I had to use a transformer to step down AC voltage as working with the variac tripped the breaker) With all this in mind, I've been thinking of a few possible solutions:Put acurrent limiterin series with the VARIAC output. This may not be the best, given the minimum voltages needed for the transistors as well as the requirements. Plus, with the adjustable current requirement, I still have the problem of a variable resistor in series with my load, so it experiences the same current as my load.Following EEVBlog's video on designing your own linear power supply, see if I can follow it to construct my own AC linear power supply. It may take some work, especially with the voltage being AC and all. My plan was to rectify it to a positive voltage waveform which will be controlled by the regulators. There may be moments of discontinuity due to the minimum voltage needed to run the regulators, but that might be acceptable (given how it was demonstrated in my demo circuit with the LM317).Use the variac (or something similar) to control an H-bridge. The power from the H-bridge will come from the programmable DC source, so it does all the voltage/current control while the VARIAC controls the H-bridge.So, yes, to respond to some questions, I'll have to think of another way to limit current aside from just a variable potentiometer. I don't know of any discrete solutions. I would use a lab-bench AC controllable power supply, but I don't know of any that offer current control in a manner similar to a DC bench supply. At best, they offer an automatic shut-off if the current goes above a certain threshold. I understood the limitations of the LM317, so that's why I mentioned changing to the LT1085 as an alternative.On a related note, while this idea is being worked on, they plan to use the VARIAC and some light-bulbs to form a make-shiftlight bulb dimmer circuitto control current that way. I admit, I was very skeptical about this, but after watching videos on it, it kind of makes sense when you can measure the current based on the incoming voltage and the bulb's wattage.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: September 04, 2022, 07:08:28 pm
content: Quote from: Terry Bites on September 04, 2022, 09:44:20 amYes, assuming the load is purely resisitive, then yes, I suppose you can see this as a voltage clipper. I based this on a fixed current, so it clips the current which in turn clips the voltage across my test load. I added more details due to changes in the project requirements. Always a joy when you're blindsided by changes.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: September 04, 2022, 07:12:23 pm
content: Quote from: Alti on September 04, 2022, 12:08:37 pmThanks for your reply. There was an idea to use a regulated DC voltage source to pass a DC current to the test sample, but they can't do that because it would cause oxygen vacancy build up. I don't get the science behind it, but that's why they wanted to use an AC source. This resistive load is a sample whose resistance changes with temperature. They want to limit the current being sent to it. I posted a reply that hopefully better explains it along with changes in the requirements.

author: Benta
author_rank: Super Contributor
timestamp: September 04, 2022, 07:43:52 pm
content: First, your idea with the bridge rectifier and the current limiter is not bad, and it can work.But you'll have to nail down your "customers" as to what they really want:1: variable voltage? Then there's no need for current control.2: variable current? Then there's no need for voltage control.But they can't have it both ways at the same time. Please ask them again before you proceed any further.

author: Ian.M
author_rank: Super Contributor
timestamp: September 04, 2022, 08:01:04 pm
content: As I said in yourprevious thread, as heavily clipped or squarewave AC is acceptable, design a H-bridge chopper module to reverse the sample circuit 100 times a second or at whatever frequency they want so they can simply use the DC bench PSU they are already familiar with the CC and CV controls and readouts thereof. The module would be powered by a 12V wall-wart and go between the DC bench PSU and their sample cell. It should be doable with off-the-shelf parts as a boosted gate supply all NMOS H-Bridge driver that does *NOT* have UVLO on the DC bus, and has an independent gate supply should work right down to zero volts on the DC bus. Use beefy enough MOSFETs and keep the DC bus decoupling capacitance fairly low to make it essentially short-circuit proof when fed from a current limited DC supply.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: September 05, 2022, 02:43:50 am
content: Thanks for your reply. Yes, it looks like this is the best solution given the changing requirements. Sorry for not taking your advice earlier.If I may ask, all the motor drivers I see have Half Bridges integrated in them. While this is nice, in order to get the voltage requirement, it doesn't seem like I can use them due to the lowest load supply only goes down to 0.5 volts and not 0 (not to mention the current limit) Not only that, every one I've seen uses some kind of digital interface like I2C whereas I don't need such a thing. Am I simply looking at the wrong type of controller? I started off looking at the TB6612FNG to give me an idea of where to start. That led me to Digikey's Motor Driver/Controller page. I thought that using a controller IC would lead to a more accurate control of the timing signals required to drive the output voltage. Or, considering that my intended frequency is slow, if I simply used an NE555 to generate a clock and an inverter to invert that clock, would I not have to worry about timing mismatch?

author: Ian.M
author_rank: Super Contributor
timestamp: September 05, 2022, 03:17:06 am
content: Dedicated motor drivers add internal complexity, frequently in the form of protection circuits, which typically get in the way when you want to do something non-standard with them. You certainly wouldn't want anything with an I2C or SPI configuration interface.A NE555 wont guarantee an exact 50% duty cycle, which you need to avoid residual DC current. Instead, use any oscillator circuit to clock a D type or J-K flip-flop wired to toggle. That gives you complimentary Q and /Q signals at half the oscillator frequency and guarantees an exact 50% duty cycle for them. Also bipolar NE555 chips suffer from vicious shoot-through current spikes when their output switches so can be problematic. For the oscillator I'd probably use a CMOS 555 which typically have a much lower switching spike, and a rail to rail output swing, much better for driving CMOS logic.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: September 05, 2022, 07:46:30 pm
content: Would catch diodes also help with the issue of residual DC current? One link I found mentioned how they are necessary to guard against momentary short circuits. Some MOSs I've seen have them integrated but would an additional diode help?Plus, considering how a potential may be floating, is it recommended to include small gate-drive transformers for the top-half of the H bridge? I saw GreatScott's video on the subject. It looks like a smooth way to ensure accurate switching.https://www.modularcircuits.com/blog/articles/h-bridge-secrets/h-bridges-the-basics/

author: Ian.M
author_rank: Super Contributor
timestamp: September 05, 2022, 10:01:34 pm
content: The low switching frequency + load that doesn't back-drive the H-bridge means the MOSFET body diodes will be sufficient as catch diodes. Its very different at high switching frequencies or if driving a motor load, which can result in significant body diode losses so external Schottky catch diodes may be helpful.Due to the low switching frequency, using gate drive transformers would risk core saturation leading to loss of gate drive before the the upper MOSFET on time and MOSFET failure as they enter the linear region and overheat.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: September 11, 2022, 10:29:12 pm
content: Thanks for your reply. Sorry, I couldn't respond sooner. I was out sick and couldn't reply.Thanks for all your help. Thanks to your advice, I think I managed to simulate something in the works. If I may ask, what do you think of my circuit so far? I know you recommended other parts than what is shown in my image, but I couldn't get the parts to work in the simulator, so I went with known working parts to get a rough idea of how the circuit should behave. I plan to use the ICM7555 in place of the NE555 in the final design. You recommended a CMOS-based timer, and it looks to serve the purpose.For the D-FLOP, I was thinking of something like the CD4013B or the MC14013. Despite what my schematic shows, both parts run off of the same 15-volt supply in my sim, matching what is shown in the datasheet. The 7555 generates a clock that goes to the DFLOP, and the inverted output feeds back into the D input so that Q and inverted Q are inverted signals of each other. Those two act as drivers to the H-Bridge which will generate the AC output that I am looking for.For my MOSFET of choice, I was looking at the IRFS7437, a N-type Power MOS. It can handle the wattage, and the Rds-on is low enough to not have a significant voltage drop at low currents when VGS is high enough. One issue I've noted is that in my simulations, the output waveform is not matching the expected voltage levels from the DC voltage input. I expected it to be +/-15 volts given V2, but it's at 10 volts. Is it possible that the high input capacitance is lowering the voltage being seen at my H-bridge output? It feels like the design is almost there with a little fine-tuning.EDIT: My bad. I realized the problem may be with my test load possibly pulling 120 amps. Whoops. Ill have to rerun sims at a more appropriate current draw to get realistic results.

author: Ian.M
author_rank: Super Contributor
timestamp: September 12, 2022, 04:31:38 am
content: Your upper MOSFETs need a gate drive that goes 10V above their source voltage. To get the source to go all the way up to the 15V supply voltage, the gate drive must go above the supply voltage, which is why I commented it needed a boosted gate supply. There are gate driver ICs that can do the job of managing the boosted gate drive for you, even in this unusual application where the DC supply to the upper MOSFET drains can drop to zero during current limiting. Attached is an LTspice example based on your circuit + two LT1158 half-bridge gate drivers. Other drivers with similar topology should also be suitable - I just picked the first suitable one I found in LTspice, and shamelessly stole most of the sample test-jig circuit provided for the chip!Note that the datasheet claims the LT1158 can work down to 4.5V, if you use low Vgs threshold 'logic level' MOSFETs, so you could get away with a single 5V auxiliary supply, rather than regulating 12V down to 5V for the logic, but that requires more expensive MOSFETs and increases the risk the user will do something dumb like try to power it from a PC USB port, which will let the magic smoke out if any of their instrumentation grounds the sample!I've also shown how to simulate an ideal CC/CV bench supply, so you can avoid 120A idiocies!

author: LoveLaika
author_rank: Frequent Contributor
timestamp: September 13, 2022, 03:28:24 am
content: Thanks for your reply as well as your demo circuit. I see now why a gate driver is necessary. I thought that just the output from the D Flip flop would be enough. I see now that I was wrong.I ran some tests with your circuit and the LT1158. I like the documentation and ease of use, and the wide supply voltage range allows for flexible options when it comes to power. I also like your CC/CV supply simulation. It's quite simple and easy to follow. Plus, it gives me a better understanding of how the Rds_on resistance affects my voltage output in ways that I couldn't think about. I picked my MOSFET to have a low resistance so that the voltage drop won't be as high for high currents. If I may, I have a question regarding your circuit.First off, I saw that you increased the clock frequency to 100 Hz. While I intended for 60, the documentation claims it can support from 0 to 100 kHz. At first, I was going to ask about any strange behavior with such a low frequency, but I found out that it may be due to the MOSFET model I was using. Switching it out for one pre-installed in LTspice (that fit my specs, testing with the STD95N04 in place of the STD95N2LH5) really made a difference in what I see at the output. On that note, I also saw some "artifacts" in your circuit as well as mine, just sudden voltage spikes. In your schematic, when you observe V(out1)-V(out2), near the beginning of the waveform, there are instances of 0.9-volt spikes. Could these just be simply artifacts as a result of the simulation? I seen something similar before, when I attempt to model switches that switch instantaneously, and I'm tempted to write these voltage spikes off as such.

author: Ian.M
author_rank: Super Contributor
timestamp: September 13, 2022, 06:37:04 am
content: The filename gives a clue I was targeting 50Hz out! Remember, the clock is divided by two by the flipflop. so you should probably go for 120Hz so the final waveform is 60Hz, same as your line frequency, or even give it a pot so the users can set the frequency.I don't think the spikes are simulation artifacts. Plot one side of the output (ref Gnd), zoom right in one and plot gate current for both the upper and lower MOSFETs and it becomes fairly obvious they are due to capacitive coupling via the MOSFETs gate-channel capacitance.The only remaining question is: Is this chip's sim model accurate enough to predict the behavior in real life with such an unusual application? For that, you'll actually have to build at least one side of it and test it.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: September 13, 2022, 09:16:28 pm
content: Thanks again for your reply. Yeah, I didn't catch that naming convention until you pointed it out. Yeah, I see how a DFLOP can divide the frequency. Honestly, it's something I haven't even considered. Thanks for pointing it out to me. Yes, looking at the waveform sections, I see what you are referring to regarding the capacitive coupling. The MOSFET gate current spikes correspond with the output voltage spikes. I found that a simple 100-ohm resistor in series with the gates helps reduce the spikes significantly by reducing the current to the gates.Yeah, I think I'm getting to the point where simulation can only get me so far. Simulation results look promising, so I guess all I can do now is to build it up and hope for the best. Thanks a lot for all your help. I really appreciate it. Luckily, as a test prototype, I have a lot of flexibility on what to add for debugging (test points, banana plugs, etc).

author: LoveLaika
author_rank: Frequent Contributor
timestamp: September 16, 2022, 03:00:30 am
content: Sorry for replying like this, but I'm curious. I thought maybe you can enlighten me. One key thing about the H-driver is that the gate drivers need to be synchronized so that the gates don't accidentally turn on the MOSFETs in such a way that it shorts. In that sense, given how my design has two "clock sources" that go to different gate drivers, do you have to worry about clock skew at all? At low frequencies, that doesn't seem like a problem. However, at higher frequencies, if the skew gets too big, isn't there a possibility of a short via MOSFETs?

author: Ian.M
author_rank: Super Contributor
timestamp: September 16, 2022, 04:40:37 am
content: The LT1158 has an anti-shoot-through circuit. Assuming you've properly connected the T_Gate_FB and B_GATE_FP pins direct to their associated MOSFET gates, i.e. on the gate side of any series gate resistors, it uses them to monitor Vgs for each MOSFET, delaying turn on of the other one till the one turning off is nearly completely off. See detailed explanation inLT1158 datasheetsection 'OPERATION' (page 8 ).