Wi-Fi-Connected Home Energy Monitor

The Kunzig brothers of Pennsylvania use the word “retired” loosely.

Donald and Robert are both retired—each from long careers in the telecommunications industry. And after retirement, each took on a new job (Donald developing software to track and manage clinical trials managed by BioClinica, Inc., and Robert at a large data center).

So while other semi-retirees might prefer relaxing in poolside chairs or on the couch, what do these two do? They eagerly take on some technologies they haven’t worked with before and build a Wi-Fi-connected device to monitor a home’s power usage. And after two years of trial, error, and, finally, success, they develop an e-commerce website to sell it.

“Robert’s son, Jay, a design engineer working in San Jose, CA, suggested the project,” the two brothers say in article they wrote for the May 2013 edition of Circuit Cellar. “The main purpose was to design a Wi-Fi-connected monitor that would be able to measure usage from both a utility and an alternate source of power such as solar or wind.”

Their article describes how they designed a usable device that offers programmability and function. They used a Microchip MRF24WB0MB 802.11 transceiver for Wi-Fi access and a Microchip Technology PIC24FJ256GB108 microprocessor in their design. They eventually wrote the article about the ups and downs of the process (which included five prototypes) because they felt elements of their work would help readers developing their own embedded electronics devices.

“All this effort has been rewarding, perhaps not financially (yet), but certainly intellectually,” the brothers say. “After almost two years of effort, we have produced a product with an excellent hardware design, coupled with software that is better than average. The platform can be used for just about any implementation.”

“We wanted to produce an energy monitor that was fully wireless, very accurate, extremely easy to use, and based on hardware and software that is very stable. We think we were successful on all counts.”

Check out the May issue of Circuit Cellar for their article. And for more information, visit their e-commerce website at www.wattsmyusage.com.

G-Code CNC Router Controller

Brian Millier constructed a microcontroller-based, G-code controller for a CNC router. So, we gave the retired instrumentation engineer space to publish a two-part series about his project.

In Part 1 (Millier-CC-2013-04-Issue 273), Millier explains the basics of G-code and how it is converted into three-axis motion, via the router’s three stepper motors. In Part 2, he describes his design of the router’s axis controller (powered by three small microcontrollers) and the host controller (powered by a more powerful microcontroller).

He calls the project one of the most challenging he has ever tackled.

So why bother? Especially when the combination of a PC and ArtSoft’s Mach3 software is a common and affordable approach to running a CNC router? Well, like most DIYers, Millier couldn’t resist an opportunity to learn.

“I want to be upfront and say that this is probably not the most practical project I have ever done,” Millier says in Part 1. “You can usually pick up a used PC for free, and the Mach3 software is professional-grade and handles much more complex G-code programs than my DIY controller will. However, it did provide me with a challenging programming task, and I learned a lot about designing a program with many concurrent tasks, all of which are quite time critical. Even if you are not interested in building such a controller, you may find interesting some of the techniques and tricks I used to provide the multi-axis stepper-motor motion.”

Millier’s two articles focus on the two main tasks of his project.

“The first was to understand the G-code language used to program CNC machines well enough to be able to write the firmware that would parse the G-code commands into something that a microcontroller could use to control the stepper motors used for each of the three axes,” he says. “The second task was to design the hardware/firmware that would actually control the three stepper motors, all of which had to move synchronously at accurate, ramped speeds.”

Millier wraps up his project by saying: “This was probably the most challenging project I’ve tackled, outside of work projects, in many years. In particular, the Basic program code for both of the controllers ran beyond 3,500 lines.”

You can Millier-CC-2013-04-Issue 273. The second article is available via Circuit Cellar’s webshop.

CC274: A Sensory Experience

The May issue of Circuit Cellar provides a number of articles focusing on how to utilize measurements and sensors in your designs.

Knowing how to generate a magnetic field to calibrate a sensor can help with a number of

Winding 25 turns of 26 AWG enamel wire on a toroid is normally difficult, but that slit made it very easy. You would wind much smaller wire on a toroid used as an inductor.

DIY projects. Most electronic devices use inductors or transformers that depend on magnetic fields. In the May issue, Ed Nisley describes how he used a small ferrite toroid to produce a known magnetic field, which he utilized to calibrate some cheap Hall-effect sensors he obtained on eBay (p. 52).

“While the results certainly don’t transform cheap sensors into laboratory instruments, you can use them for tech jewelry with a clear conscience,” Nisley says. “You’ll also have a better understanding of magnetic fields, which may come in handy when you’re building inductors.”

Whether you’re designing a small controller for your own use or an electronic device for mass production, it’s important to keep “testability” in mind. So, it’s a good idea to make a dedicated tester for your product part of the design process at the outset. Such a tester can ensure your device is working properly in your workshop—before it ships to a customer. On page 56, George Novacek describes how an inexpensive tester can bolster an electronic device’s reliability and increase its marketability.

Brothers Robert and Donald Kunzig, both with backgrounds in the telecommunications industry, stepped outside the technologies most familiar to them when they took on an ambitious project—to produce an accurate and easy to use wireless, energy-usage monitor. They also wanted the monitor to hold its collected data even during a power outage or a router issue. Did they succeed? Check out their article on page 18 to find out.

The DNA sequencer’s design includes a motor controller, a light sensor amplifier, and an injector driver circuit.

While DNA, the molecule that provides genetic instruction to all living organisms, is complex, building a DNA sequencer can be relatively simple. Fergus Dixon used a light sensor amplifier,  a motor controller, and an injector driver circuit to fulfill a customer’s request for a DNA sequencer with a color screen and full connectivity via Ethernet or Bluetooth (p. 26)

If you’re a DIYer who is nervous about possible levels of radiation in your home, find out how to build a hand-held radiation sensor on page 60.

Also, Jesús Calviño-Fraga describes how he built a serial port-to-SPI bridge programmer, the “S2S Dongle,” which functions without a pre-programmed microntroller (p. 34).

Finally, this issue includes articles that wrap up intriguing projects Circuit Cellar introduced in April.

Last month, Jeff Bachiochi explored the musical instrument digital interface (MIDI). In Part

An Atmel ATmega88 microcontroller is at the heart of the CNC router controller.

2, he focuses on a hardware circuit that can monitor the MIDI messages sent between his project’s MIDI devices, which include a Harmonix drum kit used with the Xbox version of the Rock Band video game (p. 68).

Brian Millier calls his construction of a microcontroller-based, G-code controller for a CNC router one of his most challenging DIY projects. The second article in his series focuses on two functional blocks: the axis controller and the host controller (p. 42.)

New Products: April 2013

Pico Technology PicoScope 3207A

USB 3.0 Oscilloscopes

The PicoScope 3207A is a two-channel USB oscilloscope with a 250-MHz bandwidth, a 1-GSPS sampling rate, a 256-ms buffer memory, and a built-in function generator. Its basic time base accuracy is ±2 ppm. The 3207A’s additional features include digital triggering for accurate, stable waveform display and equivalent-time sampling, which boosts the effective sampling rate to 10 GSPS for repetitive signals.

The PicoScope 3207B oscilloscope has a 512-ms buffer memory and includes an additional 32,000-sample arbitrary waveform generator with a 100-msps update rate. Since the oscilloscope is powered from the USB port, an external power adaptor is unnecessary.

The oscilloscopes come with the PicoScope software for Windows, which includes automatic measurements, serial decoding of RS-232/UART, SPI, I2C, CAN, local interconnect network (LIN) and FlexRay data, and mask limit testing. Software updates are free of charge. A free software development kit (SDK) that includes sample code in many languages and enables you to write your own data-acquisition programs, is also available.

The PicoScope 3207A and 3207B USB 3.0 oscilloscopes cost $1,813 and $1,978, respectively, including a set of two probes.

Pico Technology


XP Power JCA10 DC-to-DC Converter

Ultra-Compact DC-to-DC Converter Family

The JCA10 series of single- and dual-output 10-W metal cased DC-to-DC converters is well suited for a variety of application environments. The converters operate from –40°C to 100°C and do not derate until 70°C. No additional heatsinking or forced air cooling is required.

The small-footprint converters are packaged in an ultra-compact 0.4” × 0.8” × 1” (10 mm × 20.3 × 25.4 mm) format. Since the converters occupy less PCB space than conventional designs, you can easily reduce the size of new developments or utilize the board space for additional features. The industry-standard DIP-24 pinout makes the converter an ideal drop-in replacement for existing designs.

Accommodating a 2:1 input range, the JCA10 series offers a choice of four nominal input voltages (5, 12, 24, and 48 VDC). Its inputs are 4.5–9, 9–18, 18–36, or 36–75 VDC with standard under-voltage lockout. For each input voltage, the single-output models offer 3.3-, 5-, 12-, or 15-VDC outputs. The dual-output versions provide ±5, ±12, or ±15 VDC. Outputs are fully regulated, varying no more than ±0.3% over all input conditions, and less than ±1% across all load conditions. The JCA10 converter series offers basic 1,500-VDC input-to-output isolation and 500-VDC case-to-input or output.

The JCA10 single-output models cost $26.52 in 500-unit quantities. The dual-output models cost $28.89.

XP Power, Ltd.



Wide-Temperature System on Module

The SoM-9X25 is a system on module (SoM) based on Atmel’s AT91SAM9X25 processor. A SoM is a small embedded module containing a microprocessor system’s core.

This wide temperature, fanless ARM9 400-MHz SoM includes an Ethernet PHY along with six serial ports with auto RS-485. It utilizes up to 1 GB of NAND flash, up to 8 MB of serial data flash, and up to 128 MB of DDR2 RAM.

The SoM-9X25 uses the same small 144-pin SODIMM form-factor (1.5” × 2.66”) as other EMAC SoMs. The board includes the entire ARM processor core (i.e., flash, memory, serial ports, Ethernet, SPI, I2C, I2S audio, CAN 2.0B SDIO, PWMs, timer/counters, digital I/O lines, video, clock/calendar, etc.)

The SoM-9X25 plugs into a carrier board containing all the connectors and any custom I/O an application requires. This approach enables you or EMAC to design a custom carrier board that meets your I/O, dimensional, and connector requirements without worrying about the processor, memory, and standard I/O functionality.

The SoM-150ES, which is the SoM-9X25’s recommended off-the-shelf carrier board, enables you to use Linux or the WinCE operating system and tools to immediately start coding your application.

A free Eclipse IDE for Linux development is available from EMAC. All the compiling, linking, downloading, and debugging inherent to software development can be accomplished from one easy-to-use, high-level interface. Microsoft Visual Studio 2005/2008 can be used when developing for Microsoft Windows CE 6.0 applications. Visual Studio and Eclipse supply everything needed to develop SoM-9X25 applications. EMAC also provides an SDK for the SoM-9X25, which contains source examples and drivers.

Contact EMAC for pricing.

EMAC, Inc.


Murata-Cogiscan Magicstrap

RFID-Based PCB Traceability Solution

Murata’s MAGICSTRAP for PCB radio frequency identification (RFID) tracking device has been integrated with Cogiscan’s Track Trace Control. The joint Murata-Cogiscan solution expands on standard PCB tracking by utilizing ultra-high frequency (UHF) RFID technology, which provides a read-writable data repository on the PCB and enables fast, reliable scanning. The seamless integration of Murata’s RFID technology with Cogiscan’s track and trace platform makes RFID tracking of circuit boards possible as a plug-and-play technology.

The integrated, RoHS-compliant product includes a 515-bit memory capacity, a 4-5-m read range, and a compact, 0.55-mm × 1.6-mm × 3.2-mm footprint.

Contact Cogiscan or Murata for pricing.

Cogiscan, Inc.


Murata Power Solutions, Inc.


Mosaic Industries PDQ Board Lite

Single-Board Computer Simplifies Instrument Control

The PDQ Board Lite is a low-cost, single-board computer (SBC) and development board that hosts the Freescale Semiconductor HCS12/9S12 microcontroller and an embedded real-time operating system (RTOS). This GNU C-programmable instrument controller is well suited for data acquisition and control, PWM drive, I2C sensor interfacing, laboratory automation, scientific instruments, supervisory control and data acquisition (SCADA), and instrumentation.

The compact 2.5” × 4” SBC provides the same I/O as the Freescale MC9S12A512 processor chip, including dual logic-level and standard RS-232 serial ports, 10-bit resolution analog inputs, I2C, dual SPI links, PWM, and timer-controlled digital I/O. The PDQ Board Lite is powered by 5 V, which is delivered by an I/O header or a standard microcontroller-USB connector.

The PDQ Board Lite contains an embedded RTOS in firmware and is programmed using a C-based integrated development environment (IDE). The Mosaic IDE+ is a comprehensive GNU environment that simplifies multitasking application coding and enables users to edit, compile, download, interactively debug, and run application programs.

Contact Mosaic for pricing.

Mosaic Industries, Inc.


Elsys TranAX 3.4

Data-Acquisition Software Adds Application-based Features

Elsys has added new features to its TranAX 3.4 (formerly TransAS) client-server-based transient recorder application and signal analysis software. The software remotely controls data acquisition equipment over 1-Gb LANs from any location worldwide. Applications that benefit from the enhancements include ballistics measurement, crash testing, structural health, seismic research, field testing, stray voltage detection, variable-frequency drive diagnosis, connector conductivity testing, high-voltage switching, and rail and automotive control and monitoring.

Video recordings in common formats (e.g., AVI, MP4, MPG, etc.) can be imported and synchronously displayed with actual measurements signals. This enables you to use a high-speed camera simultaneously on screen to analyze measurement data and recordings. To analyze acoustic signals, frequency spectra can be displayed as standard, octave, or one-third octave. Audio signals can be weighted in dB-A or dB-C.

TranAX 3.4’s redesigned formula editor features more than 60 mathematical functions and includes an unlimited number of math traces for extensive signal analysis. Program functions (e.g., if/then, loops, end, true/false, etc.) make computing post-measurement results from multiple, simultaneous and/or sequential recordings easy and efficient. Events benefiting from these functions include multiblock recordings, a series of stored measurement files recorded by auto-sequence, or single-shot acquisitions with multiple events in one record.

The software enables application-specific computing algorithms to be stored and recalled for later use. Programming can be done separately in a higher-level language under Microsoft .NET. The resulting software code can then be integrated as DLL in TranAX.

Contact Elsys for pricing.

Elsys, LLC


STMicroelectronics STM32

Cortex-M4 Core-Based MCU

The STM32 expansion boards help increase the functionality of the STM32 F4 Discovery board, which is built around the STM32F4 processor and features 32-bit ARM Cortex-M4 architecture. The newly available accessories include an LCD module (a 3.5” LCD and driver board) and a camera module (with an OV9655, which is a 1.3-megapixel CMOS SXGA image sensor). Both modules connect to the third accessory, a hardware extension base board that provides Ethernet connectivity by plugging directly into the Discovery board. The baseboard helps to extend out and conveniently offer all the interfaces on the STM32F4 Discovery board.

The hardware accessories are custom designed for the Discovery board STM32 F4 and come with the necessary software drivers. This series includes devices with pin-to-pin and software compatibility with the STM32 F2 series, but with more performance, DSP capability, a floating-point unit, more SRAM, and peripheral improvements (e.g., full duplex I²S, less than 1-µA RTC, and 2.44-MSPS ADCs). The ARM Cortex-M4 core features built-in single-cycle multiply-accumulate (MAC) instructions, optimized single instruction, multiple data (SIMD) arithmetic, and saturating arithmetic instructions.

The STM32 F4 series includes devices with 512 KB to 1 MB of on-chip flash memory, 192 KB of SRAM, and 15 communication interfaces. The expansion board’s additional features include a 1.2-V voltage regulator with power scaling capability, high-speed data transfer, and fast peripherals.

Contact STMicroelectronics for pricing.



iWatt iW3630

SSL LED Driver Optimized for Commercial & Wireless Lighting

The iW3630 is a two-stage, digital AC/DC LED driver with 45-W output power that supports a PWM digital dimming interface for wireless solid-state lighting (SSL) applications. The iW3630 utilizes iWatt’s Flickerless technology to eliminate flicker across the entire 1% to 100% dimming range, while providing tight, ±5% LED current regulation. Flickerless technology incorporates a power factor correction (PFC) circuit comprised of a chopping circuit that ensures a high power factor and virtually eliminates the input line-voltage frequency component

The iW3630’s built-in isolation transformer driver works directly with 0-to-10-V dimming systems, eliminating the need for additional driver circuitry components and microcontrollers. Its PWM digital interface simplifies integration into wireless lighting systems.

The driver offers a low total harmonic distortion (THD) of less than 15% to meet stringent global energy regulations, along with a built-in over-temperature protection (OTP) and derating function to improve a system’s predictability and reliability. In commercial and wireless applications, the built-in over-temperature protection and derating function eliminates the need for additional components for heat control. In addition, iWatt’s PrimAccurate primary-side control technology eliminates the need for a secondary-side regulator and optical feedback isolator, while iWatt’s EZ-EMI technology simplifies electromagnetic interference (EMI) filtering to further minimize the external component count.

The iW3630’s digital control architecture simplifies ballast driver designs by enabling it to adapt to wide input and output conditions. Therefore, one configuration can support a range of LED string lengths to cover the entire output power range.

The driver’s on-chip over-temperature protection and derating feature monitors the temperature inside the ballast. When thermal conditions reach a point set by the system designer, the iW3630 LED driver automatically reduces the current drive to the LEDs, lowering the power dissipation and resulting in a cooler overall operation. This reduces the risk of thermal runaway, ensures the electrolytic capacitors in the lighting system’s temperature rating is not exceeded, and enables a predictable operating life.

The iW3630’s built-in protection features include LED open/short, input overvoltage, overcurrent, and current-sense resistor short protections. Additional features include 3-to-45-W output power and greater than 0.95 power factor.

The iW3630 is available in a standard, 14-lead SOIC package. It costs $1.16 in 1,000-piece quantities.

iWatt, Inc.


Touchstone TS7001

Two-Channel, 12-Bit SAR ADC

The TS7001 is an easy-to-use, stand-alone, 12-bit, 187.5-ksps ADC well suited for low-power, industrial, process control, and data-acquisition applications. Some portable and fixed-form-factor applications for the TS7001 include: optical sensors, touch panels, personal digital assistants, programmable logic controllers, and medical instrumentation.

The ADC combines a 10-MHz track-and-hold, a high-speed three-wire serial digital interface, and an internal ±0.5% initial accuracy 2.5-V reference. Operating from 2.7-to-3.6-V supplies, the ADC consumes approximately 3 mW when converting at 187.5 ksps.

The TS7001’s features include: One or two analog inputs each with a 0-V-to-VREF or a 0-V-to-VDD input range; four user-programmable, low-power operating modes including auto standby and auto power down; a 1-μA (max) shutdown-mode supply current; a –40°C-to-85°C operating temperature range; and an integrated 2.5-V, ±0.5%, 30 ppm/°C reference.

The TS7001 costs $1.15 in 1,000-piece quantities.

Touchstone Semiconductor, Inc.


Electrical Engineer Crossword (Issue 273)

The answers to Circuit Cellar’s April electronics engineering crossword puzzle are now available.


1.         BITDENSITY—Bits per inch of magnetic tape, for example [two words]

3.         KALMANFILTER—aka LQE [two words]

5.         EMBEDDEDSECURITY—Circuit Cellar columnist Patrick Schaumont covers this topic with articles about authentication, encryption, and electronic signatures [two words]

7.         HAMMING—Error-correcting code

8.         SPURIOUS—Unintentional

11.       LAND—Electronics and Computer Engineering professor at Cornell University and Circuit Cellar frequent contributor (many of his students contribute to Circuit Cellar as well)

13.       CLAPP—American inventor who developed an oscillator frequency standard

14.       ELECTRODE—Able to interact with nonmetallic circuit parts

16.       RINGOSCILLATOR—A feedback structure with an odd number of digital inverters [two words]

17.       PLESIOCHRONOUS—A system that’s not quite in synch

18.       OSCILLOGRAPH—Takes electric current measurements

19.       REFLECTEDBINARYCODE—Created by Bell Labs physicist and researcher Frank Gray [three words]



2.         DEADBAND—Potentiometer’s part shortened by a tap [two words]

4.         BECHTOLSHEIM—Electronics engineer and co-founder of the company that created Java

6.         CHIPBIOMETRICS—Digital fingerprints [two words]

9.         INCANDESCENT—Illuminating

10.       ALOHANET—Computer networking system from the 1970s

12.       EEVBLOG—Where to find electronics engineer David L. Jones’s off-the-cuff online videos

15.       EULERMETHOD—Solves equations [two words]

17.       POPOV—Helped make electromagnetic radio waves more useful

Build a Simple Dedicated Tester

Whether you’re planning a small controller for your own use or an electronic device for mass production, you need to keep “testability” in mind. So, it’s a good idea to make a dedicated tester for your product part of its initial design.

Such a tester can ensure your device is functioning smoothly in your workshop—before it ships to a customer.

A dedicated tester (with the white panel) simulates inputs and loads for an embedded controller. A breakout box (with the red terminals on the panel) allows access to every interface line.

In the upcoming May issue of Circuit Cellar, columnist and engineer George Novacek discusses how to build a simple and inexpensive dedicated tester for a product.

“According to old engineering wisdom, every new project should begin with test design,” Novacek says in his column. “If you don’t follow this advice, your product may have features that are too awkward, too time-consuming, or impossible to test. You always need to keep testability in mind. Ultimately, it improves reliability, reduces manufacturing cost, minimizes field returns, speeds up production, and reduces the cost of repairs.”

Engineers certainly have access to a broad range of general testing equipment, from oscilloscopes to signal generators and analyzers.

“While these instruments are sufficient for testing, working with them solely may be slow and cumbersome,” Novacek says. “Imagine an embedded controller with a number of input and output devices, all of which need to be monitored while different signals are injected for the test. That’s where the dedicated tester comes in. Companies with deep pockets can purchase various types of automatic test equipment (ATE), but this may be too expensive for a small operation. Or, it may not be practical because of the complex setup for a low-volume production. Building a dedicated, inexpensive tester can solve the problem by ensuring an efficient and repeatable test.”

Check out the May issue of Circuit Cellar for more of Novacek’s guidance on why and how you should build a dedicated tester.

Novacek plans to continue examining product testability in upcoming issues, addressing topics that include the design of hardware and software that enables a product to be efficiently tested.

Client Profile: ARM, Ltd.

ARM, Ltd.

ARM, Ltd.
110 Fulbourn Road
Cambridge, GB-CB1 9NJ,
Great Britain


Contact: [email protected]

Embedded Products/Services: The ARM tools range offers two software development families that provide you with all the necessary tools for every stage of your software development workflow.

ARM Development Studio 5 (DS-5) provides best-in-class tools for a broad range of ARM processor-based platforms, including application processors and multicore SoCs. Find out more by visiting www.arm.com/products/tools/software-tools/ds-5/index.php.

Keil MDK-ARM is a complete software development toolkit for ARM processor-based microcontrollers. It is the right choice for embedded applications based on the ARM Cortex-M series, ARM7, ARM9, and Cortex-R4 processors. To find out more, visit www.arm.com/products/tools/software-tools/mdk-arm/index.php.

Product Information: The MDK-ARM is a complete software development environment for Cortex-M, Cortex-R4, ARM7, and ARM9 processor-based devices. MDK-ARM is specifically designed for microcontroller applications. It is easy to learn and use, yet powerful enough for the most demanding embedded applications.

The MDK-ARM is available in four editions: MDK-Lite, MDK-Basic, MDK-Standard, and MDK-Professional. All editions provide a complete C/C++ development environment and MDK-Professional includes extensive middleware libraries.