Danger, Will Robinson

You think that rectification of a signal for power is a trivial matter. Beware, some people think they know, but what they know is dangerous. And that’s without hidden gotchas.

My employer recently landed a project that involved the use of a gas igniter to turn on a burner on in a furnace. The output which is 24VAC is supposed to drive a 24VDC solenoid which needs up to 1-1/2 Amps. After several discussions, it became apparent that what I thought was a conceptual drawing showing 24VAC on one side of a square (containing a diode bridge) and 24VDC on the other was in fact close to what the customer thought was needed. I was reminded of the line from “Lost In Space”: Danger, Will Robinson! (YouTube Lost in Space clip ). The customer was lecturing us on how to use a full wave rectifier, and getting it wrong, notwithstanding that we were going to be designing a sophisticated microcomputer based system for his system. At the time of writing this, we are still in the process of negotiating what the system will look like, but I continually hear the alarm bells- danger, danger, there will be problems. Unfortunately, I work on a job- I don’t get to pick the projects.

Will (the customer- not his real name) was worried that the voltage was too high and added a resistor in series with the bridge as a provision to divide down the voltage if necessary. Power dissipation and a variable load put pay to that idea. Wil then set up an experiment with 24VAC a full wave rectifier and a true RMS DVM. He was quite happy when he got a 24V reading. We suggested that since it was full wave rectification this was not surprise, and perhaps he should look with a ‘scope. Some loads react to the RMS current and don’t really care, as long as you don’t exceed maximum or minimum voltages. The selected solenoid apparently doesn’t fall into this category. The valve rep. stated “Please note our coils can work fine within the 15% below and 10% above the stated voltage for short periods. If using an unfiltered full wave bridge rectifier power supply, please make sure the range is within the limits. If it has a lot of ripple then the valve may function for time being but it may have a short lifecycle.”

10% above 24V is much less than 24 * √2 but this didn’t deter Will. His first response was “So just to clarify, the peak voltage is in the 30's in AC to make the area under the curve on a full wave 24 volts DC. If we add a capacitor to smooth out the ripple, wouldn't the result be a smooth 24 vDC?” Then he decided to test this with a 24VAC supply, bridge rectifier and a capacitor and concluded: “We checked with a Scope, the result we get is in line with the video .The peak voltage after the rectifier is 33.9 vDC, the RMS voltage or area under the curve was 24.5vDC. If we add a capacitor to the circuit, we will get 24.5 vDC with little ripple.”

Even if I knew how to measure the area under a curve on an oscilloscope with any accuracy, the RMS value is not given by the area under the voltage curve. And what about the current? I am not sure how to tell the Wil what’s what, since the customer is always right. So Will, this blog’s for you.

An AC waveform consists of a signal (usually sinusoidal) that oscillates around a zero value. AC is very common in the power generation field and was the subject of a bitter dispute between Edison and Tesla at the beginning of the 20th Century. Recently with the advent of switch-mode power supplies, DC to DC voltage conversion is a much more viable alternative, but power conversion using a transformer is really easy and economical.

What is an RMS voltage or current? The RMS measurement is meant to indicate that the heating effect of the AC voltage (or current) is the same as the heating effect produced by an equivalent DC voltage (or current). There is a concept of RMS power, but it is purely a mathematical exercise and does not have a practical application. I did a blog on “RMS Measurement” (RMS Measurement) for those of you who are interested in being able to process the signal.

I did a three part series of blogs in May on using a PSoC to do the same (Measuring an RMS value on a PSoC5, Part 1: Signal Acquisition), (Measuring an RMS value on a PSoC5, Part 2: Squaring a Reading) and (Measuring an RMS value on a PSoC5, Part 3: Square Root and Result). RMS stands for Root Mean Square which pretty much describes how to calculate it. The mathematically based formula for an RMS voltage is given by

So you see, Will, the integral represents the area under the curve of squares of voltage against time, and even then there is still some processing to do.

Figure 1

The two forms of rectification

The two forms of rectification

An AC signal can be rectified; that is it can be modified so that there are no negative parts to the signal. You can see a graphical depiction in Figure 1. For power supplies rectification is normally achieved with diodes shown in Figure 2.

Figure 2

Diode configuration for rectification. (a) is half wave, (b) and (c) are full wave. The four diodes in (c) can be replaced by a single diode bridge.

Diode configuration for rectification. (a) is half wave, (b) and (c) are full wave. The four diodes in (c) can be replaced by a single diode bridge.

In half wave rectification the negative cycle is “swallowed” and in full wave rectification the negative cycle is “flipped” to be positive. In half wave rectification the AC voltage is reduced by a diode drop as it is in the case of (b) in Figure 2. With a full diode bridge arrangement of (c) the voltage is reduced by two diode drops. The disadvantage of (b) is that you need a centre tap on the AC voltage.

The capacitor in each example in Figure 2 is to smooth the waveform to approximate a DC value. During the time that the AC voltage is greater than the voltage on the capacitor, the capacitor will charge up the peak value of the wave. The current flowing to the load is also derived from the AC source. When the wave voltage drops below voltage on the capacitor, the capacitor provides the current to the load since the diode becomes back biased. As the capacitor discharges, so its voltage drops until the rising AC voltage of the next cycle equals the capacitor voltage and the capacitor begins to recharge. Figure 3 demonstrates this.

Figure 3

Smoothing the rectified waveform. The red line (Net Volt) shows the smoothed voltage for both full and half wave rectification.

Smoothing the rectified waveform. The red line (Net Volt) shows the smoothed voltage for both full and half wave rectification.

The peak to peak change seen in Figure 3 is called “ripple” and it is obviously much greater in half wave rectification for a given current and capacitor since it the capacitor discharges for much longer. The discharge of the capacitor is governed by the relationship

(i=current, C= capacitance, v= voltage, t=time)

The solution to this is exponential but if we approximate to a linear relationship it becomes easier to find the value of the capacitor and since there is only small range of capacitor values and they have wide tolerance, there is no great requirement for precision. I have a long history of resorting to the use of Excel to solve calculations in electronics (you can see a list of my musings here) and I will not pass up this opportunity to add to the list in my repertoire. The blog (Use Excel Goal Seek to Solve Design Equations) covers the Goal Seek tool, but I don’t think is essential to understanding this design.

Figure 4

The Excel worksheet showing the Goal Seek feature needed to establish the smoothing capacitor value.

The Excel worksheet showing the Goal Seek feature needed to establish the smoothing capacitor value.

You can download the Excel worksheet CapCalc which was used to produce both Figures 3 and 4. After creating and seeding the variables for the AC voltage, frequency, capacitor value and load current in cells B3 through to B8, I entered the time for a full 50Hz cycle (50Hz is much clearer to see what is going on since the period of half a wave is a “round” 10mS) in row 13. I then calculated the amplitude of a sine wave (row 14) using the formula sin(2 π ft), (f=frequency in cell B5, t=time in row 13), but because it was easier to set the origin at 0, I worked with the cosine in row 15. Row 16 calculates the amplitude multiplying the value in row 15 by the peak value of the AC wave (cell B3 * 1.414). The full wave rectification in row 17 is calculated by taking the absolute value of row 16. The half wave values in row 18 are calculated by setting the cell value to zero if the corresponding value in row 16 is negative.

The values for dV (row 20) are calculated by rearranging equation 2 above. Cell B7 is the capacitance and B8 is the current. dt is the elapsed to in row 13. The Discharge row (row 21) is the peak voltage minus dV (the associated value in row 19). As an intermediate step I created row Analysis which is set to “1” if the capacitor is discharging and “0” if it is charging. The Net Volt (full) row (row 23) uses this to determine what the resultant voltage is- if the associated cell of Analysis is 1 then the Discharge value (row 21) is used, else the Full Rect (row17) value is used.

There is a problem with this calculation after the second full-wave peak, but I since the calculation only needs the first cycle, I didn’t bother to solve it. Also I did keep the model since half-wave rectification does extend out past the second full-wave peak. The half wave analysis very similar to the full wave and presented in rows 25 and 26.

The minimum value (the lowest voltage of the ripple) for full wave is found by searching all the calculated Net Volt (full) values and picking the minimum using the Excel MIN function. The Min Volt (half wave) is obtained in a similar fashion.

The Excel Goal Seek tool modifies a single cell for a target value by adjusting the value of another cell. To activate click on Data | What If Analysis | Goal Seek to bring up the dialog you see in Figure 4. The Set Cell field is the cell you are monitoring. Depending on whether you want a full wave or half wave calculation enter cell B28 or B29 respectively. Let’s assume the minimum value of the input voltage is 26V, so this is entered in the To Value field. You should in fact build in the diode drops when you enter the voltage.

We want Solver to try vary the capacitor value until it arrives at one where cell B28 (or B29) equals 26. So we enter B7 into the By changing cell field. Click on the OK button and after a brief flicker you should see the minimum capacitor value you can use. Scale the result up to the nearest standard capacitor. You can plug the value back into cell B7 and see what the actual minimum voltage would be, and truth be told, you should be using the bottom end of the tolerance range as well as the effects caused by temperature variations, but you knew that right?

You could have got a suitable result by using equation 2 and the period for half or a full cycle for dt, but that would mean I couldn’t have introduced Excel into the blog. And where would be the fun it that?

As a parting shot, let me introduce you to a gotcha. In the HVAC industry (Heating, Ventilation, Air Conditioning) everything works on 24VAC. There is a regulation that one side of the 24VAC is connected to earth-ground. If you are working with a full wave rectifier, your 0V is a diode drop above ground. Now someone may connect your 0V to earth-ground inadvertently. Your thermocouple may be grounded, or your solenoid return is via the body of the solenoid connected to a chassis. Consider Figure 2c. The junction of CR3C and CR4C is grounded as part of the AC grounding regulation and the junction of CR1C and CR3C is grounded by the external device, so CR3C is shorted out. When the AC signal is positive, the current flow is through CR1C, the load and then to ground as in half wave rectification. When the AC signal is negative, CR2C becomes forward biased, and when the voltage across the diode is forced beyond 0.7V the diode will expire, leaving you with a half wave rectifier. Kagan’s rule of using AC power: If your product is for the HVAC industry, use half wave rectification only!

So Will- how do you like them apples?

15 comments on “Danger, Will Robinson

  1. elder
    July 5, 2016

    For low currents the results should be OK but for higher currents the peak voltage on the transformer secondary winding is lower than the “theoretical” one because the rectifier is forward biased for a short time interval. Thus the peak current is much higher and resistance and impedance of the transformer make the voltage lower. The behavior of the transformer is highly nonlinear under such circumstances. So Will is in a still greater danger.


  2. elder
    July 5, 2016

    The system does not allow posting URLs so unfortunately I cannot post a reference that clarifies my post above. And the references about the subject I have found in the Internet present the (flawed) textbook concept of the peak voltage not taking into account the transformer non linear behavior.

    Eons ago I was introduced to Schade curves that helped to estimate the voltages based on the load. As far as I remember they were created empirically. This kind of knowledege (and art) is being lost in these days of switched power supplies.


  3. antedeluvian
    July 5, 2016


    I appreciate your comments and concur about prior art being lost (not only becasue of SMPSs).

    The system does not allow posting URLs so unfortunately I cannot post a reference that clarifies my post above

    If you like email details to me at akagan-at-emphatec-dot-com and I will post the link.

  4. antedeluvian
    July 5, 2016

    Elder has has sent me this link to Rectifier Circuits.

    He also added the following message.

  5. DanyP
    July 6, 2016

    totally agree

  6. jimfordbroadcom
    July 6, 2016

    Not really a reply, but the Comment button didn't work.  So HVAC (Heating, Ventilation, and Air Conditioning) works on 24 VAC, eh?  I guess that blows my theory that HVAC works on HVAC (High Voltage Alternating Current).  Darn!  Maybe it's just the control relays, etc. that work on 24 VAC?  I don't know enough to say.  Most everything I've done in my career has been 5 VDC and below.  Not everything, but most.

  7. antedeluvian
    July 7, 2016


     Darn!  Maybe it's just the control relays, etc. that work on 24 VAC?

    I don't know if it's regulation or convention or even why it is 24VAC. Every one of the ~10 projects that I have done in that field work on 24VAC. All the controls to my A/C and heating at home are 24VAC as well. Obviously the 24VAC is converted to DC for the electronic controls (but you knew that). I have never been directly involved with the complete piece of equipment so all I can tell you is that the control is mostly to relays or triacs which I presume switch 24VAC and the inputs are all 24VAC. However I have also controlled blowers that run at 120VAC and others at 24VDC (the control on both was PWM, isolated from the 120VAC/24VDC) power. Surprisingly, even in the one where there was a sizeable 24VDC power supply, I wasn't allowed to power the controls from it- it had to be 24VAC.

    Most everything I've done in my career has been 5 VDC and below.

    Most of my career has also been working at 5VDC supply- stepped down from the industrial standard of 24VDC. I also don't know why 24VDC became a standard- maybe because of a lead-acid battery backup.  I have only designed one 2.5VDC purely analog system and several 15VDC systems (long live 4000 series CMOS!). Oh and of course some +/- 5V, +/-12V analog systems as well.

  8. jimfordbroadcom
    July 7, 2016

    Interesting!  I did work at a manufacturer of RF power amplifiers for cellular base stations for a few years in the early 2000's, and the standard voltage rail for telecom is 28 VDC.  The history of that voltage has something to do with dry cells or wet cells or some other battery technology I've forgotten about (or more likely, wasn't paying enough attention to in the first place!).  Of course, the 28 V was connected directly to the RF MOSFET drains, but we had to buck it down to 15 or 12 V IIRC to bias the gates, and even further to 5 V or 3.3 V to power the digital IC's.  In some cases, we just used LM317 or similar linear regulators, in others, DC to DC switching regulators.

    Nowadays, I'm at a chip design company, and the mobile SoC division of such yet, so voltage rails are quite low.  It used to be that the voltage dropped with every click of Moore's law, and interestingly, 0.5 um technology ran on 5 V, 0.35 um on 3.3 V, 0.25 um on 2.5 V, 0.18 um on 1.8 V, and 130 nm on 1.2 V.  But then it flattened out, and the 90 nm, 65 nm, 40 nm, and 28 nm process nodes run on 1.0 to 1.2 V.  Something to do with gate leakage, I think.  I won't pretend to understand that semiconductor physics stuff.

    As far as AC voltage rails go, that's beyond my experience.  Power electronics is in no way trivial, and I would defer to an expert before getting myself in too deep! Thanks!

  9. antedeluvian
    July 7, 2016


     did work at a manufacturer of RF power amplifiers for cellular base stations for a few years in the early 2000's, and the standard voltage rail for telecom is 28 VDC.   

    The one project I did for the telecomms industry ran at -48VDC. Pain the the neck, only lower.

  10. jimfordbroadcom
    July 7, 2016

    Right, I came across -48 V as well at the PA shop.  I'd forgotten about that opposite polarity rail, as I think we only saw it on one project.  Had to buy a big isolated DC to DC converter, since everything we had was designed for +28 V.

    I ran into a similar situation very recently when our lab manager passed along to me an ovenized crystal oscillator (along with some fans and power transformers – I couldn't resist!) from some 1970's-1980's HP modulation analyzers he was junking.  One OCXO had an inconvenient -12 V power input, and I was going to use it in a 25-6000 MHz RF synthesizer box I am building for my home lab and for ham radio use.  The synthesizer board runs off +5.5 V, and I was going to have to design or buy a DC to DC converter rather than opening the can of worms of having the positive rail of the OCXO connected to chassis ground.  Fortunately, he had a newer OCXO that ran off +15 V, so I took that one.  It has an SMB connector for its 10 MHz output rather than a more common and convenient SMA like the older OCXO, but at least an adaptor cable is less money and hassle than a DC to DC.  When I finish up the synthesizer box, I'll post some pictures, perhaps not here, but on one of these blogs.

  11. Victor Lorenzo
    July 8, 2016

    24VDC is also very common for industrial automation in Europe, many sensors and PLCs run off 24VDC. I have observed this voltage too in medium and large sized wind turbine control systems, and I found it common for powering the fare collection system in train, metro, tram and bus. For some bus on-board fare collection systems we needed to design considering also 28VDC nominal, ranging from below 23VDC (diesel engine not running) to 35VDC (diesel engine running).

    For applications in home/hotels automation 24VDC and 24VAC are both used.


  12. jimfordbroadcom
    July 8, 2016

    Thanks, Victor.  Interesting to learn about power supply rails used in different industries and different locations!  23 VDC to 35 VDC is quite a wide swing; in telecom IIRC it is only a few volts and definitely not 12.  Come to think of it (the brain cells are dusting off slowly here), a few decades ago in military aircraft we ran off 28 VDC, but I think GND was positive.

  13. Victor Lorenzo
    July 8, 2016

    When I was a teenager I came across many schematics of radio-receivers, portable cassette players/recorders, car radios and walkman and common voltages were related to combinations of 1.5V battery cells like 4.5V, 6.0V, 9.0V and 12V. My father used to repair them.

    One common thing was many of them used many PNP germanium transistors and a negative polarity power rails. I started seeing positive power rails in conjunction with silicon NPN transistors in professional audio recorders and power amplifiers, many from japanese companies. I recall some power supply values: +18VDC, +24VDC, +35VDC, +50VDC and +90VC. Supply voltage for audio PA applications was determined by the desired output power more than for standardization, I guess. Those amplifiers were class A-B, not yet class D or H.

    One thing I find somehow streesing and dissappointing is integrating logic, interfaces, CPU and memory chips running at different voltages like 5V, 3.3V and 2.5V, all in the same board, same design, and in some cases including also analog front ends with +-12V/+-18V.

  14. Olivpsy
    October 22, 2016

    Thanks a lot for your post. I'm totally agree too !

  15. antedeluvian
    March 15, 2017

    Unfortunately Dropbox has chnaged their implementation of public files. This has affected many, many instances where I have linked to my files. I am trying to update the links as I come across them. Dropbox will ask you to register in order to copy the file or open the file (you can only open the file once you log in)

    In this blog this is the revised link to CapCalc

    I also have updated the link in the following statement

     I have a long history of resorting to the use of Excel to solve calculations in electronics (you can see a list of my musings here)”


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.