Tag Archives: UART

Designing a DIY 125 KHz operated deadbolt

A Maker by the name of “jeepdude48507” has designed a 125 KHz operated deadbolt with Atmel’s ATmega328 microcontroller (MCU) under the hood.

As jeepdude notes, the DIY platform is based on a store-bought electronic deadbolt.

“It was battery operated and had a keypad on the outside to allow entry with a user defined code,” he wrote in a recent Instructables post.

“I removed all of the electronics from the indoor housing keeping only the electric motor and mechanism. The mechanism has a built-in clutch that prevents damage should the motor remain on for too long when cycling. My motor is set for a cycle time of about 1.25 seconds.”

Essentially, the project comprises two boards. One houses the ATmega328 MCU with all input / output connectors attached.

“[This board] allows the resonator, voltage regulator, reset switch, power jack and power conditioning in one convenient place. Power for the entire project is fed into this board from a wall-wart (9VDC @ 1A) AC adapter,” jeepdude48507 explained.

“Power before the 7805 regulator is taken to run the motor. Power after the 7805 regulator and filtering is used to power everything else.”

Meanwhile, the RFID reader component is located on the small green circuit board on the lower left end of the controller board.

“It comes with a rectangular coil of wire which is the antenna. I housed it inside a plastic project box,” he added. “Be sure the use the UART type and not the WEIGAND. Only the UART will work with the code I have written for this project.”

Interested in learning more? You can check out the project’s official Instructables page here.

WifiDuino for the Internet of Things



Powered by Atmel’s versatile ATmega32U4 microcontroller (MCU), the open source WiFiDuino is a chip-sized development board that packs a 28×64 OLED display.

“We designed WifiDuino based on our belief in the future of the Internet of Things (IoT) when everything is connected. We will be living in a world when every object can communicate with each other using WiFi,” a WiFiDuino rep explained in a recent Indiegogo post.

“With WifiDuino, you no longer need to worry about getting a WiFi shield. [We] have done the hard part for you. It’s great for people who are tired of buying WiFi shields every time you want the board to be connected.”

Aside from Atmel’s ATmega32U4 MCU, key WiFIDuino specs and features include:

  • Supports Arduino IDE (Leonardo)
  • STA, AP, ADHOC network modes
  • Connects directly with smartphone
  • 20 digit I/O
  • 12 Analog I/O
  • UART, I2C, SPI
  • 5v power and I/O pin level

Interested in learning more? You can check out the project’s Indiegogo page here.

Who’s talking about the Arduino Zero ?

The Atmel-powered Arduino Zero dev board was officially announced on May 15th, 2014. The board’s debut has already been covered by a number of prominent tech publications, including Ars Technica, HackADay, EE Times, Electronics Weekly, CNX SoftwareUberGizmoGeeky Gadgets, SlashGear, PC World, SemiWiki and Makezine.

Sean Gallagher, Ars Technica



“The Zero is a 32-bit extension of Arduino’s flagship Uno board, developed jointly by the Arduino team and Atmel, targeted at helping developers prototype smart devices. Based on the Atmel SAM D21 ARM Cortex-based microcontroller, the Zero includes Amtel’s Embedded Debugger—allowing developers to debug their projects without having to wire up another interface.

”

“It gives developers a huge boost in storage and memory over the Uno, providing 256KB of onboard Flash storage (compared to the Uno’s 32KB) and 32KB of static RAM (compared to the Uno’s 2KB). It can also emulate an Electronically Erasable Programmable Read-Only Memory (EEPROM) of up to 168KB, while the Uno only supported 1KB of EEPROM.”

Brian Benchoff, HackADay

“The Arduino Zero uses an Atmel ARM Cortex-M0+ for 256kB of Flash and 32k of RAM. The board supports Atmel’s Embedded Debugger, finally giving the smaller Arduino boards debugging support.

“The chip powering the Zero features six communications modules, configurable as a UART, I2C, or SPI. USB device and host are also implemented on the chip [and] there are two USB connectors on the board.”

Max Maxfield, EE Times



“I’ve become a huge supporter of the Arduino, from the concept to the hardware to the software (IDE) to the ecosystem. I’m now using Arduinos and Arduino-compatible platforms for all sorts of projects, including my Infinity Mirror, my Inamorata Prognostication Engine and my BADASS Display.

“Each Arduino and Arduino-compatible platform offers different features, functions, capacities, and capabilities, which makes it possible to select the optimal platform for the project at hand using criteria such as size, cost, performance, and number of input/output pins. As of this morning, there’s a new kid on the block – the Arduino Zero, which has been jointly developed by Atmel and Arduino.”

Alasdair Allan, MakeZine

“While it shares the same form factor as the Arduino Leonardo—with 14 digital and 5 analog pins—all of the digital pins except the Rx/Tx pins can act as PWM pins, and the analog pins have a 12-bit ADC instead of the Leonardo’s 10-bit ADC, giving significantly better analog resolution,” writes Makezine’s Alasdair Allan.

“The new board comes with 256KB of Flash memory, and 32KB of SRAM. While the new board doesn’t have EEPROM, it does support 16KB by emulation, so Arduino sketches relying on this feature will still run without issue.”

Arduino Zero – official specs:

  • Microcontroller ATSAMD21G18, 48pins LQFP
  • Operating voltage 3.3V
  • Digital I/O Pins 14, with 12 PWM and UART
  • Analog input pins 6, including 5 12bits ADC channels and one 10 bits DAC
  • DC current per I/O Pin 7 mA
  • Flash memory 256 KB
  • SRAM 32 KB
  • EEPROM up to 16KB by emulation
  • Clock speed 48 MHz

Interested in learning more? You can check out the official Arduino Zero page here.

Nuvation talks Atmel and batteries at EELive! 2014

Nuvation CEO Mike Worry is at Atmel’s EELive! 2014 ToT booth presenting a series of Tech Talks about his company’s EV Battery Management System. His presentations have been covered by a number of prominent journalists, including Steve Taranovich of EDN.

“We’e seen enough instances of battery disasters occurring over the last few years in our industry. Batteries have a tremendous amount of energy within and if not properly handled and charged/monitored can be dangerous,” writes Taranovich.

“With chemistries such as Lithium, each cell must have its voltage monitored and balanced. This not only extends battery life, but prevents tragedies. [This is why] Nuvation has expertly developed their customizable battery Management System (BMS) that can handle 10s to 1,000s of cells. The system is easily made compatible with lithium, nickel, silver based and other battery chemistries.”

In terms of the Tank Controller, Nuvation selected Atmel’s ATSAM4E8C, a 32-bit ARM Cortex-M4 controller to power a wide range of features, including Ethernet, UART, CAN, current shunt and optically-isolated GPIO.

As Taranovich notes, the Tank Controller is also equipped with an optically-isolated interface to battery pack management (PackMan) strings.

“The system handles soft-start, main start and emergency disconnect and controls the charging system to protect the battery,” says Taranovich.

Meanwhile, the PackMan, or BMS slave utilizes Atmel’s ATA6870N, a Li-Ion, NiMH battery measuring, charge balancing and power-supply circuit.

This IC is tasked with measuring all cell voltages simultaneously – and balancing cells with higher voltage. 

Each IC is capable of monitoring 6 cells, with a daisy chain configuration supporting up to 16 PackMan board or 96 stacked cells.

“Nuvation’s BMS must deal with the balance/imbalance of a battery pack. It looks at the state-of-charge (SOC) between cells in the pack,” Taranovich adds. “The usable SOC of pack is determined by the lowest energy cell and then the BMS has the task of balancing these cells accurately and quickly without overcharging or overheating the cell.”

Interested in learning more? You can check out Nuvation’s official site here, while the full text of Steve Taranovich’s “Nuvation at EELive: The Fun in Electronics Design” can be read on EDN here.

Atmel+ARM SoC = Crystal Board

The Crystal Board is an integrated development platform for DIY Makers and engineers. The open source board, powered by a quad-core 1.8 GHz ARM Cortex A9 processor (RK3188), is also equipped with Atmel’s Atmega328 MCU to facilitate Arduino compatibility.

Additional platform specs include a MALI 400 GPU (ARM), SD card, 1-2GB RAM, Bluetooth, WiFi, Ethernet, GPS an FPGA (Field-Programmable Gate Array), along with multiple connections and sensors. The board only requires a single power supply and can be powered via an external battery or laptop USB port.

“With Atmel’s Atmega328 and Arduino UNO compatible pins, you can use any Arduino shields on the market [with] ease,” a Red Crystal rep explained in a recent Kickstarter post. “In addition, Atmel’s MCU communicates with [the] ARM SoC via UART.”

On the software side, the Red Crystal crew has developed a web server app with a slick GUI and is currently working on coding cloud-based software that will allow users to more effectively manage and control multiple boards.

Interested in learning more about Crystal Board? You can check out the project’s official Kickstarter page here.

Atmel MCUs: High performance for the IoT

Atmel microcontrollers (MCUs) are designed to deliver maximum performance and meet the requirements of advanced applications. That is why our MCUs offer highly integrated architecture optimized for high-speed connectivity, optimal data bandwidth and rich interface support – making them ideal for powering the smart, connected products at the heart of The Internet of Things (IoT).

Essentially, the Internet of Things (IoT) refers to a future world where all types of electronic devices link to each other via the Internet. Today, it’s estimated that there are nearly 10 billion devices in the world connected to the Internet, a figure expected to triple to nearly 30 billion by 2020.

“As applications become more interconnected and user interfaces become richer, microcontrollers must handle and transfer ever-growing levels of data,” an Atmel engineering rep told Bits & Pieces. “To boost performance for these smart, connected applications, Atmel’s 8-bit Flash MCUs integrate a wide range of classic communication peripherals, such as UART, SPI and I2C. Plus, our higher-performance 32-bit MCUs and embedded MPUs (eMPUs) feature Ethernet and full-speed and high-speed USB, while also providing extension ports for external communication modules such as WiFi or cellular modems.”

More specifically, Atmel’s ARM-based SAM9G45 eMPU  boasts high-speed 480 Mbps USB Host and Device Ports with on-chip transceivers, Ethernet MAC and SDIO/SD Card/MMC interfaces – offering developers an easy way to manage large amounts of data and interconnection both between systems and printed circuit boards (PCBs) inside a system. Indeed, the SAM9G45 eMPU is fully compliant with both EHCI and OHCI standards, enabling easy porting of USB host drivers to the SAM9G45.

Similarly, Atmel’s 32-bit AVR and AT91SAM devices are also well-suited for a wide range of standards-based high-speed USB applications. To be sure, the peripheral DMA controller found in the AVR XMEGA and AVR UC3 facilitates efficient data transfers between peripherals and memories with minimal CPU intervention. This eliminates CPU bottlenecks, allowing AVR microcontrollers to achieve transfer rates of up to 33 MBit/s per SPI and USART port with only a 15 percent load on the CPU.

“In addition, Atmel offers a complete line of IEEE 802.15.4-compliant, IPv6/6LoWPAN based, ZigBee certified wireless solutions,” the engineering rep continued. “They are based on our extensive family of RF transceivers, 8-bit and 32-bit AVR, and ARM microcontrollers. As expected, to ease development and speed time to market, Atmel offers a variety of free software stacks, reference designs, wireless modules and development kits.”

In terms of ensuring sufficient data bandwidth, Atmel’s 32-bit MCUs and eMPUs contains a set of parallel data buses where each bus master controls its own dedicated bus connected to all the slaves. This lets the devices support tremendous data bandwidth and removes processing bottlenecks. Atmel 400 MHz eMPUs also feature a high data speedway architecture based on a peripheral DMA (direct memory access) and distributed memory architecture that, together with a multi-layer bus matrix, enables multiple simultaneous data transfers between memories, peripherals and external interfaces without consuming CPU clock cycles.

Meanwhile, select models of Atmel’s 32-bit microcontrollers feature additional SRAM blocks connected to the multi-layer databus or tightly-coupled with the CPU, enabling devices with multiple high-speed communication interfaces to transfer more data by allowing each peripheral to use all of the available bandwidth of any one of the SRAMs. Combined with the peripheral DMA controller, this allows large blocks of data to be transferred with minimal load on the CPU.

It should also be noted that Atmel’s versatile and expansive MCU portfolio can be used to power a wide range of sophisticated interfaces. Examples include industrial applications, such as home and commercial building automation, data loggers, point-of-sale terminals and cash registers, in-house displays for energy metering, alarm systems and medical equipment – all are joining the “smart” revolution currently enjoyed by portable media player and smartphone markets.

So in addition to ubiquitous Internet connectivity, a central aspect of The Internet of Things, the way in which individuals interface and interact with equipment is fundamentally changing. This is prompting hardware designers to increase the processor performance to several 100 MIPS, the peripheral data rates to tens of Mbps and on and off-chip bandwidth to Gbps. As such, the memory size scales with the software to several Mbytes in cases of an RTOS-based implementation or tens of Mbytes for Linux or Microsoft Embedded CE.

Last, but certainly not least, videos are replacing static images. To address this demand, the Atmel SAM9M10 eMPU embeds a high-performance hardware video decoder and 2D accelerator, delivering a high-quality user experience, all while preserving the full processing power of the central processing unit for the application.

“Simply put, we are continuing to build on its legacy of innovation and highly integrated designs, to deliver a solid combination of performance, flexibility and efficiency to support the machine-to-machine (M2M) communications and evolution of the ‘industrial Internet,'” the engineering rep added.

SleepWalking Helps Conserve Energy

Imagine you are the sole care-provider for a household full of babies all under the age of 3.  Each and every single one of them requires you to tend their needs and desires.  From feeding to going to the bathroom, from burping to changing their diapers, from bathing to putting them to nap/sleep to keeping them entertained, you are needed every single step of the way.  Isn’t that just exhausting?  Fast forward by a decade when they are grow to become teenagers – autonomy and self-sufficiency – in which they can all satisfy their own basic needs without your help, unless it’s an urgent matter.  Now you have much more free time to read a book, surf the net, get a job, or take a nap.

In essence, this is what SleepWalking is all about in the realm of an Atmel MCU.  Traditionally a technology found in the AVR architecture only, it is now incorporated into the ARM architecture as well.  It is a feature that extends the concept of autonomous peripherals (babies) that operate independently of the CPU core (a parent or care-provider) during active mode, to actually keeping the peripherals functional when the system clock has been stopped. This is achieved by clocking the peripherals using the real‐time clock (RTC), instead of the system clock.

sleepwalking explained

In the SAM4L, SleepWalking has been integrated into many of the peripherals, including the analog comparator, the ADC, the I2C, UART and the capacitive touch interface. It is then the peripheral that decides whether to wake the system, instead of the CPU waking periodically to carry out an interrupt service routine.  With this feature, the need to wake the CPU reduces significantly thus allowing it to stay inactive for longer and more frequent and thereby conserving more energy.

For more information, check out this video for a more detailed explanation on SleepWalking.  Please note: despite the AVR UC3 being used as an example in the video, the underlying fundamentals of how SleepWalking works and its benefits are the same as in the ARM SAM4L.