About Circuit Cellar Staff

Circuit Cellar's editorial team comprises professional engineers, technical editors, and digital media specialists. You can reach the Editorial Department at editorial@circuitcellar.com, @circuitcellar, and facebook.com/circuitcellar

Cross-Platform, Dual-Band Spectrum Analyzer for Wireless Pros

Oscium recently announced the WiPry 5x, a dual-band spectrum analyzer solution that visualizes all spectral activity on 2.4 and 5 GHz on both iOS and Android devices.  A hardware plug-in accessory, the WiPry 5x makes possible to identify and avoid interferences and optimize wireless connectivity from a smartphone or tablet. The portable WiPry 5x is an excellent tool for field technicians, wireless professionals, and home audio enthusiasts who need to set up wireless audio networks.Oscium - WiPry5x

Oscium currently offers the LogiScope (logic analyzer), iMSO-204L and iMSO-104 (mixed-signal oscilloscopes), WiPry-Pro Combo (combination spectrum analyzer and dynamic power meter), WiPry-Pro (2.4-GHz spectrum analyzer), and now the new WiPry 5x Dual Band Spectrum Analyzer (2.4 and 5 GHz) with cross platform support. By adding coverage to the Android market and supporting 5 GHz, Oscium has expanded its customer base and made some significant improvements in direct response to market’s demands.

The WiPry 5x visualizes all wireless activity on both the 2.4 and  5 GHz hands. Measurement settings include 802.11b, 802.11g, 802.11n, 802.11ac, and 802.15.4 (ZigBee). Also available is SSID-specific activity, which is ideal for troubleshooting home security, home automation, and home audio wireless installations.

The WiPry 5x costs approximately $499. WiPry software is free both in the Apple App Store and on Google Play. Although initial support will only include iOS version 7.0 or higher and Android version 4.0.3 and higher, the hardware can support other platforms such as Windows, Mac, and Linux. Compatible devices include Apple’s iPod touch (5th generation), iPhone 5 to 6S Plus models, and all iPads from the third generation forward, including the iPad Pro. All Android devices with USB On-The-Go are compatible.

Source: Oscium

79-GHz CMOS Radar Sensor Chips for Automotive Applications

Infineon Technologies recently announced at the Imec Technology Forum in Brussels (ITF Brussels 2016) it is cooperating with Imec to develop integrated CMOS-based, 79-GHz sensor chips for automotive radar applications. According to the announcement, Infineon and Imec expect functional samples to be available in Q3 2016. A complete radar system demonstrator is slated for early 2017.

There are usually up to three radar systems built into vehicles equipped with driver assistance functions. In the future, fully automated cars will be equipped with up to 10 radar systems and 10 additional sensor systems using camera or lidar technologies.

Source: Infineon Technologies

New Plug-and-Play FPC Antennas for the 3G, 4G, and LTE Bands

Antenova recently announced three new flexible printed circuit antennas—Mitis (SRFL026), Moseni (SRFL029), and Zhengi (SRFC015)—to cover the 3G, 4G, and LTE bands. The flexible antennas—which belong to Antenova’s flexiiANT range of antennas—offer options for all of the world’s 4G and LTE bands. You also have a choice of antenna shape and size. You can fold the flexible FPC antennas to fit inside small electronic devices. You can position them vertically, horizontally, or co-planar to the PCB. and are ideal for use in applications where there may not be room for an SMD antenna.Antenova Mitis Antenna

The Mitis and Moseni antennas were developed for 4G and LTE applications, including MIMO. The Zhengi covers all of the 3G and 4G LTE bands B7 (2,500–2,690 MHz) and B30, B40 (2,300–2,400 GHz), including LTE Bands B7, B30, B38, B40, and B41.

The antennas come with an IPEX MHF (UFL) cable in a choice of three lengths for easy connection to a wireless module, making them effectively plug-and-play antennas, particularly as they can be integrated without matching. Each one has a peel-back self-adhesive backing that enables you to position it in a variety of  designs.

The Mitis, Moseni and Zhengi antennas are designed for a wide variety of applications, such as smart meters, remote monitoring, M2M, and IoT devices.

Source: Antenova M2M

OEM Controller for Fiber Optic Emergency Stop and Signaling Sensors

Micronor’s MR380-0 OEM Controller provides a low-cost, turn-key solution for OEM manufacturers and control system providers integrating any of the Micronor MR38X series ZapFREE Fiber Optic Signaling Sensors into their design. The sensor range includes Emergency Stop, E-Actuator, U-Beam, Key Switch, Push Button, Foot Switch, and Microswitch sensors.MICRONOR_MICROSWITCH_1500X1000P

The OEM Controller contains a stable transmitter and a sensitive optical receiver that operates over a Duplex LC multimode fiber optic link. The transmitter sends a constant light level via the transmit fiber that is interrupted when the fiber optic switch activates or the sensor beam is broken. The system is compatible with either OM1 (62.5 µm/125 µm) or OM2/OM3 (50 µm/125 µm) multimode fiber to distances up to 1.5 km. The Controller operates over a wide 5 to 24 VDC range and provides a Digital Logic as well as Open-Collector Output for activating external relays.

The MR380 ZapFREE Signaling Sensor System outperform electromechanical and electronics-based switches and sensors, specifically where EMI immunity, high voltage isolation, inherent safety, MRI compatibility, or operation over long distance is required. Applications include medical and MRI, transportation, and more.

For ATEX applications and hazardous locations, the Signaling Sensors are classified simple mechanical devices and can be installed in any manner of explosive atmosphere—mines, gas and dust. The Controller outputs inherently safe, optical radiation and is approved for EPL Mb/Gb/Gc/Db/Dc applications.

For Functional Safety applications, depending on sensor type, the controller defaults to the emergency state when: the optical path is blocked, in case of a broken fiber, a fiber is disconnected, or loss of power to the controller link.

In small quantities, the MR380-0 OEM Controller is $250 and MR38X Sensors can range $350 to $495, with a typical lead time of stock to two weeks. Discounts are available for OEM applications. Special engineered versions are available for MRI applications, radiation, and vacuum environments.

Source: Micronor

Arduino Primo Features Nordic Semiconductor SoC

Nordic Semiconductor recently announced that Arduino’s new Arduino Primo features its nRF52832 Bluetooth low energy SoC. The IoT-targeted Arduino Primo PCB features native Bluetooth low energy wireless connectivity and includes Near Field Communication (NFC), Wi-Fi, and infrared (IR) technologies. In addition to being able to wirelessly connect to a wide array of Bluetooth low energy sensors, the Arduino Primo uses the nRF52832 SoC’s integrated NFC for secure authentication and Touch-to-Pair (a simple BLE pairing function requiring no user interaction), and has embedded IR for traditional remote control. Nordic_Arduino_Primo_PRINT

The Nordic nRF52832 SoC’s ARM processor has ample computational overhead to manage the Arduino Primo’s on-board accelerometer, temperature, humidity, and pressure sensors. The Nordic Semiconductor nRF52832’s features and specs include:

  • 64-MHz, 32-bit ARM Cortex-M4F processor
  • 2.4-GHz multiprotocol radio that’s fully compatible with the Bluetooth 4.2 specification and features –96-dB RX sensitivity and 5.5-mA peak RX/TX currents
  • 512-KB flash memory and 64-KB RAM, and a fully-automatic power management system to optimize power consumption.

You can program via the Arduino Integrated Development Environment (IDE) programming interface. If you want to access the Arduino Prio’s most advanced features and functionality, you can use any Nordic nRF52 Series-compatible Software Development Kit (SDK) or programming tools. For example, the nRF5 SDK for IoT enables you to develop IPv6 over Bluetooth low energy applications on the nRF52832 SoC.

Source: Nordic Semiconductor

Upcoming Webinar: Design Tips to Optimize Stepper Motor Designs

STMicroelectronics will run 1-hour webinar on May 19 for designers interested  in optimizing stepper motor control designs. You’ll receive an overview of STMicro’s Integrated Driver ICs for stepper motors with specific focus on the digital motion engine approach, an innovative architecture to ease the design and control of motors with high-level SPI commands.

You will learn how the digital motion engine core enables users to select motion profiles with acceleration, deceleration, speed, or target position via an SPI and a dedicated register set. You’ll also learn how to distinguish between various stepper motor driver product features along with their advantages/disadvantages. Experts will also provide tips for testing and improving various system-level characteristics.

Agenda:

  • 12:00 PM – 12:45 PM CDT
    • Introduction, review agenda
    • Digital motion engine advantages and benefits
    • Tips for selecting the right digital motion engine driver
    • Tools from STMicroelectronics for getting started on your next design
  • 12:45 PM – 1:00 PM CDT
    • Q&A session

Click here for more information and to register.

Source: STMicroelectronics

65-V Micro-Power Buck Converters for Automation

Texas Instruments recently introduced two 65-V, 150-mA synchronous DC/DC buck converters for powering factory automation and automotive sensor applications. Featuring 10.5-µA quiescent current (IQ), the converters are intended for applications requiring high efficiency. The LM5165 (industrial-grade) and LM5165-Q1 (automotive-grade) micro-power step-down regulators feature a wide input voltage (VIN) range and dual control modes for optimizing efficiency and PCB area.TI UltraLow Buck

Features and benefits

  • Low 10.5-uA standby IQ (operating with no load) enables 90% conversion efficiency at 1-to-10-mA loads to extend battery life in “always on” applications.
  • 100% duty cycle enables low-dropout operation, while a P-channel high-side MOSFET eliminates the bootstrap diode and capacitor.
  • Dual-mode operation: a pulse frequency modulation (PFM) control mode enables the highest efficiency power supply design, while a constant on-time (COT) control mode provides higher output current and better EMI performance.
  • Fixed 3.3- and 5-V options eliminate external feedback resistor dividers to lower BOM.
  • Programmable current limit optimizes inductor size and cost.

The industrial-grade LM5165 costs $1.35 in 1,000-unit quantities. The automotive-grade LM5165-Q1 costs $1.58.

Source: Texas Instruments

Cryptography-Enabled 32-bit Microcontroller for IoT Designs

Microchip Technology’s CEC1302 hardware crypto-enabled 32-bit microcontroller enables you to easily add security to Internet of Things (IoT) devices. Enabling pre-boot authentication of system firmware, the microcontroller prevents a variety of security attacks (e.g., man-in-the-middle, denial-of-service, and backdoor). You can also use it to authenticate firmware updates.Microchip CEC1302

The CEC1302’s features, benefits, and specs:

  • Private key and customer programming flexibility
  • Power drain savings and improved execution of application performance
  • 32-bit microcontroller with an ARM Cortex-M4 core
  • The hardware-enabled public key engine of the device is 20 to 50 times faster than firmware-enabled algorithms

In order to quickly develop applications with the CEC1302, use MikroElektronika’s CEC1302 Clicker (MIKROE-1970) and CEC1302 Clicker 2 (MIKROE-1969). You can use the boards with MikroElektronika’s complete development toolchain for Microchip CEC1302 ARM Cortex-M4 MCUs.

The CEC1302 (CEC1302D-SZ-C0) is available today for sampling and volume production in a 144-WFBGA package starting at $1.75 each in 10,000-unit quantities.

Source: Microchip Technology

New Programmable Oscillators for Next-Gen Networking Systems

Cypress Semiconductor recently introduced the CY294X high-performance programmable oscillator family. Delivering superb jitter performance and a wide range of output frequencies for embedded systems, the new oscillators offer performance that exceeds the reference clock requirements of high-speed interface standards including 40/100GbE, SyncE, and IEEE 1588.Cypress CY294X High-Performance Programmable Oscillator

Well-suited for networking applications, the CY294X family delivers RMS jitter performance of 110 fs (12 kHz – 20 MHz offset). The family comes with two evaluation kits (CY3676 and CY3677) and programming software (CyClockWizard 2.1).

The CY294X family is currently sampling in 5 mm × 7 mm LCC, 5 mm × 3.2 mm LCC, and 16-pin QFN packages.

Source: Cypress Semiconductor

The Perfect PCB Prototype

Interested in constructing perfect PCB prototypes? Richard Haendel has the solution for you. In this article, he explains how five simple steps—print, mount, punch, fit, and evaluate—can save you a lot of time and money.

The following article first appeared in Circuit Cellar 156.


Who designs and builds your prototype circuit boards? The other department? Oh. Well, in that case, nice seeing you. Just flip past this article and enjoy the rest of the magazine.

On the other hand, if you’re a do-it-yourself engineer like me, then perhaps my technique for prototyping prototypes will interest you (see Photo 1). It’s so easy, cheap, and obvious, I have trouble believing that no one else has done it before. If you have, please let me know. I’d love to compare notes. The entire process can be described in five words: print, mount, punch, fit, and evaluate.

Photo 1: It doesn’t get any easier than this (or cheaper). Just remember to print, mount, punch, stuff, and evaluate.

Photo 1: It doesn’t get any easier than this (or cheaper). Just remember to print, mount, punch, stuff, and evaluate.

PRINT

Your printer must be able to print a full-scale, moderately accurate representation of your PCB layout. I say “moderately accurate,” because, after all, a 10% error on a 0.4″-spaced resistor is only 0.04″. That’s close enough for most through-hole designs. Surface mounting, however, can be a problem. But because I don’t normally do surface mounting, it’s not a problem for me.

I use two printers for development: a color ink-jet and a black and white laser-jet. Both are fairly old, but they still have more than enough accuracy for this purpose. The laser-jet is probably a little better, but not by much.

Your printed layout must show (at minimum) the holes and component layout. You may or may not need to see the traces; it depends on what you’re hoping to accomplish. The traces are superfluous for test fitting (e.g., to make sure that components don’t touch each other); however, if you’re building a full-scale concept model, you’ll need as much detail as is practical. In fact, with a little more effort, you could print the top traces on one sheet and the bottom traces on another, glue them to the foam board on opposite sides (taking care to line up the holes, of course), and make yourself a full-scale PCB model. Cool.

MOUNT

Trim the excess white space from the sheet containing your printed image, because it will just get in the way. Next, cut a piece of foam board slightly larger than your layout. A utility knife and metal ruler work well for this. Peel the backing from the foam board’s adhesive side; of course, if you don’t have the self-adhesive kind, simply apply dry glue (from a glue stick) to either the board or paper. After that, carefully position one corner of your image on the foam board and smoothen it. Rub gently but firmly with a soft cloth or paper towel to permanently “seat” the image.

If you get air bubbles or wrinkles, throw it away and start over. Remember, your pattern must be accurate. You can probably make a new one faster than you can fix a damaged one. A little practice goes a long way toward achieving perfect results.

PUNCH

Using a pushpin (or a similar instrument), carefully punch your holes. As you can see in Photo 2, I use metallic pushpins with longer-than-usual shafts. Naturally, the shorter plastic pushpins will work just as well. Thumbtacks, however, are not a good choice; they’re pretty rough on the fingernails.

Photo 2: A small pin is my favorite tool for punching holes in the foam board.

Photo 2: A small pin is my favorite tool for punching holes in the foam board.

Note that this stage can be tedious, especially if you have a large board with many holes. Take your time. The holes should be centered as accurately as possible. Also, don’t push the pin all the way through; it’s merely intended to puncture the paper front so the component’s pins can penetrate the foam and have it “grab” them. In other words, you want a snug fit so the pieces don’t (easily) fall off the board.

That’s how it works for IC sockets and connectors with short leads (i.e., less than the thickness of the board). However, resistors and other parts with longer leads are a different matter. In this case, you must either trim the leads—which is fine if you’re not planning to reuse the component—or extend the hole to the backside with something like a map pin. That’s what I usually do.

FIT

That’s right. Simply fit (or stuff) your components as you would a real circuit board. Components with short leads should be easy to fit; however, those with longer leads may need persuading. Simply insert the part, grab one lead close to the board’s surface with needle-nose pliers, and gently (but firmly) coax it through the hole. Sometimes this can be a pain, especially with small-gauge component leads (e.g., ceramic capacitors). You may need to enlarge the hole from the front or backside. Remember: practice, practice, practice.

EVALUATE

In other words, use it for whatever purpose you need. Most of the time, I make these models just to test my board design and confirm that all parts will fit before committing to a manufactured prototype. After that, it’s trash. If the design is significant (pronounced “expensive to produce”), then I may make others until I’m confident of perfection.

I must confess, though, most of my models are nowhere near as neat and attractive as the one pictured in this article. Frequently, the images are slapped on a piece of scrap foam, tested, and tossed within 5 min. or less.

SO, WHAT’S IT COST?

Not much. Just the other day, I purchased a 20″ × 30″, 3/16″ thick sheet of white self-adhesive foam board at a local hobby store for $4.99. (The nonadhesive type was about $1 less.) Therefore, the cost is $4.99 divided by 600 square inches, or a mere $0.00832 per square inch—that’s less than a penny. At that rate, this board cost only $0.07.

IS IT WORTH IT?

You bet! I’ve caught numerous board design and layout errors with this technique. I’ve also learned that legends on the silk-screen layer don’t always match the physical part as closely as you may expect. This is good to know when you’re tight on board space and need to fudge a little.

Photo 3: Notice that D1 will not actually touch J2, as the PCB layout program’s silkscreen outline indicates.

Photo 3: Notice that D1 will not actually touch J2, as the PCB layout program’s silkscreen outline indicates.

I was able to crowd D1 between J2 and J3, because J2 is 0.08″ smaller than its silkscreen outline (see Photo 3). So, even though D1 appears to touch J2, there’s actually 0.04″ between them, which is more than enough for my design.

So, did I lie? Is this not as simple as can be? And cheap! Try it yourself and see.—By Richard Haendel (Circuit Cellar 156)

TRENCHSTOP Performance IGBT Enables Energy Efficiency

Infineon Technologies recently launched the 600-V TRENCHSTOP Performance IGBT to deliver high energy efficiency and reliability for a variety of applications, such as air conditioning, solar PV inverters, drives, and uninterruptible power supplies (UPS). Based on Infineon’s TRENCHSTOP technology, the new IGBT is optimized for hard switching topologies working at frequencies of up to 30 kHz. The new TRENCHSTOP Performance IGBT series combines the best trade-off between conduction and switch-off energy losses with outstanding robustness, 5-µs short circuit capability, and excellent electromagnetic interference (EMI) behavior.Infineon TRENCHSTOP

The 600-V TRENCHSTOP Performance is an attractive alternative to the predecessor TRENCHSTOP IGBT from Infineon as well as to competing products. In a plug-and-play replacement the new TRENCHSTOP Performance IGBT yields reduced losses of 7% at switching frequency of 8 kHz. An unmatched 11% lower total loss is delivered for switching frequency of 15 kHz. Making use of the same packages, redesigns for higher efficiency and competitive cost can be realized easily, fast and with low efforts. The 600-V TRENCHSTOP Performance IGBT contributes to more energy-efficient power consumption, higher reliability, and longer operational lifetime of the application. For end consumers this means lower electricity bills, sustainability, and environmental protection.

The TRENCHSTOP Performance IGBT is available now.

Source: Infineon Technologies

New FPGA Board Based on the Xilinx UltraScale VU190 Device

BittWare recently released a new COTS PCIe board based on Xilinx’s 20-nm UltraScale VU190 FPGA. The XUSP3R is a 3/4-length PCIe board offers up to four Gen3 x8 PCIe interfaces, along with four front panel QSFP28 cages, supporting 16 lanes of 25 Gbps or 4 lanes of 100 Gbps, including 100 GbE. Four DIMM sockets support massive memory configurations including up to 256 GB of DDR4 memory across four 72-bit wide banks.

Alternatively, each DIMM socket can be populated with BittWare’s dual bank QDR DIMMs, each providing 576 Mb of QDR-II+. An optional Hybrid Memory Cube (HMC) module with up to 4 GB is also available that can be populated in addition to, and independent of, the DIMMs. Together, these features make the XUSP3R well suited for a variety of data center and networking applications, including compute acceleration, network processing, cybersecurity, and storage.

The board also offers features and tools for simplified development and integration. A comprehensive Board Management Controller (BMC) with host software support for advanced system monitoring simplifies platform management. A complete software tool suite and FPGA development/project examples are also available.

The XUSP3R’s features and specs:

  • High-performance Xilinx Virtex UltraScale 190/160/125
  • Up to four independent PCIe Gen3 x8 interfaces
  • Four QSFP28 cages for 4x 100GbE, 16x 25GbE, 4x 40GbE, or 16x 10GbE (or combinations thereof)
  • Four DIMM sites that support DDR4-2133 SDRAM, QDR-IV, and QDR-II+
  • Optional HMC Module (in addition to, and independent of, the DIMM sites)
  • Board Management Controller for Intelligent Platform Management
  • USB 2.0 for programming, debug, or control with optional integrated Platform Cable USB functionality
  • Timestamping and synchronization support
  • Complete software support with BittWare’s BittWorks II Toolkit
  • FPGA development kit for FPGA board support IP and integration

The XUSP3R board is in production and shipping now. Contact BittWare for more details and pricing.

Source: BittWare

Telit Announces IoT Innovation Conference

Telit announced that it will soon open registration for the 2016 Telit IoT Innovation Conference, which will take place on Tuesday, September 6, 2016 at Caesars Palace in Las Vegas. The one-day, multi-track conference will feature business use cases and provide you with tools for building your network and enabling connected devices.

As an attendee, you can study real IoT business use cases, network with IoT innovators, discover new technologies for IoT solution deployment, connect with partners, and learn more about Telit products and its IoT ecosystem.

Registration opens soon!

Source: Telit

embOS-MPU Brings Security to Embedded Systems

SEGGER recently launched the embOS-MPU, which is a new variant of its zero interrupt latency real-time operating system (RTOS) that is optimized for minimal memory utilization. Using the microcontroller’s memory protection unit (MPU) or memory management unit (MMU) capabilities, it can protect a system from the potential harm posed by errant threads.SEGGER HRES

With embOS-MPU, a particular task failure won’t impact the entire system. Using it, you can develop an unlimited number of privileged and unprivileged tasks. The latter receive a set of restricted rights (e.g., memory write access). When an unprivileged task attempts to violate predefined limits or causes a system error (e.g., stack overflow), the task is immediately terminated.

With the embOS-MPU can also install a callback function that is activated if an unprivileged task is terminated. This application-defined routine can take whatever action is necessary when this exceptional condition is triggered. It could log the problem and recover to restore full functionality, degrade system performance, or shut down the entire system in a failsafe manner.

Source: SEGGER Microcontroller

Minimum Mass Waveform Capture

I can capture repetitive waveforms at 1 Msps using a microcontroller’s on-chip PWM and comparator. The impetus for developing this technique came from my own need to capture repetitive waveforms using the least expensive and lowest part count means possible. I wanted to be able to view the waveforms on an LCD dedicated to the purpose or upload the waveform to a computer for manipulation on a spread­sheet. This waveform capture method adheres to the “minimum mass” product design concept: it doesn’t use anything that is not absolutely essential to obtaining the needed function.

Implementations can be cheap enough to allow capture and analysis in many applications that otherwise could not justify the cost. Such applications include calculating the RMS values or harmonic content of waveforms for power management and equipment maintenance, self-testing audio frequency circuits, the analysis of pulse response for self-tuning servos, signal signature analysis, and remote diagnostics and data gathering.

The approaches using on-chip A/D converters on AVR and PIC controllers reach sample rates of up to nearly 60 kHz. Exotic and pricey high-speed controllers top out around 100 kHz. Such a sampling rate is not really high enough for the sort of applications I had in mind: encoded data, radio control signals, A/D converter waveforms, checking the dynamic range of amplifiers and capturing audio frequency waveforms for filtering, and power calculations. I realized that the comparators in AVR and PIC devices have fast response times (several hundred nanoseconds) and that the pulse width modulation (PWM) circuit could be made fairly responsive. I just needed some way to quickly combine them to sample analog values.

Eventually it became apparent that repetitive sampling was the only way to get high enough voltage and temporal sampling resolution using only these on-chip components. Rather than trying to sample and digitize the waveform in real time as it comes in, this method finds out a little bit about the waveform using the relatively high-speed comparator every time the waveform is repeated; it builds a more detailed picture with each repetition by changing the relatively low-speed PWM voltage each time.

Subscribe to Circuit Cellar magazine! Get 12 months of electrical engineering project articles, embedded design tutorials, embedded programming tips, and much more. We cover micrcontrollers, robotics, embedded Linux, IoT projects, and more!

THE METHOD

To capture a waveform, the PWM D/A converter (PWM DAC) is set to its maximum output voltage. Then, using timing loops to generate regularly spaced sampling times (1 µs in Figure 1), the microcontroller looks at the output of the voltage comparator to determine if the incoming voltage is higher than the PWM voltage. At each sampling time, if the PWM voltage is at a higher voltage than that of the incoming waveform, the PWM value is stored in a RAM array location corresponding to that sampling time.

Figure 1—It’s all in the timing. Firmware timing loops set the interval between samples in a burst of waveform samplings that starts with a trigger signal. The green dots represent voltage levels of the sampled signal at the time of sampling.

Figure 1—It’s all in the timing. Firmware timing loops set the interval between samples in a burst of waveform samplings that starts with a trigger signal. The green dots represent voltage levels of the sampled signal at the time of sampling.

After all of the sample times have been tested against the PWM voltage, the PWM voltage is decremented. The process is then repeated until the PWM voltage has been reduced to its mini­mum value (0 V). Each scan of the sample time starts by a trigger signal that’s derived from, or in some way related to, the incoming waveform. The finer the voltage resolution, the longer it takes to capture the wave­form because the waveform has to be sampled more times. Note that the settling time for the PWM DAC needs to be longer for finer voltage resolution.

The total capture time (TCAP) equals: the number of voltage levels × (trigger latency + sample time + step settling time). Trigger latency is the average amount of time the controller waits for a trigger signal. The initial PWM settling time and the step settling time are the times for the PWM filter to charge to its initial value and settle after a 1-LSB step change, respectively. Capturing 100 samples at 1 Msps in a circuit optimized for 6-bit resolution (64 levels) takes approximately 69 ms; however, it takes about 1.3 s to measure the same waveform on a circuit optimized for 8-bit resolution.

When capturing waveforms with long periods, the total time needed to capture the waveform is dominated by the time it takes the waveform to make the requisite number of repetitions. For shorter periods, the total time is dominated by the settling times for the PWM. Thus, the higher the sampling rate, the more you can speed up the capture cycle by using a faster DAC. A resistor network connected to some port pins could suffice for low-resolution (6-bit) waveform capture. An integrated circuit DAC would be better for higher resolution applications.

The quality of the trigger signal is essential to the fidelity of the captured waveform. The trigger signal must consistently appear at the same time with respect to the captured signal, otherwise severe distortion will result. This means that a noisy trigger signal, such as one derived directly from a noisy input signal, would give poor results. You’ll get the best results with a digital trigger signal taken directly from the source of the signal if such a trigger source is available.

Unsynchronized signals (e.g., noise) are not represented accurately; instead, such signals are underrepresented in the captured waveform. This quality, which results from synchronous sampling, is sometimes a good thing because it can effectively pull a signal out of the noise, which is an important property in applications such as ultra wideband and spread-spectrum signal decoding. But, if you intend to measure noise or jitter, this quality makes the system inappropriate.

Another aspect of sampled data sys­tems is their susceptibility to aliasing. Aliasing is a phenomenon in which a signal appears to occur at a frequency other than that at which it actually occurs. For instance, when a 250-kHz square wave is viewed with a 1-µs sampling interval, it shows up properly as four samples per cycle; however, when it is captured at a 100-µs sampling interval, it appears as 16 samples per cycle, or a 625-Hz signal, which is one four-hundredth the actual frequency.

To prevent aliasing, insert an analog filter in the signal path before the comparator’s input. In the example I’ve been focusing on, the Atmel AT90S2313 samples the signal at 1 Msps. The on-chip comparator has a propagation delay of 500 to 700 ns, providing inherent filtering for components of signals above approximately 800 kHz, and thus restricting the range of frequencies above the sam­pling rate that can be aliased down to frequencies below the sampling rate. To reduce the aliasing of signal components that have a lower frequency than the sampling rate, you’d need an additional external analog filter.

Figure 2— You can work with a bare minimum of parts, because it doesn’t take much to capture repetitive waveforms at 1 Msps and upload them to a terminal program on a PC for display and analysis. The passive components connected to pins 13 and 15 of the microcontroller are in the same basic configuration used for successive approximation A/D conversion; only the firmware is different.

Figure 2—You can work with a bare minimum of parts, because it doesn’t take much to capture repetitive waveforms at 1 Msps and upload them to a terminal program on a PC for display and analysis. The passive components connected to pins 13 and 15 of the microcontroller are in the same basic configuration used for successive approximation A/D conversion; only the firmware is different.

AN IMPLEMENTATION

The simple implementation shown in Figure 2 needs only a microcontroller with a DAC and voltage comparator, and some way to get control signals into the chip and the data back out. The demonstration system, for which firmware is posted on the Circuit Cellar ftp site, assumes an Atmel AT90S2313­10 is connected to level-shifting invert­ers for the EIA-232 interface such as a Maxim MAX232 with its 1-µf capaci­tors, a 10-MHz crystal with load capacitors, a decoupling capacitor, and the PWM low-pass filter connected to pins 13 and 15 of the microcontroller (see Photo 1).

Photo 1—The only components added to the operating Atmel AT90S2313 circuit needed to allow for waveform sampling with less than 1-μs resolution at 1-V full scale are the capacitor and two resistors. Imagine how small the circuit will be using surface-mount components.

Photo 1—The only components added to the operating Atmel AT90S2313 circuit needed to allow for waveform sampling with less than 1-μs resolution at 1-V full scale are the capacitor and two resistors. Imagine how small the circuit will be using surface-mount components.

It can be controlled by and dump data to an ASCII terminal program such as HyperTerminal at capture rates from 1 µs per sample to 10 ms per sample at 6-, 7-, and 8-bit resolution with selectable trigger polarity. An example of a waveform captured with this system and plot­ted in a spreadsheet program is shown in Figure 3.

Figure 3—This is the capture of a 31.25-kHz sawtooth waveform. The sample rate is set to 1 μs per sample and the voltage resolution is 8 bits.

Figure 3—This is the capture of a 31.25-kHz sawtooth waveform. The sample rate is set to 1 μs per sample and the voltage resolution is 8 bits.

PWM LOW-PASS FILTER

The DAC uses pulse-width modula­tion, so it is necessary to have an averaging (low-pass) filter to recover the DC component while filtering out most of the PWM signal’s AC component. The AC component remaining on the filter’s output is referred to as ripple.

The filter is made up of 330- and 82-kΩ resistors and a 0.047-µF capaci­tor, which forms a single-pole RC fil­ter. The two resistors form a voltage divider to reduce the full-scale voltage from the DAC to 1-V full scale. If you are worried about accuracy, you can replace the 82-kΩ resistor with a fixed resistor and a variable resistor in series to allow for full-scale calibration.

If 5-V full scale is appropriate for your application, you can omit the lower resistor and save a part. The low-pass filter for the PWM output needs to be made with a large enough time constant to keep the ripple to an acceptable level. After the filter time constant is pinned down, the controller must wait long enough after each step change in output voltage for the filter to settle adequately before starting measurements.

The PWM filter can be analyzed as a single resistor driving the capacitor (see Figure 4). Judging from the AT90S2313 datasheet, when operating at 5 V, the output resistance of the PWM output is approximately 28 Ω; it is safe to say that it is negligible com­pared to the 330-kΩ resistor that’s in series with it. Thus, the filter model is plenty close by taking the value of the resistance to be the parallel combina­tion of the two resistors (see Figure 4).

Figure 4—The PWM filter is easily analyzed as a single resistor charging the capacitor by replacing the resistors with a single resistor equal to the parallel combination of the two, because that is what it looks like to the capacitor.

Figure 4—The PWM filter is easily analyzed as a single resistor charging the capacitor by replacing the resistors with a single resistor equal to the parallel combination of the two, because that is what it looks like to the capacitor.

The first step is to select the time constant that gives an acceptably low ripple. For my application, I considered speed to be more important than absolute accuracy, so I decided to keep the ripple at 1 LSB. The time constant should be figured for the worst possible PWM signal. The worst case for ripple is when the lowest frequency appears at the filter’s input. In the case of the AT90S2313, this occurs when the PWM output runs 50% duty cycle. Under this condition, the pulse frequency is about 19.6 kHz and the voltage across the capacitor is 0.5 V. When the pulse is high (this analysis is the same for the time the pulse is low, only the signs change), the difference between the PWM peak voltage (1 V) and the voltage across the capacitor is across the equivalent resistance, and the current through the resistance charges the capacitor.

Note that 1 LSB of an 8-bit value based on 1-V full scale is 4 mV (1/255). Using the formula in Figure 5, the time constant must be approximately 3.2 ms. I chose the resistors by first selecting the largest capacitor and a pair of large resistors that had the necessary 4:1 resistance ratio while simultaneously giving nearly the correct time constant. The resulting combination gives a divide ratio of 1:5.02 and a time con­stant of 3.15 ms (67 kΩ × 0.047 µF).

Figure 5—A simplified model can be used to predict the relationship between the filter’s time constant and the amount of ripple. The charging current for the capacitor comes from the voltage drop between the 1 V from the output of the resistive divider and the voltage across the capacitor. Note that EO is the voltage change across the capacitor (1 LSB = 4 mV), and EI is the average voltage across the resistance (0.5 V). T is the time that voltage is applied across the circuit (25.5 μs), and t is the time constant of the circuit.

Figure 5—A simplified model can be used to predict the relationship between the filter’s time constant and the amount of ripple. The charging current for the capacitor comes from the voltage drop between the 1 V from the output of the resistive divider and the voltage across the capacitor. Note that EO is the voltage change across the capacitor (1 LSB = 4 mV), and EI is the average voltage across the resistance (0.5 V). T is the time that voltage is applied across the circuit (25.5 μs), and t is the time constant of the circuit.

After the filter time constant is known, the settling times can be determined. I decided to have the con­troller wait for the initial settling of the filter to within 1 LSB of full scale before starting the waveform capture cycle using the formula in Figure 6. For the settling time between succes­sive steps, I wanted to wait until after the voltage changed more than 0.5 LSB. Because the step size is 1 LSB, I chose one time constant, or 3 ms.

Figure 6—The initial settling time must be long enough to assure that the PWM output settles to within 1 LSB of the final voltage. It must be calculated for the worst case scenario, which is when it starts from 0 V. Note that ΔV is the error in the settled voltage (1 LSB = 4 mV). EI is the voltage applied to the circuit, which is 1 V. In is the natural logarithm (base 2.71828…). T is the time that voltage is applied across the circuit, and t is the time constant of the circuit (3.17 ms).

Figure 6—The initial settling time must be long enough to assure that the PWM output settles to within 1 LSB of the final voltage. It must be calculated for the worst case scenario, which is when it starts from 0 V. Note that ΔV is the error in the settled voltage (1 LSB = 4 mV). EI is the voltage applied to the circuit, which is 1 V. In is the natural logarithm (base 2.71828…). T is the time that voltage is applied across the circuit, and t is the time constant of the circuit (3.17 ms).

FIRMWARE

When capturing a waveform, the PWM circuit first generates the maxi­mum output voltage and samples all time intervals starting from a trigger signal, taking care to keep the time between samples constant. Whenever the voltage at a sampled time exceeds the PWM voltage, the PWM value is stored in the RAM array location corresponding to that sample. In this way, at the end of the capture cycle, the peak value at each sampling time is stored in the RAM array.

The sampling loop in Listing 1 is the time-critical part of the code. It requires 10 clock cycles per sample. With a 10­-MHz clock, the sampling rate is 1 MHz. Two clock cycles are taken up by the indirect jump instruction (ijmp), which jumps either to the next instruction in sequence (at the label oneus:) or to a delay routine that returns to the next instruction in sequence. Eliminating the indirect jump instruction would decrease the sampling interval to eight cycles. Straight line coding would be inflexible and take a lot of program memory, but it could reduce the sam­pling interval to as few as three cycles when storing the waveform in RAM.

Listing 1—The sampling of the waveform takes place at the sbic ACSR,5 instruction, where the output of the comparator is tested. If the comparator’s output is low, execution proceeds to st Y+,pwmval, the instruction that stores the data into the RAM array via the Y pointer. If the comparator’s input is high, the program branches back to nextydelay, which imcrements the Y pointer without storing data.

Listing 1—The sampling of the waveform takes place at the sbic ACSR,5 instruction, where the output of the comparator is tested. If the comparator’s output is low, execution proceeds to st Y+,pwmval, the instruction that stores the data into the RAM array via the Y pointer. If the comparator’s input is high, the program branches back to nextydelay, which imcrements the Y pointer without storing data.

At the beginning of a waveform collection cycle, the program sits in a wait loop and waits for a transition on the trigger input. After the triggering edge is detected, the sampling routine is called and it runs through and collects a full set of samples. Then, the PWM value is decremented, a wait loop is executed to allow the RC filter in the PWM DAC to settle, and the program returns to wait for the next triggering event. This process continues until the lowest pos­sible PWM value has been tested.

Timing uncertainty is introduced by the short loop in which the controller waits for the triggering edge. The uncertainty translates into jitter in the signal sampling. As long as the uncer­tainty is small compared to the signal-sampling interval, it should not contribute much in the way of noise to the captured waveform. In applications that use only a few machine cycles between samples, it pays to keep the wait loops as short as possible.

BELOW GROUND SIGNALS

Judging from the offset-versus-input voltage curve on the AT90S2313’s datasheet, the comparator’s differen­tial gain is good enough for 6-bit waveform capture just above ground. For linearity errors of less than 1 LSB with 8-bit operation, the comparator inputs need to run closer to the mid­dle of the power supply where the curve is nearly flat.

There is a bonus to adding offset to the input signal in that it can measure input signals at and below ground without clipping. When the input signal is level-shifted, the PWM DAC’s output must be similarly offset. The PWM offset circuit provides an oppor­tunity for an adjustable vertical-cen­tering control (to use the oscilloscope term). Circuits that shift the input level and allow offset adjustment are shown in Figure 7.

Figure 7—The FET provides an offset allowing the input to swing above and below ground as well as moving the input to the AT90S2313’s on-chip comparator away from ground and enabling an offset adjustment. You can also achieve these functions with op-amps, but there are several trade-offs to consider.

Figure 7—The FET provides an offset allowing the input to swing above and below ground as well as moving the input to the AT90S2313’s on-chip comparator away from ground and enabling an offset adjustment. You can also achieve these functions with op-amps, but there are several trade-offs to consider.

Level shifting is achieved easily enough with an op-amp if you have a negative power supply, but my objec­tive was to make the entire system operate from a single 5-V regulator. Besides, my cheap single-supply op-amps, which also had adequate dynam­ic range, had too poor a slew rate to give satisfactory performance at 1 Msps.
A junction field effect transistor (JFET) source follower is an ideal way to offset the input signal to a more positive voltage without much attenu­ation or loss of bandwidth. I used an MPF102 in my own circuit because I had some on hand. Numerous other small signal JFETs would work well.

Pinch-off voltage is the FET parameter that most affects the offset because, for most FETs, this parameter varies widely. To obtain the approximate 2.5-V offset (the DC voltage on the FET source when the gate is grounded), you can hand select an FET, adjust the source resistor (15 kΩ in the circuit above), or try a combination of the two. The higher the value of the resistor, the higher the off­set voltage (i.e., up to nearly the pinch-off voltage of the FET, which is usually specified at a low current). Be aware that the source resistor affects the trade-off between the bandwidth and signal loss. As the resistor gets larger, the bandwidth will decrease; as the resistor gets smaller, the gain of the source follower drops. For my particular circuit layout and its parasitic capacitance, 15 kΩ was about the upper limit for 1 Msps.

One way to add an adjustable DC offset to the output of the PWM circuit without affecting the RC filter’s response time is to use an adjustable constant current source. The current source shown in Figure 7 relies on the fact that the 2N2907’s collector current is nearly equal to the emitter current. (The collector cur­rent equals the emitter current times Alpha, which is nearly unity and pretty stable.) Emitter current is determined by the voltage across the 8.2-kΩ emitter resistor, which follows the base voltage and is temperature-compensated by the diode in series with the potentiometer.

SIMPLE, ECONOMICAL, FLEXIBLE

Among the variations that may be useful are programmable offset and gain controls, and a calibration func­tion using only a few resistors and additional I/O pins. In multiple-chip systems, the time-dependent sampling task can be offloaded to a low-cost slave processor with little or no RAM that sends intermediate results to a host. The slave could be one of the cheapest eight-pin microcontrollers offered that has a suitable on-chip voltage comparator. The minimum mass waveform capture approach is a building block that produces a much faster sampling rate and costs less than conventional approaches using on-chip A/D converters.

I suspect that by now you have come up with some ideas of your own. It’s easy enough to put the sam­ple system together, so why not give it a try?

ABOUT THE AUTHOR

Dick Cappels enjoys tinkering with and writing about analog circuits and microcontrollers. He has published several papers relating to electronic displays in computer systems, and is currently active in the Society for Information Display. Dick holds 17 U.S. patents.

This article first appeared in Circuit Cellar 159.