I need a method to control an AC load - Page 1
Forum section: electronics / projects

author: jackbob
author_rank: Regular Contributor
timestamp: October 22, 2019, 06:44:58 am
content: Hello all, I am working on a project for school and I am looking for a way to control an AC load. Here are some of the relevant details and caveats. The load is just a simple bank of resistors being fed by a transformer. The voltage is low (12V RMS). The load is about 100W with four channels of the same circuit so 400W total. I am looking for a way to control the power to the load resistors and would prefer an efficient way using power electronics or some other clever way. This is a small part of a large project so I would prefer to not make the solution too complicated but I am open to all ideas.Seems simple but I tried using a triac phase controller and ran into a problem. We are using many current sensors in this project which monitor the AC current at various points and the transducers we have do not seem to work with non-sinusoidal current waveforms. After doing some research, it seems only true RMS current transducers can measure the non-sinusoidal distorted current waveforms produced by SCR's and triac's. These current sensors are very expensive (especially considering the project is using 16 of them) and most of them have an unacceptable latency.All this leads to a solution which requires the current waveform to be relatively sinusoidal with the AC voltage. I have thought of rheostats but I hate the way they feel (like a scratchy, rusty potentiometer) and they will dissipate quite a bit of power themselves, especially when their resistance is equal to the load bank resistance (maximum power transfer theorem). I have also considered a small variac but these seem very specialized and almost impossible to find for this application. It is very difficult if not impossible to find small variacs (~100VA ) that can pass a reasonable amount of current. Most variacs are made for mains voltage and would be too large for the application. Also, it would be nice to have a power electronics solution as the load could be adjusted through the computer interface rather than manually with clunky knobs.Can anyone think of any other solutions to control the load power? Your help is much appreciated!

author: capt bullshot
author_rank: Super Contributor
timestamp: October 22, 2019, 06:55:31 am
content: Simple solution: Use rheostats or an appropriate oversized Variac (current rating must match your expected maximum current, voltage doesn't matter too much)Electronic solution 1: Use a PWM controller to "chop" the current using a back-to-back MOSFET switch. If the PWM freqency is high enough, some simple LC filtering should provide you with a near sinusoidal current.Electronic solution 2: Use a "R mode" electronic load and rectify the voltage before applying the load. If your electronic load is good (fast) enough, the current waveform will follow the voltage waveform in R mode, resulting in a sinussoidal current with some crossover distortion near the zero crossing. The power will be dissipated within the electronic load, no need for resistors. One can build the electronic load on his own, or buy one. I've seen AC electronic loads, but I think they're rather rare.

author: jackbob
author_rank: Regular Contributor
timestamp: October 22, 2019, 07:06:05 am
content: I have thought of both those solutions, I think I just needed to hear them from someone else. I do have some electronic loads but the project itself will likely be demonstrated many times and later given to a different group I dont want to give up my electronic loads with the projectAs for the PWM solution, it seems good but I cannot apply an AC voltage to mosfets, would you suggest passing it though diodes in series with mosfets then using PWM? I cannot add filter tank capacitors past the diodes as then the load will become very nonlinear. Are you thinking of something similar to an active PFC controller or are you saying just use PWM to chop up the instantaneous AC voltage? By passing the voltage through the diodes I will automatically have a deadzone of +-0.6V around the zero crossings but that may still be manageable.

author: Zero999
author_rank: Super Contributor
timestamp: October 22, 2019, 07:43:01 am
content: How about putting the variac before the mains transformer?

author: jackbob
author_rank: Regular Contributor
timestamp: October 22, 2019, 08:14:43 am
content: Thanks for the suggestion, however, I cant put a variac before the mains because each channel must act independently. The mains transformer has four 12V secondaries and each one needs to serve these variable loads but also needs the 12V available for other functions on the project.To give a little more background so that it makes sense. The project is simulating a small electircal distribution grid and will also simulate protective relay schemes to respond to faults. Each 12V circuit will have the load resistors monitored at different points but will also have another fixed load resistor bank of very low impedance which needs the full 12V to create the necessary current magnitudes. The purpose of this resistor bank is to simulate faults and the current sensors will detect this spike in current and reconfigure the circuits to redistribute the load to isolate the fault.

author: jackbob
author_rank: Regular Contributor
timestamp: October 22, 2019, 08:20:01 am
content: I have also considered using a full wave bridge then putting some mosfets in series with the load acting in the linear region (essentially as variable resistors) this is basically an electronic load. The FETs will dissipate a bit of heat in this mode but that's alright as long as they have the cooling they need. I'm just not sure about how easy this is to control. I know the linear region of most FETs is quite narrow.

author: capt bullshot
author_rank: Super Contributor
timestamp: October 22, 2019, 08:58:49 am
content: Quote from: jackbob on October 22, 2019, 07:06:05 amLook up "back-to-back" MOSFET configuration. It's two MOSFETs connected in a way that they can switch AC, without additional diodes and no dead zone. You may need a floating gate drive. If you don't filter, the AC will just be chopped with some kHz, depends on the currents sensors if this works or not. You'll probably need some kind of snubber to protect the MOSFETs since the transformer will shoot high voltage at your switch when you open the circuit.There are some MOSFETs around that can be operated safely in the linear region, most of the modern ones will fail due to SOA limitations, they're intended as switches. If you use a constant gate voltage to drive the MOSFET into linear range, the current won't be proportional to the D-S voltage, You'll need the text book alike circuit of a MOSFET current sink. with the current set by a fraction of the applied voltage. The external resistor can still be used to dissipate part of the power.

author: capt bullshot
author_rank: Super Contributor
timestamp: October 22, 2019, 09:02:56 am
content: If your load requirement isn't "fully variable", have you considered dividing the load resistors into smaller (maybe binary weighted) steps and switching them using relays?Edit: There's also some neat tricks by using an array of identical resistors and connecting them in variations of series and parallel (using relays) to vary the load.

author: Zero999
author_rank: Super Contributor
timestamp: October 22, 2019, 09:36:38 am
content: Quote from: capt bullshot on October 22, 2019, 08:58:49 amI think a filter will be required to play nicely with the current sensors and I can't see it working, without isolated gate drive.No doubt it will work, but it won't be simple, a decent filter to give a smooth sine wave output, low in harmonicas and isolated gate driver will be required for, both for functional as well as safety reasons.

author: Ian.M
author_rank: Super Contributor
timestamp: October 22, 2019, 12:48:07 pm
content: Isolated, high bandwidth current sensors that can handle very non-sinusoidal waveforms shouldn't *be* expensive if you buy bare chips and mount them on your own PCB. e.g. Allegro do a range of analog output hall effect current sensor ICs with the current conductor integrated in the package for as little as $1.22 USD each (Qty 10):Digikey link. Output is a voltage that reproduces the current waveform, centered on 1/2 Vcc.Resistors don't care whether they get AC or DC, nor whether its PWMed. Full wave rectify, (but don't smooth) the 12V AC with a beefy Schottky diode bridge rectifier (to minimize losses), and tap a feed for your control circuit off the rectifier output with another Schottky diode to a reservoir cap, which will give you about 16V to work with. Then you can use power N-MOSFETs on the negative side of the load resistors, driven by ordinary gate driver ICs controlled by a MCU with at least 4 fast PWM channels and enough ADC or comparator inputs for any local current sensing required (advisable for over-current protection - MOSFETs die faster than any fuse so the only way to effectively protect them is to shut off the PWM immediately - in hardware - if a fast-acting current limit threshold is exceeded). If any of the other loads on the 12V AC introduce a ground, you'll need to optoisolate (or otherwise galvanically isolate) the control link to the MCU from the PC, so the bridge rectifier negative doesn't have to be grounded.As mentioned above, you *WILL* need snubbers across the MOSFETs to handle the back-EMF spike from the transformer secondary leakage inductance and the load wiring inductance.

author: rvalente
author_rank: Frequent Contributor
timestamp: October 22, 2019, 01:58:24 pm
content: Would this work for you?The mosfet shorts the bridge, the fast pwm is mixed with the sinusoidal wave.This configuration acts as a fast dimmer.

author: jackbob
author_rank: Regular Contributor
timestamp: October 23, 2019, 03:57:52 am
content: Quote from: Ian.M on October 22, 2019, 12:48:07 pmThe problem with these sensors is that I would like an output voltage proportional to the RMS, not reproduce the current waveform. With these, I would have to sample them extremely fast and compute the RMS with a microcontroller or something similar. This is tough to do for 16 sensors and we are a little strapped for computing power as is just by sampling the 16 analog voltages proportional to the RMS current.The current sensors I have now appear to be extremely simple devices which I can tell operate with an RC filter based on their response to transients. I believe they have the current transformer rectified, then load a burden resistor and store the peak voltages in a capacitor across that resistor.I did try controlling the AC waveform with a 1KHz PWM, although I realize the frequency isn't very high, I just wanted to see how the sensor would respond, I varied the duty cycle quite a bit but the sensor output remained relatively constant. I believe this is because of my description of the current sensor above (it stores the peaks of the current waveform in the capacitor voltage). I have a picture of the waveform attached which looks rather neat but doesnt do the job. This was created by feeding the transformer through a full wave bridge and then taking the output and putting it through a mosfet and applying a PWM signal to the gate. Similar to what rvalente drew but with the resistor on the DC side and snubbers added to the FET to handle voltage spikes due to high di/dt through the transformer. The picture below is the current measured through the transformer before the rectifier. It was mentioned by some to add filter caps but i'm not sure where it would make sense to place them. If I place them across the load resistor, then this creates large current spikes to charge the caps once the input voltage passes the voltage on the capacitor (just like a simple linear power supply circuit) these current spikes due to the filter capacitors increase the measured current by the sensor significantly as the sensor stores the peak currents.

author: jackbob
author_rank: Regular Contributor
timestamp: October 23, 2019, 04:56:59 am
content: Also when operating a FET as a resistor, it seems to chop off the top of the sinusoid current waveform (see the picture below). Am I misunderstanding this mode of operation? I simply applied a variable voltage to the gate with a power supply like the simple schematic shown below and it doesn't seem to behave linear like a resistor.

author: jackbob
author_rank: Regular Contributor
timestamp: October 23, 2019, 06:10:41 am
content: I figured out the answer to my last question. I am able to use the FET as a linear resistor and it does behave quite linear if the voltage to the gate is also sinusoidal with the source voltage. I used a simple constant resistance circuit with an op amp and feedback from the source going to the inverting input and the non inverting input from a potentiometer with one side ground and the other side the rectified sineusoid. The outcome is exactly what I was looking for, it regulates the load quite linearly (with the exception of some small zero cross distortion). The FET is acting as a resistor so it does dissipate a bit of power BUT its a very simple solution.If I had more time for the project I would dig deeper into a more power efficient solution and after looking into the back to back configured FETs that topology is one I find quite useful and it will definitely stick in the back of my mind for future projects. I just know floating gate drives opens a whole new can of worms!Thanks for all the help folks!!! This community is invaluable!

author: Zero999
author_rank: Super Contributor
timestamp: October 23, 2019, 08:03:55 am
content: Quote from: jackbob on October 23, 2019, 03:57:52 amYou might not need to sample as fast as you think. It's possible to measure and compute the RMS voltage or current by sampling at a lower frequency than the waveform. It depends on how often you need to read the RMS value. For example if you sampled the mains voltage at 1Hz, over a few minutes you could quite accurately calculate the RMS voltage, as long as the sampling occurs at different parts of the mains cycle, which can be ensured by introducing some jitter into the sampling.Quote from: jackbob on October 23, 2019, 06:10:41 amBeing picky but that sounds like a constant current source circuit, rather than constant resistance. Please post the schematic.I'm glad you got it to do what you want.

author: Ian.M
author_rank: Super Contributor
timestamp: October 23, 2019, 01:03:56 pm
content: Fast MCUs with high performance ADC and DMA are readily available and cheaper than doing RMS in the analog domain for more than a couple of channels. e.g. Microchip'sdsPIC33EP256MU806can be got for about seven bucks one-off, and has 24 analog input channels and two 10 bit ADCs, good for up to 1.1 Msp/s (megasamples per second), with DMA and auto channel scanning.Using both ADCs, sampling 16 channels, that maxes out at over 130 Ksp/s, per channel, which is quite a bit more than you need for reasonably accurate RMS measurement, even with a 1KHz PWM chopping the waveform.Its 16 bit CPU core runs at up to 70 MIPS and has a single cycle multiply instruction so keeping up with squaring and summing in excess of 100 Ksp/s on 16 channels in realtime is practical. You only need to take the square root once per channel per block of samples, so it isn't a significant CPU load.However if you *MUST* do RMS in the analog domain, all you need is an OPAMP squarer circuit per channel and a low pass filter to do the bulk of the averaging. Acquisition, longer period averaging and calculating the square root can be done even on a crappy slow 8 bit MCU.If you don't need better than a few percent accuracy, that shouldn't cost you more than a couple of bucks per channel so it should be under $5 USD per RMS current sensor. What are you paying for your off-the-shelf RMS sensors?

author: MarkL
author_rank: Unknown
timestamp: October 23, 2019, 04:33:22 pm
content: Another possible solution is to ditch the four-output transformer and instead feed each of the four load banks with an audio amplifier(s) capable of driving around 1.4ohms per channel (100W @ 12VAC) either directly or through an impedance matching transformer.You can generate 4x 60Hz sine waves from an audio card, providing computer controlled frequency and voltage for each channel, and the resulting 12VAC would be low in distortion.There are lots of cheap, used, high wattage boat-anchor audio amps on ebay. The ones from Crown are particularly indestructible.

author: jackbob
author_rank: Regular Contributor
timestamp: October 24, 2019, 01:18:06 am
content: Quote from: Zero999 on October 23, 2019, 08:03:55 amI understand what you mean but we need the response time to be rather fast we can't wait 10's or hundreds of cycles to get an accurate reading, it would work though but I dont see it doing well with this project.I will post a crude hand drawing of the schematic below.Quote from: MarkL on October 23, 2019, 04:33:22 pmI thought of just designing an amplifier at some point but its too much for the project (all of this is a small portion of the project). Also I would prefer the project to be standalone in the end and not rely on external equipment. The project will be be designed and demonstrated by myself and a group of engineering students I am working with, however, I anticipate it will be used and demonstrated by lots of other non technical people lets just say "joe average" should be able to plug it in and demonstrate the project.Quote from: Ian.M on October 23, 2019, 01:03:56 pmThese are the exact sensors we are using for the projecthttps://bravocontrols.com/shop/current-sensor-single-phase/We have purchased 20 of them so I would prefer not to let them go to waste. (Originally I was not experienced with these sensors and thought they would work with a triac controlled load without issues)Now for my quick hand drawn schematic below, I built what I think is a MOSFET being used as a constant resistor. This circuit DOES work successfully and it appears to operate as a resistor. The amplitude of the AC current sinusoid can be adjusted without affecting the quality of the sinusoid (with the exception of some zero cross distortion due to the bridge). However, doing some research, I do have some concerns using the FET's as resistors. Turns out most FET's are designed to operate as switches (no surprise) but with this optimization, most cannot operate in the linear region for more than a few 10's of ms at most. It did work fine with an IRFP250N MOSFET when I tested it but that doesn't mean it will continue to work that way. The fets tend to form hotspots in the die and suffer from thermal runaway. There are FET's designed to work for this application, I'm looking at IXYS L2 line of FETs. I havent bought them yet as they are $10 each transistor.So I have a few questions regarding this application of FET's.Will using them in their linear region be any different with pulsed (full wave rectified) DC? They are still acting as a resistor but will be subject to a pulsed rectified sinusoid.Doing some quick math using maximum power transfer theorem, the FET will dissipate the most power when it is equal to the load resistance (1.5 ohms) in this case the RMS current will be 4 amps so I expect to dissipate a maximum of 24W per FET worst case.Realistically, could the IRFP250N's handle this reliably? How does Rigol use these transistors in their electronic loads for constant resistance mode if they are not designed to do so?The last thing I want is a FET to blow, especially while demonstrating the project haha! So if I have to I will go for the IXYS L2's made for the application, but I do have a handful of IRFP250N's and IRFP150N's and wouldn't mind using them if I felt they were up to the job.

author: djacobow
author_rank: Super Contributor
timestamp: October 24, 2019, 03:59:51 am
content: Use a triac in phase angle mode and use your existing sensors.Of course they wrong, but you can calibrate them at a handful of phase settings and interpolate between those to generate a correction factor for the phase angle. You know the phase angle because you're the one generating it.To do the calibration you'll just need one proper current meter. You can use one on your multimeter if it is a true RMS model with reasonable bandwidth.Since you are a student, you might also consider calculating the RMS value of a phase cut off sinusoid using basic calculus and see how well that matches your measurements.Do not try to pwm the sinusoid. Such a thing is obviously possible, but it sounds like you'd be in over your head to do it yourself, especially given your long list of constraints driven by decisions you've already made and refuse to revisit.

author: jackbob
author_rank: Regular Contributor
timestamp: October 24, 2019, 04:22:13 am
content: These sensors are so poor with triac controlled waveforms. When I increase the firing angle (reducing the conduction time of the triac) the sensors actually begin to report higher currents than full conduction without the triac. I was able to make some small modifications to my last schematic of the FET as a variable resistor and it is working great (before the potentiometer control was not linear at all only about 20% of the pot range controlled the current). Now its working perfect, I'm just not sure the FET's will continue to operate reliably in this mode of operation. This design does not use any PWM only a simple op amp to control the gate voltage and keep the FET in the linear region.

author: capt bullshot
author_rank: Super Contributor
timestamp: October 24, 2019, 05:58:26 am
content: Virtually short the output of the sensors (or load them with a rather small resistor) and measure their short circuit current / voltage across the rather small resistor. This should rule out the internal circuitry, which I believe is just a higher value shunt resistor, diode bridge rectifier and smoothing cap that gives you a poor "peak detect" current measurement. If that peak detect circuitry can be ruled out this way, you can apply your own more appropriate filtering to deal with your current waveforms.

author: Zero999
author_rank: Super Contributor
timestamp: October 24, 2019, 08:12:14 pm
content: Quote from: jackbob on October 22, 2019, 08:14:43 amPresumably it's not possible to use four smaller transformers?Quote from: jackbob on October 24, 2019, 01:18:06 amOh, I thought you were talking about some kind of voltage controlled resistor. Yes, that will work, but it relies on a potentiometer for controlling the resistance. Since you need a potentiometer anyway, why not simply replace your MOSFET circuit with a high powered variable resistor known as a rheostat? It will make it much simpler.Yes, MOSFETs are designed to be used as switches, but can work quite well in the linear region. The parameter you're looking for is known as the safe operating area. It's true that pulsing vs DC makes a difference, but at these low voltages, I believe the average power dissipation is the limiting factor and will depend on the temperature and thermal coupling between the MOSFET's semiconductor junction and the ambient, i.e. the total thermal resistance of the die, package, any thermal insulator and heat sink.

author: JacobPilsen
author_rank: Regular Contributor
timestamp: October 29, 2019, 05:23:09 pm
content: Another thread:Where can i find an adjustable AC (AC output!) power supply?