Tag Archives: Brian Hammill

Evaluating Atmel’s ATM90E36A Polyphase Metering IC

Written by Brian Hammill

Thanks to the Atmel Smart Energy product team, I evaluated the ATM90E36A polyphase metering IC kit last week.

2013-10-10 14.27.55

FIrst impressions were very positive as the kit arrived packaged in a very nice Atmel Smart Energy box.  Inside the box, I was equally impressed with the complete kit including microcontroller control board with LCD, ATM90E36A metering board, power supply, USB cable, and international adapter tips.

The microcontroller used in this kit that interfaces with the ATM90E36A and drives the LCD and PC connection is the new ATSAM4C16C.  This smart meter MCU family includes peripherals for communications and security and meets the exact requirements for smart meters.  Based on two ARM Cortex-M4 cores with DSP instructions, the SAM4C even has a true random number generator and hardware accelerators for both AES (symmetric) and ECC or RSA (asymmetric) cryptography that exceed smart metering requirements.  The SAM4C is an ideal building block for smart meters when combined with the AT90E36A, other analog metering ICs, the Atmel line of Power Line Communications ICs or RF transceivers.

I only had to supply a line cord, a load, and current transformer (CT), which was not unreasonable since CTs can be very application specific.  I had  three matched CTs  suited for the ATM90E36A with 500:1 current transfer ratio in my surplus box.  The CT I used is shown in the photo above with the kit box. My load is a standard light bulb.

It is important to match the burden resistors, A/D converter input voltage range and CT.  The ATM90E36A metering board came fitted with 2.4 Ω resistors.  And the industry leading 6000:1 dynamic range means that the ATM90E36A can be used across a wide range of metering applications utilizing different current and voltage ranges without a change in the bill-of-materials and without deviating from the better than 0.2% accuracy.  I expected that I’d be able to get reasonable results with my setup thanks to this outstanding dynamic range.

The Atmel Smart Energy team provided me with the comprehensive user guide, software and quick start guide before the hardware arrived.


Since the ATM90E36A is a 7 channel analog front end IC capable of measuring current and voltage for each of 3 phases (plus the neutral current) and I only have 120 Volt single phase 60 Hz power convenient, this means I can only run 1 phase at a time.  So it was nice  that the designers of the board provided an optically isolated USB connection for an always safe connection to my PC.  They also decided to power the board off the phase C input voltage to eliminate the need for the external 9 volt DC supply.  So I connected my line cord to the Phase C voltage input and the neutral after identifying the “hot” wire.  And I connected my CT to the phase C current input.  The screw terminal strips made this very easy.  I needed a load to be able to measure consumed energy, so I connected a standard light bulb socket to the line in parallel with the meter voltage inputs and passed the hot conductor through the center of my CT.

Once I plugged in the board and connected the USB, the USB CDC class driver loaded automatically.  Then I launched the software.  I appreciated the fact that this software was supplied as a zip file and did not require a full permanent installation on my Windows PC.  It is also easy to run from a USB drive or cloud storage.

The main screen gave me a clear indication of available comm ports and I picked the one corresponding to the ATM90E36A evaluation kit.

After Read

I installed a 25 watt 120 volt light bulb in the socket as my load.

2013-10-10 14.24.42

After doing a “read” I was able to see what the meter evaluation kit was seeing.  As expected in this uncalibrated state, the voltage was not the 129.9 volts I was measuring and the voltage output from the CT was different than what I was measuring using my multimeter. Clearly calibration was needed.

Without spelling out all of the details, and honestly there wasn’t a whole lot to do, I was able to calibrate this meter within the limitations of available equipment (Light bulb, line voltage, and Multimeter) with ease!


After entering the measured values for line voltage and CT output on phase C, and allowing the software to run the calibration on the board, I was measuring 22.5 watts which was reasonable for the 25 watt lamp and also agreed with the measured values from the DMM.


To test my calibration, I substituted 60 watt and 100 watt light bulbs for the 25 watt one.  The metered energy agreed closely with the wattage of the lamps and the measured values of current and voltage.

Real calibration to obtain 0.2% or better accuracy can be achieved, but you need expensive equipment like the WECO tester that Atmel has in its smart meter applications lab.  It takes a very accurate voltage source and precise load to calibrate utility meters to the exact requirements of the ANSI (North America) or IEC (European) standards that electric utilities demand.  Watthour Engineering (www.watthour.com) is one trusted source for this equipment.


Overall, I was impressed by the completeness of the kit, the functionality of the companion PC software, and the ability to get it up and running with my limited equipment.  Utility meter customers selecting Atmel solutions will have a very good experience with this device, kit and the excellent Atmel Smart Energy applications team.  Other customers (appliances, lighting, industrial, consumer) interested in accurately measuring energy, either single phase or polyphase, can also take advantage of Atmel’s smart energy products and easily add energy measurement to their products.

Atmel’s SAM4S clinches highest CoreMark/MHz scores

Atmel’s SAM4S MCU lineup – which clocks in at a top speed of 120MHz+ – is based on ARM’s Cortex-M4 core. The microcontroller series integrates a Flash read accelerator along with cache memory to increase system performance. Additional key specs include a multi-layer bus matrix, multi-channel direct memory access (DMA) and distributed memory to facilitate high data rate communication.

Recently, the EEMBC (Embedded Microprocessor Benchmark Consortium) certified five SAM4S MCU benchmark scores running a version of CoreMark compiled using the IAR Embedded Workbench for ARM version 6.50. As it turns out, Atmel’s SAM4S MCUs racked up the highest CoreMark/MHz for any Cortex-M microcontroller submitted to date.

“The CoreMark benchmark is designed to measure the performance of the processor core alone,” Atmel engineering rep Brian Hammill told Bits & Pieces.

“While the CoreMark may not always convey how well a particular part will perform in a specific application, it does offer an accurate test of core performance and efficiency. As such, CoreMark can be used to understand how the performance of a particular MCU and compiler combination compares to others.”

According to Hammill, the Atmel scores are particularly significant as they illustrate the overall efficiency of the Cortex-M4 cache implemented on the SAM4SA16 and SAM4SD32, as well as the optimized performance of the IAR Embedded Workbench version (6.50).

“Looking at the Atmel SAM4SD32CAU, we see the CoreMark for the IAR EWARM 6.50 was run at both 21 MHz and 123 MHz. If we run the EEMBC CoreMark report or export the data to Excel, here is what we see:


“As expected, the CoreMark scores are much higher at the faster clock speed. But what is most significant is the difference in the CoreMark/MHz scores. Notice that the 21 MHz CoreMark memory configuration is zero wait states. The memory configuration for the 123 MHz CoreMark is 5 wait states but with prefetch and cache enabled. You see a small difference in the CoreMark/MHz scores between the 21 and 123 MHz benchmarks.”

Why? Well, as Hammill, notes, if you had a perfect zero wait state memory or cache system, the exact same CoreMark/MHz would be returned regardless of the speed.

“Of course it is to be expected that the cache helps – but does not completely cover the wait states of Flash. However, the small difference between 3.32 CoreMark/Mhz at 123 MHz and 3.38 CoreMark/ MHz illustrates Atmel’s SAM4SD32CAU device has a very good implementation of cache and prefetch,” he explained.


“Indeed, if the Atmel cache and prefetch weren’t optimized, you would expect to see a much larger difference in the CoreMark/MHz scores. I would also like to note that the Atmel SAM4SD32CAU require 5 wait states in flash to run at 123 MHz – but with very slight performance penalty as indicated by the CoreMark/MHz scores.”


CoreMark – written in C – was developed in 2009 by Shay Gal-On at EEMBC and contains implementations of numerous algorithms. These include list processing (find and sort), Matrix (mathematics) manipulation (common matrix operations), state machine (determine if an input stream contains valid numbers) and CRC. Like any benchmark, the EEMBC CoreMark clearly isn’t perfect, although it is certainly a fair assessment of overall performance, as well as the core and memory efficiency of a specific processor.