AC Tester Schematic Update

An error was found in one of the AC tester schematics that ran in Kevin Gorga’s June 2012 article, “AC Tester” (Circuit Cellar 263). As a reader indicated, T2 is disconnected in the published version of the schematic. An edited schematic follows.

Edited version of Figure 2 in K. Gorga’s June 2012 article, “AC Tester” (Source: Paul Alciatore)

The correction is now available on Circuit Cellar‘s Errata, Corrections, & Updates page.

Q&A: Aubrey Kagan (Engineer, Author)

Aubrey Kagan is a talented engineer with years of experience designing embedded systems. He’s also a prolific author. Between 2000 and 2010 he published 15 articles with Circuit Cellar on topics ranging from developing an AC current generator to resilience in embedded designs. His 2004 book Excel By Example: A Microsoft Excel Cookbook for Electronics Engineers provides tips on using Excel for engineering computations, data analysis, circuit modeling, and more.

In Circuit Cellar 263 (June 2012), Kagan opens up in a candid interview with editor Nan Price. Below is an abridged version of an interview that currently appears in Circuit Cellar 263.

AUBREY KAGAN: I live on the northern edge of Toronto, Ontario, Canada. However, that belies my accent, which the readers obviously cannot hear. I was born and grew up in “deepest, darkest Africa” just north of Rudyard Kipling’s “great gray-green, greasy Limpopo River” (see “How the Elephant Got Its Trunk” from Kipling’s Just So Stories) in what is now called Zimbabwe (then Rhodesia). I did my undergraduate engineering degree at the Technion, Israel Institute of Technology, and then returned to Africa for my MBA at the University of the Witwatersrand in South Africa. My early years in engineering were spent in South Africa, immigrating to Canada in 1989.

NAN PRICE: What is your current occupation?

AUBREY: I am an engineering manager at Emphatec, although managing occupies only a small portion of my day—the majority of my time is engineering. Most of the projects are for industrial monitoring and control. They tend to be a blend of analog and digital approaches and usually are quite compact with only a single function.

Engineer and author Aubrey Kagan

NAN: How long have you been interested in designing embedded systems?

AUBREY: I was given the opportunity to get into embedded design long before anybody thought to call it that. It was in 1977, and all we had were microprocessors, which I was trying to design into HF radio transceivers. I had been struggling with phase lock loops and control of the frequency divider seemed a likely candidate for computer control. Just at that time, there was an article in Popular Electronics on creating an evaluation board for the RCA CDP1802 COSMAC microprocessor. I used that as the basis for the development and as they say, the rest is history.

NAN: Circuit Cellar Online featured your article, “Developing an AC Current Generator” (119, 2000). Tell our newer readers about that project. Do you still use the generator? Have you made any upgrades to it?

AUBREY: That was my first Circuit Cellar article and my only collaborative effort (with Ernesto Gradin). It is probably my favorite project because it is so unusual and remains pertinent to this day.

This AC current generator is one of Kagan’s favorite projects.

Some of the products that we make involve monitoring an AC current and converting the measurement to a 4-to-20-mA analog signal. Some of the devices will measure currents up to 100 A AC. In order to test and calibrate these units, obviously you need an accurate current. If you use a variable AC voltage into a fixed load or a fixed voltage into a variable load to generate the current, you will be working with dangerous voltages and lots of heat. This leads to errors due to heating and more importantly health risks to the operators. We all know in transformers (VIN × IIN) = (VOUT × IOUT) and VIN = (N × VOUT) and so if you make a transformer with a low number of output turns, there is a low output voltage, and for a given power input you can then derive a high current—no heat and very low voltage. To improve the performance, we added a feedback loop with a micro then implemented PID control. The generator is still in use. I have not made any upgrades to it, but I certainly could improve upon it now. I would like to increase its resolution, and of course some of the components are now obsolete, so they would need revision. I might consider onboard displays as well, not control from a PC.

NAN: Your 2002 article series, “Driving the NKK SmartSwitch” (Circuit Cellar 144 and 145), focused on using a Cypress Microsystems programm-able system-on-chip (PSoC) microcomputer as an interface to drive the SmartSwitch. Tell us how this project came about.

AUBREY: Signal conditioning modules in the process-control market tend to be physically small, typically 2” high by 3” deep by 0.75” wide. Of course, there are many much bigger and smaller examples. All of them mount on a rail installed in a panel. Aside from some LED indications, there is very little information you can glean by just looking at the modules. As a result, there has been a slow trend in the industry to add displays to each individual module. Because of the size, the displays are small and are limited to seven-segment displays of up to four digits and sometimes some indicators, if a custom LCD has been used. Also, the displays are invisible when the panel door is closed. The NKK SmartSwitch would allow three lines of six alphanumeric characters and even some graphics. It would also allow the user to change operational parameters for the module. The NKK projects through the panel door and so the information is available to the outside world.

Simply driving the display was the focus of my discussion in Circuit Cellar. At the time, the article had the distinction of being used as an application note by two different companies simultaneously (NKK and Cypress).

But there is much more to the story. If an NKK SmartSwitch and driver were added to a single module, it would probably double the effective price of the module, and so we came up with a networked approach that allowed a single NKK SmartSwitch to be shared among up to 30 different modules spreading the costs and now becoming economically more viable.

Circuit Cellar 263 (June 2012) is now available.

A CTO’s Bright & Clean Workspace

Our enthusiasm for bright and clean workspaces won’t wane. A tidy, well-lit space is a must-have for a designer working with microcontrollers, PCBs, and small components such as transistors and capacitors. Fergus Dixon’s Sydney, Australia-based workspace is an excellent example.

Keeping a space clean and bright is key. (Source: F. Dixon)

Dixon submitted the following information about his workspace:

The tools I use include an oscilloscope, function generator, variable DC power supply and desoldering tool. The Oscilloscope is a new Agilent DSP-X 3014A which replaces the old Tektronix TDS210 which lasted for 12 years. I looked into the Chinese Rigol scopes, but while they are value for money, opted to go for a high-end scope. The function generator is a cheap one with an annoying mains hum, and the DC supply is a GPS-3030D which has been going well for over ten years, and another would be useful. The desoldering tool is a Hakko 701 which needs to be replaced with a hot-air gun soon for small SMD work. The workspace has a workbench for assembly of prototypes and a desk. The major issue is being able to store all the parts in a logical way – the new yellow boxes work well with pullout trays for small SMD parts. There are a few new projects this month including an energy meter which is better than the rest and electric fence energizers for farms. Reverse engineering projects are the hardest and most rewarding since you pick up experience from other engineers and see different methods of building circuits.

A narrow workspace can be useful when moving to and from equipment and tools (Source: F. Dixon)

Nice cabinet space and storage for electronics components (Source: F. Dixon)

Dixon is the Chief Technical Officer at Electronic System Design (ESD), which he started to provide hardware and software engineering services to clients. After completing one of ESD’s recent projects for a client, Dixon published an article titled “Smart Switch Management: Construct and MCU-Based, Net-Enabled Controller” in Circuit Cellar 263 (June 2012).

The following excerpt is the introduction to his article about the switch controller.

“Mate, we have a new project for you you’ll like this one,” said my pal from the contract assembly company. New projects are often referred to contract assembly companies and printed circuit board (PCB) designers, so it pays to be on good terms with them. This project was to design a controller for up to 50 smart switches. Smart switches are energy-saving devices installed in office blocks to automatically turn off the lights at the end of the day to conserve energy. The controller needed an accurate real-time clock (RTC) that would pulse a 24-V AC line once or twice to turn off the smart switches at the end of the working day, and repeat at two- to three-hour intervals in case the lights were turned on. After the first prototype was finished, the Ethernet interface was added.

The first prototype featured a Microchip Technology ENC28J60 Ethernet chip on a Vero board.

The design features Microchip Technology ENC28J60 Ethernet chip

You can read the entire article in the June 2012 issue.

Share your space! Circuit Cellar is interested in finding as many workspaces as possible and sharing them with the world. Email editor at circuitcellar.com to submit photos and information about your workspace. Write “workspace” in the subject line of the email, and include info such as where you’re located (city, country), the projects you build in your space, your tech interests, your occupation, and more. If you have an interesting space, we might feature it on CircuitCellar.com!

Issue 263: Privately Funded Engineering

The public vs. private funding debate endures in the United States and Europe. Everything from energy generation (e.g., oil) to social welfare programs are debated daily by government committees, discussed in corporate board rooms, and argued over at lunch tables from Los Angeles to Brussels and beyond.

One particularly interesting discussion pertains to the role of the public and private sectors in space flight and exploration, which comprises fields such as aerospace design, embedded electronics, and robotics. In Circuit Cellar June 2012, Steve Ciarcia weighs in on this debate and makes a thought-provoking argument for the benefits of privately funded engineering endeavors. In “Google LUNAR X Prize” he writes:

This is certainly an exciting time to be an engineer. We have seen the success NASA has had with robotic exploration, especially on nearby planets such as Mars. Contrary to everything coming from NASA in the future, however, thanks to the advances in robotics and launch vehicles, “space” will soon become the province of private enterprise and not just government. Very soon, commercial space flight will become a reality.

The Google Lunar X PRIZE provides a focal point for these efforts. Google is offering a $20 million prize to the first team to complete a robotic mission to the moon. The basic goal is to put a lander on the surface of the moon, have it travel at least 500 m once it’s there, and send back high-definition pictures and video of what it finds. There’s a $5 million second prize, and also $5 million in bonus prizes for completing additional tasks such as landing near the site of a previous NASA mission, discovering water ice, traveling more than 5,000 m while on the surface, or surviving the 328-hour lunar night.

When the Lunar X PRIZE registration closed in December 2010, a global assortment of 33 separate teams had registered to compete. Seven of those teams have subsequently dropped out, but there are still 26 active teams, including 11 from the U.S. The first launch is expected sometime in 2013, and there’s plenty of time before the competition ends December 31, 2015. Some teams are even planning multiple launches to improve their chances of winning.

It’s interesting to browse through the team information and see the vast diversity in the approaches they’re taking. This is the part that is most exciting from an engineering point of view. Some teams are building their own launch systems, while others are planning to contract with existing government or commercial services, such as SpaceX. There’s a huge amount of variety among the landers, too: some will roll, some will walk, and some will fly across the moon in order to cover the required distance. Each one takes a different approach to dealing with the difficult terrain on the moon, and issues such as the raw temperature extremes between blazing sunlight and black space.

This sort of diversity is a powerful driver for future development. Each approach will have its strengths and weaknesses, and there will certainly be some spectacular failures. Subsequent missions will draw on the successful parts of each prior one. Contrast this to the approach NASA has tended to take of putting all its effort into a single design that had to succeed.

It’s also interesting to consider the economics of this sort of competition. The prize doesn’t really approach the full investment required to succeed. Indeed, Google is quite up front about the fact that it probably only covers about 40%, based on other recent high-tech competitions such as the Defense Advanced Research Projects Agency’s DARPA Grand Challenge and the Ansari X PRIZE. This means the teams need to raise most of their money in the private sector, which keeps them focused on technologies that are commercially viable.

I have long been a fan of “hard” science fiction, as typified by writers such as Larry Niven, Arthur C. Clarke, and Michael Crichton. To me, hard science fiction means you posit a minimal set of necessary technologies, such as faster than light (FTL) space travel or self-aware computers/robots, and then explore the implications of that universe without introducing new “magic” whenever your story gets stuck. In particular, Larry Niven’s “Known Space” universe—particularly in the near future—includes extensive exploration of the solar system by private entrepreneurs. With the type of competition fostered by the Google Lunar X PRIZE, I see those days as being just around the corner.

The competition among these teams, and the commercial companies that arise from them, will be good for society as a whole. For one thing, we’ll finally see the true cost of getting to space, as opposed to the massive amounts of money we’ve been pouring into NASA to achieve its goals. As a public agency, NASA has many operational constraints, and as a result, it tends to be ultra-conservative in terms of risk taking. Policies that dictate incorporating backups for the backups certainly makes a space mission more expensive than the alternative.

Despite these remarks, however, I don’t mean to sound overly negative about NASA at all. It has had many spectacular successes, starting with the Mercury, Gemini, and Apollo manned space programs, as well as robotic exploration of the solar system with the likes of Pioneer and Voyager, and more recently with the remarkable longevity of the Mars rovers, Spirit and Opportunity. There have been many beneficial spin-offs of the space program and we have all benefited in some way. We wouldn’t be where we are today without the U.S. space program. But the future is yet to be written. There are striking differences between a publicly run space program and the emerging free-market privately funded endeavors. We would do well to recognize the opportunities and the potential benefits.

Circuit Cellar 263 (June 2012) is now available on newsstands.

Issue 263: H2M & M2M Communication

Before I introduce this issue, I’d like to bring your attention to our recently redesigned website, CircuitCellar.com. It enables engineers and programmers around the world to communicate and share ideas via project articles, videos, and social media. The site’s features range from project posts (how-to articles, videos, and photos) to daily updates about products and industry news. We also run short write-ups on actual circuit cellars and workbenches in the well-received “Workspaces” section of the site. I encourage you to submit photos and info about your workspaces. Share your space with the design community!

Now let’s focus on this issue, which has articles on both human-to-machine (H2M) and machine-to-machine (M2M) communication. Topics as diverse as smart switch management and human motion-sensing systems are covered.

Kevin Gorga kicks off the issue with his “AC Tester” project (p. 14). It is an isolated variable voltage power source that includes an electronic circuit breaker for testing and debugging equipment. An mbed controller displays voltage and current, and it controls the breaker’s trip point and response time.

Circuit Cellar published 15 of Aubrey Kagan’s articles from 2000 to 2010. In an interview on page 24, Aubrey shares some of his engineering experiences from designing controllers for mines in Africa to helping create specs for the remote control arm on the International Space Station.

On page 28, Fergus Dixon presents a ’Net-connected controller for up to 50 smart switches for lighting systems. The controller’s RTC pulses a 24-V AC line once or twice to turn off the smart switches at the end of the day.

Final PCB with a surface-mount Microchip Technology ENC28J60 Ethernet chip (Source: F. Dixon, CC263)

Turn to page 36 if you’re interested in computer vision technology. Miguel Sánchez introduces depth camera technology, and describes how he used Microsoft’s Kinect in an interactive art project.

On page 44, columnist Bob Japenga starts an articles series on the subject of concurrency in embedded systems. In this article, he defines concurrency and covers some concurrency-related pitfalls.

Last month columnist George Novacek examined the topic of product testing and simulation. In this issue, he tackles a different yet equally important topic: diode ORing (p. 48).

On page 52, columnist Ed Nisley carefully explains MOSFET channel resistance. He describes power MOSFET operation and explores the challenges of using a MOSFET’s drain-to-source resistance as a current-sensing resistor.

A serious RF designer should have a sound understanding of frequency mixers. On page 58, columnist Robert Lacoste summarizes the basics of RF mixers and presents real-life applications.

A simple single-diode unbalanced mixer and its simulation done with Labcenter's Proteus. The RF and LO frequencies are 340 MHz and 300 MHz respectively. You can see on the output spectrum that these two frequencies are still visible, but as well as the difference 40 MHz and sum 640 MHz, among others. (Source: R. Lacoste, CC263)

Jeff Bachiochi wraps up the issue with an article about a DIY, MCU-based blood pressure cuff project (p. 68). He converted a manual blood pressure cuff into an automatic cuff by adding an air pump, a solenoid release valve, and a pressure sensor.

Circuit Cellar Issue 263 (June 2012) is now available on newsstands.

Electronics Engineering Crossword (Issue 263)

Across

1.     SPARKGAP—A space in an otherwise closed electric circuit [two words]

3.     FUZZYLOGIC—Began in 1965 with Lotfi Zadeh’s proposal of a certain type of set theory [two words]

6.     NULLTEST—Cancels a device’s signal input by negative feedback from its output [two words]

7.     COULOMB—One of these is equal to 6.28 x 1018 electrons

10.   EDDYCURRENT—A.k.a. Foucault currents [two words]

11.   KIRCHHOFF—Created a law of thermochemistry

13.   ANDGATE—Relies on truth and logic  [two words]

16.   HOLONYAK—Invented the LED while working at General Electric in the 1960s

17.   SOLIDSTATERELAY—Doesn’t rely on movement or contact to switch electric circuits [three words]

20.   ACCIRCUIT—A circuit with a current that goes one way and then another [two words]

Down

2.     ANNEAL—Run hot and cold

4.     OPTOISOLATOR—Changes electrical signals to light and back into electrical signals

5.     CHECKBIT—Adds a bit to make things even or odd [two words]

8.     MICROFARAD—1,000,000 pF

9.     THEVENIN—French engineer (1857–1926); augmented Ohm’s law

12.   KELVINSCALE—Temperature scale where 0° = absolute zero [two words]

14.   PHOTODIODE—Turns light into current or voltage

15.   ACORNTUBE—A small tube used at very high frequencies [two words]

18.   ERG—Causes 1 cm of movement

19.   ASCII—A character-encoding system used to represent text

 

Issue 263: Net-Enabled Controller, MCU-Based Blood Pressure Cuff, MOSFETs 101, & More

Although the June issue is still in production, I can report that it’s packed with projects and tips you’ll find immediately applicable. The projects include an AC tester design, an Internet-enabled controller, a DIY image-processing system, and an MCU-cased blood pressure cuff. Once you’ve had your fill of design projects, you’ll benefit from our articles on essential topics such as concurrency embedded systems, frequency mixers, MOSFET channel resistance, and “diode ORing.”

An Internet-Enabled Controller, by Fergus Dixon
Power-saving smart switches require a real-time clock-based controller. With a request for an Ethernet interface, the level of complexity increases. Once the Ethernet interface was working, connecting to the Internet was simple, but new problems arose.

Final PCB with a surface-mount Microchip Technology ENC28J60 Ethernet chip (Source: F. Dixon, CC263)

AC Tester, Kevin Gorga
The AC Tester provides a modular design approach to building a tool for repair or prototyping line voltage devices. In its simplest form, it provides an isolated variable AC voltage supply. The next step incorporates digital current and voltage meters with an electronic circuit breaker. The ultimate adds an energy meter for Watts, VA, and VAR displays.

The AC Tester powered up and running. The E meter is shown in the plastic case on the top of the tester. The series current limit bulbs are on the top. (Source: K. Gorga, CC263)

Image Processing System Development, by Miguel Sánchez
Some computer vision tasks can be accomplished more easily with the use of a depth camera. This article presents the basics on the usage of Microsoft’s Kinect motion-sensing device on your PC for an interactive art project.

Build an MCU-Based Automatic Blood Pressure Cuff, by Jeff Bachiochi
Personal health products are becoming more and more commonplace. They reinforce regular visits to personal physicians, and can be beneficial when diagnosing health issues. This article shows you how to convert a manual blood pressure cuff into an automatic cuff by adding an air pump, a solenoid release valve, and a pressure sensor to a Microchip Technology PIC-based circuit.

A manual blood pressure cuff adapted into an automatic cuff by adding an air pump, a solenoid release valve, and a pressure sensor to a microcontroller. (Source: J. Bachiochi, CC263)

Concurrency in Embedded Systems, by Bob Japenga
This is the first in an article series about concurrency in embedded systems. This article defines concurrency in embedded systems, discusses some pitfalls, and examines one of them in detail.

Radio Frequency Mixers, by Robert Lacoste
Frequency mixers are essential to radio frequency (RF) designs. They are responsible for translating a signal up or down in frequency. This article covers the basics of RF mixers, their real-life applications, and the importance of frequency range.

MOSFET Channel Resistance: Theory and Practice, by Ed Nisley
This article describes the basics of power MOSFET operation and explores the challenges of using a MOSFET’s drain-to-source resistance as a current-sensing resistor. It includes a review of fundamental enhancement-mode MOSFET equations compared with Spice simulations, and shows measurements from an actual MOSFET.

Diode ORing, by George Novacek
Diode ORing is a commonly used method for power back up. But there is a lot more behind the method than meets the eye. This article describes some solutions for maintaining uninterrupted power.

The June issue will hit newsstands in late May.

Robot Design with Microsoft Kinect, RDS 4, & Parallax’s Eddie

Microsoft announced on March 8 the availability of Robotics Developer Studio 4 (RDS 4) software for robotics applications. RDS 4 was designed to work with the Kinect for Windows SDK. To demonstrate the capabilities of RDS 4, the Microsoft robotics team built the Follow Me Robot with a Parallax Eddie robot, laptop running Windows 7, and the Kinect.

In the following short video, Microsoft software developer Harsha Kikkeri demonstrates Follow Me Robot.

Circuit Cellar readers are already experimenting Kinect and developing embedded system to work with it n interesting ways. In an upcoming article about a Kinect-based project, designer Miguel Sanchez describes a interesting Kinect-based 3-D imaging system.

Sanchez writes:

My project started as a simple enterprise that later became a bit more challenging. The idea of capturing the silhouette of an individual standing in front of the Kinect was based on isolating those points that are between two distance thresholds from the camera. As depth image already provides the distance measurement, all the pixels of the subject will be between a range of distances, while other objects in the scene will be outside of this small range. But I wanted to have just the contour line of a person and not all the pixels that belong to that person’s body. OpenCV is a powerful computer vision library. I used it for my project because of function blobs. This function extracts the contour of the different isolated objects of a scene. As my image would only contain one object—the person standing in front of the camera—function blobs would return the exact list of coordinates of the contour of the person, which was what I needed. Please note that this function is a heavy image processing made easy for the user. It provides not just one, but a list of all the different objects that have been detected in the image. It can also specify is holes inside a blob are permitted. It can also specify the minimum and maximum areas of detected blobs. But for my project, I am only interested in detecting the biggest blob returned, which will be the one with index zero, as they are stored in decreasing order of blob area in the array returned by the blobs function.

Though it is not a fault of blobs function, I quickly realized that I was getting more detail than I needed and that there was a bit of noise in the edges of the contour. Filtering out on a bit map can be easily accomplished with a blur function, but smoothing out a contour did not sound so obvious to me.

A contour line can be simplified by removing certain points. A clever algorithm can do this by removing those points that are close enough to the overall contour line. One of these algorithms is the Douglas-Peucker recursive contour simplification algorithm. The algorithm starts with the two endpoints and it accepts one point in between whose orthogonal distance from the line connecting the two first points is larger than a given threshold. Only the point with the largest distance is selected (or none if the threshold is not met). The process is repeated recursively, as new points are added, to create the list of accepted points (those that are contributing the most to the general contour given a user-provided threshold). The larger the threshold, the rougher the resulting contour will be.

By simplifying a contour, now human silhouettes look better and noise is gone, but they look a bit synthetic. The last step I did was to perform a cubic-spline interpolation so contour becomes a set of curves between the different original points of the simplified contour. It seems a bit twisted to simplify first to later add back more points because of the spline interpolation, but this way it creates a more visually pleasant and curvy result, which was my goal.

 

(Source: Miguel Sanchez)
(Source: Miguel Sanchez)

The nearby images show aspects of the process Sanchez describes in his article, where an offset between the human figure and the drawn silhouette is apparent.

The entire article is slated to appear in the June or July edition of Circuit Cellar.