Tag Archives: microcontrollers

Engineering wizardry for your Arduino

Bits & Pieces has been on a roll lately when it comes to technical books related to Atmel-powered Arduinos. Over the past few weeks, we’ve taken a closer look at  a number of titles, including “Arduino Robot Bonanza,”Arduino and Lego Projects,” “Arduino Workshop: A Hands-On Introduction with 65 Projects” and “Practical AVR Microcontrollers.”

Today we wanted to talk about “Exploring Arduino: Tools and Techniques for Engineering Wizardry,” which uses the popular board as a platform to teach readers about electrical engineering, programming and human-computer interaction.

Written by Jeremy Blum, the book is targeted at both hobbyists and engineers, both of whom will benefit from paced lessons walking readers through practical educational exercises which gradually become more advanced.

In addition to specific projects, the book offers up advice about programming and design that can be applied to numerous projects.

“Exploring Arduino: Tools and Techniques for Engineering Wizardry” also covers electrical engineering and programming concepts – interfacing with the world through analog and digital sensors, as well as communicating with various devices.

“Code snippets and schematics will [continue to] serve as a useful reference for future projects even after you’ve mastered all the topics in the book,” added Blum.

“Exploring Arduino: Tools and Techniques for Engineering Wizardry” can be pre-ordered on Amazon for $24.79 here.

Designing next-gen UIs with the SAMA5D3 MPU

Intuitive user interfaces (UIs) are ubiquitous for smartphones, tablets and personal media players. But what about user interfaces in the world of industrial automation applications and home control units?

userinterface

Frédéric Gaillard, Atmel Product Marketing Manager, tells Bits & Pieces the use of MIMIC diagrams and traditional switches and rotary controls are still quite commonplace for industrial equipment. Ditto for home thermostats, the majority of which are mechanical.

“There are actually some very good reasons for this, as gloved hands, moisture, and condensation can play havoc with touchscreen controls. The industrial operating environment may dictate large switches for these reasons,” Gaillard explains.

“Safety considerations may warrant the use of traditional control mechanisms such as switches. Nevertheless, equipment manufacturers are keen to update both the functionality and cosmetic aesthetics of their products. Industrial automation equipment is increasingly networked.”

sama5d3flat

Clearly, when it comes to home automation, there is a need for an integrated display and control center to control heating, ventilation and smart-energy monitoring.

“You need a higher performance microprocessor, but with a more intuitive, easy-to-understand user interface (UI). When embarking on a new control panel application, embedded developers are likely to select a microprocessor device rather than a microcontroller,” says Gaillard.

“This is dictated by the processing power required for the connectivity and the need to manage a TFT LCD screen and associated UI. An example of such a microprocessor is the Atmel SAMA5D3 MPU, based on an ARM Cortex-A5 core. It’s 65nm low-power process geometry delivers up to 850 DMIPS (drhystone million instructions per second) at 536 MHz and up to 1,328 MB/s at a 166 MHz bus speed.”

The SAMA5D3 also features a floating-point unit (FPU) for high-precision compute-intensive applications, along with a 24-bit TFT LCD controller and graphics accelerator for image composition. Optimized for use in industrial control and HMI (human-machine interface) applications, the device is equipped with a comprehensive set of peripheral interfaces including dual Ethernet, high-speed USB and dual CAN.

Simply put, the Atmel SAMA5D3 MPU is an ideal candidate for most control panel-oriented designs. With its Cortex-A5 core and vector FPU, the MPU is capable of achieving accelerated graphics processing. Coupled with the 32-bit DDR (dual data rate) controller performing up to 1,328 MB/s, it offers enough raw horsepower to drive a high-resolution screen display via the 24-bit TFT LCD controller block. Resistive touchscreen support is integrated into the device, although one can alternatively interface to an external Atmel maXTouch capacitive touchscreen controller.

sama5d3sketch

On the software side, Atmel has partnered with TimeSys to port the Qt framework and its comprehensive range of development tools for easy UI design. Qt can best be described as a cross-platform application framework with a reliable, easy-to-use toolkit to develop complex graphical user interfaces.

“Qt is based on a comprehensive set of widgets that you use to create a GUI screen design. Within the Qt Creator development environment, the Qt Designer tool allows you to lay out the interface design and plan the human interaction,” Gaillard adds.

“The excellent support for multimedia and 3D graphics, plus all the traditional concepts of text entry, check-boxes, and radio buttons, all help to facilitate the easy creation of industrial interface designs. Indeed, the Qt Designer creates C++ code that integrates into your application, while QML defines all the necessary visual graphical interface elements to create and animate visual interaction.”

Interested in learning more? Check out Atmel’s official white paper on the subject here.

Atmel-powered FLORA measures your beating heart

Earlier this month, we took a closer look at “FLORA,” Adafruit’s wearable electronics platform powered by Atmel’s Atmega32u4 MCU. The microcontroller boasts built-in USB support, eliminating the need for pesky special cables and extra parts.

Unsurprisingly, numerous Makers are currently using Adafruit’s FLORA to design a wide range of creations, a fact that has caught the eye of the folks at element14. To be sure, the Newark Corporation recently issued a challenge to engineers and Makers to develop their own piece of wearable technology. The platform of choice for the contest? Adafruit’s versatile FLORA.

Today, Adafruit’s very own Becky Stern is showcasing a wearable badge designed to display the beat of your heart. The project – based on FLORA – uses the Polar heart rate sensor which you wear around your ribcage as it wirelessly transmits heart beats to the receiver chip included in Adafruit’s educational starter pack.

As seen in the video above, the badge can be worn on your clothes or bag, as it is held in place by a magnetic pin back. Required hardware items for this project include:

  • Polar Wireless heart sensor educational starter pack
  • FLORA main board
  • 150 mAh lipoly battery (with charger)
  • Eight FLORA NeoPixels or 8×8 LED matrix w i2c backpack
  • Magnetic pin back
  • Sugru
  • Thin stranded wire
  • Double-stick tape or foam

Want to wear your beating heart with FLORA? The complete Heart Rate Badge guide is available here.

Motor control with AVR MCUs

Microcontrollers (MCUs) are becoming more and more common for motor control applications as they replace Application-Specific Standard Products (ASSP) and ASICs. Simply put, MCUs are equipped with embedded peripherals – thereby offering considerable flexibility while reducing costs.

Typical applications for motor control MCUs – such as Atmel’s extensive AVR lineup – include compressors and fans in refrigerators, fans in cooker hoods, as well as drums and pumps in washing machines.

“Atmel AVR MCUs are particularly well suited for motor control applications. First off, Flash memory provides flexibility that enables developers to use the same microcontroller for multiple applications, all while easily upgrading the program during an application’s lifetime,” an Atmel engineering rep told Bits and Pieces.

“Secondly, code compatibility allows engineers to port existing development to other Atmel AVR microcontrollers based on new application requirements. Thirdly, the extended family of Atmel 8-bit AVR microcontrollers helps engineers choose a perfect fit for a specific application, while keeping costs under control. And lastly, dedicated peripherals such as high-end PWM modules and ADC are ideal for motor control applications.”

Numerous motors  can be appropriately paired with Atmel AVR MCUs, including a three-phase BLDC, two-phase BLDC, asynchronous AC and stepper.

Interested in learning more? Additional information about using Atmel AVR MCUs for various motor control applications is available here.

Getting up close and personal with SERCOM

Last week, Bits & Pieces discussed Atmel’s Peripheral Event System in the context of the recently launched SAM D20 microcontroller (MCU) lineup. Today, we’re getting up close and personal with SERCOM (Serial Communication Module) on the  SAM D20 which can be configured to support UART/USART, SPI or I2C.

“SERCOM offers immense flexibility when embarking on a design since it allows devs to configure available interfaces as needed. Essentially, there are two very important benefits to this approach,” explained Andreas Eieland, Sr. Product Marketing Manager, Atmel.

“Firstly, you no longer need to trawl through microcontroller specifications looking for a device with the number of types of serial interfaces you require. Not only does this save a lot of time but it also allows you to adopt a single microcontroller for a number of similar designs where the interfaces required may differ slightly and you no longer have to buy a device that has five UARTS because you need three SPIs.”

According to Eieland, another benefit of Atmel’s SERCOM relates to designing the PCB. By choosing the interface type to coincide with the location of any supporting interface components or interconnect on the PCB, engineers can ensure more efficient PCB routing that is not only potentially shorter, but also avoids any long signal paths past electrically noisy components.

“This is made possible by having multiple SERCOM modules and the fact that each SERCOM module boasts multiple pin connection options. Remember, Atmel’s SAM D20 device supports I2C fast mode of up to 400 kHz while SPI and UART are capable of up to 24 Mb/s transfer speeds,” he continued.

“Plus, the serial communication modules all are connected to the Peripheral Event System – facilitating peripheral cooperation without CPU intervention. Each SERCOM module is also capable of being reconfigured by software into another interface type on-the-fly.”

Additional data about Atmel’s Peripheral Event System and SERCOM for the SAM D20 can be found here.

Building a custom LEGO MCU system

A Maker by the name of J. Benschop has created a custom electronic LEGO system powered by an Atmel microcontroller (MCU).

“The main board consists of a [number of components, including an] ATMega328, nRF24L01+, a protection diode and stabilizing capacitor,” Benschop explained.

“The  ATMega328 is running at 5V while the nRF24L01 requires 3.3V. However, I needed the IO pins to run at 5V and although the nRF24L01 requires a lower supply voltage, all interface pins can handle 5V.”

As the Hack A Day crew notes, the enclosure for the LegoDuino is compatible with other LEGO bricks, simply because it is made from a 6×16 plate (three blocks high), with sufficient space for the electronics, three AA batteries and IO headers.

On the software side, Benschop decided to go with the Minibloq programming environment, as the Arduino IDE was somewhat too advanced for his nine-year-old son to take on.

“I downloaded [Minibloq] and found that I could add my own blocks relatively easily. For the LegoDuino target in Minibloq, I copied the ArduinoUno target. I modified minibloq.h to use my defined port names as well as the minibloq target board definition (main.board),” wrote Benschop.

“I also added some of my own programming blocks and the Arduino NewPing sensor (instead of the existing Ping sensor). [Plus], I copied the DCMotor programming block and modified it into a LegoMotor programming block. And I added some special power button [along with] LED support so the power button can be used to turn the LegoDuino on and off, but also to power off the LegoDuino after a fixed time. This way, the batteries will not be drained when my son forgets to turn it off.”

Interested in learning more? Additional information about Benschop’s custom electronic LEGO microcontroller system can be found here.

A practical guide to Atmel AVR microcontrollers

Earlier this month, we took a close look at at an instructional book for Makers that describes how to use various Atmel-powered Arduino boards in a wide variety of LEGO projects, as well as another Maker book titled “Arduino Workshop: A Hands-On Introduction with 65 Projects.”

But what if you wanted to get up close and personal with an Atmel AVR microcontroller (MCU), sans the board? Well, you might want to check out “Practical AVR Microcontrollers.” Written by Alan Trevennor, the book kicks off with the basics in part one – setting up a development environment and detailing how a “naked” AVR differs from a classic Arduino.

mcupracticalguide

Part two offers an in-depth exploration of various projects, including an illuminated secret panel, a hallway lighting system with a waterfall effect, a crazy lightshow and visual effects gizmos like a Moire wheel and shadow puppets.

“You’ll design and implement some home automation projects, including working with wired and wireless setups,” Trevennor explained. “Along the way, you’ll design a useable home automation protocol and look at a variety of hardware setups.”

Readers will also learn the following:

  • How programming the AVR differs from programming an Arduino
  • How to use the Arduino IDE to program the AVR and when to use AVR Studio
  • How to network your AVR devices and use them in home automation
  • How to add intelligence to your AVR devices
  • How to design games with an AVR

Interested? The e-book version of “Practical AVR Microcontrollers” can be purchased from Amazon for $22.79 here.

Atmega32u4 MCU takes center stage in wearable tech challenge

Known as “FLORA,” Adafruit’s wearable electronics platform is built around Atmel’s Atmega32u4 MCU. The microcontroller boasts built-in USB support, eliminating the need for pesky special cables and extra parts.

According to Adafruit’s Limor Fried, FLORA is extremely “beginner-friendly.” Indeed, the device is difficult to accidentally destroy by connecting a battery backwards, thanks to a polarized connector and protection diodes. Meanwhile, an onboard regulator ensures even connecting a 9V battery won’t result in damage or tears.

Numerous Makers are using FLORA to design a wide range of creations, a fact that has caught the eye of the folks at element14. To be sure, the Newark Corporation recently issued a challenge to engineers and Makers to develop their own piece of wearable technology. The platform of choice for the contest? Adafruit’s versatile FLORA kit.

“Wearable technology is incredibly popular at the moment. Yet, we’re still waiting for a product that brings wearable technology together with clothing and that’s what makes this competition and the Adafruit kit stand out,” explained Dianne Kibbey, Global Head of Community, element14.

“In this challenge we’re calling on our talented community to create something new in wearable technology that will make a difference to the everyday lives of the user. From tracking the vulnerable or elderly to finding a lost handbag in a nightclub, wearable technology is only just getting started and has the potential to do so much and this is why we’re all really looking forward to seeing the submissions in this competition.”

As previously discussed on Bits & Pieces, Atmel is right in the middle of the wearable tech revolution. First off, Atmel’s SAM4S and tinyAVR MCUs are inside the Agent smart-watch which recently hit Kickstarter. Atmel MCUs have also tipped up in a number of Maker projects for wearable tech, like the LED pocket watch we featured earlier this month.

Clearly, wearable tech is getting a long overdue makeover, as Internet-linked computers are woven into formerly brainless attire such as glasses, bracelets and shoes.

“We are heading for the wearable computing era,” Gartner analyst Van Baker told the AFP. “People are going to be walking around with personal area networks on their bodies and have multiple devices that talk to each other and the Web.”

Ben Arnold, director of industry analysis for consumer technology at NPD, expressed similar sentiments.

“Traditional technology companies will have to start paying attention to how sensors are enabling us to live,” he added. “Consumers are ultimately going to become more aware of their data in the digital ether. I suspect wearables are going to disrupt the way tech firms are doing business now.”

A closer look at Atmel’s SAM D20 Xplained Pro eval kit

Atmel’s SAM D20 lineup is based on the ARM Cortex- M0+ core, setting a new benchmark for flexibility and ease-of-use. The recently launched MCU series is ideal for a number of low-power, cost-sensitive industrial and consumer devices, such as GPS trackers, appliance controllers, intelligent remotes and optical transceivers.

Perhaps most importantly, the SAM D20 also offers engineers easy access to an expansive array of software and hardware tools, including Atmel Studio 6 (free IDE with compiler) as well as the SAM D20 Xplained Pro evaluation kit.

The $39  kit supports the Atmel I/O1 Xplained Pro, OLED1 Xplained Pro and PROTO1 Xplained Pro extension boards, all of which can be purchased individually.

samd20evalkit

In terms of key specs, the board is powered by a SAMD20J18 microcontroller and features one mechanical reset button, a single mechanical user pushbutton (wake-up, bootloader entry or general purpose), a yellow user LED, 32.768kHz crystal and three Xplained Pro extension headers.

Additional specs include an embedded debugger, Auto-ID for board identification in Atmel Studio 6.1, one yellow status LED, one green board power LED, Data Gateway Interface (SPI, I²C, 4 GPIOs) and a virtual COM port (CDC).

Atmel’s SAM D20 Xplained Pro evaluation kit can be purchased here for $39.

This mini computer is designed around Atmel’s ATtiny84

Recently, we discussed how a talented Maker by the name of Jack Eisenmann designed a multi-core homebrew computer using 16 ATMega328P microcontrollers. And today? A programmable computer based on Atmel’s ATtiny84 dubbed the DUO tiny.

“The DUO system interprets its own proprietary programming language to run all applications. This language is called DUO Tiny Programming Language, or DTPL,” Eisenmann explained.

“Software is stored in EEPROM (AT24C1024B-PU25) and loaded through a serial interface. The computer is equipped with 4 buttons and a 102 by 64 pixel LCD display (EA DOGS102W-6). [Meanwhile], a three-pin port is available on the DUO Tiny board, [which] may be used to inspect and modify the contents of EEPROM.”

As the Hack A Day crew notes, Eisenmann’s project began on a breadboard, but as he brought each part into being it transitioned to a strip-board prototype – and finally the fab-house version seen in the video above.

Additional information about the Atmel-powered DUO tiny can be found here.