Custom Variac build - Page 1
Forum section: electronics / projects

author: ElectronSurf
author_rank: Regular Contributor
timestamp: September 18, 2023, 04:52:32 pm
content: This Variac on my desk is eating dust for too long, hopefully it's time to design and build a proper box with some circuitry around it.What I have in mind is a digital meter using an MCU with 16bit ADC showing voltage, current, wattage and watt-hour.Over-current and short circuit protection.I'm thinking to add a soft start with a relay because the Variac has two cores.And of course an old lamp as current limiter.I'm gonna update this post as the project progress.Latching comparator for short circuit protection:The current transformer:

author: Hydron
author_rank: Super Contributor
timestamp: September 18, 2023, 05:12:26 pm
content: Take a look at panel power meters on ebay/aliexpress. Could dramatically simplify the measurement side of things - I found one that displays real/reactive power, power factor, voltage and current (switching mode via a button on the front) and have built it into a couple of different variacs. The trick with these (other than finding the right one - there are a few options available) is to open them up to identify the input to the capacitive dropper power supply (it only runs down to some tens of volts, not zero), lift the connection and feed the PSU bit full mains voltage. The measurement side (connected to variac output) will still run down to 0V so you bypass the typical 40-80V minimum AC voltage limitation and get a much more useful meter.Can still use a simple CT for things like OC and SC protection, with the bonus that the MCU can be easily isolated if you're not doing voltage monitoring etc.As for soft-start a MCU will make it easy (just need a timer, plus some appropriate NTCs and a bypass relay), though there are also methods that don't need one (I was lucky enough to find a small 12V plugpack that had an appropriate soft start delay when mains was applied, and drove a bypass relay direct from it).

author: ElectronSurf
author_rank: Regular Contributor
timestamp: September 18, 2023, 05:43:49 pm
content: Quote from: Hydron on September 18, 2023, 05:12:26 pmTBH I was going to buy one of those power meter modules but what's the fun in that, decided to build one myself. I have the CT, I just need to feed it to a precision rectifier and read the value. hopefully it will be as simple as that!

author: Terry Bites
author_rank: Super Contributor
timestamp: September 18, 2023, 05:47:37 pm
content: I got me a "Nashone Tuya Energy Meter Wifi 2P 63A Electric Power Meter Din 170-270V Electric Consumption Mete Kwh Meter Voltmeter Ammeter" for £15Bloody marvelous!

author: schmitt trigger
author_rank: Super Contributor
timestamp: September 18, 2023, 07:30:11 pm
content: A genuine General Radio Variac!Wooooooow! That thing is old, a legitimate antique.

author: schmitt trigger
author_rank: Super Contributor
timestamp: September 18, 2023, 08:38:18 pm
content: I can see you have a two gang unit. Depends whether you require a higher voltage or current, there are a couple of wiring configurations.

author: ElectronSurf
author_rank: Regular Contributor
timestamp: September 19, 2023, 07:38:55 am
content: Quote from: schmitt trigger on September 18, 2023, 08:38:18 pmIt's really useful, thank you.

author: RJSV
author_rank: Super Contributor
timestamp: September 20, 2023, 12:27:19 am
content: (Casual bystander, but amazed!)Why couldn't the thing be intended for Dual Output purposes; Two legs of a 3-phase system...although that could mean some phase sensitive windings. ( ? ).I remember something about obtaining full 3-phase waveforms, from a source having 2-phases.

author: schmitt trigger
author_rank: Super Contributor
timestamp: September 20, 2023, 02:37:12 am
content: That is called the Scott-T transformer connection.It requires two different secondary-voltage transformers.And the input source must be a true two phase, i.e. 90 degrees out of phase.

author: ElectronSurf
author_rank: Regular Contributor
timestamp: September 21, 2023, 06:32:50 pm
content: I had some progress with analog section, I'd appreciate any suggestion/correction.Since I've the MCU in there, I want to use that to trigger soft start relay.

author: ElectronSurf
author_rank: Regular Contributor
timestamp: October 16, 2023, 02:47:43 pm
content: I'm still working on this whenever I have the chance. I decided to make the control section isolated from the main, winded a voltage transformer that gives me 1:500 ratio:And plus so many changes in the schematic, hopefully I can one day design the PCB!

author: TizianoHV
author_rank: Regular Contributor
timestamp: October 16, 2023, 06:16:51 pm
content: Hi,nice to see some projects with mains!I'm not so convinced by the soft start relay K1. Using the make/break contact could cause a lot of wear and make the soft start useless. You should connect K1 and K2 in parallel so to avoid switching transients. That would reduce contact resistance too.Adding a variable series impedance (ballast) could be a useful feature to limit short circuit current when testing broken stuff (I have that on my PS ->https://tiziano-bielli-ee.github.io/projects/ac-power-supply.htmland it's super useful).I don't know if I'm reading the schematic correctly, to me seems that K1 is not controlled by the micro. Why are you using those analog comparators when the micro could do everything?Are those opamps needed? I'm building a power meter too (https://tiziano-bielli-ee.github.io/projects/pk-rms-wattmeter.html), and I opted for a more simplistic design. The less stuff you use, the less stuff can break!

author: jonpaul
author_rank: Super Contributor
timestamp: October 16, 2023, 09:12:02 pm
content: Transformer is ferrite must be lam or tapewound silicon steelBad design.My power mains setuo has beenMains>>1:1 isolation trsf 1..5 KVA>>Variac>>Analog meters.See GenRad and Staco for commercial metered variacs.Digital meters are not as useful to monitir faults and fluctuationsJon

author: ElectronSurf
author_rank: Regular Contributor
timestamp: October 16, 2023, 09:31:58 pm
content: Quote from: TizianoHV on October 16, 2023, 06:16:51 pmHi, paralleling of the relays has a problem, so based on your drawing; K1 first should close then after a delay it should open and K2 should close. we have a moment there with no power to the Variac and the only way to solve this is to keep K1 closed until K2 closes too and then open K1. it's just beyond simple analog that I'm after.I was going to use a micro for the soft start at first but then I thought comparators are way way more faster, analog wins in this scenarios...The op amps are not really needed but the programing and math is easier with DC (or at least for me).I really liked your build, how did you mount the Variac inside that box?

author: ElectronSurf
author_rank: Regular Contributor
timestamp: October 16, 2023, 09:36:43 pm
content: Quote from: jonpaul on October 16, 2023, 09:12:02 pmHi Jon, The transformer is not a ferrite! it's good old EI core.Appreciate your input.

author: TizianoHV
author_rank: Regular Contributor
timestamp: October 16, 2023, 09:51:10 pm
content: Why do you want to open K1? First you close K1, you wait 1-2 secs, and then you close K2 (K1 stay closed, no need to open it while K2 is closed).Don't worry about speed, your electromechanical relays will be way slower than any microcontroller. Anyway, everyone does what he likes more, I'm scared of analog electronics.Thank you! The mounting is just some wood, screws and hot glue, nothing fancy but it's still solid after 7 years.Edit: For some reason photos are rotated.. tried reuploading

author: jonpaul
author_rank: Super Contributor
timestamp: October 17, 2023, 07:49:05 am
content: ElectronSurf: A potential measurement transformer is usually a tapewound toroid, not EI.The photo seems to be a ferrite EINumber of turns Pri/Sec seems very low.At 120 or 240V mains 50/60Hz the magnetizing current and Bsat flux will be VERY HIGH.lam size and thickness? Winding sheet?JonPS: See any good transformer design text on the formulas and design of mains transformers.# Turns depends on Bmax, core CX area, integrated product of V over time.

author: ElectronSurf
author_rank: Regular Contributor
timestamp: October 17, 2023, 01:41:40 pm
content: Quote from: jonpaul on October 17, 2023, 07:49:05 amIt's not ferrite:The core size is 3.5x3x1.2 CM.It was a 9V transformer that I removed the secondary and to increase the coupling I winded the secondary on top of primary.I tried to wind the common mode choke myself (right) but then found a proper one with datasheet and gonna use that (left):

author: p.larner
author_rank: Frequent Contributor
timestamp: October 18, 2023, 02:39:40 am
content: make a psu like photonic induction.

author: ElectronSurf
author_rank: Regular Contributor
timestamp: November 17, 2023, 07:35:54 am
content: The final schematic with last changes, built the PCB and tested it. now I just have to do the software and build the box.

author: ElectronSurf
author_rank: Regular Contributor
timestamp: December 10, 2023, 05:01:30 pm
content: While I was working on the project I came across PZEM-004 module that outputs the data isolated to a micro-controller. So I decided to re-build the project around this module, after all my 16bit ADC was no match for the in-chip 20bit ADC of V9888.The module couldn't read down to 0V so I had to modify it a little, other than that everything is fine.After 500+ lines of coding the software is ready to use, calculations of all the values:Code:void calculateValues() {voltage = pzem.voltage();// Calibrationvoltage *= 1.0144;current = pzem.current();// 10 Turns around the CTcurrent /= 10;frequency = pzem.frequency();pf = pzem.pf();energy = (pzem.energy()) / 1000;activeP = (voltage * current * pf) / 1000;apparentP = (voltage * current) / 1000;reactiveP = sqrt(pow(apparentP, 2) - pow(activeP, 2));phaseAngle = acos(pf) * (180 / 3.14159265359);resistance = activeP / pow(current, 2);impedance = apparentP / pow(current, 2);reactance = reactiveP / pow(current, 2);}Two minute video of the UI:Now I just have to design a box for this.

author: ElectronSurf
author_rank: Regular Contributor
timestamp: December 27, 2023, 07:29:48 am
content: It's done, I only need to design the cover...

author: TizianoHV
author_rank: Regular Contributor
timestamp: December 28, 2023, 12:19:11 pm
content: Good job! Yes, these PZEM-004 modules are really the easiest way to get good accuracy power measurement. The thing that I don't like about them is the speed. 1 rdng/sec is a bit too slow for my taste. Are you using its readings for the overcurrent protection? It may be too slow for that.For overload protection you don't need all that accuracy. You could use the internal ADC of the micro to monitor the peak value of the current (no need for RMS) and check if the peak value is higher than the limit for more than a time limit.What is the minimum current you can measure with the PZEM-004?

author: ElectronSurf
author_rank: Regular Contributor
timestamp: December 28, 2023, 12:39:27 pm
content: Quote from: TizianoHV on December 28, 2023, 12:19:11 pmYeah it is slow, annoying tbh and the module itself is not slow but it's the library...I turned 10 turns around the CT so it's accurate down to mA range, didn't tested it below that.