The ATmega32 WAV player

A Maker by the name of Vinod Stanur has created a WAV audio player powered by Atmel’s ATmega32 microcontroller (MCU). 

As the folks at Hack A Day explain, Stanur originally started development using a PIC microcontroller, although the component ultimately lacked sufficient SRAM to effectively act as a playback buffer.

“When he got his hands on an ATmega32 his mind turned back to the project and he saw it through to the end,” explained Hack A Day’s Mike Szczys. “He takes advantage of what he learned on several earlier builds. He’s using a TV remote as input, just like his Snake game did.”

In the most recent iteration of the project, storage is provided by an MMC card. In place of a FAT  (File Allocation Table) library, Stanur uses his own code to read the linked-list for sector addresses. The WAV header is subsequently parsed and the file processed accordingly.

“Playback uses two 512 byte buffers,” added Szczy. “One is feeding the output while the other is being populated from the memory card. When the output buffer is exhausted the two are swapped and the process continues.”

According to Stanur, the ATmega32 WAV player is capable of outputting both mono and stereo of maximum bitrate of 160KHz and 96KHz, respectively. Additional information about Stanur’s ATmega32 WAV player can be found here.

Posted in Design Tips & Tricks, Makers Movement | Tagged , , , , | Leave a comment

The Atmel-ARM connection

Atmel currently offers the broadest portfolio of MCUs (microcontroller units) based on the two most popular 8- and 32-bit architectures – AVR and ARM. 

“Flexible, highly integrated Atmel ARM-based MCUs are designed to optimize system control, user interface (UI) management and ease of use,” Atmel Digital Marketing Manager Tom Vu told Bits & Pieces.

atmelarm1

“Indeed, the ARM Cortex-M3 and M4 based architectures share a single integrated development platform (IDP)—Atmel Studio 6. This platform provides time-saving source code with more than 2,000 example projects, access to debuggers/simulators, integration with Atmel QTouch tools for capacitive touch applications and access to the Atmel Gallery online apps store for embedded software or extensions.”

Vu also noted that Atmel’s ARM-based MPUs range from entry-level devices to advanced integrated devices with extensive connectivity, refined interfaces and a plethora of security options.

“Whether you are working on new, existing or legacy designs, a wide range of Atmel ARM-based devices provides the latest features and functionality. These devices also feature the lowest power consumption, a comprehensive set of integrated peripherals and high-speed connectivity,” he added.

As previously discussed on Bits & Pieces, Atmel’s SAM4 and SAMA5D3 ARM-based MCUs are used to power a number of industrial and consumer devices including thermostats, remote process control nodes, smart glucose meters, gateway concentrators, bar-code scanners and portable outdoor equipment.

atmel1

Earlier this week, Atmel rolled out its SAM D20 MCU, a comprehensive product lineup based on ARM’s Cortex -M0+. Essentially, the new microcontroller series combines the performance and energy efficiency of an ARM Cortex-M0+ based MCU with an optimized architecture and peripheral set and 8-bit AVR for ease of use – enabling Atmel to reach new markets.

According to Atmel engineering manager Bob Martin, the SAM D20 offers a “truly differentiated” general-purpose lineup that is ideal for a wide range of low-power, cost-sensitive devices, including GPS trackers, appliance controllers, intelligent remotes and optical transceivers.

atmel4

“The SAM D20′s power-saving techniques include an event system that allows peripherals to communicate directly with each other without involving the CPU, while SleepWalking peripherals wake up the CPU only upon a pre-qualified event, reducing overall power consumption,” Martin told Bits & Pieces.

“In terms of peripheral flexibility, a serial communication module (SERCOM) is fully software configurable to handle I2C, USART/UART and SPI communications. Meaning, with multiple SERCOM modules on a device, designers can precisely tailor the peripheral mix to their applications.”

Bits & Pieces also asked Andreas Eieland, Atmel Sr. Product Marketing Manager, to describe his favorite SAM D20 features.

“Personally, I like the Peripheral Touch Controller and SERCOM. The PTC is by far the easiest way to add capacitive buttons, sliders wheels and proximity to an application. Plus, there is no need for external components and very little SW overhead, as the module is self calibrating – supporting up to 256 channels,” said Eieland.

“Previously, if you wanted 4 UARTs you had to buy a device equipped with 4SPIs and 4 I2Cs. However, the SAM D20′s SERCOM module allows users to configure the SERCOMs to what they need, meaning devs no longer have to pay for serial interfaces they do not use. Lastly, the SERCOM module is fitted with a multiplexer, offering flexibility in regards to what pin different signals are outputted on, thereby simplifying board layout and reducing board area.”

Meanwhile, Brian Hammill, Atmel Sr. Staff Field Applications Engineer, said he most appreciates the SAM D20′s high end analog to digital converter feature.

“The hardware averaging feature facilitates oversampling, making high resolution at sample rates that apply to many real-world sensor requirements reality without extra software overhead,” he explained,

atmel3

“Sensor nodes in the Internet of Things (IoT) collectively generate a tremendous amount of data. When you’ve got that much data, it had better be good. And reducing the CPU cycles cuts energy use, especially important in applications that use energy harvesting or are battery powered.”

Posted in Product News | Tagged , , , , , , , , , , , , | Leave a comment

Vintage radio modded into a docking station

A modder named Øyvind Nydal Dahl has converted an antique 1937 Phillips radio into a  smartphone docking station.

“I had this old Philips radio laying around that I couldn’t use because it only had an AM receiver. So, I thought it would be cool to make it into an iPhone dock,” Dahl explained in a blog post published on Build-Electronic-Circuits.com.

“The first thing I did was to remove old the old parts from it. Then I cut out the front of an old speaker and replaced the original speaker element. The reason for this was that the original element didn’t have any bass at all.”

According to Dahl, a Fiio L11 was used to dock the iPhone and enable sound – amplified via a TEA2025 amplifier circuit which provides 2.5 watts of power.

“I made the display by drawing it on my computer, then printing it out on a sheet of paper placed behind a plastic window. I used LED’s on the back to indicate volume and source selection. The LED’s [are] controlled by an Arduino Duemilanove,” said Øyvind.

“[Specifically], J1, J2, J3 and J4 are connected to outputs of the Arduino. The volume knob is a dual potentiometer (two potentiometers in one), so I have used one to control the volume and connected the other one to an input of the Arduino. The Arduino then controls the LEDs according to the potentiometer.”

Additional information about the modded antique radio can be found here, while the relevant Arduino sketch is available here.

Posted in Arduino, Design Tips & Tricks, Makers Movement | Tagged , , , , , , | Leave a comment

Bump up your Atmel Studio

Written by Johannes Bauer, ARM

With Atmel Studio, Atmel has one of the best free development tools for ARM-based microcontrollers on the market.

Its slick IDE and the smooth integration of the Atmel Software Framework (ASF) makes it a good choice for users of the SAM3, SAM4, and the brand-new SAM D20 devices. One thing some might be missing, though, is a top-notch compiler.

Thankfully, there is a solution in the Atmel Gallery – the Keil MDK-ARM Toolchain extension. It allows Atmel Studio to use the highly optimizing ARM Compiler with its best-in-class code density and high performance for a wide range of applications. The extension requires an installation of Keil MDK-ARM, but makes the integrated compiler available transparently in Atmel Studio.

The ARM Compiler provides two run-time C/C++ library variants: a full ANSI compliant library and a Microlib for utmost code density on small microcontrollers like the Cortex-M0+ based SAM D20. You can give it a spin and see how your code size improves.

As a perfect match for the extension, ARM has recently introduced the MDK-ARM Atmel Edition, or MDK-Atmel for short. This special edition of the industry-standard Keil MDK supports compiling and debugging for ARM-based Atmel MCUs and is available at a reduced price compared to the full version of MDK. Of course you can also use MDK-Atmel stand-alone without Atmel Studio if you prefer that.

Together, the ARM development tools and Atmel software and hardware make a good combination for developers, no matter which environment they work in.

Posted in Application Highlights, Product News | Tagged , , , , , , , , , , , , | Leave a comment

An intelligent remote control with Atmel’s SAM D20 under the hood

An intelligent remote control is typically paired with electronic devices capable of processing infrared (IR) or WiFi signals. 

Powered by batteries, remote control units demand low sipping capabilities, both when activated and during idle time. Additional design considerations include flexible and multi-function user interfaces (UI), as well as responsive touch-screens.

“Integrating interfaces, functions and firmware helps to minimize the BOM of an intelligent remote, while reducing size and cost,” Atmel engineering manager Bob Martin told Bits & Pieces.

samd20remote1

“This can be accomplished by using Atmel’s SAM D20 ARM Cortex-M0+ based MCU, along with our 86RF232 802.15.4 Radio, 30TS Temperature Sensor and AT24/AT25 Serial EEPROM.”

According to Martin, the SAM D20 offers low power operation with flexible, multi-function peripherals in a small form factor.

“Low power operation means less than 150µA/MHz in active state and full operation from 1.6V to 3.6V. It also means <2uA with the Real Time Clock (RTC) operating and full RAM retention. Plus, Atmel’s Sleepwalking and Event System capabilities provide low-power wakeup with minimal CPU load,” he said.

“In addition, the Atmel platform offers multi-function peripherals for diverse and complex serial interfaces, including 6 flexible SERCOM interfaces – with each configurable as SPI, I2C, or USART for gyroscopes, accelerometers, temp sensors, displays, Wi-Fi and 802.15.4 RF communications.”

Martin noted that Atmel’s intelligent remote control platform offers 16 channel 12 bit ADC, 10 bit DAC and full-featured comparators, along with a fully integrated, low-power, hardware-accelerated Peripheral Touch Controller. It also supports direct connection to touch interfaces, magnetometers and battery monitoring.

On the software side, Atmel’s SAM D20 supports an extensive development ecosystem with access to Atmel Studio 6 (free IDE and compiler), Atmel Software Framework (ASF) with free SW libraries of production-ready source code, along with Atmel’s Gallery, SAM D20 Xplained Pro Kit with built-in programmer and debugger (includes connectors for expansion wings).

Additional information about Atmel’s SAMD20 can be found here.

Posted in Design Tips & Tricks, Design Trends, Engineering Perspectives, Product News | Tagged , , , , , , | Leave a comment

The ATtiny1634 Nixie clock

A Nixie tube can best be described as an electronic device that displays numerals and other information using glow discharge. The glass tube is packed with a wire-mesh anode and multiple cathodes, shaped like numerals or other symbols.

Recently, a Reddit user by the name of “Smallscaleresearch” created a slick Nixie clock powered by Atmel’s ATTiny1634.

“I was digging around in my parts bins and came across most of the exotic bits required to build a GPS sync’d Nixie tube clock. Logic side is an ATTiny1634 with a surplus (old) SiRF GPS module. HV side is based on a surplus backlight inverter, rectified and filtered. At 3.3v it puts out around 140v under load, and around 270v if allowed to float,” the Reddit user explained.

“To switch the HV, I’m using a Supertex HV5122 high voltage shift register which gives me 32 channels. Since I only have 32, the high digit of the hour only has digits 1 and 2 connected, so to display ’0′ I just leave it off. The 4 BS108 MOSFETs on the board are just level shifters for the control lines, since the HV5122 needs a minimum of around 10.5v for logic ‘high’ on its input.”

Additional information and schematics for the ATtiny1634-powered Nixie clock can be found here.

As previously discussed on Bits & Pieces, the high-performance Atmel picoPower 8-bit AVR RISC-basedATtiny1634 microcontroller features 16KB flash memory, 256B EEPROM, 1KB SRAM, 18 general purpose I/O lines, 32 general purpose working registers, one 8-bit timer/counter and one 16-bit timer/counter.

Additional key specs include two full duplex USARTs with start frame detection,  universal serial interface (USI), I2C slave, internal and external interrupts, a 12-channel 10-bit A/D converter, programmable watchdog timer with Ultra Low Power internal oscillator and four software selectable power saving modes (the device operates between 1.8-5.5 volts).

Posted in Design Tips & Tricks, Makers Movement | Tagged , , , , , , | Leave a comment

Atmel’s SAM D20 can power this next-gen appliance UI control unit

An appliance user interface (UI) enables easy control of items such as washing machines and dishwashers, while providing visual and audio feedback in real-time. The UI accomplishes this by communicating with various subsystems, including motor controllers and wireless modules.

samd20appliancecontroller

Key design considerations of a next-gen UI include capacitive touch, as well as full compliance with safety and energy standards such as EMC, IEC 60730 Class B, FMEA and EnergyStar.

As noted above, the UI is in constant communication with multiple subsystems such as dedicated modules that control motor tasks like drum rotation and compressor drives – or modules that offer wireless capabilities for linking home automation, remote control units and diagnostic tools.

A number of Atmel components can be used as a platform to help power a next-gen appliance UI control unit – supporting all of the above-mentioned features. These include the SAM D20 ARM Cortex-M0+based MCU, 86RF233 or AT86RF212 IEEE802.15.4 ZigBee radios, various MCUs for motor control, SHA204 Authentication IC for security, 30TS temperature sensor and AT24/AT25 Serial EEPROM.

“The SAM D20 offers an integrated UI, eases standards compliance and supports multiple communications interfaces, which reduces BOM cost and board space, increasing system reliability,” Atmel engineering rep Bob Martin told Bits & Pieces.

“In addition, there is hardware support for self and mutual-capacitive touch interfaces with up to 16×16 channels requiring virtually no external components. All of this enables quick response to touches in all power modes with high button count panels.”

Martin also noted that hardware-based 32-bit Cyclic Redundancy Check (CRC) and Memory BIST help customers achieve IEC 60730 Class B compliance, with EMC compliance eased by flexible PCB routing from SERCOM modules and integrated touch control. Plus, each of the 6 SERCOM interfaces can be configured as a USART, I2C or SPI to more efficiently communicate with multiple subsystems.

On the software side, the SAM D20 boasts an extensive development ecosystem, including Atmel Studio 6 (free IDE with compiler), free SW libraries of production-ready source code, a gallery open to extensions via Atmel’s app store and the SAM D20 Xplained Pro Kit – which offers an integrated programmer and debugger with connectors for expansion wings.

Additional information about the SAMD20 can be found here.

Posted in Design Tips & Tricks, Design Trends, Engineering Perspectives, Product News | Tagged , , , , , , , , , , , | Leave a comment