About Circuit Cellar

Circuit Cellar is the only publication that provides intensive, exploratory articles about hardware and software methods for embedded-control systems. The sophisticated professionals in this rapidly growing market demand new tools and information to develop unique solutions to their application problems. Circuit Cellar provides these professionals with insightful analysis of emerging technologies and concepts, enabling them to be better equipped to make long-term forecasts and purchasing decisions-decisions that not only affect the direction of their own enterprises but also shape future technologies.

Check Your PCB Design Online Before Ordering

Did you know Circuit Cellar’s parent company, Elektor, offers a standard PCB service? The PCB service was originally launched in 2009, and since then more than 3,000 users have been registered.

Who will benefit from the service? Ask yourself: Are you an electronics designer who occasionally designs a PCB and then sends it off to a PCB manufacturing house? If so, you’re likely familiar with that nagging feeling of uncertainty about the correctness of your production files. Did you check the Gerber files you uploaded? Are you sure that the PCB manufacturing house will interpret your board data properly?

The PCB Visualizer and Checker is a fully automated interactive web tool that enables you to review your design files before ordering the PCB. After uploading your design files, the tool analyzes them and shows you what the manufacturer sees. Possible design issues are highlighted and you’re provided insight into critical areas of the PCB production process. Your design is verified against your board specifications, and you’re provided a list of the modifications needed to get it ready for production. Finally, the visualizer renders the board as it will be shipped before production has even started!

For more information, check out the latest addition to the Elektor CircuitCellar PCB Service.

Issue 264: EQ Answers

The answers to the Circuit Cellar 264 (July) Engineering Quotient are now available. The problems and answers are listed below, along with a schematic.

Problem 1a—Is it possible to transmit on-off (DC) signals between two pieces of equipment in both directions simultaneously on the same wire, in much the same way that telephones do for audio?

Source: D. Tweed, CC264

Answer 1a—Why not? Hybrids work just as well at DC as they do for audio; you just need a receiver with balanced inputs, like an RS-422 buffer:

All resistors are the same value (e.g., 4,700 Ω) and the transmit driver needs to be a voltage source (low impedance).

If the transmitter switches between, say, 0 V and 5 V, the opposite receiver will see a voltage differential of 0 V and 2.5 V, respectively, while the local receiver will just see 0V.

For long lines, you’ll probably want to use lower resistances and you’ll want to limit the slew rate of the transmitter so that the receiver doesn’t produce glitches on the transitions of the local transmitter.

If the RS-422 receiver is replaced with an op-amp differential amplifier with a gain of 2, then any analog voltage transmitted by one end will be reproduced at the other end.

Problem 1b—But doesn’t a true hybrid use transformers, or at least some tricky transformer simulation with op amps to ensure the transmitted signal does not appear on the receive port?

Answer 1b—No. A hybrid is just a bridge circuit, with one arm of the bridge replaced by the line and the termination at the far end. The transmit signal is applied to two opposite corners of the bridge and the receive signal is taken from the other two corners.

In order to provide the Tx/Rx isolation, the bridge must be balanced, which in the example above, means that the lower resistor on each side must match the impedance of the line/far end combination. For DC and short lines, a simple resistor suffices. At audio frequencies and with the long unshielded twisted pairs used in telephony, a more complex matching impedance is required.

Transformers are used only because it’s the easiest way (and the only passive way) to get a balanced drive and/or receive signal — the transmit driver and receiver cannot share a ground. In order to mass produce phones that were dirt cheap, yet simple and reliable, the phone company figured out how to use a multi-winding transformer to provide the both the isolation and the balanced/unbalanced conversion in both directions, usually with a single resistor and capacitor to provide the line matching. As noted, modern electronic phones use active electronics to achieve the same things.

As always, the theory is simple, but the practical implementations can get complicated.

Problem 2a—The conventional way to calculate the magnitude (length) of a vector is to take the square root of the sum of the squares of its components. On small processors, this can be somewhat difficult (especially the square root operation), and various approximations are used instead.

One approximation that works surprisingly well for 2-D vectors and complex numbers is to take the absolute values of the two components, compare them, then add 1/3 of the smaller to the larger.

What is the maximum error using this method?

Answer 2a—If we restrict the discussion to unit vectors at various angles A, the x component is cos(A) and the y component is sin(A), and the correct magnitude is 1.

Furthermore, let’s concentrate on angles between 0 and 45° — then we know that both cos(A) and sin(A) are positive and that cos(A) > sin(A). (The absolute value and compare operations provide the symmetry that covers the rest of the unit circle.) The approximation then gives the result

Magnitude = cos(A) + sin(A)/3

Graphing this shows that this is most negative (0.943) at 45° and most positive (1.054) at approximately 18.4° (the actual angle is given by atan(1/3) —can you show why?). The peak error is therefore –5.7%, +5.4%.

Problem 2b—Is there a similar formula that gives even better results?

Answer 2b—Yes. One more multiplication operation gives a result that has less than 4% error:

Magnitude = 0.960433 × max(|x|, |y|) + 0.397826 × min(|x|, |y|)

This function is most negative at 0° and 45°, and most positive at 22.5°. The error is ± 3.96%. This form is well-suited to DSPs that have multiply-accumulate units. The two constants can be expressed as 62943/65536 and 26072/65536, respectively.

Contributor: David Tweed

Electronics Engineering Crossword (Issue 264)

The answers to Circuit Cellar’s July Electronics Engineer crossword puzzle are now available.

Issue 264 crossword answers

Across

3.     IONIZATION—Occurs when an atom or molecule gains either and positive or negative charge

4.     ANDROIDPHONE—In “Audio-Enhanced Touch Sensors” (Circuit Cellar, May 2012), Matt Oppenheim said one of the stumbling blocks of using this for data collection is that it will try to recharge itself whenever you connect it to a USB port. [two words]

6.     FOLTZER—Circuit Cellar interviewee who participated in Motorola’s IEEE-802 MAC subcommittee on token-passing access control methods. [two words]

13.   COORDINATEDUNIVERSALTIME—A method of keeping the world in sync [three words]

14.   CICCHINELLI—Circuit Cellar published his book about a commonly used computer programming language in 2010

17.   HACKSPACE—i.e, “a circuit cellar”

18.   CHIP—A basic component of an electronic device

19.   VOLTAGEREFERENCE—National Semiconductor’s LM385 series is an example of an adjustable one. [three words]

Down

1.     DOPPLEREFFECT—A phenomenon that occurs when a vehicle sounding a siren approaches, passes, and recedes from an observer [two words]

2.     WAVEFORMGENERATOR—A device that produces electronic signals [two words]

5.     ANGSTROM—Equals 1/10,000,000,000 m

7.     ISOTHERMALPROCESS— ΔT = 0 [two words]

8.     COMPARATOR—A device that compares two voltages or currents and switches its output to indicate which is larger

9.     NSPE—Organization formed in 1934 by bridge engineer David Steinman

10.   EMI—Acronym; common cause of electronic data corruption and subject of Novacek’s December 2011 Circuit Cellar article [two words]

11.   PIEZOELECTRICITY—Occurs when crystals acquire a charge after being compressed, twisted, or distorted (e.g., quartz)

12.   WIDLAR—American electrical engineer (1937–1991); IC pioneer

15.   LEDDRIVER—Circuitry that regulates or provides powers to a light source [two words]

16.   JOULE—Symbolized by 10th letter of the alphabet

20.   RTOS—Hint: acronym. Unscramble the following: IETEORGSEPSMNYMRLTIAEAT

Renesas RL78 Green Energy Challenge

Up for an international design challenge? It’s time for the Renesas RL78 Green Energy Challenge! Renesas has partnered with IAR Systems to deliver engineers a power-house combo of low-power devices and high-quality software. They’re steering a great, green revolution and are challenging you to transform how the world experiences energy efficiency by developing a unique, low-power application using the RL78 MCU and IAR toolchain. Succeed and win a share of $17,500 in Grand Prizes from Renesas! * The Renesas Grand Prize winner will also win a free trip to Renesas DevCon in October where winners will be announced.

But that’s not all. Earn additional prizes like developments tools, Pmods, Wi-Fi modules, embedded systems books, and more from Contest Partners through weekly prize drawings. Follow Renesas on Twitter and Facebook for weekly challenge questions from official Contest Partners. Weekly Partner Challenges, and the respective winners, will be announced every Monday throughout the competition.

So, do you have a great idea for a remote device that monitors pollution? What about a box collecting data on home power usage or an energy harvesting biometric design? Perhaps your grand plan is for a low power controller scavenging heat from an oven or furnace, a meter reading biomass parameters, or a braking system for a wind turbine? It’s up to you! Send us your best RL78 based ideas to help make the world a better place.

The Challenge starts March 26, 2012 and ends on August 31, 2012. Winners will be announced in October at Renesas’ DevCon 2012.

Hundreds of free RL78/G13 development kits (“RDK”s), loaded with IAR’s Kickstart edition, are being distributed to those who qualify. Click here to see if you qualify for a complimentary RDK!

*Prizes in U.S. dollars.

Circuit Cellar, Inc. and Elektor International Media is the Contest Administrator.

 

Issue 258: EQ Answers

These are the answers to the EQ questions that appeared in Circuit Cellar 258(January 2012).

Answer 1—Q1 and Q2 are wired as a differential amplifier, but in this digital application, it’s probably better to think of them as a current switch. Whenever VIN < VTH, the current through R1 is shunted to ground, and whenever VIN > VTH, the current passes instead through Q2 to the base of Q3, turning it on. As long as Q1 and Q2 are reasonably well matched, VTH is the input voltage at which the switchover occurs, and this is relatively stable with respect to temperature. For example, if VIN is being driven by standard TTL logic, you might set VTH to 1.5 V.

Answer 2—R1, combined with VTH, sets the amount of current flowing through Q2 to drive the base of Q3. This current should be sufficient to drive Q3 into saturation, given the expected load on it (R3 plus the external circuit). R2 serves to make sure that Q3 isn’t turned on by any leakage current through Q2 when it’s supposed to be off. For example, a value of 100 kΩ would bypass currents of up to 6 µA or so.

Answer 3—When VIN is high, there is virtually no current flowing through the input terminal—just the leakage current through Q1’s base-collector junction. When VIN is low, the driving circuit must sink the current set by R1 divided by the beta (current gain) of Q1. For example, if R1 is 4,300 Ω, giving a current through Q1 of about 1 mA, and the beta of Q1 is 50, then the driving circuit must sink about 20 µA.

Answer 4—Better: The component count is reduced by one transistor. Better: VTH is stabilized by the forward drop of a diode, making it less dependent on the exact value of the positive supply. Worse: The switching voltage is now determined by the combination of D1 and the base-emitter drop of Q2, both of which vary with temperature. Worse: Now the driving circuit must supply all of the base current for Q3 when it is in the high state.

Contributed by David Tweed (eq at circuitcellar.com)

Plugin by Social Author Bio