Circuit Worst-Case and Extreme Value Analysis

Quote of the Day

Ants individually do not show much intelligence, but in colonies show great intelligence. Humans have exactly the opposite characteristic.

— Scientist discussing ants.


Introduction

Figure 1: Illustration of Component Tolerance Contributing to Overall Variation.

Figure 1: Illustration of Component Tolerance
Contributing to Overall Variation (Source).

Electrical engineers design their circuits to work under "worst case" conditions. This means that the circuits will meet their operational requirements when built with any possible mix of components and environmental conditions (Figure 1). Determining the worst case conditions for a complex system can be difficult, especially for analog systems. There are numerous approaches to worst-case circuit analysis. One approach that I use is called Extreme Value Analysis (EVA).

EVA entails evaluating your circuit's performance using every possible combination of extreme component value. This post will show my results for a simple circuit that I needed to evaluate last week. The circuit was designed years ago and the original circuit designer is no longer around – he left years ago to pursue a job writing software for another company.

Background

This circuit measures the DC current generated by an Amplitude-Modulated, Vestigial Sideband (AM-VSB) signal that is shining on a reversed-biased photodiode. The DC current is linearly related to the average optical power being received. The average optical power level is used by software to adjust the overall gain of the system.

Analysis

Circuit

I need to determine the worst-case output voltage range for the circuit shown in Figure 2 when the photodiode exposed to a light level of 6.00 dBm ± 0.35 dBm.

The circuit and its function are really very simple:

  • The DC photodiode current enters on the left-side of the circuit.
  • An opamp configured as a non-inverting amplifier is used to generate a voltage that is proportional to the DC current level.
  • This voltage is fed to an A/D converter (not shown) that will convert the voltage to a number, which can then be used by the software folks.
Figure 2: Circuit For Measuring DC Optical Power.

Figure 2: Circuit For Measuring DC Optical Power.

Algorithm

Figure 3 shows my algorithm for trying all combinations of extreme component values. The algorithm works as follows:

  • Generate a binary number with each bit representing a component that will be varied.
  • Convert the binary number from "1" and "0" values to "1" and "-1" values.
  • Use the "1" and "-1" values to generate the high or low extreme component values. In this case, I will multiply "1" or "-1" by the percentage tolerance. I will then use this tolerance to compute an appropriate component value.
  • Compute the circuit's output voltage using the extreme component values selected.
  • Repeat for all binary combinations.
  • Select the minimum and maximum output voltage values.
Figure 3: Algorithm For Trying All Extreme Values.

Figure 3: Algorithm For Trying All Extreme Values.

Results

Figure 4 shows the results of my analysis. Note that the units are in volts, but I did not use units in this analysis because Mathcad 15 does not allow mixed units in arrays.

Figure 4: Analysis Results.

Figure 4: Analysis Results.

Conclusion

For this design, 1.05 is called the Design Worst-Case Max and 0.881 is called the Design Worst-Case Min. In addition to these numbers, also performed a Monte Carlo analysis and compared my results with what our Manufacturing team had measured on 3,479 units. Figure 5 shows these results using a box plot. On this plot, I also show what the specification allows for this value. As you would expect, the design worst case values are within the specification limits. However, the Manufacturing spread does show some units outside of the specification range. These units failed the test and needed to be repaired.

Notice how the measured distribution is not as wide as my Monte Carlo distribution. This is because I used a uniform probability distribution for generating my Monte Carlo values. The actual part distributions tend to be closer to a normal distribution.

The red diamonds indicate outliers as defined I defined in my plotting program (1.5 x IQR).

Figure 5: Circuit Output Results..

Figure 5: Circuit Output Results.

Posted in Electronics | 1 Comment

Generating Pejsa's F Function

Quote of the Day

Every politician's goal is to get the credit for something popular that would have happened anyway.

— Philip Bump, political commentator


Introduction

Figure 1: Pejsa's F Function Reference.

Figure 1: Pejsa's F Function Reference.

I have had several people ask me to review how Pejsa generated his F function. Recall that Pejsa's approach is based on using a parameter called the ballistic coefficient (BC) to scale the performance of a reference projectile – Pejsa used the US military's 30 caliber M2 bullet, which dates back to the Springfield rifle. This effort involves basic curve fitting, and I will illustrate the process for the velocity interval from 1400 feet per second (fps) to 4000 fps. This velocity range is the most important to most folks and it illustrates the basic curve fitting process well.

Pejsa actually defined four velocity intervals (Pejsa numbered them in this order):

  1. 0 fps to 900 fps
  2. 900 fps to 1200 fps
  3. 1200 fps to 1400 fps
  4. 1400 fps to 4000 fps

As can be seen in Figure 1, two of the velocity intervals (#2 and #4) are simple horizontal lines and no fitting activity is needed. I will leave fitting velocity interval #3 to others, but the process is the same as shown for fitting velocity interval #1 below.

Background

Projectile Types

Some of the questions I have received indicate that it is not clear to people that there are many reference projectile shapes. Figure 2 shows the drag coefficients (related to the 1/F function) for a few of the common reference projectiles. Of all of these, G1 is by far the most common, but G7 is growing in popularity.

Figure 2: There are Numerous Reference Projectiles.

Figure 2: There are Numerous Reference Projectiles.

Pejsa's approach was to create his own reference projectile based on the M2 and scaled his results in a manner that would allow the use of G1 BCs, which are commonly available.

You do not see the Pejsa reference projectile mentioned much because Pejsa never explicitly presented it. However, you do occasionally see it (Figure 3 calls it "GP") presented on some  web pages.

Figure 3: Set of Drag Coefficients for Reference Projectiles ,Including Pejsa's (source).

Figure 3: Set of Drag Coefficients for Reference Projectiles, Including Pejsa's (source).

In Appendix A, I explain how to generate the reference projectile curve from Pejsa's model.

Analysis

Data Capture

Figure 4 shows the data that I captured from Figure 1 using Dagra.

Figure 3: Data Captured from the Upper Curve of Figure 1.

Figure 4: Data Captured from the Upper Curve of Figure 1.

Curve Fitting

Figure 5 shows the curve fitting process that I used for data captured from Figure 1.

Figure 4: Curve Fitting the Data from Figure 1.

Figure 5: Curve Fitting the Data from Figure 1.

Equation 1 shows the result of my curve fitting.

Eq. 1 \displaystyle \frac{1}{F\left(v\right)}=\frac{1}{{165}}\cdot {{v}^{{-0.5}}}

where

  • v is the projectile's velocity [fps]
  • F(v) is Pejsa's F function [ft]

The only difference between my result and Pejsa is that his coefficient is 166 and mine is 165. This is excellent agreement considering I am working off of a poor quality image.

Quality of Curve Fit

Figure 6 shows the quality of my curve fit to the data I captured.

Figure 5: Curve Fit Quality.

Figure 6: Curve Fit Quality.

While I have confirmed my fit equation closely models my data, I still need to show how closely my curve matches Pejsa's. Figure 7 shows that my curve is within 2.5% of Pejsa's result along the entire curve.

Figure 6: Cross Checking My Result with Pejsa's.

Figure 7: Cross Checking My Result with Pejsa's.

Conclusion

This post shows how you can generate Pejsa's F function for yourself based on the 30 caliber M2 drag data. This same approach could be used to extend Pejsa's approach to other reference projectiles – a task that I will leave to others.

Appendix A: Drag Coefficient vs Pejsa's 1/F Function

Most work on projectiles is done using drag functions. Pejsa's 1/F function is closely related to standard drag functions – a relationship that I demonstrate in Figure 8.

An equivalent drag function can be derived from Pejsa 1/F function for a 30 caliber M2 bullet (Figure 1). Note that this is not the 1/F function for a reference round (1 inch diameter, 1 pound mass). You can generate the reference 1/F by dividing the 1/F function of the M2 bullet by its ballistic coefficient, which is 0.484. This is exactly what Pejsa did.

Pejsa does briefly mention drag functions, but then omits a factor of 1/2 in his formulation. In modern work, we normally see a factor of 1/2 in the drag formula and I included it in my work below. This factor of 1/2 is needed to obtain the same results for the Pejsa reference projectile that others obtain.

Figure 8: Demonstration of Equivalence Between 1/F and Drag Function.

Figure 8: Demonstration of Equivalence Between 1/F and Drag Function.

Posted in Ballistics | 3 Comments

Greenland Ice Sheet Trivia

Quote of the Day

The world is divided into people who do things and people who get the credit.

— Dwight Whitney Morrow


Introduction

Figure 1: Map of Greenland Ice Sheet.

Figure 1: Map of Greenland Ice Sheet (source).

I was reading an article today that says that geophysicists have figured out why the Greenland has been experiencing a flurry of magnitude 5 earthquakes. The scientists claim that the earthquakes are being caused by massive icebergs calving off the Greenland ice sheet in a manner that momentarily jams the movement of the ice sheet. The ice sheet and the calved icebergs are so massive that their interaction cause an earthquake.

While the earthquake information was interesting, there was an side discussion on the amount of ice required to raise sea level by 1 mm and seal level impact potential of a melting Greenland ice sheet that I want to explore here.

I highlight the specific trivia that caught my eyes in the following quote:

Each gigaton sized iceberg would be equivalent to roughly a quarter of a percent of Greenland’s estimated 378 gigaton annual ice loss. It takes 360 gigatons to raise the global sea level by a millimeter, so Greenland is doing that roughly annually, as icebergs fall into the sea and glaciers retreat further. (In all, the ice sheet contains enough water to raise global sea levels by 6 meters, or 20 feet.)

I am going to confirm both highlighted statements.

Analysis

Mass of Ice Required for 1 mm of Sea Level Rise

Figure 2 shows my calculations that verify 1 mm of sea level rise from melting 360 gigatons of ice. I am just using rough numbers for the radius of the Earth and percentage of the Earth's surface covered by water.

Figure 2: Calculations for 1 mm Sea level Rise.

Figure 2: Calculations for 1 mm Sea level Rise.

Voyager 1 interstellar

Sea Level Rise from Melting All the Ice on Greenland

Figure 3 shows my sea level rise calculations for melting the entire Greenland ice sheet, which confirms the article statement of 6 meters.

Figure 3: Calculations for 1 mm Sea level Rise.

Figure 3: Calculations for 1 mm Sea level Rise.

Greenland Ice Sheet Data Ice Sheet Thickness

One assumption that I made in this calculation is that increase in sea level will not have a significant impact on the amount of land area on Earth. I will verify that this assumption next.

Land Area Decrease from this Sea Level Rise

My calculations above assume that a few meters of sea level rise will have minimal effect on the amount of land area on Earth. We can verify this assumption using a hypsograph of the Earth (Appendix A). The hypsograph tells us how the percentage of the Earth's land area changes with sea level. I have blogged about the hypsograph before.

My approach is to digitize the curve, determine the slope at our current sea level, and estimate the impact of 6 meters of sea level rise.  A 6 meter increase in sea level will reduce the land area of the Earth by 0.3%, which is insignificant with respect to my calculation needs here.

Figure 4: Calculation of the Land Area Impact of Sea Level Rise.

Figure 4: Calculation of the Land Area Impact of Sea Level Rise.

While a 0.3% loss of land area is not significant for my calculations here, it will have a major impact on people. 44% of the world's population live within 100 km of the ocean. That 0.3% land lost is some of the most valuable real estate in the world.

Conclusion

I confirmed the conversions for ice melt tonnage to mm of sea level rise and for the sea level rise that would come from melting the whole Greenland ice sheet.

Appendix A: Hypsograph of the Earth

Figure 5 shows the hypsograph of the Earth, which relates land area to sea level. I digitized this plot to determine the impact of sea level rise on Earth's land area.

Figure X: Hypsograph of the Earth.

Figure 5: Hypsograph of the Earth.

Posted in Geology | Comments Off on Greenland Ice Sheet Trivia

Owl Camouflage

Quote of the Day

When love is not madness it is not love.

— Pedro Calderon de la Barca


I saw these three pictures today and I was stunned by the effectiveness of an owl's camouflage. I occasionally see owls – there is a great horned owl that lives near my house and it is amazing watching it fly at dusk. It has a very large wingspan.

Figure 1: Eastern Screech Owl (source).

Figure 1: Eastern Screech Owl (source).

Figure 2: Eurasian Scops Owl (source).

Figure 2: Owl Species Unknown to Me (source).

Figure 3: Another Scops Owl Photo.

Figure 3: Another Scops Owl Photo (source).

Posted in General Science | Comments Off on Owl Camouflage

Lignum Vitae is a Remarkable Wood

Quote of the Day

People who claim that they're evil are usually no worse than the rest of us... It's people who claim that they're good, or any way better than the rest of us, that you have to be wary of.

— Gregory Maguire


Figure 1: Lignum Vitae tree is a caribbean species that is now endangered.

Figure 1: Lignum Vitae tree is a Caribbean
species that is now endangered.

I enjoy woodworking very much and I am now in the process of making a solid walnut countertop by gluing small walnut pieces together. While choosing the wood species for my countertop, I did consider a number of tropical species like teak and ipe. During this search, I heard a person mention that Lignum Vitae was the world's densest wood and is known for being so oily as to be considered self-lubricating. It is also a rare and potentially endangered species.

As I heard this person speak,  I recalled that reading years ago that John Harrison had made some of his marvelous wood clocks using Lignum Vitae for its self-lubricating properties. Here is a quote from the Wikipedia on the topic.

Master clockmaker John Harrison used lignum vitae in the bearings and gears of his pendulum clocks and his first three marine chronometers (all of which were large clocks rather than watches), since the wood is self-lubricating. The use of lignum vitae eliminates the need for horological lubricating oil; 18th-century horological oil would get gummy and reduce the accuracy of a timepiece under unfavourable conditions (including those that prevail at sea).

Here are two excellent videos on how Harrison built his excellent wooden clocks.

What really surprised me was that Lignum Vitae was used as a bearing material for submarines as late at the USS Nautilus.

Here are a some photos of ship's bearing (Figure 3 and 4) made using Lignum Vitae.

Figure X: Propeller Shaft Bearing.

Figure 2: Propeller Shaft Bearing (source).

Figure X: More Bearings.

Figure 3: More Bearings (source).

Posted in Construction | 1 Comment

Barycenter of Pluto and Charon

QUOTE OF THE DAY

With ordinary talents and extraordinary perseverance, all things are attainable.

— Sir Thomas Buxton


Introduction

Figure 1: Pluto System Artist's Conception.

Figure 1: Artist's Conception of the Pluto System.

I am excited about the New Horizon's flyby of the Pluto system (Figure 1) occurring on July 14, and I will be glued to my computer as the data is returning. Fortunately, there is already some data coming back on Pluto and its moons. One interesting aspect of the Pluto system is the fact that the mass ratio of Charon to Pluto is large enough that the barycenter of their orbit is outside the bodies of both Charon and Pluto.

Figure 2 shows an animated GIF of Charon and Pluto in orbit. The blue cross shows where the barycenter is (source: APL/New Horizons GeoViz).

Figure 2: Animated GIF showing the movement of Charon and Pluto about their barycenter.

Figure 2: Animated GIF showing the movement of Charon and Pluto about their barycenter.

My goal here is to compute the location of the barycenter and compare my results with the published data.

Background

The Wikipedia does an excellent job describing the barycenter here and here. NASA also has an excellent web page.

For a terrestrial example of the barycenter concept, I have included a video showing a  hammer thrower (Figure 3). Notice how the human and the ball rotate about a point in-between them, just like Pluto and Charon.

Figure 3: Hammer Thrower Illustrating the Existing of a Barycenter.

I used to throw the discus in high school – I remember well the feeling of rotating about a point outside of my body.

Analysis

Figure 4 shows my calculations for the barycenter of the Pluto and Charon.

Figure 3: Pluto-Charon Calculations.

Figure 4: Pluto-Charon Calculations.

My results for the barycenter distances agree with those in the Wikipedia's article on Charon.

Conclusion

Just a quick calculation to verify that I am seeing Pluto and Charon rotating about a point that is clearly between the two of them.

To whet your appetite for the New Horizon's mission, Figure 5 (source) provides a quick look at how New Horizon's will encounter the Pluto system.

Figure X. Animation of the New Horizon's Encounter with Pluto.

Figure 5. Animation of the New Horizon's Encounter with Pluto.

Posted in Astronomy | 9 Comments

Volt-Ampere Measurement Circuit

Quote of the Day

The beginnings and endings of all human undertakings are untidy.

— John Galsworthy


Introduction

Figure 1: Woodward Circuit for Measuring Power and VAs.

Figure 1: Woodward Circuit for Measuring Power and VAs.

This is a circuit designed by Stephen Woodward that I saw years ago in EDN. I originally was interested in the right-hand side of the circuit, which measures the real power usage of the load. I now have an interest in the left-hand side of the circuit, which measures the Volt-Ampere (VA) usage of the load. I will present an abbreviated analysis of the circuit operation along with some design equations.

I find a number of things about this circuit that are interesting:

  • It measures both VA (i.e. apparent power) and real power usage of the load.
  • It uses the idea of the differential resistance (another example), which is a nice illustration of the mathematical concept of a differential.
  • It has an interesting output circuit for converting an AC waveform into a proportional DC level. I say interesting because it has aspects of a voltage doubler circuit.

My analysis will show that the output voltage is linearly related to the VA usage of the load by Equation 1.

Eq. 1 \displaystyle {{V}_{{Output}}}=\frac{{CTR}}{{2\cdot {{V}_{T}}\cdot \eta }}\cdot \frac{{{{R}_{{Sense}}}}}{{{{R}_{{5.1\text{ k }\!\!\Omega\!\!\text{ }}}}+\pi \cdot {{R}_{{100\text{ k }\!\!\Omega\!\!\text{ }}}}}}\cdot {{P}_{{VA}}}

where

The circuit and my analysis does have some weaknesses:

  • There is one potentiometer required to calibrate the VA-portion of the circuit (two pots are required to calibrate the real power-portion of the circuit).

    While I use potentiometers in my personal designs, I make every effort not to have them in production designs. Calibration using a mechanical potentiometer is just too much trouble.

  • My analysis assumes the optocouplers and transistors are matched.

    In real life, optocouplers and transistors vary widely. This is one reason why a potentiometer is needed to calibrate the circuit. While not discussed in this post, there is a potentiometer in the right-hand side of the circuit (i.e. real power measurement) that is used to calibrate-out the optocoupler differences for that function.

I have included links to my LTSpice circuit and Mathcad file in Appendix A.

Background

Why Use Volt-Amperes?

The VA usage of a load is simply the product of the load's actual RMS voltage and current. The load's power (P) and VA usage are related by formula P = VA \cdot PF, where PF is the power factor, PF = cos(θ),  and θ is the phase shift between the load's voltage and current. While the power and volt-ampere usage of the load are equal for resistive loads, like heaters, the two numbers can be dramatically different for motors and certain lighting loads (example). Knowing both VA and P usage of a load allows one to compute the load's PF.

Basic Optocoupler Operation

The Wikipedia has an excellent description of an optocoupler (aka optisolator) and I will refer you there for more information on their operation. Figure 2 shows a basic optocoupler circuit. There are numerous uses for optocouplers – I often use them to provide galvanic isolation.

Figure 2: Basic Optocoupler Circuit.

Figure 2: Basic Optocoupler Circuit.

One item not covered is the current transfer ratio of the optocoupler, which is defined as follows (source).

Current Transfer Ratio (CTR)
Current Transfer Ratio (CTR) is the ratio of the phototransistor's collector current compared to the infrared emitting diode (IRED) forward current expressed as a percentage (%).

CTR is not a constant – it varies with the LED's forward current. Figure 3 shows an typical example.

Figure 3: A Typical CTR Example.

Figure 3: A Typical CTR Example.

For my analysis, I will be assuming that we can use a single, average CTR value. I will assume that a sine wave passed through the CTR function will remain approximately sinusoidal. While a variable CTR clearly makes this circuit nonlinear, the results are close enough that I consider the model useful.

Analysis

For my simulations, I assumed a 11 Ω load. This is near the maximum power level that the circuit supports. I did not worry about setting the VA calibration potentiometer to an optimal point – I just picked an arbitrary value.

Reference Circuit

Figure 4 shows a slightly marked-up version of Woodward's original circuit.  The red mark-ups show points in the circuit where I will derive formulas for determining component values.

Figure 4: Circuit Diagram with Analysis Points Marked.

Figure 4: Circuit Diagram with Analysis Points Marked.

Functional Overview

The overall circuit function can be described as follows:

  • The voltage at Point A is proportional to the AC voltage amplitude.

    This a simple half-wave rectifier circuit and we can easily determine a formula for the voltage at Point A.

  • The two optocoupler LEDs are biased slightly differently – D3 is driven directly with the rectified voltage and D4 is driven with the rectified voltage minus the voltage drop across the 0.001 Ω sense resistor.

    The voltage drop across the sense resistor is proportional to the current draw of the load. The voltage across the sense resistor is just a few millivolts. However, this small voltage is enough to generate a small current difference between the current sourced by Q3 and sunk by Q4. This current difference will be proportional to product of the the AC voltage and current values.

  • The current difference output from Q3 and Q4 will be amplified by A2 with a constant diode voltage drop (actually a base-emitter junction) added to the amplifier's output voltage (Point C).

    The diode voltage drop will compensate for a diode drop in the output circuit.

  • The output circuit (Point D) consists of a simple low-pass filter circuit that is driven by current from A2.

    The current from A2 is steered by the BE junctions of Q7 and Q8. The current drawn through the BE junction of Q7 charges the 4.7 µF capacitor on the output of A2. The discharge current through the 4.7 µF capacitor is steered to the output through the BE junction of Q7.

Voltage at Point A

Figure 5 show my derivation for the voltage at Point A. I also compare my result with an LTSpice simulation. The formula accuracy is reasonable considering the accuracy of the modeling that I am using. I use the fact that the average value of a half-wave rectified sinusoid equals the peak of the signal divided by π.

Figure 5: Derivation of Formula for the Voltage At Point A.

Figure 5: Derivation of Formula for the Voltage At Point A.

Current Through Capacitor at Point B

Figure 6 shows my expression for the current through the capacitor at Point B. Here is where I make of the differential resistance of the diodes gm = ID /(VT · η).

In Figure 6, the variable PVA refers to the measured VA value.

Figure 6: Current Through Capacitor at Point B.

Figure 6: Current Through Capacitor at Point B.

Voltage at Point C

I derive an expression for the voltage from amplifier A2 (Point C). The agreement with the LTSpice simulation is reasonable.

Figure 7: Output Voltage from Amplifier A2.

Figure 7: Output Voltage from Amplifier A2.

Voltage at Point D

Figure 8 show my final expression, which is for the voltage at Point D. This is the output voltage from this circuit. My expression is giving me good agreement with the LTSpice simulation.

The key result is the formula for the circuit's output voltage (VPointD in Figure 8). This formula shows that the output voltage is linearly related to the VA usage of the load.

Figure 8: Expression for the Voltage at Point D.

Figure 8: Expression for the Voltage at Point D.

Note the level of ripple on the output.

Conclusion

I have presented an analysis of the VA measurement portion of the circuit that provides sufficient detail for a designer to select component values tailored to their specific application.

Appendix A: Files Used in Analyzing This Circuit

LTSpice Circuit

Mathcad File

Figure 9 show my LTSpice Schematic.

Figure 8. LTSpice Schematic.

Figure 9. LTSpice Schematic.

Posted in Electronics | Comments Off on Volt-Ampere Measurement Circuit

Sun's Galactic Orbital Speed

Far and away the best prize that life offers is the chance to work hard at work worth doing.

— Theodore Roosevelt


Figure 1: Position of the Sun in the Milky Way.

Figure 1: Position of the Sun in the Milky Way (Source).

I was reading Quora this week and I saw the following statement that mentioned the orbital speed of the Sun as it revolves about center of the Milky Way.

Earth revolves around the Sun at a speed of 30 km/s and our solar system revolves around the galactic center at 220 km/s.

The Sun's orbital speed about the Milky Way's galactic center is an interesting number and I thought it would be useful to compute this value here.
Figure 2 shows my analysis.

Figure 2: Calculation of the Sun's Speed around the Galactic Center.

Figure 2: Calculation of the Sun's Speed around the Galactic Center.

Distance from Galactic Center Galaxy Rotational Period Galactic Year

I consider 213 km/s close enough to 220 km/s to say that I understand the number I saw on Quora.

Posted in Astronomy | Comments Off on Sun's Galactic Orbital Speed

Schmitt Trigger Circuit For a Push-Pull Output

Quote of the Day

If you were replaced, what would your successors do?

— Andy Grove, former CEO of Intel. This is a question he would ask himself in difficult management situations.


Introduction

Figure 1: Basic Schmitt Trigger Circuit For a Push-Pull Output Comparator.

Figure 1: Basic Schmitt Trigger Circuit For
a Push-Pull Output Comparator Drawn in
LTSpice.

I previously wrote a blog post about how to select components for a Schmitt trigger circuit using a comparator with an open-collector output. An engineer stopped by my cube yesterday and asked if I could write-up the same analysis for a Schmitt trigger circuit using a comparator with a push-pull output. This post will provide that analysis. The only thing unusual about the circuit is the use of a Zener diode as a voltage reference instead of the more commonly seen resistor divider network.

This a very common electronic circuit. I think I have had some form of Schmitt ­­trigger comparator circuit in every large analog design I have ever done.

The analysis is very similar to my previous presentation and I will let the mathematics speak for itself – this means a minimum of gloss.

Background

Objective

Figure 1 is referred to as an inverting Schmitt-trigger circuit. For a rising input voltage, we want the output of the circuit to transition from a high voltage (VCC) to a low voltage (~0 V) when the input level reaches VTH­↑. For a falling input voltage, we want the output of the circuit to transition from a low voltage (~0 V) to high voltage (~VCC) when the input level reaches VTH↓.

Definitions

VTH­↑
Comparator threshold voltage for positive-going signals.
VTH↓
Comparator threshold voltage for negative-going signals.
VCC
Supply voltage for the circuit. This will be a single-supply Schmitt trigger.
VZ
The Zener diode breakdown voltage.

Analysis

Setup Circuit Equations

Figure 2 shows how I apply Kirchoff's nodal equations to the circuit of Figure 1 and I determine equations for VTH↓ and VTH­↑. VPlus and VMinus refer to the comparator inputs. I often solve circuit equations in terms of normalized component values. Normalized values have an "n" appended to their symbol.

Figure 2: Equation Setup for the Push-Pull Schmitt Trigger.

Figure 2: Equation Setup for the Push-Pull Schmitt Trigger.

Given equations for VTH↓ and VTH­↑, I can solve them for normalized R3 and R5 values.

Solve Equations for R3 and R5

Figure 3 shows how I solved for R3 and R5 in terms of the hysteresis voltages (VTH↓, VTH­↑) and Zener diode breakdown voltage (VZ).

Figure 3: Solve for the normalized values of R3 and R5.

Figure 3: Solve for the normalized values of R3 and R5.

Denormalization

While not required, you can denormalize R3 by multiplying by R4. Similarly, R5 is denormalized by multiplying by R1. Figure 4 illustrates the process.

Figure 4: Denormalize the Solution.

Figure 4: Denormalize the Solution.

Example

To illustrate how to use the equations for R3 and R5, I will work an example with the following parameters.

  • VCC = 3.3 V, which is the system supply voltage.
  • R4 = 10 kΩ, arbitrary chosen value
  • R1 = 1.33 kΩ, arbitrarily chosen value
  • VZ = 2.5 V
  • VTH↓ = 11.75 V
  • VTH­↑= 12.25 V

Given these design parameters, I will now use the formulas for R3 and R5 to complete the circuit design.

Determine Component Values

Figure 5 shows how we can compute value for R3 and R5.

Figure 6: A Worked Example.

Figure 5: A Worked Example.

Simulation Results

I used LTSpice to simulate the circuit of Figure 1 populated with the circuit values shown in Figure 6.

Figure 7: Circuit of Figure 1 with Component Values.

Figure 6: Circuit of Figure 1 with Component Values.

Figure 7 shows the simulation results, which show that VTH↓ = 11.75 V,  VTH­↑ = 12.25 V, which are our desired hysteresis voltages. Here is the color code used in this plot.

  • Yellow is my annotation color (i.e. I added them).
  • Green is the output voltage (vOUT) from the circuit of Figure 7.
  • Blue is the input voltage (vIN), which has a trapezoid.
  • Red is the Zener voltage.
Figure 8: Simulation Results.

Figure 7: Simulation Results.

Conclusion

Just a quick note to demonstrate how to solve a common circuit design problem using a computer algebra system.

Posted in Electronics | 2 Comments

Number of Photons Per Second from a One-Watt Bulb

I am going to give up Pilsners.

— The Lenten sacrifice made by an engineer. His wife wanted him to give up beer entirely, but that was too much to ask.


Figure 1: Incandescent Lightbulb.

Figure 1: Incandescent Light bulb (Source).

An article on Stumbleupon called "8 shocking things we learned from Stephen Hawking's book" considered the following statement from The Grand Design shocking.

A 1-watt night-light emits a billion billion photons each second.

We can easily compute this number after making a few assumptions:

  • We are talking about an incandescent bulb (Figure 1).
  • The incandescent bulb is ~4% efficient – this means that 4% of the input power goes into making visible light.
  • We will only be considering photons in the range of human vision. There are actually many more photons emitted with wavelengths outside the range of human vision.

Figure 2 shows my calculations.

Figure 2: Calculation of the Number of Photos from a 1W Incandescent Bulb.

Figure 2: Calculation of the Number of Photons from a 1W Incandescent Bulb.

Easy enough calculation. However, I never have seen a 1 W nightlight bulb. I think the smallest I have seen is 7 W.

Posted in General Science | Comments Off on Number of Photons Per Second from a One-Watt Bulb