ESP Logo
 Elliott Sound Products Mains Voltage Frequency Conversion 

Convert 50 To 60Hz, 60 To 50Hz, Or Either To 400Hz

© Sept 2023, Rod Elliott

HomeMain Index articlesArticles Index

Contents
Introduction

Frequency dividers are one of the most common circuits in the digital world.  However, most are limited to integers (i.e. whole numbers), although there are schemes that allow division by (say) 2.5 or 4.5.  These are not common, and are somewhat irksome to implement.  Things get serious if you need an exact division by a number that is not a 'simple' fraction, such as 1.2.  It sounds simple enough, but when you discover that you may also need to multiply by the same fraction things get out of hand pretty quickly.

You may well ask where the 1.2 fraction came from - it's the difference between 50Hz and 60Hz.  The inverse is 0.8333 (repeating forever!).  This issue was faced when I designed the synchronous clock driver circuit, which is designed to convert 50Hz to 60Hz, or 60Hz to 50Hz.  Synchronous motors were once common for clocks before the introduction of quartz crystals, and even today synchronous clocks are generally far more accurate than the typical quartz movements that replaced them.

This is because the electricity generators 'count' the number of cycles of the AC mains over a period of time (which may vary from hours to days).  I have two clocks in my office, one using an Arduino with a very accurate RTC (real-time clock) IC, and the other driven from the mains frequency via a simple divider circuit.

Both keep perfect time! Unlike the various quartz clocks we have elsewhere (and in my workshop), the two in my office are always in complete agreement with each other.  Both are rescued 'slave' clocks that were once driven by a 'master' movement, as was common in offices and factories from the 1920s to the 1960s.  One uses a 1 second impulse, and the other has a 30 second impulse, with the latter being more common for early examples.  Many other clocks used a synchronous motor, and it must be operated at the design frequency.  A voltage mismatch is easily overcome using a transformer, but a frequency mismatch means the clock is unusable.

The method I used to obtain either 50Hz or 60Hz from 60Hz or 50Hz (respectively) is somewhat unusual, but it works perfectly and synchronises the 'new' frequency directly from the original mains.  The problem faced was that synchronous clock motors are locked to the mains frequency, and use gears to reduce the motor speed from the original (between 200/220RPM and 3,000/3,600RPM for 50 or 60Hz respectively).  Getting alternate gearing is not possible any more, so the only viable option is to change the mains frequency to suit the clock, not change the clock gearing to suit the mains frequency.

If the mains frequency drifts a little during the course of a day, the synthesised 'new' frequency will track it perfectly.  I don't know of any other project that's been created to perform this function, and while it could almost certainly be done using an Arduino or similar, that's all code with no 'real' electronics.

Of course you can buy a frequency converter, but they are usually large and expensive, and most will be crystal controlled so there's no phase-lock between the input and output.  For industrial or appliance converters there's no real requirement for great accuracy (±1% is normally good enough), but a 1% change for a clock is quite unacceptable.

In the 'old days', conversion was achieved by using a motor-alternator set.  The motor must be synchronous, and it runs at a speed determined by the mains frequency (i.e. 600RPM for a 10-pole, 50Hz motor, or a 12 pole, 60Hz motor).  This is coupled to an alternator (AC generator) with 10 poles to get 60Hz or 12 poles to get 50Hz.  These are still available, but predictably they are intended for industrial applications, and are large and expensive.  An alternative is to use belt drive, so the motor and generator can have the same number of poles.  The speed change is accomplished by using different sized pulleys on the motor and generator.

The losses in a properly set up belt drive are quite low, so there's little loss of efficiency.  A belt drive can achieve better than 95% efficiency with the right belt and pulleys.  However a 'common shaft' system (with motor and generator direct-coupled and with a different number of poles) will probably win for efficiency.  Of course, this has nothing to do with the ideas shown in this article, but is included for your reference.

The technique I used can generate almost any frequency you like, including the aircraft standard of 400Hz.  This can be obtained from either 50 or 60Hz mains, and it's locked to the mains frequency.  The tricky part is (and always will be) the amplifier.  The arrangement described for clocks is intended for low-voltage, low-power applications.  There's no real reason that you can't use a (very) powerful amplifier, but of course that will also need a very powerful power supply.

A Class-D amp can be used to drive a transformer (in reverse) to get an output of up to around 1kVA, but that was never the (original) intention.  Great care is needed if you drive a large transformer from an amplifier, and an EI transformer is preferred over a toroid.  You'd normally expect the opposite, but a toroidal transformer saturates suddenly and viciously.  Transformer saturation can destroy almost any amplifier, so your solution must be tested very thoroughly.

You may well ask "Why not use a crystal oscillator?".  That's a fair question, but if you need to be able to switch between 50Hz and 60Hz, the crystal frequency has to be able to be divided by integer values (i.e. whole numbers ¹) to get the two frequencies.  Unless you get a fully stabilised crystal oscillator, it most probably won't be as accurate as the mains frequency - particularly long-term.  RTC (real-time clock) modules are available at reasonable prices, but with a limited number of standard frequencies.  One of the most common is the DS3231, commonly used with Arduino processors (and others).  However, it's not designed to produce a high frequency signal that can be divided to get the required mains frequencies.  The claimed accuracy is better than ±0.4 seconds/ day (about 2.4 minutes/ year).

While a 32kHz (32.768kHz) output is available, it's of no real use to obtain 50, 60 or 400Hz outputs.  There is no (integer) division that can provide a usable common frequency (e.g. 1,200Hz).  1,200Hz can be divided by integers to obtain 50, 60 or 400Hz, but dividing 32.768Hz to obtain (for example) 1,200Hz can't be done with digital dividers.  Obtaining a division of 27.30666 (repeating!) cannot be achieved.  You can get a 1 second output, but that's not even remotely useful.

¹  It is possible to divide by non-integers, but there are limits.  Divide by X.5 (where 'X' is any integer) is possible, but requires some degree of 'trick' circuitry.  An example of a divide by 1.5 circuit is shown in Fig 3.2.  Division by irrational numbers (i.e. those that cannot be described by a simple fraction) is not possible.  For example, you can't divide by π with basic logic circuits.  Computers and calculators don't use logic dividers - they use algorithms to make calculations.

To divide by 1.5, you can use a frequency doubler followed by a divide-by-3 circuit.  If the input frequency is (say) 600Hz, multiply by 2 gives 1,200Hz, divide by 3 gives 400Hz.  600 × 1.5 is also 400, so this approach is quite valid (and can be also be used with different ratios).  Digital frequency doubling is almost trivial, but tripling (×3) is not, so your options are still limited.  Some configurations can create 'unfriendly' waveforms, with uneven ratios such as two 'normal' cycles, then a few missing pulses, followed by two normal cycles (etc.).  These are not useful for any of the applications described here.

We can also divide by 2.5, but to obtain a usable output waveform it requires a doubler, followed by a divide by 5 circuit.

If you look up 'non-integer division' on the Interwebs you'll see many different approaches.  Some are highly convoluted, and make it seem like a huge and difficult task.  However, the general principle isn't necessarily difficult.  There are limits of course - as noted above, irrational numbers won't work, but simple fractions like 1.5, 2.5 (etc.) are usually most easily accomplished by using a doubler first, followed by an 'ordinary' divider.  For example, to divide by 4.5 you simply use a clock doubler, followed by a divide by 9 circuit.  These will nearly always have an uneven mark-space ratio though.  This is (usually) unimportant for logic circuits, but it's critical if we need to extract an audio-frequency waveform from the digital signal.

The base frequency of 600Hz as described next is the most convenient, as no fractional divisions are needed for 50/ 60Hz output, and a symmetrical squarewave is easily achieved.


1   'Base' Frequency Determination/ Extraction

If you only have one mains frequency to worry about, determining the ideal frequency is easier, as it can be based on the available harmonics of a pulse waveform derived from the mains.  It gets harder if you want to be able to use either 50Hz or 60Hz, because you have to use a frequency that's common to 50Hz, 60Hz and the desired output frequency (if different from either input frequency).  To convert from 50 to 60Hz (or vice versa) that common frequency is 600Hz, which can be divided by 12 (divide by 6, then divide by 2) to get 50Hz or by 10 (divide by 5, then divide by 2) to get 60Hz.  In fact, the 'base' of 600Hz is the lowest frequency that can be used to convert 50/ 60Hz to 60/ 50Hz conveniently, and with a symmetrical output waveform.

From 50Hz mains, you can use 300Hz as the 'base', and while you can get a 300Hz signal from 60Hz, the circuit becomes input frequency specific because 300Hz can't be obtained from the 120Hz output of the zero-crossing detector circuit.  To obtain 60Hz from a 300Hz source requires a division of 5, but the output would be asymmetrical.  With a 600Hz source, we divide by 5 (asymmetrical output) then divide by 2 to obtain a symmetrical 60Hz squarewave.  Using a 300Hz base frequency creates another problem - the dividers become far more difficult.  Divide by 5 or 6 will give 60Hz or 50Hz respectively, but the waveform will be asymmetrical, and this makes it much harder to get a clean squarewave or sinewave at the desired frequency.  That's why I used 600Hz as the base - it allows for final divide by 2 to get a clean, symmetrical squarewave output.

To get 400Hz from 50Hz is easy - just use the 4th harmonic of 100Hz (from full-wave rectified 50Hz), but it's harder with 60Hz (120Hz).  It can be done using 60Hz rather than 120Hz, but getting the narrow pulse needed to obtain high-level harmonics is more difficult (and the circuit becomes input frequency specific).  To obtain 400Hz (uncommon for most hobbyist needs), the lowest frequency you can use is 1,200Hz (the 10th harmonic), which is divided by 3 to obtain 400Hz.  The trick is to find the lowest common denominator, which tends to be an iterative process.  There are on-line calculators that can help (but that's cheating).

You can just use the following ...

fo = fM × fR (fo is output frequency, fM is mains frequency, fR is the required frequency)

However, that will give a frequency that's much too high.  You need to find the lowest frequency that can be divided by an integer to get the desired frequency, bearing in mind that the frequency to be divided must be a harmonic of the mains frequency.  The rotary converter mentioned above gives us a clue - the most usable common frequency is 600Hz, which can be divided by integers to get either 50 or 60Hz.  We divide by 12 to get 50Hz or by 10 to get 60Hz.  This will work equally well with a 50Hz or 60Hz mains input, and the 'base' frequency circuit is not changed at all.

fig 1.1
Figure 1.1 - Power Supply And Pulse Generator Circuit

The first part of the circuit is the power supply, which includes the pulse generator circuit.  This is based on a zero-crossing detector, using Q1 to detect when the output from the bridge rectifier is less than 600mV.  D5 isolates the filter cap (C1) so the voltage isn't held high permanently.  The output of Q1 is low, other than for the ~500μs period when the base voltage is below 600mV.  R3 is very important - without it, stray capacitance and/ or even tiny diode leakage will prevent Q1 from turning off.  The DC has two components, a 22V supply for power amplifiers (if used), and a 10V supply for the CMOS ICs and opamps.  I've shown a 10V regulator, but 12V (using a 7812) will also work fine.  R2a and R2b are shown as 2.2k so you don't need to acquire a 1.1k resistor.  You could use a trimpot, but great accuracy is not needed.

The transformer and diodes must be selected for the current you expect.  If you're only generating a signal waveform to be amplified externally, the total current drain will be very low, probably less than 50mA.  This means you can use a small transformer - around 4-5VA will be more than enough.  The diodes are 1N4004 or similar.  If you expect to be drawing up to (say) 500mA (DC), then the transformer will need to be rated for at least 20VA.  Anything over 500mA from the supply should ideally be handled by a separate dedicated transformer, rectifier and filter caps, or a switchmode supply.  This will only be required if your output current demands are more than 30mA at 230V or 60mA at 120V.  Even for low output current, a separate supply for the amplifier is a good investment.

fig 1.2
Figure 1.2 - Harmonics And Power Supply Waveforms (50Hz)

The inset shows the rectified low voltage (shown ½ scale) & pulse, with the harmonic structure of the pulse waveform referred to 1V.  The harmonics don't collapse quickly with the waveform taken from the collector of Q1.  The level remains reasonably consistent from the base frequency of 100/ 120Hz up to the 12th, showing a reduction from around 800mV to ~460mV (100Hz to 1,200Hz).  This gives us the ability to filter any harmonic quite easily, as there's enough level to work with to obtain any frequency with the range of 100/ 1,200Hz to 120/ 1,200Hz.  Both even and odd harmonics are available because the waveform is highly asymmetrical.  If you were to generate a squarewave detector, then only the odd harmonics would be available, so you'd be unable to extract the 6th harmonic.  A perfectly symmetrical squarewave contains no even harmonics.  The pulse width is about 500μs, and the full filtered output voltage (at 600Hz) is obtained within two mains cycles.

The spectrum is from a rectified 50Hz waveform (100Hz) converted by the pulse generator.  If you use 60Hz (120Hz), the harmonics are at 240Hz, 360Hz, 480Hz and 600Hz (the 5th harmonic, and the lowest sensible/ usable frequency common to both 50 and 60Hz).  The 10th harmonic of 120Hz is 1,200Hz, another common frequency.  This would only be used if you require a 400Hz output.  By comparison, if we looked at the rectified sinewave it would show that each harmonic is diminished by a great deal more than the pulse waveform.  The second harmonic is down by 14dB, the third by a further 8.3dB, and the fourth by another 4.1dB.  If were were to look at the 5th (-33dB) and 6th (-34dB), it's obvious that the pulse waveform is vastly superior.  The 5th harmonic is down by 1dB, and the 6th by 1.4dB.  However, the starting level is also lower (the 10V peak pulse waveform has an RMS value of ≈2V), but that's neither here nor there in the greater scheme of things.

Of course, you can use a 555 timer to build an oscillator at the right frequency, but it won't be stable.  Using a crystal is the way most people get stable frequencies.  Modern quartz clocks use a 32.768kHz crystal with a divide by 15 counter, but these have poor frequency stability.  Earlier quartz clocks used an 8.388608MHz (8,388,608Hz), followed by a divide by 23 counter.  These were more stable, but also more costly to produce.  The 8.388608MHz crystals are still common from major suppliers, but are not suited to obtaining 50 or 60Hz - they are intended to provide a 1Hz output with a 23 stage binary counter.  The same applies to 32.768kHz crystals.

For our purposes, a readily available 3.072MHz crystal can be divided by 61,440 to get 50Hz or 51,200 for 60Hz.  First, we'd divide by 2^10 (1,024) to obtain 3kHz, then divide by 50 to get 60Hz or by 60 to get 50Hz.  All of these are simple enough to do, but quite a few counters are required to get the final result.  The final output is independent of the mains frequency, and may not have the same long-term accuracy.

This is where some analogue electronics come in handy.  By using the rich harmonic structure of a pulse waveform, we can extract any harmonic up to the 12th, although that's pushing the limits.  The first idea that may spring to mind for this task (multiplying the input frequency) may be a PLL (phase-locked loop) such as the 4046.  This might seem like a good idea until you realise that it will need the PLL and a divide by 10 counter, plus the inevitable support components.

PLLs are very capable, but the loop filter can be a cow to get right, and if it's not right it either won't work or will be unstable.  The VCO (voltage controlled oscillator) also has to be set up so that it's close to the input frequency with an input voltage of ~2.5V (assuming 5V operation).  The 4046 is not a precision IC, and there may be considerable parameter spread, so it will need to be tested and tweaked before you can get it to work properly.

By comparison, using tuned filters may seem crude, but provided you get the values right (and use trimpots to adjust the filters), the results are impressive, and you can see exactly how the 'new' frequency is derived.  In many respects, the operation of a PLL and a tuned harmonic filter are more similar than you may have thought.  The difference is only in the implementation - a particular harmonic frequency vs. a digital divider.  It's noteworthy that frequency multiplication using harmonics is (or was) common in RF circuits, but most are/ were only doublers or triplers, and used LC (inductor/ capacitor) tuned circuits.

A PLL solution to obtain 600Hz from 50Hz is shown below.  It will take about 400ms (about 8 cycles of 50Hz input) to lock with the values shown, which is pretty good, but it's a lot slower than the harmonic filter version (shown following the PLL circuit).  The harmonic filter has full output at 600Hz within 40ms with a 50Hz input.

fig 1.3
Figure 1.3 - PLL Frequency Converter, 50Hz To 600Hz/ 1,200Hz

The essential parts of the PLL circuit are the mains frequency extraction circuit (shown in Fig. 1.1), the PLL itself, followed by a divide by 5/ 6/ 10 counter, which forces the output to be either 5, 6 or 10 times the input frequency.    Note that the circuit shown can only achieve 1,200Hz output from a 60Hz input, and another counter (a divide by 2 D-Type flip-flop) is needed to get a total of divide by 12 with 50Hz mains.  The counter connection then becomes from O6 (divide by 6) with the following divide by 2 obtained from the extra counter.  The mains frequency is doubled by the bridge rectifier, so becomes 100Hz with 50Hz mains, or 120Hz with 60Hz mains.  100Hz × 6 is 600Hz, and 120Hz × 5 is also 600Hz.  The output is a squarewave.

The two critical parts are the VCO (voltage controlled oscillator) presets R1 and C1.  These should set the oscillator frequency to close to the input frequency so the feedback (via the loop filter) settles quickly.  The loop filter is one of the hardest things to get right, but the values shown work well for the frequency we're looking at.  If the time constant is too long the output frequency won't settle quickly enough.  Unlike the harmonic tuning method, the output frequency will 'hunt' until the PLL is locked, so the output frequency will be wrong.  However, this only lasts for a few mains cycles and is unlikely to be a problem.

If the input frequency is changed to 60Hz, the counter has to be changed.  Instead of dividing by 6, we have to divide by 5 so the output is 5 times the input frequency (120Hz to 600Hz).  The harmonic filters will accept either 50Hz (100Hz pulses) or 60Hz (120Hz pulses) with no circuit changes.

fig 1.4
Figure 1.4 - Harmonic Tuning Frequency Converter, 50/ 60Hz To 600Hz

The input signal is identical to that used for the PLL (see Fig 1.1 - 'P-Out' is the pulse waveform).  The filters are both tuned to 600Hz.  With a 50Hz (100Hz) input, the filters capture the 6th harmonic at 600Hz.  If the input frequency is changed to 60Hz (120Hz), the filters capture the 5th harmonic - nothing is changed in the circuit, because the filters are tuned to 600Hz, and no other frequency can get through with enough energy to cause a problem.  The opamps should be run from the +22V supply, using the 10V supply as the 'reference' voltage.  Any ripple on the 22V supply is of no consequence, and the higher voltage means that you can get plenty of level from the filters.

There is no change to the filter for 50 or 60Hz operation, as only the harmonic at 600Hz is captured.  The pulse generator (Q1) generates a rectangular waveform with a voltage that's compatible with the dividers that follow.  D1 (a 1N4148 or similar) is there to prevent a negative voltage being presented to the base of Q1, which may be of sufficient amplitude to cause degradation over time.  R6 is important, because it sets the reference level for switching.  The output is AC coupled before it reaches the transistor to remove the 10V DC component.

The filters are MFB (multiple feedback) types, which are irksome to design.  Many years ago I wrote a simple program that works out the values you need, and lets you 'back check' available values to see how close you can get.  The final tuning is done with a trimpot (VR1, VR2 in the circuit shown).  The program 'mfb-filter.exe' is available from the downloads page or just click on this link ... mfb-filter.exe.  It requires the VB6 run-time library (this should be available from Microsoft is it's not already on your PC).

If you'd rather calculate the values yourself, you need to select the desired gain and Q first.  I used a gain of 5 and a Q of 20.  The formulae are as follows ...

Input resistanceR1 = Q / (G × 2π × f × C)
Attenuator resistanceVR2 = Q / (( 2 × Q² - G ) × 2π × f × C )
Feedback resistanceR2 = Q / ( π × f × C )
Passband GainG = 1 / (( R1 / R2 ) × 2 )
Centre Frequencyf = 1 / (( 2π × C ) × √(( R1 + VR1 ) / ( R1 × VR1 × R2 )))

No?  I thought not, and that's why I wrote the calculator program.  The final values were set to standard values (47k & 470k) with final tuning done by VR1/2, nominally about 310Ω.

The two filters must be tuned for maximum output at 600Hz.  Because the output of the second filter will clip (at about 2V and 20V with a 22V supply), it's better to tune that first. using TP2 to monitor the output.  The trimpot (VR2) should be adjusted to maximum output at 600Hz (you must measure the frequency).  Then the first filter can be tuned using VR1, monitoring TP1.  Again, adjust to maximum output, but note that the level peaks when an input pulse is received, and decays over time until the next pulse.  With a 50Hz input, the level will reach ~5.8V peak, decaying to ~2.5V peak before the next pulse.  With 60Hz input, there's a little less decay - from 5.8V to about 3V peak.  This is because a lower harmonic (the 5th) is being filtered, which has a higher amplitude.

In theory, a single filter would work, but using two guarantees that the output remains at maximum amplitude, and forces a constant amplitude and more accurate output pulses.  Any deviation could cause a cyclic frequency variation of the 600Hz output frequency.  This won't hurt anything, but for the sake of a few cheap parts it's better to ensure that it's correct.

The last stage needed is a level converter, that provides a pulse waveform at 600Hz.  This is necessary because the sinewave output from the filters is unsuitable as a clock signal for the dividers.  There's no DC offset that will cause problems (thanks to C5), and the simple transistor circuit is perfectly adequate for the task.  You can use a Schmitt trigger to get fast rise and fall times, but that's overkill.  D1 is required to prevent high-level negative excursions at the base of Q1.


2   50/ 60Hz Division

Once we have a stable 'reference' signal at 600Hz, we can extract either 50 or 60Hz simply by dividing, using common digital divider ICs.  There are many options, including the use of a string of 4013 D-Type dual flip-flops.  This might sound silly, but only four flip-flops (2 ICs) are required, and the output is arranged to be a 'perfect' squarewave.  This is not absolutely necessary, but it makes conversion to a decent approximation of a sinewave much easier.  The final flip-flop is also used with some logic to generate a 'modified squarewave' output signal.

fig 2.1
Figure 2.1 - Dividers For 50 And 60Hz Using 4013 ICs

The same basic circuit is used for both, with the first three dividers configured for either divide by 5 to get a 120Hz output or by 6 to get 100Hz.  This is followed by a divide by 2 circuit to ensure a symmetrical output.  The decode logic is very a basic resistor/ diode AND gate.  You can use a 'real' AND gate (e.g. 4081), but the IC has 4 to a package and 3 will be unused.  There is no improvement in performance by using an AND gate, and the cost of a pair of diodes and a resistor is less than the IC.

The circuit is designed to reset the flip-flops when the desired count is reached.  Each D-Type divides by 2, and with 3 the maximum division is 8.  The diode/ resistor AND gate resets the counter at either 5 or 6 counts.

fig 2.2
Figure 2.2 - Divider For 50Hz Using 4013 D-Type ICs

A divide by 6 circuit can be implemented with no external parts, but that can't be done for a divide by 5 circuit.  Since 50Hz output requires a divide by 6 counter, the three D-Type flip-flops can be connected as shown above to obtain the 100Hz output, which is then divided by two by U2B to get 50Hz.  While this saves a couple of diodes and a resistor, it's not flexible.  If you need a 60Hz output, you have to use the circuit as shown earlier (or use the alternative divider shown next).

fig 2.3
Figure 2.3 - Divider For 50 Or 60Hz Using 4017 Decade Counter IC

You can also use a 4017 (decoded 5-stage Johnson counter [ 1 ]), and this doesn't need any external parts - other than a D-Type flip-flop to produce a squarewave.  The feedback from the desired output (in this case either O5 for divide by 5 or O6 for divide by 6) resets the counter.  The output can be taken from any pin below the one used as the reset (e.g. O1 to O4), with the only difference being the phase.  Note that the divider has an asymmetrical output waveform, so a 4013 is still needed to divide by 2 and provide a perfectly symmetrical output signal at the desired frequency.  The other half of U2 is unused, so all inputs should be pulled low to prevent problems.

Asymmetrical waveforms have more harmonics than symmetrical waveforms, making filtering harder.  In some cases, you may decide that a 'modified squarewave' (aka 'modified sinewave') is acceptable, and most driven circuits (including synchronous motors) don't care either way.  However, a modified squarewave has a high harmonic structure that may cause some motors to run hotter than they would with a reasonably clean sinewave.  Motors may also be noisy with a modified squarewave.


3   400Hz Generation

Generating a 400Hz mains waveform is probably not something that most people will need, as it's a specialty application that's mainly used with aircraft instrumentation.  The harmonic extraction method is still preferred, because although the necessary 1,200Hz can be achieved using a PLL, it needs a divide by 12 counter in the feedback loop for 50Hz, or divide by 10 for 60Hz.  Both are easily achieved, but the harmonic filter can extract the 12th (or 10th) harmonic quite satisfactorily, with no changes to the basic topology.  Component values are changed, but that's all.  The filters have a gain of 5, with a Q of 10 with the values shown.  The 12th harmonic is pushing the limits, but the result is pretty good.  You could add another filter stage if you wanted to, but it won't improve the circuit noticeably.

fig 3.1
Figure 3.1 - 1,200Hz Harmonic Filter

Once the 1,200Hz waveform is obtained, it's simply divided by three to get 400Hz.  As before, the output is locked to the mains frequency, but it will show a greater deviation (in Hz) than the 50 or 60Hz mains.  The percentage change is not affected of course.  You can use a 4017 decade counter, but the output will be asymmetrical.  A pair of 4014 dual D-Type flip-flops can be configured as a divide by 1.5 counter, followed by a divide by 2 to get a symmetrical output.

fig 3.2
Figure 3.2 - Divide By 1.5 Plus Divide By 2 Circuit

Dividing by 1.5 is not something you come across every day.  These are several references on line, but most use the same circuit as shown in the reference [ 2 ].  It's a very clever design that's not overly complex.  You do end up with one unused flip-flop and 2 NOR gates, which must be disabled by pulling their inputs to ground.  There is one other patented circuit, but it doesn't divide by 1.5 at all - it divides by three!  The output of a divide by 1.5 circuit is asymmetrical, so it must be followed by a flip-flop to ensure that the frequency is reduced from 800Hz to 400Hz, and the output is symmetrical.  The test point lets you verify that the output is 800Hz (1,200Hz / 1.5).  As an alternative, one can divide by three, but the output is asymmetrical, and filtering is harder.

Another possibility is to divide by six and use a voltage doubler to get the 400Hz signal.  The doubler can be tweaked to get an almost perfect 50:50 output, making the final filter easier to implement.  There's some messing around with a doubler to get a clean waveform without cycle-by-cycle jitter, so I've not included it here.  It's possible (but unlikely) that a modified squarewave would suffice for a 400Hz supply, and I'd expect that most applications would require a reasonably pure sinewave.

fig 3.3
Figure 3.3 - Direct Harmonic Extraction From 50Hz Input

If you have 50Hz mains, obtaining 400Hz is easy, simply by taking the 4th harmonic of 100Hz.  This eliminates dividers and/ or multipliers completely.  Unfortunately, this doesn't work with 60Hz mains because there's no harmonic at the desired frequency.  That means that the only options involve a 1,200Hz starting frequency, with dividers to suit.

The filter shown above will give a clean 400Hz sinewave, even with an asymmetrical input waveform, so the 100Hz pulse input can be replaced by a 400Hz squarewave (or pulse waveform), and because of the clipping circuit the output will be acceptably free of even harmonics.  Using two filters is only necessary if the input waveform is asymmetrical.

If you have a symmetrical input squarewave, a single filter will suffice.  The gain needs to be reduced, which is easily done by increasing R1 to 180k.  The output level will be around 4.2V RMS at 400Hz.  Everything from R4 to the right is omitted, but an output coupling capacitor (C5) will be required, along with a level control.  The tuning (VR1) is adjusted for maximum output.


4   True Sinewave

Getting a reasonable sinewave isn't difficult, requiring a fairly simple filter of the same type used for harmonic 'extraction'.  A Q of around 10 will provide a sinewave output with less than 2% distortion, which is far better than you'll get from the mains.  Striving for anything better is pointless.

fig 4.1
Figure 4.1 - Sinewave Filters For 50 And 60Hz

Like the 600Hz filters, these must be tuned for the desired frequency.  The output will be about 4V RMS with a 10V squarewave input, more than sufficient to drive a suitable power amplifier.  The output voltage is within the output range for typical opamps (from about 1.5V to 10.5V with a 12V supply.  The 22V supply voltage is essential here.

fig 4.2
Figure 4.2 - Sinewave Filter For 400Hz

This is easy to achieve, but is only necessary if you have to synthesise the 400Hz waveform from 60Hz mains.  Provided the input is symmetrical, a single filter will be more than good enough, but you will need two if you start from an asymmetrical waveform.  The output is about 3.7V RMS with a 10V squarewave input.  The level pot (VR2) is used to adjust the output voltage of the power amplifier and transformer shown below.

The sinewave output can be used to drive a small power amplifier to obtain low voltages, suitable for low voltage motors.  The maximum I'd recommend is around 16-24V with a load current of up to 1A.  This will require a power amplifier with a single supply of around 70V, or ±35V.  If more power is needed, a Class-D amplifier will give higher efficiency.  For low current 230V (or 120V) outputs (~30-40mA maximum), a small transformer can be used in reverse, with the output voltage taken from the primary.

The amplifier shown uses LM1875 power amps (TO-220 case), but you can substitute anything of similar or greater power output.  It's intended for low output current from the transformer output, at up to ~50mA for 120V or 100mA at 120V.  Although it's shown using a 22V supply (as provided by the Fig. 1.1 circuit), a separate supply is recommended with its own transformer, rectifier and filter cap.  Otherwise the supply will be loaded too heavily which may upset the operation of the filters.

fig 4.3
Figure 4.3 - Sinewave Transformer Output

The transformer is used in reverse, and has to be selected so that it will step up the voltage to obtain the required output voltage.  For example, if you have a 12V RMS output from the amplifier (available from the design shown), you'd use a 230V to 12-15V transformer.  The amplifier will need a supply voltage of 22V, and will have to supply about 1.4A RMS for a 50mA load (using a 12VA transformer).  It doesn't matter if the amplifier clips a little, because the normal AC mains waveform is also 'clipped' to some extent.  The mains distortion is often up to 8%, but that doesn't affect any loads.

Small transformers have rather poor regulation, and using them in reverse makes that worse.  It's better to use a transformer that's somewhat larger than the output voltage and current would suggest.  230V at 50mA is 11.5VA, but a 30VA transformer is more likely to be able to perform well than one that's just big enough.

A high-power Class-D amp can drive a much larger transformer, but you need to take precautions against transformer saturation.  If the output is taken from the filter circuit shown the voltage will rise over a few cycles which helps.  Any amplifier driving a transformer needs very good protection circuitry, as a transformer is a very difficult load!  If you need high power (anything over 5W or so), you must test everything thoroughly, and ESP accepts zero responsibility if the amp blows up.


5   Modified Squarewave

This waveform is very common, and it's used in most UPS (uninterruptible power supply) and the majority of 'sinewave' converters sold for use with recreational vehicles.  In some cases it's called 'modified sinewave', but that hides the truth from the uninitiated.  The general idea is to ensure that the peak and RMS voltages are the same as a true sinewave, and if that's achieved most appliances don't care about the actual waveform.

There are more advanced versions (using 3 steps for each half-cycle), but these are uncommon and won't be covered here.  For 50Hz/ 230V mains, that's the RMS value, and the peak is 325V (120V RMS and 170V peak for 60Hz).  These voltages will not be available from our little converter, but the relationships can be duplicated easily enough.

A true squarewave can't be used, because its peak and RMS voltages are the same, although a few early designs used a squarewave output.  This is described in detail in Inverter AC Power Supplies, which includes examples of all currently used techniques.  A modified squarewave inverter has several distinct 'phases' of operation.  The first is zero - no output at all.  This period should be (almost) exactly 1/4 of the period (20ms for 50Hz, so 5ms 'off').  The next is a 5ms positive pulse, followed by another 5ms 'off' period.  The final phase is a 5ms negative pulse.  This creates one cycle (see below).  With a 10V peak sinewave, the RMS value is 7.07V, and the modified squarewave shown has an RMS value of 7.02V.  This is more than acceptable.

fig 5.1
Figure 5.1 - Modified Squarewave, True Sinewave For Comparison.

The required waveform can be created using a D-Type flip-flop and some external logic.  Another technique is to use a couple of simple timers (each with 1 resistor, 1 capacitor and 1 diode).  The logic solution is more elegant, and eliminates the need for adjustment.  An example is shown below, and it includes a small delay that prevents a glitch in the waveform.  You may not need it, but if you see very short 'spikes' as the output changes stage then the delay is essential.

Why is there a glitch?  All circuits have a propagation delay, and for the 4013 that's up to 300ns with a 5V supply, and somewhat less with the recommended 10V supply.  The clock signal to the gates is immediate and the NAND gates have a lower propagation delay, so an invalid state can exist for up to 50ns or so.  Delaying the clock input to the NAND gates prevents this from happening.  It's possible that the glitch only shows up on the simulator, but it's more likely that it's real.  You can test for it with a scope, and if present it must be eliminated to prevent high peak dissipation in the output MOSFETs.

fig 5.2
Figure 5.2 - Modified Squarewave Generator Using Logic

The way this circuit works is fairly straightforward.  The 4013 divides by 2, and the NAND gates will only produce a negative output pulse when the appropriate flip-flop output and the clock are high.  Because we need a positive voltage to turn on the power switch (assuming a transformer output), the polarity is inverted for both outputs.  The two waveforms and the composite waveform (after amplification) are shown in the drawing.  You can also use standard NAND gates, as the Schmitt Trigger versions are optional.  Note that U1A cannot be the final divider flip-flop shown in Fig. 2.1, 2.2, 2.3 or 3.2, because the input is asymmetrical.  The input must be double the output frequency, so you need 100Hz, 120Hz or 800Hz to obtain 50Hz, 60Hz or 400Hz respectively.  The input must be a perfect squarewave!

While the above circuit is the ideal, it has a 'small' issue that's not at all small for 60Hz.  The input must be a perfect squarewave, meaning a 50:50 mark-space ratio.  The earlier dividers have to be modified, and obtaining the 100Hz waveform is easy, using a divide by 3 (from 600Hz), followed by a divide by 2 to get a squarewave.  However, for 120Hz, the 600Hz waveform has to be divided by 2.5 to obtain a 240Hz waveform that can be divided by two for a perfect squarewave.  This is possible, but very inconvenient.  One method would be to re-tune the 600Hz extraction filters to 720Hz, and divide the output by three to get 240Hz.  While a frequency doubler can be used (at least in theory), the timing circuits of that need to be precise as well.  This isn't an issue if the input is perfect squarewave, but if that were the case you wouldn't need any extra circuitry!

There's an easier way, and while it may not be 'perfect', if the resistors and capacitors are selected to be within 1% tolerance the results are quite satisfactory.  The circuit is shown next, and requires only a 4584 hex Schmitt trigger, two resistors, two caps and two diodes (1N4148).  The paralleled inverters at the outputs can drive a medium power MOSFET directly, with no requirement for a 'proper' gate driver.  The most important thing is to ensure that the 'on' periods of both timers are identical.  This eliminates even harmonics that introduce a DC offset in the output.

fig 5.3
Figure 5.3 - Modified Squarewave Generator

The RC networks act as delays, and 22nF caps are used for both frequencies.  The diodes force the caps to charge (more-or-less) instantly, but the discharge is controlled by the resistors.  The resulting output waveform is almost perfect with the values shown, with only a small deviation between the theoretical ideal (RMS = 0.707 of the peak) and the actual RMS values (shown in the drawing).  This arrangement is a lot easier to implement than changing the dividers and/ or harmonic filters, and the resistors could even be switched so you can change from 50Hz to 60Hz.  The dividers also have to be switched, assuming that you use the Fig. 2.1 or 2.3 divider circuits, and is easily implemented with either divider.

Once a satisfactory drive waveform is available, we can look at the output stage.  This is simple for low power, but becomes much more complex if you expect to deliver more than a (small) few watts/ VA.  I will not be showing a high power version here, as you need to be able to provide for a prodigious input current.  For 1kW and a 24V DC supply, this will be around 45A continuous.  This is not recommended.  The output stage shown is good for about 10-20VA output.  As with the sinewave amp shown earlier, I recommend a separate power supply for the amplifier.

fig 5.4
Figure 5.4 - Modified Squarewave Output Stage

Assuming a reasonably low output power, the circuit shown will produce an output with the modified squarewave waveform, at either 230V or 120V.  The transformer has to be selected to suit both the voltage and power you need.  It's wired in reverse, so the secondaries are connected to the MOSFETs, with the centre-tap going to the supply.  The primary is used for the output.  With a 22V supply, the transformer needs a secondary voltage rating of 15+15V, but to account for losses, a 12+12V secondary may be needed.  The transformer should be rated for at least double the output VA you expect.  For example, 50mA at 230V is 11.5VA, but the transformer will need to be a minimum of 20VA, with ~30VA being preferred.

The windings will have considerable resistance, so there will always be losses.  The output voltage will be highly dependent on the load current, and you will need to experiment to find the right combination for your load.  The MOSFET dissipation is minimal, but I strongly recommend that you use a heatsink anyway.  It doesn't need to be large for the recommended output current.  The input current will be quite high - for the circuit shown with an output of 18VA, the input current is about 1.6A at 22V DC.  The power transformer for the amplifier supply needs to be at least 50VA to ensure acceptable regulation.  Using the same tranny for the frequency converter and power amp is not recommended.

The comments made about driving a transformer in reverse for a sinewave are just as relevant for a modified squarewave.  If the transformer saturates, the MOSFET current will rise alarmingly.  The fuse is shown as 2A (preferably slow-blow), but you'll need to select the right value for the transformer and load being used.  If you need more than 50-100mA, you'll need a bigger fuse, higher current MOSFETs and a more robust power supply.  Consider that with a 12V AC input, if you want just 2A output at 230V, the peak AC input current will be over 80A (≈57A RMS).  There will always be losses, and they increase rapidly as output current is increased.


6 - Analogue Divider

One thing you won't see often now is dividers that are fully analogue.  There's a variation on neon lamp dividers that were used in some early electronic organs (I only ever saw one!).  An analogue divider (using a comparator) can do a fine job of dividing by anything from 2 to 10, but they can be somewhat finicky to set up.  This is particularly true if the incoming pulse width varies (even by a small amount) and with higher division ratios (>6).  They were once used in early electronic organs to divide by two to obtain the octaves, so there could have been between 5 and 7 in cascade (5-7 octaves).  With low division ratios an analogue divider is very reliable, even with simple circuits.  Unlike digital dividers, getting non-binary (i.e. 2-4-8-16 sequence) is easy, so a simple divide by 3 or 5 isn't an issue.  However, like most divider circuits, they are integer only, so you can't divide by 2.5 for example.

If you were to use analogue dividers to divide by 12, it would be far more reliable to use a divide by 3 followed by divide by 4.  The output waveform is a narrow pulse, which makes sinewave filtering hard, and makes a modified squarewave signal difficult to achieve.  For reference, a divide by 5/ 6 counter is shown next, purely as an example.  I really don't expect anyone to built one, but then again ...

fig 6.1
Figure 6.1 - Analogue Divide By 5/ 6

The division ratio is set using VR1, with a low resistance for low division ratios and vice versa.  The maximum voltage across C1 should be limited to less than 5V, or division may become erratic.  The input pulse with the circuit shown must be 10V peak, with a 2.5% duty-cycle (assuming 600Hz input, that's 34μs).  The output pulse is narrow (only ~34μs), and that's actually quite hard to increase without additional complexity.  The simplest is a basic 'pulse stretcher', using a diode, capacitor, discharge resistor and the other half of the LM339 comparator, included in the drawing.  The way the divider works is probably not intuitive, and the following waveform should help.  The circuit is set up for a 50Hz output for the following graph (divide by six).

fig 6.2
Figure 6.2 - Analogue Divide By 6 Waveforms

Each time an input pulse is received, the voltage across C1 is increased, and this happens in steps.  The reference voltage is set for 3.3V with VR1, and the voltage increases until the threshold is reached.  The comparator's output goes high, which provides the output pulse (shown truncated to 5V), and turns on Q1.  This discharges C1, and the process repeats.  The resistor, diode and capacitor network (R4, R5, D2 and C2) ensure that Q1 is on for long enough to fully discharge C1.  Without this network, the circuit doesn't function properly.  The pulse stretcher simply charges C3 when the output of U1A goes high, and it discharges via R6.  The mark-space ratio can be varied by adjusting R6, and 50:50 is easily achieved.

The amplitude and pulse width at the input are critical, and must be within the design limits at all times.  If the amplitude or pulse width are increased, the circuit will trigger early, resulting in a lower division ratio.  The converse is naturally true as well.  The division ratio is adjusted with VR1, and it can be varied from divide by 2 up to 17 (the latter is neither useful nor recommended).  The circuit can be improved in a number of ways, with the most useful being to charge C1 using a switched current source.  This makes charging linear, but also adds a number of extra parts.

The analogue divider shown here is something you probably won't see elsewhere else.  There are a couple of simple examples on-line, but nothing as sophisticated as the circuit shown.  Neon (or unijunction transistor) circuits were never common, but they have been used as divide by two circuits for early electronic organs.  Compared to a digital solution there's more circuitry, but it's still an interesting application of electronic principles.


Conclusions

For most hobbyists there's not much call for mains frequency conversion, but it's an interesting learning exercise even if you don't use it.  For synchronous motors (including those used for turntables), there's not much choice, especially for older units where the alternative pulleys (to accommodate different mains frequencies) are no longer available.  Using a basic oscillator is not generally very useful due to frequency instability, although there are several turntable motor drive systems that do use an RC (resistor-capacitor) oscillator.

What is acceptable for a turntable is far from acceptable for an electric clock though.  We can hear a pitch change of about 3.6Hz (0.36%) within the range of 1-2kHz [ 3 ], but most people would want a turntable to be better than that.  In general, expecting around 0.1% (1Hz in 1kHz) is not unreasonable, but even if an oscillator is within 0.01%, if driving a clock, it will gain/ lose 1 minute/ week.  This is unacceptable, and an RC oscillator will also show drift thanks to capacitance change with temperature.

The principles for generating the modified squarewave waveform are likely to be useful for other projects.  In some cases a basic oscillator will be quite alright, particularly if the frequency is not critical.  Most electronics really don't care much, and as long as the frequency is somewhere between 45 and 65Hz they will work normally.  Where the frequency is critical, you need a way to make the conversion.

Much of the information described here was developed in 2009 as part of the frequency changer for clock motors.  However, the article didn't go into a lot of detail on divider principles, and the PLL option was only mentioned in passing.  This article explains the other options, and includes the ability to generate 400Hz (as used for aircraft systems).

This article is a collection of ideas, and is not designed as a project per se.  All of the circuitry works, and you'd gather the sections that you need and ignore the others.  The ideas shown are (for the most part) uncommon, especially the use of harmonic filters to obtain a higher frequency that can be divided back to the frequency you need.  Most of the dividers are pretty common, with the exception of the divide by 1.5 counter, which I think is rather clever.

It's likely that many of the requirements described could be achieved using an Arduino or similar.  I will leave this as an exercise for others, as programming at that level is difficult for me.  There will still be analogue circuitry involved, particularly for harmonic extraction.  I'm also not sure that a PLL can be programmed into an Arduino with any reliability.  A search indicates that it might be possible, but others say "no".  Most of the dividers wouldn't be a challenge, but they are simple and cheap as described, so use of a processor board or PIC is at best an exercise to show that it can be done, rather than a simplification of the circuit.


References

As a matter of course, datasheets for all digital ICs were used to verify the truth-tables and pin connections.  Please be careful though, because the simulator models don't always use the same nomenclature for pin IDs as the datasheet.  This particularly applies to the PLL circuit - if you use it, you must verify the pin numbers for yourself.

  1. Ring Counter - (Wikipedia)
  2. Divide by 1.5 circuit - (Designed by David Johnson)
  3. Psychoacoustics - (Wikipedia)
  4. Frequency Changer for Low Voltage Synchronous Clocks - (ESP)

 

HomeMain Index articlesArticles Index

Copyright Notice. This article, including but not limited to all text and diagrams, is the intellectual property of Rod Elliott, and is © 2023.  Reproduction or re-publication by any means whatsoever, whether electronic, mechanical or electro-mechanical, is strictly prohibited under International Copyright laws.  The author (Rod Elliott) grants the reader the right to use this information for personal use only, and further allows that one (1) copy may be made for reference.  Commercial use is prohibited without express written authorisation from Rod Elliott.
Change Log:  Page published Sept 2023.