DSP vs. RISC Processors (EE Tip #110)

There are a few fundamental differences between DSP and RISC processors. One difference has to do with arithmetic. In the analog domain, saturation, or clipping, isn’t recommended. But it generally comes with a design when, for example, an op-amp is driven high with an input signal. In the digital domain, saturation should be prevented because it causes distortion of the signal being analyzed. But some saturation is better than overflow or wrap-around. Generally speaking, a RISC processor will not saturate, but a DSP will. This is an important feature if you want to do signal processing.

Let’s take a look at an example. Consider a 16-bit processor working with unsigned numbers. The minimum value that can be represented is 0 (0×0000), and the maximum is 65535 (0xFFFF). Compute:

out = 2 × x

where x is an input value (or an intermediate value in a series of calculations). With a generic processor, you’re in trouble when x is greater than 32767.

If x = 33000 (0x80E8), the result is out = 66000 (0x101D0). Because this value can’t be represented with 16 bits, the out = 2 × x processor will truncate the value:

out = 2 × 333000 = 464(0x01D0)

From that point on, all the calculations will be off. On the other end, a DSP (or an arithmetic unit with saturation) will saturate the value to its maximum (or minimum) capability:

out = 2 × 333000 = 65535(0xFFFF)

In the first case, looking at out, it would be wrong to assume that x is a small value. With saturation, the out is still incorrect, although it accurately shows that the input is a large number. Trends in the signal can be tracked with saturation. If the saturation isn’t severe (affecting only a few samples), the signal might be demodulated correctly.

Generic RISC processors like the NXP (Philips) LPC2138 don’t have a saturation function, so it’s important to ensure that the input values or the size of the variable are scaled correctly to prevent overflow. This problem can be avoided with a thorough simulation process.—Circuit Cellar 190, Bernard Debbasch, “ARM-Based Modern Answering Machine,” 2006.

This piece originally appeared in Circuit Cellar 190, 2006. 

Q&A: Jeremy Blum, Electrical Engineer, Entrepreneur, Author

Jeremy Blum

Jeremy Blum

Jeremy Blum, 23, has always been a self-proclaimed tinkerer. From Legos to 3-D printers, he has enjoyed learning about engineering both in and out of the classroom. A recent Cornell University College of Engineering graduate, Jeremy has written a book, started his own company, and traveled far to teach children about engineering and sustainable design. Jeremy, who lives in San Francisco, CA, is now working on Google’s Project Glass.—Nan Price, Associate Editor

NAN: When did you start working with electronics?

JEREMY: I’ve been tinkering, in some form or another, ever since I figured out how to use my opposable thumbs. Admittedly, it wasn’t electronics from the offset. As with most engineers, I started with Legos. I quickly progressed to woodworking and I constructed several pieces of furniture over the course of a few years. It was only around the start of my high school career that I realized the extent to which I could express my creativity with electronics and software. I thrust myself into the (expensive) hobby of computer building and even built an online community around it. I financed my hobby through my two companies, which offered computer repair services and video production services. After working exclusively with computer hardware for a few years, I began to dive deeper into analog circuits, robotics, microcontrollers, and more.

NAN: Tell us about some of your early, pre-college projects.

JEREMY: My most complex early project was the novel prosthetic hand I developed in high school. The project was a finalist in the prestigious Intel Science Talent Search. I also did a variety of robotics and custom-computer builds. The summer before starting college, my friends and I built a robot capable of playing “Guitar Hero” with nearly 100% accuracy. That was my first foray into circuit board design and parallel programming. My most ridiculous computer project was a mineral oil-cooled computer. We submerged an entire computer in a fish tank filled with mineral oil (it was actually a lot of baby oil, but they are basically the same thing).

DeepNote Guitar Hero Robot

DeepNote Guitar Hero Robot

Mineral Oil-Cooled Computer

Mineral Oil-Cooled Computer

NAN: You’re a recent Cornell University College of Engineering graduate. While you were there, you co-founded Cornell’s PopShop. Tell us about the workspace. Can you describe some PopShop projects?

Cornell University's PopShop

Cornell University’s PopShop

JEREMY: I recently received my Master’s degree in Electrical and Computer Engineering from Cornell University, where I previously received my BS in the same field. During my time at Cornell, my peers and I took it upon ourselves to completely retool the entrepreneurial climate at Cornell. The PopShop, a co-working space that we formed a few steps off Cornell’s main campus, was our primary means of doing this. We wanted to create a collaborative space where students could come to explore their own ideas, learn what other entrepreneurial students were working on, and get involved themselves.

The PopShop is open to all Cornell students. I frequently hosted events there designed to get more students inspired about pursuing their own ideas. Common occurrences included peer office hours, hack-a-thons, speed networking sessions, 3-D printing workshops, and guest talks from seasoned venture capitalists.

Student startups that work (or have worked) out of the PopShop co-working space include clothing companies, financing companies, hardware startups, and more. Some specific companies include Rosie, SPLAT, LibeTech (mine), SUNN (also mine), Bora Wear, Yorango, Party Headphones, and CoVenture.

NAN: Give us a little background information about Cornell University Sustainable Design (CUSD). Why did you start the group? What types of CUSD projects were you involved with?

CUSD11JEREMY: When I first arrived at Cornell my freshman year, I knew right away that I wanted to join a research lab, and that I wanted to join a project team (knowing that I learn best in hands-on environments instead of in the classroom). I joined the Cornell Solar Decathlon Team, a very large group of mostly engineers and architects who were building a solar-powered home to enter in the biannual solar decathlon competition orchestrated by the Department of Energy.

By the end of my freshman year, I was the youngest team leader in the organization.  After competing in the 2009 decathlon, I took over as chief director of the team and worked with my peers to re-form the organization into Cornell University Sustainable Design (CUSD), with the goal of building a more interdisciplinary team, with far-reaching impacts.

CUSD3

Under my leadership, CUSD built a passive schoolhouse in South Africa (which has received numerous international awards), constructed a sustainable community in Nicaragua, has been the only student group tasked with consulting on sustainable design constraints for Cornell’s new Tech Campus in New York City, partnered with nonprofits to build affordable homes in upstate New York, has taught workshops in museums and school, contributed to the design of new sustainable buildings on Cornell’s Ithaca campus, and led a cross-country bus tour to teach engineering and sustainability concepts at K–12 schools across America. The group is now comprised of students from more than 25 different majors with dozens of advisors and several simultaneous projects. The new team leaders are making it better every day. My current startup, SUNN, spun out of an EPA grant that CUSD won.

CUSD7NAN: You spent two years working at MakerBot Industries, where you designed electronics for a 3-D printer and a 3-D scanner. Any highlights from working on those projects?

JEREMY: I had a tremendous opportunity to learn and grow while at MakerBot. When I joined, I was one of about two dozen total employees. Though I switched back and forth between consulting and full-time/part-time roles while class was in session, by the time I stopped working with MakerBot (in January 2013), the company had grown to more than 200 people. It was very exciting to be a part of that.

I designed all of the electronics for the original MakerBot Replicator. This constituted a complete redesign from the previous electronics that had been used on the second generation MakerBot 3-D printer. The knowledge I gained from doing this (e.g., PCB design, part sourcing, DFM, etc.) drastically outweighed much of what I had learned in school up to that point. I can’t say much about the 3-D scanner (the MakerBot Digitizer), as it has been announced, but not released (yet).

The last project I worked on before leaving MakerBot was designing the first working prototype of the Digitizer electronics and firmware. These components comprised the demo that was unveiled at SXSW this past April. This was a great opportunity to apply lessons learned from working on the Replicator electronics and find ways in which my personal design process and testing techniques could be improved. I frequently use my MakerBot printers to produce custom mechanical enclosures that complement the open-source electronics projects I’ve released.

NAN: Tell us about your company, Blum Idea Labs. What types of projects are you working on?

JEREMY: Blum Idea Labs is the entity I use to brand all my content and consulting services. I primarily use it as an outlet to facilitate working with educational organizations. For example, the St. Louis Hacker Scouts, the African TAHMO Sensor Workshop, and several other international organizations use a “Blum Idea Labs Arduino curriculum.” Most of my open-source projects, including my tutorials, are licensed via Blum Idea Labs. You can find all of them on my blog (www.jeremyblum.com/blog). I occasionally offer private design consulting through Blum Idea Labs, though I obviously can’t discuss work I do for clients.

NAN: Tell us about the blog you write for element14.

JEREMY: I generally use my personal blog to write about projects that I’ve personally been working on.  However, when I want to talk about more general engineering topics (e.g., sustainability, engineering education, etc.), I post them on my element14 blog. I have a great working relationship with element14. It has sponsored the production of all my Arduino Tutorials and also provided complete parts kits for my book. We cross-promote each-other’s content in a mutually beneficial fashion that also ensures that the community gets better access to useful engineering content.

NAN: You recently wrote Exploring Arduino: Tools and Techniques for Engineering Wizardry. Do you consider this book introductory or is it written for the more experienced engineer?

JEREMY: As with all the video and written content that I produce on my website and on YouTube, I tried really hard to make this book useful and accessible to both engineering veterans and newbies. The book builds on itself and provides tons of optional excerpts that dive into greater technical detail for those who truly want to grasp the physics and programming concepts behind what I teach in the book. I’ve already had readers ranging from teenagers to senior citizens comment on the applicability of the book to their varying degrees of expertise. The Amazon reviews tell a similar story. I supplemented the book with a lot of free digital content including videos, part descriptions, and open-source code on the book website.

NAN: What can readers expect to learn from the book?

JEREMY: I wrote the book to serve as an engineering introduction and as an idea toolbox for those wanting to dive into concepts in electrical engineering, computer science, and human-computer interaction design. Though Exploring Arduino uses the Arduino as a platform to experiment with these concepts, readers can expect to come away from the book with new skills that can be applied to a variety of platforms, projects, and ideas. This is not a recipe book. The projects readers will undertake throughout the book are designed to teach important concepts in addition to traditional programming syntax and engineering theories.

NAN: I see you’ve spent some time introducing engineering concepts to children and teaching them about sustainable engineering and renewable energy. Tell us about those experiences. Any highlights?

JEREMY: The way I see it, there are two ways in which engineers can make the world a better place: they can design new products and technologies that solve global problems or they can teach others the skills they need to assist in the development of solutions to global problems. I try hard to do both, though the latter enables me to have a greater impact, because I am able to multiply my impact by the number of students I teach. I’ve taught workshops, written curriculums, produced videos, written books, and corresponded directly with thousands of students all around the world with the goal of transferring sufficient knowledge for these students to go out and make a difference.

Here are some highlights from my teaching work:

bluestamp

I taught BlueStamp Engineering, a summer program for high school students in NYC in the summer of 2012. I also guest-lectured at the program in 2011 and 2013.

I co-organized a cross-country bus tour where we taught sustainability concepts to school children across the country.

indiaI was invited to speak at Techkriti 2013 in Kanpur, India. I had the opportunity to meet many students from IIT Kanpur who already followed my videos and used my tutorials to build their own projects.

Blum Idea Labs partnered with the St. Louis Hacker Scouts to construct a curriculum for teaching electronics to the students. Though I wasn’t there in person, I did welcome them all to the program with a personalized video.

brooklyn_childrens_zoneThrough CUSD, I organized multiple visits to the Brooklyn Children’s Zone, where my team and I taught students about sustainable architecture and engineering.

Again with CUSD, we visited the Intrepid museum to teach sustainable energy concepts using potato batteries.

intrepid

NAN: Speaking of promoting engineering to children, what types of technologies do you think will be important in the near future?

JEREMY: I think technologies that make invention more widely accessible are going to be extremely important in the coming years. Cheaper tools, prototyping platforms such as the Arduino and the Raspberry Pi, 3-D printers, laser cutters, and open developer platforms (e.g., Android) are making it easier than ever for any person to become an inventor or an engineer.  Every year, I see younger and younger students learning to use these technologies, which makes me very optimistic about the things we’ll be able to do as a society.

CC280: Analog Communications and Calibration

Are you an analog aficionado? You’re in luck. Two articles, in particular, focus on the November issue’s analog techniques theme. (Look for the issue shortly after mid-October, when it will be available on our website.)

Block Diagram

Data from the base adapter is sent by level shifting the RS-232 or CMOS serial data between 9 and 12 V. A voltage comparator at the remote adapter slices the signal to generate a 0-to-5-V logic signal. The voltage on the signal wire never goes low enough for the 5-V regulator to go out of regulation.

These adapters use a combination of tricks. A single pair of wires carries full-duplex serial data and a small amount of power to a remote device for tasks (e.g., continuous remote data collection and control). The digital signals can be simple on/off signals or more complex signals (e.g., RS-232).

These adapters use a combination of tricks. A single pair of wires carries full-duplex serial data and a small amount of power to a remote device for tasks (e.g., continuous remote data collection and control). The digital signals can be simple on/off signals or more complex signals (e.g., RS-232).

Dick Cappels, a consultant who tinkers with analog and mixed-signal projects, presents a design using a pair of cable adapters and simple analog circuits to enable full-duplex, bidirectional communications and power over more than 100 m of paired wires. Why bother when Power Over Ethernet  (PoE), Bluetooth, and Wi-Fi approaches are available?

“In some applications, using Ethernet is a disadvantage because of the higher costs and greater interface complexity,” Cappels says. “You can use a microcontroller that costs less than a dollar and a few analog parts described in this article to perform remote data gathering and control.”

The base unit including the 5-to-15-V power supply is simple for its functionality. The two eight-pin DIP ICs are a voltage comparator and the switching regulator.

The base unit including the 5-to-15-V power supply is simple for its functionality. The two eight-pin DIP ICs are a voltage comparator and the switching regulator.

Cappels’s need for data channels to monitor his inground water tank inspired his design. Because his local municipality did not always keep the tank filled, he needed to know when it was dry so his pumps wouldn’t run without water and possibly become damaged.
“Besides the mundane application of monitoring a water tank, the system would be excellent for other communication uses,” Cappels says, including computer connection to a home weather station and intrusion-detection systems. Bit rates up to 250 kHz also enable the system to be used in two-way voice communication such as intercoms, he says.

Retired engineer David Cass Tyler became interested in writing his series about calibration while working on a consulting project. “I came to realize that some people don’t really know how to approach the issue of taking an analog-to-digital value to actual engineering units, nor how to correct calibration factors after the fact,” Tyler says

In Part 1 of his article series, Tyler notes: “Digital inputs and digital outputs are pretty simple. They are either on or off. However, for ADCs and DACs to be accurate, they must first be calibrated. This article addresses linear ADCs and DACs.” Part 2, appearing in the December issue, will discuss using polynomial curve fitting to convert nonlinear data to real-world engineering values.

In addition to its analog-themed articles, the November issue includes topics ranging from a DIY solar array tracker’s software to power-capped computer systems.

Editor’s Note: Learn more about Circuit Cellar contributors Dick Cappels and David Cass Tyler by reading their posts about their workspaces and favorite DIY tools.

New Products: May 2013

iC-Haus

iC-Haus iC-TW8

The iC-TW8 is a high-resolution signal processor designed to evaluate sine/cosine sensors. Its automatic functions help minimize angular errors and jitters. The processor can be used for initial, push-button calibration and to permanently adapt signal-path parameters during operation. The angular position is calculated at a programmable resolution of up to 65,536 increments per input cycle and output as an indexed incremental signal. A 32-bit word, which includes the counted cycles, is available through the SPI.

As an application-specific DSP, the iC-TW8 has two ADCs that simultaneously sample at a 250-ksps rate, fast CORDIC algorithms, special signal filters, and an analog front end with differential programmable gate amplifier (PGA) inputs that accepts typical magnetic sensor signals from 20 mVPP and up. Signal frequencies of up to 125 kHz enable high rotary and linear speeds for position measuring devices and are processed at a 24-µs constant latency period.

The device’s 12-bit measurement accuracy works with one button press. Measuring tools are not required. The iC-TW8 independently acquires information about the signal corrections needed for offset, amplitude, and phase errors and stores them in an external EEPROM.

The iC-TW8 has two configuration modes. Preset functions and interpolation factors can be retrieved through pins and the device can be calibrated with a button push. No programming is required for initial operation.

The device’s functions—including an AB output divider for fractional interpolation, an advanced signal filter to reduce jitter, a table to compensate for signal distortion, and configurable monitors for errors and signal quality—can be accessed when the serial interfaces are used. Typical applications include magnetic linear displacement measuring systems, optical linear scales, programmable magnetic/optical incremental encoders, high-resolution absolute/incremental angle sensors with on-axis, Hall scanning, and the general evaluation of sine/cosine signals (e.g., PC measuring cards for 1 VPP and 11 µAPP).

The iC-TW8 operates on a 3.1-to-5.5-V single-ended supply within a –40°C-to-125°C extended operating temperature range. It comes in a 48-pin QFN package that requires 7 mm × 7 mm of board space. A ready-to-operate demo board is  available for evaluation. An optional PC operating program, in other words, a GUI, can be connected with a USB adapter.

The iC-TW8 costs $7.69 in 1,000-unit quantities.

iC-Haus GmbH

www.ichaus.com


ULTRASOUND RECEIVERS

Analog Devices AD9675

The AD9675 and the AD9674 are the latest additions to Analog Devices’s octal ultrasound receiver portfolio. The devices and are pin compatible with the AD9670/AD9671.

The AD9675 is an eight-channel ultrasound analog front end (AFE) with an on-chip radio frequency (RF) decimator and Analog Devices’s JESD204B serial interface. It is designed for mid- to high-end portable and cart-based medical and industrial ultrasound systems. The device integrates eight channels of a low-noise amplifier, a variable-gain amplifier, an anti-aliasing filter, and a 14-bit ADC with a 125-MSPS sample rate and a 75-dB signal-to-noise ratio (SNR) performance for enhanced ultrasound image quality. The on-chip RF decimator enables the ADC to be oversampled, providing increased SNR for improved image quality while maintaining lower data I/O rates. The 5-Gbps JESD204B serial interface reduces ultrasound system I/O data routing.

The AD9674 offers similar functionality, but includes a standard low-voltage differential signaling (LVDS) interface. Both devices are available in a 144-ball, 10-mm × 10-mm ball grid array (BGA) package.

The AD9674 and the AD9675 cost $62 and $68, respectively.

Analog Devices, Inc.

www.analog.com


LOW-VOLTAGE DIGITAL OUTPUT HALL-EFFECT SENSORS

Melexis MLX92212

Melexis MLX92212

MLX92212 digital output Hall-effect sensors are AEC-Q100-qualified devices that deliver robust, automotive-level performance. The MLX92212LSE-AAA low-hysteresis bipolar latch and the MLX92212LSE-ABA high-hysteresis unipolar switch are optimized for 2.5-to-5.5-V operation. They pair well with many low-power microcontrollers in embedded systems. The sensor and specified microcontroller can share the same power rail. The sensors’ open-drain outputs enable simple connectivity with CMOS/TTL. They exhibit minimal magnetic switch point drift over temperature (up to 150°C) or lifetime and can withstand 8 kV electrostatic discharge.

The MLX92212LSE-AAA is designed for use with multipole ring magnets or alternating magnetic fields. It is well suited for brushless DC electric motor commutation, speed sensing, and magnetic encoder applications. Typical automotive uses include anti-trap/anti-pinch window lift controls, automatic door/hatch systems, and automatic power seat positioning. The MLX92212LSE-ABA enables the use of generic/weak magnets or larger air gaps. It can be used in simple magnetic proximity sensing and interlocks in covers/hatches or ferrous-vane interrupt sensors for precise position and timing applications.

Both MLX92212 devices utilize chopper-stabilized amplifiers with switched capacitors. The CMOS technology makes this technique possible and contributes to the sensors’ low current consumption and small chip size.

The MLX92212 sensors cost $0.35 each in 5,000-unit quantities and $0.30 in 10,000-unit quantities.

Melexis Microelectronic Integrated Systems

www.melexis.com


POWERFUL SPI ADAPTERS

Byte SPI Storm

Byte SPI Storm

The SPI Storm 50 and the SPI Storm 10 are the latest versions of Byte Paradigm’s SPI Storm serial protocol host adapter. The adapters support serial peripheral interface (SPI), Quad-SPI, and custom serial protocols in the same USB device.

The SPI Storm 50 and the SPI Storm 10 support serial protocols and master up to 50 and 10 MHz, respectively. The SPI Storm 10 features an 8-MB memory, while the higher-end devices are equipped with a 32-MB memory.

The SPI Storm adapters enable system engineers to access, communicate, and program their digital board and digital ICs, such as field-programmable gate array (FPGA), flash memories, application-specific integrated circuit (ASIC), and

system-on-a-chip (SoC). The SPI Storm 10 is well suited for engineering schools and universities because it is a flexible, all-around access device for hands-on digital electronics. The 50- and 100-MHz versions can be used in mid- and high-end testing and debugging for telecommunications, medical electronics, and digital imaging industries.

The SPI Storm 50 and the SPI Storm 10 cost $530 and $400, respectively.

Byte Paradigm

www.byteparadigm.com


ANALOG-BASED POWER MANAGEMENT CONTROLLER WITH INTEGRATED MCU

Microchip MCP19111

Microchip MCP19111

The MCP19111 digitally enhanced power analog controller is a new hybrid, digital and analog power-management device. In combination with the expanded MCP87xxx family of low-figure-of-merit (FOM) MOSFETs, it supports configurable, high-efficiency DC/DC power-conversion designs for many consumer and industrial applications.

The MCP19111 controller, which operates at 4.5 to 32 V, integrates an analog-based PWM controller with a fully functional flash-based microcontroller. This integration offers the flexibility of a digital solution with the speed, performance, and resolution of an analog-based controller.

The MCP19111 devices have integrated MOSFET drivers configured for synchronous, step-down applications. The MCP87018, MCP87030, MCP87090, and MCP87130 are 25-V-rated, 1.8-, 3-, 9-, and 13-mΩ logic-level MOSFETs that are specifically optimized for switched-mode-power-supply (SMPS) applications.

The MCP19111 evaluation board includes Microchip’s high-speed MOSFETs. This evaluation board includes standard firmware, which is user-configurable through an MPLAB X IDE graphical user interface (GUI) plug-in. The combined evaluation board, GUI, and firmware enable power-supply designers to configure and evaluate the MCP19111’s performance for their target applications.

The MCP19111 controllers cost $2.81 each and the MCP87018/030/090/130 MOSFETs cost $0.28 each, all in 5,000-unit quantities.

Microchip Technology, Inc.

www.microchip.com


ELASTOMER SOCKET FOR HIGH-SPEED QFP ICs

Ironwood SG-QFE-7011

Ironwood SG-QFE-7011

The SG-QFE-7011 is a high-performance QFP socket for 0.4-mm pitch, 128-pin QFPs. The socket is designed for a

1.6-mm × 14-mm × 14-mm package size with a 16-mm × 16-mm lead tip to tip. It operates at bandwidths up to 10 GHz with less than 1 dB of insertion loss and has a typical 20 mΩ per I/O contact resistance. The socket connects all pins with 10-GHz bandwidth on all connections. The small-footprint socket is mounted with supplied hardware on the target PCB. No soldering is required. The small footprint enables inductors, resistors, and decoupling capacitors to be placed close to the device for impedance tuning.

The SG-QFE-7011’s swivel lid has a compression screw that enables ICs to be quickly changed out. The socket features a floating compression plate to force down the QFP leads on to elastomer. A hard-stop feature is built into the compression mechanism.

The sockets are constructed with high-performance, low-inductance gold-plated embedded wire on elastomer as interconnect material between a device and a PCB. They feature a –35°C-to-100°C temperature range, a 0.15-nH pin self inductance, a 0.025-nH mutual inductance, a 0.01-pF capacitance to ground, and a 2-A per pin current capacity.

The SG-QFE-7011 costs $474.

Ironwood Electronics

www.ironwoodelectronics.com

Retro Electronics (“Retronics”): Analog, Test, & Micrcontroller Tech

Pop quiz: What was the first microcontroller to leave the Earth? Find out the answer in Jan Buiting’s new “Retronics” webinar. Check out the video below.

The Tektronix 546B

If you read Circuit Cellar and Elektor magazines, you likely have as much passion for old-school electronics as you do for he new, cutting-edge technology you find at events such as the Embedded Systems Conference. Elektor editor Jan Buiting is well-known for his love of both new and old technology, and in his Retronics webinar series he presents some of his favorite old-school technologies.

In the video below, Jan explains how and where he found some of his retronics equipment. He also details how he fixed some of the systems and what he does with them. Examples include:

  • A Heathkit TC-2P Tube Checker that Jan found at lawn sale
  • Old audio equipment
  • A satellite TV receiver
  • An “Elektorscope” from 1977
  • 1980s-era test equipment
  • And more!

CircuitCellar.com is an Elektor International Media publication.