LM324 based automatic voltage stabilizer circuit simulation


 

4 boost, 1 in-out, 1 buck

 

boost_1, Ne/Nb: RL1 NC, RL2 NC, RL3 NC

boost_1, Ne/Nb: RL1 NC, RL2 NO, RL3 NC

 

boost_2, Ne/Nc: RL1 NO, RL2 NC, RL3 NC

 

boost_3, Nd/Nb: RL1 NC, RL2 NC, RL3 NO

boost_3, Nd/Nb: RL1 NC, RL2 NO, RL3 NO

 

boost_4, Nd/Nc: RL1 NO, RL2 NC, RL3 NO

 

in-out, Ne/Ne: RL1 NO, RL2 NO, RL3 NC

 

buck, Nd/Ne: RL1 NO, RL2 NO, RL3 NO

 


 

@kerim, could you kindly share any design or an example where you are trying to show boost-buck actions.
Your description looks interesting but need a reference to understand at least.

On Thursday, December 26, 2024 at 12:31:50 AM GMT+1, Kerim via groups.io <ahumanbeing2000@...> wrote:


Off topic

 

When I started designing and producing mains stabilizers for the local consumers, around 4 decades ago, I used LM324 with trimmers to activate the relays properly (much like the one discussed here).

 

In my latest designs, I use the old MCU ATmega8A. It ADC pins read both the mains voltage and the output voltage as well. Trimmers are no more needed. I followed two topologies: old conventional and digital.

 

The MCU conventional design takes 1 relay for each boost tap and 1 relay for each buck one, besides 1 relay for protection (connected at the input, not the output as in the old designs). For example, if the transformer has 5 boost taps and 1 buck tap, the transformer has 7 taps (1 for in-out) connected to 6 relays (and the protecting one). Its advantage is that the transformer is cost effective.

 

The MCU digital design takes 4 relays (+1 for protection) to achieve 11 boost steps, 1 in-out, and 4 buck steps, total 16 steps (typical input from 120 to 285 Vac, to output 220 +/- 10V). Similarly, with 5 relays, we get 23 boost steps, 1 in-out, 8 buck steps, total 32 steps. But it is better for the latter one to use triacs instead of relays (that is 10 power triacs instead of 5 relays). Its disadvantage is that the transformer costs more than of the conventional design.  

 

As most engineers are doing, I took advantage of the SMPS availability (say 24V, 1A) whose input can vary from 100 to 240V, to supply my boards. But I had to also design a small circuit to increase this range. By connecting it between the mains voltage and the SMPS input, the range becomes from 70 to 400 Vac.

 

Thanks to LTspice, I was able to test every design before drawing its final PCBs. I substitute the MCU by logic elements.


 

Kerim, can you share that front end ACV range extender circuit?

It sounds intriguing!

 

Dave

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Kerim via groups.io
Sent: Wednesday, December 25, 2024 3:32 PM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] LM324 based automatic voltage stabilizer circuit simulation

 

Off topic

 

As most engineers are doing, I took advantage of the SMPS availability (say 24V, 1A) whose input can vary from 100 to 240V, to supply my boards. But I had to also design a small circuit to increase this range. By connecting it between the mains voltage and the SMPS input, the range becomes from 70 to 400 Vac.

 

Thanks to LTspice, I was able to test every design before drawing its final PCBs. I substitute the MCU by logic elements.

_._,_._,_


 

I uploaded a couple of circuits, parts that may be useful in the AC Stabilizer design:

TR1: a mostly successful basic simulation of the main autotransformer

relay_driver: can use this subcircuit for each of the three voltage sense and relay switching circuits of the diagram.

 

Relay_Driver.asc needs a little more tweaking, but it was late and I ran out of stem. I was having trouble passing the internal pot’s wiper position parameter. As it is, it works stand-alone in the _test.asc, but there is currently no means to make three copies with different Wp values. The potmet circuit uses Fz as it’s wiper value. I need to get Wpxx in the top level circuit pushed through to the subcircuit, as Fz internally…

 

Dave


 

On Sat, Dec 28, 2024 at 02:50 PM, Bell, Dave wrote:

TR1: a mostly successful basic simulation of the main autotransformer

It's still got the wrong voltage source.  V1 is a 155 V RMS source.  It does not represent a 220 V mains voltage.
 
Text is overlapping.  Messy.
 
Measurements should look at RMS voltages, not instantaneous values at a somewhat arbitrary phase.
 
Andy
 
 


 

I’m well aware of that, Andy!

I set it at 220 so I could easily read the plot or in .meas, as if it were RMS.

Ratiometrically, it really doesn’t matter, does it?

 

Dave

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Andy I via groups.io
Sent: Saturday, December 28, 2024 9:39 PM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] LM324 based automatic voltage stabilizer circuit simulation

 

On Sat, Dec 28, 2024 at 02:50 PM, Bell, Dave wrote:

TR1: a mostly successful basic simulation of the main autotransformer

It's still got the wrong voltage source.  V1 is a 155 V RMS source.  It does not represent a 220 V mains voltage.

 

Text is overlapping.  Messy.

 

Measurements should look at RMS voltages, not instantaneous values at a somewhat arbitrary phase.

 

Andy

 

 


 

On Sun, Dec 29, 2024 at 01:07 AM, Bell, Dave wrote:

I set it at 220 so I could easily read the plot or in .meas, as if it were RMS.

Ratiometrically, it really doesn’t matter, does it?

I suppose not.  But your .MEAS commands are wrong.  If you are fortunate and the phase shifts are small enough, it might be "close enough for government work" (as they say) and you might get lucky and happen to see numbers that agree with your expectations.  But it is just plain wrong.

 

And it's a wee bit dangerous to simulate the wrong thing too and then pass it around for thousands of others to see.

 

Andy

 


 

@Andy and @deve, thank you a lot.
Now I will sketch the circuit, partially I am trying to find the missing points in this circuit. 

On Sunday, December 29, 2024 at 03:15:50 PM GMT+1, Andy I via groups.io <ai.egrps+io@...> wrote:


On Sun, Dec 29, 2024 at 01:07 AM, Bell, Dave wrote:

I set it at 220 so I could easily read the plot or in .meas, as if it were RMS.

Ratiometrically, it really doesn’t matter, does it?

I suppose not.  But your .MEAS commands are wrong.  If you are fortunate and the phase shifts are small enough, it might be "close enough for government work" (as they say) and you might get lucky and happen to see numbers that agree with your expectations.  But it is just plain wrong.

 

And it's a wee bit dangerous to simulate the wrong thing too and then pass it around for thousands of others to see.

 

Andy

 


 

A wee bit, perhaps, but it’s a work in progress, and maybe a collaborative effort.

 

RE: The measurements, I tried 0 compression, and the voltages changed by mV’s.

There were markable fewer data points before that, but I’m measuring where the derivative is practically zero, so…

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Andy I via groups.io
Sent: Sunday, December 29, 2024 6:15 AM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] LM324 based automatic voltage stabilizer circuit simulation

 

On Sun, Dec 29, 2024 at 01:07 AM, Bell, Dave wrote:

I set it at 220 so I could easily read the plot or in .meas, as if it were RMS.

Ratiometrically, it really doesn’t matter, does it?

I suppose not.  But your .MEAS commands are wrong.  If you are fortunate and the phase shifts are small enough, it might be "close enough for government work" (as they say) and you might get lucky and happen to see numbers that agree with your expectations.  But it is just plain wrong.

 

And it's a wee bit dangerous to simulate the wrong thing too and then pass it around for thousands of others to see.

 

Andy

 


 

“Correcting” V1 to 311V peak / 220 V RMS, after a full minute of settling down, I measure:

rb: RMS(v(b))=210.556 FROM 0 TO 0.02

rc: RMS(v(c))=219.988 FROM 0 TO 0.02

rd: RMS(v(d))=229.341 FROM 0 TO 0.02

re: RMS(v(e))=238.728 FROM 0 TO 0.02

rf: RMS(v(f))=18.0041 FROM 0 TO 0.02

 

These are almost identical to the peak measurements at 1005ms, with V1 at 220.:

vb: v(b)=210.591 at 0.005

vc: v(c)=220 at 0.005

vd: v(d)=229.38 at 0.005

ve: v(e)=238.768 at 0.005

vf: v(f)=18.007 at 0.005

 

They seem pretty close.

As for overlapping text, I’m running version XVII, and I know there were font differences in 24.

 

Dave

 

From: LTspice@groups.io <LTspice@groups.io> On Behalf Of Andy I via groups.io
Sent: Saturday, December 28, 2024 9:39 PM
To: LTspice@groups.io
Subject: EXTERNAL: Re: [LTspice] LM324 based automatic voltage stabilizer circuit simulation

 

On Sat, Dec 28, 2024 at 02:50 PM, Bell, Dave wrote:

TR1: a mostly successful basic simulation of the main autotransformer

It's still got the wrong voltage source.  V1 is a 155 V RMS source.  It does not represent a 220 V mains voltage.

 

Text is overlapping.  Messy.

 

Measurements should look at RMS voltages, not instantaneous values at a somewhat arbitrary phase.

 

Andy

 

 


 

Bumping this to the top

I had uploaded a couple of circuits yesterday.

Can an LTspice subcircuit guru help me with passing a parameter, as below?

 

relay_driver: can use this subcircuit for each of the three voltage sense and relay switching circuits of the diagram.

 

Relay_Driver.asc needs a little more tweaking, but it was late and I ran out of stem. I was having trouble passing the internal pot’s wiper position parameter. As it is, it works stand-alone in the _test.asc, but there is currently no means to make three copies with different Wp values.

The potmet device uses Fz as its wiper value.

I need to get Wp1, 2, 3, etc. in the top level circuit pushed through to the subcircuit, as Fz internally…

 

Thanks,

Dave


 

Dave,
I just uploaded the file "MF_VCpot.zip".
I got tired of trying to allocate floating net names to different pots.
I chose the pin name as "PC", because it is the Pot Control pin.
Feel free to Look over the files and see if it will help with your "Fz" issue.
I think that it is easy to apply net names from the top level to subcircuits.
Mike


 

Mike,

Thanks a lot, kindly share the uploaded link here.

On Monday, December 30, 2024 at 10:48:06 AM GMT+1, Mike Fraser <mrfraser@...> wrote:


Dave,
I just uploaded the file "MF_VCpot.zip".
I got tired of trying to allocate floating net names to different pots.
I chose the pin name as "PC", because it is the Pot Control pin.
Feel free to Look over the files and see if it will help with your "Fz" issue.
I think that it is easy to apply net names from the top level to subcircuits.
Mike


 

On Mon, Dec 30, 2024 at 11:44 AM, MD MUBDIUL HASAN wrote:
 kindly share the uploaded link here.
It's in here:
 
Files > Temp
 
which is where all newly uploaded files are.
 
Andy