Tag Archives: Atmel SMART ARM based processors

Are you designing for the latest automotive embedded system?


Eventually, self-driving cars will arrive. But until then, here’s a look at what will drive that progression.


The next arrow of development is set for automotive

We all have seen it. We all have read about it in your front-center technology news outlets. The next forefront for technology will take place in the vehicle. The growing market fitted with the feature deviation trend does not appeal to the vision of customizing more traditional un-connected, oiled and commonly leveraged chassis vehicles of today. Instead, ubiquity in smartphones have curved a design trend, now mature while making way for the connected car platform. The awaiting junction is here for more integration of the automotive software stack.  Opportunities for the connected car market are huge, but multiple challenges still exist. Life-cycles in the development of automotive and the mobile industry are a serious barrier for the future of connected cars. Simply, vehicles take much longer to develop than smartphones other portable gadgetry. More integration from vendors and suppliers are involved with the expertise to seamlessly fit the intended blueprint of the design. In fact, new features such as the operating system are becoming more prevalent, while the demand for sophisticated and centrally operated embedded systems are taking the height of the evolution. This means more dependence on integration of data from various channels, actuators, and sensors — the faculty to operate all the new uses cases such as automatic emergency response systems are functionality requiring more SoC embedded system requirements.

A step toward the connected car - ecall and how it works

What is happening now?

People. Process. Governance. Adoption. Let’s look at the similarities stemmed from change. We are going to witness new safety laws and revised regulations coming through the industry. These new laws will dictate the demand for connectivity. Indeed, drawing importance this 2015 year with the requirement set by 2018, European Parliament voted in favor of eCall regulation. Cars in Europe must be equipped with eCall, a system that automatically contacts emergency services directing them to the vehicle location in the event of an emergency. The automotive and mobile industries have different regional and market objectives. Together, all the participants in both market segments will need to find ways to collaborate in order to satisfy consumer connectivity needs. Case in point, Chrysler has partnered with Nextel to successfully connect cars like their Dodge Viper, while General Motors uses AT&T as its mobile development partner.

General Motors selected AT&T as its mobile partner

What is resonating from the sales floor and customer perspective?

The demand is increasing for more sophistication and integration of software in the cabin of cars. This is happening from the manufacturer to the supplier network then to the integration partners — all are becoming more engaged to achieve the single outcome, pacing toward the movement to the connected car. Stretched as far as the actual retail outlets, auto dealers are shifting their practice to be more tech savvy, too. The advent of the smart  vehicle has already dramatically changed the dealership model, while more transformation awaits the consumer.

On the sales floor as well as the on-boarding experience, sales reps must plan to spend an hour or more teaching customers how to use their car’s advanced technology. But still, these are only a few mentioned scenarios where things have changed in relation to cars and how they are sold and even to the point of how they are distributed, owned, and serviced. One thing for certain, though, is that the design and user trend are intersecting to help shape the demand and experience a driver wants in the connected car. This is further bolstered by the fast paced evolution of smartphones and the marketing experiences now brought forth by the rapid adoption and prolific expansion of the mobile industry tethered by their very seamless and highly evolved experiences drawn from their preferred apps.

Today, customer experiences are becoming more tailored while users, albeit on the screen or engaged with their mobile devices are getting highly acquainted with the expectation of “picking up from where I left off” regardless of what channel, medium, device, or platform.  Seamless experiences are breaking through the market.  We witness Uber, where users initialize their click on their smartphone then follows by telemetry promoted from Uber drivers and back to the users smart phone.  In fact, this happens vis versa, Uber driver’s have information on their console showing customer location and order of priority.  Real life interactions are being further enhanced by real-time data, connecting one device to draw forth another platform to continue the journey.  Transportation is one of the areas where we can see real-time solutions changing our day-to-day engagement.  Some of these are being brought forth by Atmel’s IoT cloud partners such as PubNub where they leverage their stack in devices to offer dispatch, vehicle state, and geo fencing for many vehicle platforms.  Companies like Lixar, LoadSmart, GetTaxi, Sidecar, Uber, Lyft are using real-time technologies as integral workings to their integrated vehicle platforms.

The design trajectory for connected cars continues to follow this arrow forward

Cars are becoming more of a software platform where value chain add-ons tied to an ecosystem are enabled within the software tethered by the cloud where data will continue to enhance the experience. The design trajectory for connected cars follow this software integration arrow.  Today, the demand emphasizes mobility along with required connectivity to customer services and advanced functions like power management for electric vehicles, where firmware/software updates further produce refined outcomes in the driver experience (range of car, battery management, other driver assisted functionalities).

Carmakers and mobile operators are debating the best way to connect the car to the web. Built-in options could provide stronger connections, but some consumers prefer tethering their existing smartphone to the car via Bluetooth or USB cable so they can have full access to their personal contacts and playlists. Connected car services will eventually make its way to the broader car market where embedded connections and embedded systems supporting these connections will begin to leverage various needs to integrate traditional desperate signals into a more centrally managed console.

Proliferation of the stack

The arrow of design for connected cars will demand more development, bolstering the concept that software and embedded systems factored with newly-introduced actuators and sensors will become more prevalent. We’re talking about “software on wheels,” “SoC on wheels,” and “secured mobility.”

Design wise, the cost-effective trend will still remain with performance embedded systems. Many new cars may have extremely broad range of sensor and actuator‑based IoT designs which can be implemented on a single compact certified wireless module.

The arrow for connected cars will demand more development bolstering the concept that software and embedded systems factored with newly introduced actuators & sensors will become more prevalent; “software on wheels”, “SoC on wheels” and “secured mobility”.

Similarly, having fastest startup times by performing the task with a high-performance MCU vs MPU, is economic for a designer. It can not only reduce significant bill of materials cost, development resources, sculpted form factor, custom wireless design capabilities, but also minimize the board footprint. Aside from that, ARM has various IoT device development options, offering partner ecosystems with modules that have open standards. This ensures ease of IoT or connected car connectivity by having type approval certification through restrictive access to the communications stacks.

Drivers will be prompted with new end user applications — demand more deterministic code and processing with chips that support the secure memory capacity to build and house the software stack in these connected car applications.

Feature upon feature, layer upon layer of software combined with characteristics drawn from the events committed by drivers, tires, wheels, steering, location, telemetry, etc. Adapted speed and braking technologies are emerging now into various connected car makes, taking the traditional ABS concept to even higher levels combined with intelligence, along with controlled steering and better GPS systems, which will soon enable interim or cruise hands-free driving and parking.

Connected Car Evolution

Longer term, the technological advances behind the connected car will eventually lead to self-driving vehicles, but that very disruptive concept is still far out.

Where lies innovation and change is disruption

Like every eventual market disruption, there will be the in-between development of this connected car evolution. Innovative apps are everywhere, especially the paradigm where consumers have adopted to the seamless transitional experiences offered by apps and smartphones. Our need for ubiquitous connectivity and mobility, no matter where we are physically, is changing our vehicles into mobile platforms that want us users to seamlessly be connected to the world. This said demand for connectivity increases with the cost and devices involved will become more available. Cars as well as other mobility platforms are increasingly becoming connected packages with intelligent embedded systems. Cars are offering more than just entertainment — beyond providing richer multimedia features and in-car Internet access.  Further integration of secure and trusted vital data and connectivity points (hardware security/processing, crypto memory, and crypto authentication) can enable innovative navigation, safety and predictive maintenance capabilities.

Carmakers are worried about recent hacks,  especially with issues of security and reliability, making it unlikely that they will be open to every kind of app.  They’ll want to maintain some manufactured control framework and secure intrusion thwarting with developers, while also limiting the number of apps available in the car managing what goes or conflicts with the experience and safety measures.  Importantly, we are taking notice even now. Disruption comes fast, and Apple and others have been mentioned to enter this connected car market. This is the new frontier for technological equity scaling and technology brand appeal. Much like what we seen in the earlier models of Blackberry to smartphones, those late in the developmental evolution of their platforms may be forced adrift or implode by the market.

No one is arguing it will happen. Eventually, self-driving cars will arrive.  But for now, it remains a futuristic concept.

What can we do now in the invention, design and development process?

The broader output of manufactured cars will need to continue in leveraging new designs that take in more integration of traditional siloed integration vendors so that the emergence of more unified and centrally managed embedded controls can make its way. Hence, the importance now exists in the DNA of a holistically designed platform fitted with portfolio of processors and security to take on new service models and applications.

This year, we have compiled an interesting mixture of technical articles to support the development and engineering of car access systems, CAN and LIN networks, Ethernet in the car, capacitive interfaces and capacitive proximity measurement.

In parallel to the support of helping map toward the progress and evolution of the connected car, a new era of design exists. One in which the  platform demands embedded controls to evenly match their design characteristics and application use cases. We want to also highlight the highest performing ARM Cortex-M7 based MCU in the market, combining exceptional memory and connectivity options for leading design flexibility. The Atmel | SMART ARM Cortex-M7 family is ideal for automotive, IoT and industrial connectivity markets. These SAM V/E/S family of microcontrollers are the industry’s highest performing Cortex-M microcontrollers enhancing performance, while keeping cost and power consumption in check.

So are you designing for the latest automotive, IoT, or industrial product? Here’s a few things to keep in mind:

  • Optimized for real-time deterministic code execution and low latency peripheral data access
  • Six-stage dual-issue pipeline delivering 1500 CoreMarks at 300MHz
  • Automotive-qualified ARM Cortex-M7 MCUs with Audio Video Bridging (AVB) over Ethernet and Media LB peripheral support (only device in the market today)
  • M7 provides 32-bit floating point DSP capability as well as faster execution times with greater clock speed, floating point and twice the DSP power of the M4

We are taking the connected car design to the next performance level — having high-speed connectivity, high-density on-chip memory, and a solid ecosystem of design engineering tools. Recently, Atmel’s Timothy Grai added a unveiling point to the DSP story in Cortex-M7 processor fabric. True DSPs don’t do control and logical functions well; they generally lack the breadth of peripherals available on MCUs. “The attraction of the M7 is that it does both — DSP functions and control functions — hence it can be classified as a digital signal controller (DSC).” Grai quoted the example of Atmel’s SAM V70 and SAM V71 microcontrollers are used to connect end-nodes like infotainment audio amplifiers to the emerging Ethernet AVB network. In an audio amplifier, you receive a specific audio format that has to be converted, filtered, and modulated to match the requirement for each specific speaker in the car. Ethernet and DSP capabilities are required at the same time.

“The the audio amplifier in infotainment applications is a good example of DSC; a mix of MCU capabilities and peripherals plus DSP capability for audio processing. Most of the time, the main processor does not integrate Ethernet AVB, as the infotainment connectivity is based on Ethernet standard,” Grai said. “Large SoCs, which usually don’t have Ethernet interface, have slow start-up time and high power requirements. Atmel’s SAM V7x MCUs allow fast network start-up and facilitate power moding.”

Atmel has innovative memory technology in its DNA — critical to help fuel connected car and IoT product designers. It allows them to run the multiple communication stacks for applications using the same MCU without adding external memory. Avoiding external memories reduces the PCB footprint, lowers the BOM cost and eliminates the complexity of high-speed PCB design when pushing the performance to a maximum.

Importantly, the Atmel | SMART ARM Cortex-M7 family achieves a 1500 CoreMark Score, delivering superior connectivity options and unique memory architecture that can accommodate the said evolve of the eventual “SoC on wheels” design path for the connected car.

How to get started

  1. Download this white paper detailing how to run more complex algorithms at higher speeds.
  2. Check out the Atmel Automotive Compilation.
  3. Attend hands-on training onboard the Atmel Tech on Tour trailer. Following these sessions, you will walk away with the Atmel | SMART SAM V71 Xplained Ultra Evaluation Kit.
  4. Design the newest wave of embedded systems using SAM E70, SAM S70, or SAM V70 (ideal for automotive, IoT, smart gateways, industrial automation and drone applications, while the auto-grade SAM V70 and SAM V71 are ideal for telematics, audio amplifiers and advanced media connectivity).

IMG_3659

[Images: European Commission, GSMA]

4 designs tips for AVB in-car infotainment


AVB is clearly the choice of several automotive OEMs, says Gordon Bechtel, CTO, Media Systems, Harman Connected Services.


Audio Video Bridging (AVB) is a well-established standard for in-car infotainment, and there is a significant amount of activity for specifying and developing AVB solutions in automobiles. The primary use case for AVB is interconnecting all devices in a vehicle’s infotainment system. That includes the head unit, rear-seat entertainment systems, telematics unit, amplifier, central audio processor, as well as rear-, side- and front-view cameras.

The fact that these units are all interconnected with a common, standards-based technology that is certified by an independent market group — AVnu — is a brand new step for the automotive OEMs. The AVnu Alliance facilitates a certified networking ecosystem for AVB products built into the Ethernet networking standard.

Figure 1 - AVB is an established technology for in-car infotainmentAccording to Gordon Bechtel, CTO, Media Systems, Harman Connected Services, AVB is clearly the choice of several automotive OEMs. His group at Harman develops core AVB stacks that can be ported into car infotainment products. Bechtel says that AVB is a big area of focus for Harman.

AVB Design Considerations

Harman Connected Services uses Atmel’s SAM V71 microcontrollers as communications co-processors to work on the same circuit board with larger Linux-based application processors. The software firm writes codes for customized reference platforms that automotive OEMs need to go beyond the common reference platforms.

Based on his experience of automotive infotainment systems, Bechtel has outlined the following AVB design dos and don’ts for the automotive products:

1. Sub-microsecond accuracy: Every AVB element on the network is hooked to the same accurate clock. The Ethernet hardware should feature a time stand to ensure packet arrival in the right order. Here, Bechtel mentioned the Atmel | SMART SAM V71 MCU that boasts screen registers to ensure advanced hardware filtering of inbound packets for routing to correct receive-end queues.

2. Low latency: There is a lot of data involved in AVB, both in terms of bit rate and packet rate. AVB allows low latency through reservations for traffic, which in turn, facilitate faster packet transfer for higher priority data. Design engineers should carefully shape the data to avoid packet bottlenecks as well as data overflow.

Figure 2 - Bechtel

Bechtel once more pointed to Atmel’s SAM V71 microcontrollers that provide two priority queues with credit-based shaper (CBS) support that allows the hardware-based traffic shaping compliant with 802.1Qav (FQTSS) specifications for AVB.

3. 1588 Timestamp unit: It’s a protocol for correct and accurate 802.1 AS (gPTP) support as required by AVB for precision clock synchronization. The IEEE 802.1 AS carries out time synchronization and is synonymous with generalized Precision Time Protocol or gPTP.

Timestamp compare unit and a large number of precision timer counters are key for the synchronization needed in AVB for listener presentations times and talker transmissions rates as well as for media clock recovery.

4) Tightly coupled memory (TCM): It’s a configurable high-performance memory access system to allow zero-wait CPU access to data and instruction memory blocks. A careful use of TCM enables much more efficient data transfer, which is especially important for AVB class A streams.

It’s worth noting that MCUs based on ARM Cortex-M7 architecture have added the TCM capability for fast and deterministic code execution. TCM is a key enabler in running audio and video streams in a controlled and timely manner.

AVB and Cortex-M7 MCUs

The Cortex-M7 is a high-performance core with almost double the power efficiency of the older Cortex-M4. It features a six-stage superscalar pipeline with branch prediction — while the M4 has a three-stage pipeline.  Bechtel of Harman acknowledged that M7 features equate to more highly optimized code execution, which is important for Class A audio implementations with lower power consumption.

Again, Bechtel referred to the SAM V71 MCUs — which are based on the Cortex-M7 architecture — as particularly well suited for the smaller ECUs. “Rear-view cameras and power amplifiers are good examples where the V71 microcontroller would be a good fit,” he said. “Moreover, the V71 MCUs can meet the quick startup requirements needed by automotive OEMs.”

Figure 3 - Atmel's V71 is an M7 chip for Ethernet AVB networking and audio processing

The infotainment connectivity is based on Ethernet, and most of the time, the main processor does not integrate Ethernet AVB. So the M7 microcontrollers, like the V71, bring this feature to the main processor. For the head unit, it drives the face plate, and for the telematics control, it contains the modem to make calls so echo cancellation is a must, for which DSP capability is required.

Take the audio amplifier, for instance, which receives a specific audio format that has to be converted, filtered and modulated to match the requirement for each specific speaker in the car. This means infotainment system designers will need both Ethernet and DSP capability at the same time, which Cortex-M7 based chips like V71 provide at low power and low cost.

6 memory considerations for Cortex-M7-based IoT designs


Taking a closer look at the configurable memory aspects of Cortex-M7 microcontrollers.


Tightly coupled memory (TCM) is a salient feature in the Cortex-M7 lineup as it boosts the MCU’s performance by offering single cycle access for the CPU and by securing the high-priority latency-critical requests from the peripherals.

Cortex-M7-chip-diagramLG

The early MCU implementations based on the ARM’s M7 embedded processor core — like Atmel’s SAM E70 and S70 chips — have arrived in the market. So it’d be worthwhile to have a closer look at the configurable memory aspects of M7 microcontrollers and see how the TCMs enable the execution of deterministic code and fast transfer of real-time data at the full processor speed.

Here are some of the key findings regarding the advanced memory architecture of Cortex-M7 microcontrollers:

1. TCM is Configurable

First and foremost, the size of TCM is configurable. TCM, which is part of the physical memory map of the MCU, supports up to 16MB of tightly coupled memory. The configurability of the ARM Cortex-M7 core allows SoC architects to integrate a range of cache sizes. So that industrial and Internet of Things product developers can determine the amount of critical code and real-time data in TCM to meet the needs of the target application.

The Atmel | SMART Cortex-M7 architecture doesn’t specify what type of memory or how much memory should be provided; instead, it leaves these decisions to designers implementing M7 in a microcontroller as a venue for differentiation. Consequently, a flexible memory system can be optimized for performance, determinism and low latency, and thus can be tuned to specific application requirements.

2. Instruction TCM

Instruction TCM or ITCM implements critical code with deterministic execution for real-time processing applications such as audio encoding/decoding, audio processing and motor control. The use of standard memory will lead to delays due to cache misses and interrupts, and therefore will hamper the deterministic timing required for real-time response and seamless audio and video performance.

The deterministic critical software routines should be loaded in a 64-bit instruction memory port (ITCM) that supports dual-issue processor architecture and provide single-cycle access for the CPU to boost MCU performance. However, developers need to carefully calibrate the amount of code that need zero-wait execution performance to determine the amount of ITCM required in an MCU device.

The anatomy of TCM inside the M7 architecture

The anatomy of TCM inside the M7 architecture.

3. Data TCM

Data TCM or DTCM is used in fast data processing tasks like 2D bar decoding and fingerprint and voice recognition. There are two data ports (DTCMs) that provide simultaneous and parallel 32-bit data accesses to real-time data. Both instruction TCM and data TCM — used for efficient access to on-chip Flash and external resources — must have the same size.

4. System RAM and TCM

System RAM, also known as general RAM, is employed for communications stacks related to networking, field buss, high-bandwidth bridging, USB, etc. It implements peripheral data buffers generally through direct memory access (DMA) engines and can be accessed by masters without CPU intervention.

Here, product developers must remember the memory access conflicts that arise from the concurrent data transfer to both CPU and DMA. So developers must set clear priorities for latency-critical requests from the peripherals and carefully plan latency-critical data transfers like the transfer of a USB descriptor or a slow data rate peripheral with a small local buffer. Access from the DMA and the caches are generally burst to consecutive addresses to optimize system performance.

It’s worth noting that while system memory is logically separate from the TCM, microcontroller suppliers like Atmel are incorporating TCM and system RAM in a single SRAM block. That lets IoT developers share general-purpose tasks while splitting TCM and system RAM functions for specific use cases.

A single SRAM block for TCM and system memory allows higher flexibility and utilization

A single SRAM block for TCM and system memory allows higher flexibility and utilization.

5. TCM Loading

The Cortex-M7 uses a scattered RAM architecture to allow the MCU to maximize performance by having a dedicated RAM part for critical tasks and data transfer. The TCM might be loaded from a number of sources, and these sources aren’t specified in the M7 architecture. It’s left to the MCU designers whether there is a single DMA or several data loading points from various streams like USB and video.

It’s imperative that, during the software build, IoT product developers identify which code segments and data blocks are allocated to the TCM. This is done by embedding programs into the software and by applying linker settings so that software build appropriately places the code in memory allocation.

6. Why SRAM?

Flash memory can be attached to a TCM interface, but the Flash cannot run at the processor clock speed and will require caching. As a result, this will cause delays when cache misses occur, threatening the deterministic value proposition of the TCM technology.

DRAM technology is a theoretical choice but it’s cost prohibitive. That leaves SRAM as a viable candidate for fast, direct and uncached TCM access. SRAM can be easily embedded on a chip and permits random accesses at the speed of the processor. However, cost-per-bit of SRAM is higher than Flash and DRAM, which means it’s critical to keep the size of the TCM limited.

Atmel | SMART Cortex-M7 MCUs

Take the case of Atmel’s SMART SAM E70, S70 and V70/71 microcontrollers that organize SRAM into four memory banks for TCM and System SRAM parts. The company has recently started shipping volume units of its SAM E70 and S70 families for the IoT and industrial markets, and claims that these MCUs provide 50 percent better performance than the closest competitor.

SAM-E70_S70_BlockDiagram_Lg_929x516

Atmel’s M7-based microcontrollers offer up to 384KB of embedded SRAM that is configurable as TCM or system memory for providing IoT designs with higher flexibility and utilization. For instance, E70 and S70 microcontrollers organize 384KB of embedded SRAM into four ports to limit memory access conflicts. These MCUs allocate 256KB of SRAM for TCM functions — 128 KB for ITCM and DTCM each — to deliver zero wait access at 300MHz processor speed, while the remaining 128KB of SRAM can be configured as system memory running at 150MHz.

However, the availability of an SRAM block organized in the form of a memory bank of 384KB means that both system SRAM and TCM can be used at the same time.The large on-chip SRAM of 384KB is also critical for many IoT devices, since it enables them to run multiple communication stacks and applications on the same MCU without adding external memory. That’s a significant value proposition in the IoT realm because avoiding external memories lowers the BOM cost, reduces the PCB footprint and eliminates the complexity in the high-speed PCB design.

10 (+1) invaluable steps to launching your next IoT product


Let’s transition your products from a ‘dumb’ to ‘smart’ thing.


Many enterprises, startups and organizations have already been exposed to the innovation land grab stemming from the rapidly evolving Internet of Things (IoT). What’s available in the product/market fit arena? This is the hunt to cease some segment of the multi-trillion dollar growth reported to gain from the IoT, enabling embedded system connectivity coupled with the ecosystem value-add of a product or service. Even for that matter, transforming a mere idea that centers around connectivity solutions can present an array of challenges, particularly when one seeks to bring to market disruptive ways for the end-user to adopt from the more traditional way of doing things (e.g. GoPro, PebbleWatch, FitBit, and even to as far as e-health monitors, tire subscriptions, self-driving vehicles, smart bracelets, connected medical apparatus or Industrial Internet devices, home automation systems and more).

All together, there’s one overlaying theme to these Internet-enabled products. They are all pervasively SMART technologies that help monetize the IoT. Now, let’s get your products to transition from a once ordinary, mundane object to a much smarter, more secure “thing.” When doing so, this too can often present a few obstacles for designers, especially as it requires a unique set of skills needed to interface systems with connectivity to the cloud or Internet.

To top it all off, there may already be various product lines in existence that have a mandate to leverage a connected ecosystem/design. In fact, even new ones require connectivity to the cloud, having designs set forth to enhance via customer usage then combining this user data with other associated data points. Already, the development to enable such devices require an assortment of skills. It’s an undertaking, one in which requires knowledge and expertise to command stable connectivity in the infrastructure and design a product with security, scalability, and low power.

Moving ahead, here are some recommendations developers and Makers should know:

  1. Identify a need and market: The value of the smart device lies in in the service that it brings to the customer. Identify the need to develop a strong offer that brings value or enhances efficiency rather than creating a simple gadget. (See Marc Andreesen’s infamous blog on product/market fit for more tips).
  1. Validate your ideation: Carry out market research. Do your due diligence. Determine whether the device you think of creating already exists. Can improvements be ascertained with testimonial as an enhanced or unique experience? Indeed, benchmarking will allow you to discover any competitors, find sources of inspiration, develop a network of ideas to pool and find other areas for improvement as well.
  1. Prototype toward MVP: New device fabrication techniques, such as 3D printing, are the ideal creative validation for producing prototypes much faster and for less money. They also promote iteration, which is an integral process when designing the device towards MVP.
  1. Connect the ‘thing’ then concert it into a smart ‘thing:’ Right now, there is no mandatory standard for interconnecting different devices. Selecting the right technology is essential, particularly if the device requires low-power (speaking of low-power….) and event and state controls, which highly optimize extended power and the services to enrich the information system and eventally enhance user experience with a roadmap toward an ecosystem.
  1. Develop the application: Today, the primary smart devices are linked to an dedicated mobile app. Since the app transforms the smartphone into a remote control, it must be be easy to use for your end-users, and more importantly, simply upgraded via the cloud.
  1. Manage the data: Fitted with a multitude of sensors, connected gadgets generate an enormous amount of data that need to be processed and stored with the utmost security across all layers even to as far as using cryptography in memory. (After all, you don’t want your design become a ‘Tales from the Crypt-O” horror story.) 
  1. Analyze and exploit the data: By processing and analyzing the data, a company can extract the necessary information to deploy the right service in the right place at the right time.
  1. Measure the impact of the smart device: Set up probes to monitor your devices and data traffic quality. Answer questions objectively as to how it would securely scale and evolve should there be an instant high volume success and usage. This will help you measure the impact of the smart device in real time and adapt its actions accordingly, and model into the product roadmap and MVP spec.
  1. Iterate to fine-tune the device’s use: After launching the project, the process has only begun. Feedback needs to be taken into account in order to adjust and fine-tune the project. Due to its very nature, digital technology requires continuous adaptation and iteration. “Try and learn” and present riskier ideas to products are the fundamental principles behind transformation when imposing a new use.
  1. Prototype again: Continuous adaptation and iteration means that your company needs to produce a new prototype.
Here’s 10 + 1 invaluable Step to Launching Your IoT Project or Products

Here’s 10 + 1 invaluable steps to launching your IoT project or product.

11. Take advantage of the hands-on training in your region.

As an application space, IoT sensor nodes are enabled by a number of fundamental technologies, namely a low-power MCU, some form of wireless communication and strong security. With this in mind, the newly revealed Atmel IoT Secure Hello World series will offer attendees hands-on training, introducing them to some of the core technologies making the Internet of Things possible, including Wi-Fi and CryptoAuthentication.

What’s more, these sessions will showcase Atmel’s diverse Wi-Fi capabilities and CryptoAuthentication hardware key storage in the context of the simplest possible use cases. This includes learning how to send temperature information to any mobile device via a wireless network and how to enable the remote control of LEDs on a SAM D21 Xplained Pro board over a Wi-Fi network using a WINC1500. In addition, attendees will explore authentication of IoT nodes, as well as how to implement a secure communications link — something that will surely come in handy when preparing to launch your next smart product.

As you can see, so far, everyone is LOVING the Hello World sessions — from hardcore embedded engineers to hobbyists. Here some recent social activity following the recent Tech on Tour events in both Manchester and Heathrow, UK. Need we say more? These tweets say a thousand words!

Atmel-Tech-On-Tour-Europe-UK

Connected and ready to go… all before lunch! (Yes, there’s food as well!)

 

Atmel-Tech-On-Tour-Europe-BYOD

Atmel’s Tech on Tour and proud partner EBV Elektronik proudly thankful for the successful event in Manchester, UK.

 

Atmel-Tech-On-Tour-Europe

Atmel’s Tech on Tour just successfully completed a full house attendance training in Manchester, UK

 

Find out how you too can receive in-depth IoT training. As the Atmel | Tech on Tour makes it way throughout Europe, Asia, and North America, make sure you know when the team arrives in your town!  Don’t miss it. Upon registering, you will even receive a WINC1500 Xplained Pro Starter Kit to take home.

4 reasons why Atmel is ready to ride the IoT wave


The IoT recipe comprises of three key technology components: Sensing, computing and communications.


In 2014, a Goldman Sachs’ report took many people by surprise when it picked Atmel Corporation as the company best positioned to take advantage of the rising Internet of Things (IoT) tsunami. At the same time, the report omitted tech industry giants like Apple and Google from the list of companies that could make a significant impact on the rapidly expanding IoT business. So what makes Atmel so special in the IoT arena?

The San Jose, California–based chipmaker has been proactively building its ‘SMART’ brand of 32-bit ARM-based microcontrollers that boasts an end-to-end design platform for connected devices in the IoT realm. The company with two decades of experience in the MCU business was among the first to license ARM’s low-power processors for IoT chips that target smart home, industrial automation, wearable electronics and more.

Atmel and IoT (Internet of Things)

Goldman Sachs named Atmel a leader in the Internet of Things (IoT) market.

Goldman Sachs named Atmel a leader in the Internet of Things (IoT) market

A closer look at the IoT ingredients and Atmel’s product portfolio shows why Goldman Sachs called Atmel a leader in the IoT space. For starters, Atmel is among the handful of chipmakers that cover all the bases in IoT hardware value chain: MCUs, sensors and wireless connectivity.

1. A Complete IoT Recipe

The IoT recipe comprises of three key technology components: Sensing, computing and communications. Atmel offers sensor products and is a market leader in MCU-centric sensor fusion solutions than encompass context awareness, embedded vision, biometric recognition, etc.

For computation—handling tasks related to signal processing, bit manipulation, encryption, etc.—the chipmaker from Silicon Valley has been offering a diverse array of ARM-based microcontrollers for connected devices in the IoT space.

Atmel-IoT-Low-Power-wearable

Atmel has reaffirmed its IoT commitment through a number of acquisitions.

Finally, for wireless connectivity, Atmel has cobbled a broad portfolio made up of low-power Wi-Fi, Bluetooth and Zigbee radio technologies. Atmel’s $140 million acquisition of Newport Media in 2014 was a bid to accelerate the development of low-power Wi-Fi and Bluetooth chips for IoT applications. Moreover, Atmel could use Newport’s product expertise in Wi-Fi communications for TV tuners to make TV an integral part of the smart home solutions.

Furthermore, communications across the Internet depends on the TCP/IP stack, which is a 32-bit protocol for transmitting packets on the Internet. Atmel’s microcontrollers are based on 32-bit ARM cores and are well suited for TCP/IP-centric Internet communications fabric.

2. Low Power Leadership

In February 2014, Atmel announced the entry-level ARM Cortex M0+-based microcontrollers for the IoT market. The SAM D series of low-power MCUs—comprising of D21, D10 and D11 versions—featured Atmel’s signature high-end features like peripheral touch controller, USB interface and SERCOM module. The connected peripherals work flawlessly with Cortex M0+ CPU through the Event System that allows system developers to chain events in software and use an event to trigger a peripheral without CPU involvement.

According to Andreas Eieland, Director of Product Marketing for Atmel’s MCU Business Unit, the IoT design is largely about three things: Battery life, cost and ease-of-use. The SAM D microcontrollers aim to bring the ease-of-use and price-to-performance ratio to the IoT products like smartwatches where energy efficiency is crucial. Atmel’s SAM D family of microcontrollers was steadily building a case for IoT market when the company’s SAM L21 microcontroller rocked the semiconductor industry in March 2015 by claiming the leadership in low-power Cortex-M IoT design.

Atmel’s SAM L21 became the lowest power ARM Cortex-M microcontroller when it topped the EEMBC benchmark measurements. It’s plausible that another MCU maker takes over the EEMBC benchmarks in the coming months. However, according to Atmel’s Eieland, what’s important is the range of power-saving options that an MCU can bring to product developers.

“There are many avenues to go down on the low path, but they are getting complex,” Eieland added. He quoted features like multiple clock domains, event management system and sleepwalking that provide additional levels of configurability for IoT product developers. Such a set of low-power technologies that evolves in successive MCU families can provide product developers with a common platform and a control on their initiatives to lower power consumption.

3. Coping with Digital Insecurity

In the IoT environment, multiple device types communicate with each other over a multitude of wireless interfaces like Wi-Fi and Bluetooth Low Energy. And IoT product developers are largely on their own when it comes to securing the system. The IoT security is a new domain with few standards and IoT product developers heavily rely on the security expertise of chip suppliers.

Atmel offers embedded security solutions for IoT designs.

Atmel, with many years of experience in crypto hardware and Trusted Platform Modules, is among the first to offer specialized security hardware for the IoT market. It has recently shipped a crypto authentication device that has integrated the Elliptic Curve Diffie-Hellman (ECDH) security protocol. Atmel’s ATECC508A chip provides confidentiality, data integrity and authentication in systems with MCUs or MPUs running encryption/decryption algorithms like AES in software.

4. Power of the Platform

The popularity of 8-bit AVR microcontrollers is a testament to the power of the platform; once you learn to work on one MCU, you can work on any of the AVR family microcontrollers. And same goes for Atmel’s Smart family of microcontrollers aimed for the IoT market. While ARM shows a similarity among its processors, Atmel exhibits the same trait in the use of its peripherals.

Low-power SAM L21 builds on features of SAM D MCUs.

A design engineer can conveniently work on Cortex-M3 and Cortex -M0+ processor after having learned the instruction set for Cortex-M4. Likewise, Atmel’s set of peripherals for low-power IoT applications complements the ARM core benefits. Atmel’s standard features like sleep modes, sleepwalking and event system are optimized for ultra-low-power use, and they can extend IoT battery lifetime from years to decades.

Atmel, a semiconductor outfit once focused on memory and standard products, began its transformation toward becoming an MCU company about eight years ago. That’s when it also started to build a broad portfolio of wireless connectivity solutions. In retrospect, those were all the right moves. Fast forward to 2015, Atmel seems ready to ride on the market wave created by the IoT technology juggernaut.

Interested? You may also want to read:

Atmel’s L21 MCU for IoT Tops Low Power Benchmark

Atmel’s New Car MCU Tips Imminent SoC Journey

Atmel’s Sensor Hub Ready to Wear


Majeed Ahmad is author of books Smartphone: Mobile Revolution at the Crossroads of Communications, Computing and Consumer Electronics and The Next Web of 50 Billion Devices: Mobile Internet’s Past, Present and Future.

How Big Bang Theory and IoT relate to Tech on Tour


Hands-on ‘IoT Secure Hello World’ training introduces Atmel Wi-Fi and CrytoAuthentication technologies.


How The Big Bang Theory Relates to the Internet of Things

How many of you out there are fans of the CBS hit sitcom series Big Bang Theory? If you recall an episode from the show’s first season, entitled “The Cooper-Hofstadter Polarization,” the team of Sheldon Cooper, Leonard Hofstadter, Howard Wolowitz and Raj Koothrappali successfully triggered a lamp over the Internet using an X-10 system.

In order to accomplish this feat, the gang sent signals across the web and around the world from their apartment to connect not only their lights, but other electronics like their stereo and remote control cars as well.

“Gentlemen, I am now about to send a signal from this laptop through our local ISP racing down fiber optic cable at the of light to San Francisco bouncing off a satellite in geosynchronous orbit to Lisbon, Portugal, where the data packets will be handed off to submerged transatlantic cables terminating in Halifax, Nova Scotia and transferred across the continent via microwave relays back to our ISP and the external receiver attached to this…lamp,”  Wolowitz excitedly prefaced.

800px-X10_1

The funny thing is, the technology that the group of sitcom scientists was simulating could have just as easily been done using a Wi-Fi network controller like the WINC1500. However, at the time of airing back in March of 2008, open access for Internet users looking to control “things” around the house was seemingly something only engineers and super geeks thought possible.

We can imagine this is probably how it would’ve gone down…

Bringing Next-Generation Technology to You

In order to make the scene above possible, an Atmel | SMART SAM D21 was hooked up to the WINC1500 and connected to a solid-state relay, thereby enabling the team to control the lamp.

If this captivated your attention, then you’re in for a treat. That’s because Atmel is taking its “IoT Secure Hello World” Tech on Tour seminar on the road — starting with Europe!

As an application space, IoT sensor nodes are enabled by a number of fundamental technologies, namely a low-power MCU, some form of wireless communication and strong security. With this in mind, the Atmel IoT Secure Hello World series will offer attendees hands-on training, introducing them to some of the core technologies making the Internet of Things possible, including Wi-Fi and CryptoAuthentication.

These training sessions will showcase Atmel’s Wi-Fi capability and CryptoAuthentication hardware key storage in the context of the simplest possible use-case in order to focus attention on the practical aspects of combining the associated supporting devices and software. This includes learning how to send temperature information to any mobile device via a wireless network and how to enable the remote control of LEDs on a SAM D21 Xplained Pro board over a Wi-Fi network using a WINC1500. In addition, attendees will explore authentication of IoT nodes, as well as how to implement a secure communications link.

Take the very fundamental use-case of switching on an LED, for instance, which will represent our ‘Hello World!’ For this IoT application, the LED will be controlled using a smartphone app via the Internet, while a sensor node will be enabled to read an analog temperature sensor. The first part of the training will introduce Atmel Wi-Fi technology, which connects our embedded development kit of choice, an Atmel | SMART SAMD21 Xplained Pro, via the Atmel SmartConnect WINC1500 Wi-Fi module to a local access point. The result will be the ability to easily and securely send temperature information to any mobile device on the network, while also having remote control of the LED.

From the moment a ‘thing’ is connected, it becomes susceptible to a slew of potential security risks from hackers. That’s why the second part of the training will delve deeper into how CryptoAuthentication can be used to authenticate the temperature sensor node and host application before it can read the temperature information to avoid fake nodes. A secure communications link will be implemented using a session key to and from the remote node.

When all is said and done, building for the IoT demands innovative and secure solutions while architecting a balance between performance, scalability, compatibility, security, flexibility and energy efficiency — all of which Atmel covers extremely well.


Atmel | Tech on Tour Agenda At-a-Glance

The Atmel team will be coming through a number of major cities, from Manchester and Milan to Munich and Moscow. Ready to join us? Be sure to register for one of the Atmel | Tech on Tour European, Asia, or North America locations today! Upon registering, you will even receive a WINC1500 Xplained Pro Starter Kit to take home.

8:30 – 9:00     Check-In and Preparation

  • Assistance with installing software will be provided

9:00 – 10:15     Introduction to Atmel Wi-Fi Solution

  • WINC1500/WILC1000 Hardware and Performance Overview
  • Software and IoT Solution Overview
  • Wi-Fi Network Controller IoT Sensor Application

10:15 – 10:30    Hands-on Introduction

10:30 – 10:45    BREAK

10:45 – 12:30    Hands-on: WINC1500 Wi-Fi Network Controller IoT Sensor Application

  • Sending temperature information to any phone or tablet on the network
  • Enabling remote control of LED0 on the SAM D21 Xplained Pro board

12:30 – 1:30    LUNCH

1:30 – 2:15      Introduction to Atmel CryptoAuthentication IoT Security and Technology

2:15 – 3:00      Hands-on Introduction: Authenticating IoT Nodes

  • Authenticate the temp sensor node and host application before being able to read the temperature information to avoid fake nodes
  • How to implement a secure communications link using a session key to and from the remote node to any phone or tablet on the network

3:00 – 3:15    BREAK

3:45 – 4:30    Hands-on: Authenticating IoT Nodes (continued…)

4:30 – 5:00    Wrap-up, Questions and Answers


Prerequisites

Software Requirements

  • Download Atmel Studio 6.2 software.
  • Wireshark Packet Sniffer will be provided.

Hardware Requirements

  • Attendees are required to bring a laptop. Atmel will NOT supply computers at the training.
  • Please make sure to have administrator rights on your laptop.
  • Laptop must have at least one Internet port and one free USB host connector.

Evaluation Kit Requirements

  • Atmel | SMART SAMD21 – XPRO host MCU board
  • Atmel WINC1500 module mounted ATWINC 1500 Xplained Pro Extension (Product Code: ATWINC1500-XSTK)
  • Atmel Digital I/O WING extension board for sensor and SD-card input target USB

Simply the highest performing Cortex-M MCU


Why develop a new MCU instead of using a high-performance MPU? Eric Esteve says “simplicity.”


By Eric Esteve

If you target high growth markets like wearable (sport watches, fitness bands, medical), industrial (mPOS, telematics, etc.) or smart appliances, you expect using a power efficient MCU delivering high DMIPs count. We are talking about systems requiring a low bill of material (BoM) both in terms of cost and devices count. Using a MCU (microController) and not a MPU (microProcessor) allows for the minimizing of power consumption as such device like the SAM S70 runs at the 300 MHz range, not the GigaHertz, while delivering 1500 CoreMark. In fact, it’s the industry’s highest performing Cortex-M MCUs, but the device is still a microcontroller, offering multiple interface peripherals and the related control capabilities, like 10/100 Ethernet MAC, HS USB port (including PHY), up to 8 UARTs, two SPI, three I2C, SDIOs and even interfaces with Atmel Wi-Fi and ZigBee companion IC.

Atmel has a wide MCU offering from the lower end 8-bit MCU to the higher end Cortex-A5 MPU.

The Cortex-M7 family fits within the SAM4 Cortex-M4 and the SAM9 ARM9 products.
The Cortex-M7 family offers high performance up to 645 Dhrystone MIPS but as there is no Memory Management Unit, we can not run Operating System such as Linux. This family targets applications with high performance requirements and running RTOS or bare metal solution.

This brand new SAM S/E/V 70 32-bit MCU is just filling the gap between the 32-bit MPU families based on Cortex-A5 ARM processor core delivering up to 850 DMIPS and the other 32-bit MCU based on ARM Cortex-M. Why develop a new MCU instead of using one of this high performance MPU? Simplicity is the first reason, as the MCU does not require using an operating system (OS) like Linux or else. Using a simple RTOS or even a scheduler will be enough. A powerful MCU will help to match increasing application requirements, like:

  • Network Layers processing (gateway IoT)
  • Higher Data Transfer Rates
  • Better Audio and Image Processing to support standard evolution
  • Graphical User Interface
  • Last but not least: Security with AES-256, Integrity Check Monitor (SHA), TRNG and Memory Scrambling

Building MCU architecture probably requires more human intelligence to fulfill all these needs in a smaller and cheaper piece of silicon than for a MPU! Just look at the SAM S70 block diagram below, for instance.

SAM S70 Block diagram

SAM S70 Block diagram

The memory configuration is a good example. Close to the CPU, implementing 16k Bytes Instruction and 16k Bytes Data caches is a well-known practice. On top of the cache, the MCU can access Tightly Coupled Memories (TCM) through a controller running at MPU speed, or 300 MHz. These TCM are part of (up to) 384 Kbytes of SRAM, implemented by 16 Kbytes blocks and this SRAM can also be accessed through a 150 MHz bus matrix by most of the peripheral functions, either directly through a DMA (HS USB or Camera interface), either through a peripheral bridge. The best MCU architecture should provide the maximum flexibility: a MCU is not an ASSP but a general purpose device, targeting a wide range of applications. The customer benefits from flexibility when partitioning the SRAM into System RAM, Instruction TCM and Data TCM.

SRAM Partition Atmel Cortex M7
As you can see, the raw CPU performance efficiency can be increased by smart memory architecture. However, in terms of embedded Flash memory, we come back to a basic rule: the most eFlash is available on-chip, the easier and the safer will be the programming. The SAM S70 (or E70) family offers 512 Kbytes, 1 MB or 2 MB of eFlash… and this is a strong differentiator with the direct competitor offering only up to 1 MB of eFlash. Nothing magical here as the SAM S70 is processed on 65nm when the competition is lagging on 90nm. Targeting a most advanced node is not only good for embedding more Flash, it’s also good for CPU performance (300 MHz delivering 1500 DMIPS, obviously better than 200 MHz) — and it’s finally very positive in power consumption.

Indeed, Atmel has built a four mode strategy to minimize overall power consumption:

  • Backup mode (VDDIO only) with low power regulators for SRAM retention
  • Wait mode: all clocks and functions are stopped except some peripherals can be configured to wake up the system and Flash can be put in deep power down mode
  • Sleep mode: the processor is stopped while all other functions can be kept running
  • Active mode
Atmel's SMART | ARM Cortex M7 SAM S Series Target Applications

Target Applications depicted above for Atmel’s SMART | ARM based Cortex M7 SAM S Series. The SAM S series are general-purpose Flash MCUs based on the high-performance 32-bit ARM based Cortex-M7 RISC processors with floating point unit (FPU).

If you think about IoT, the SAM S70 is suited to support gateway applications, among many other potential uses, ranging from wearable (medical or sport), industrial or automotive (in this case it will be the SAM V70 MCU, offering EMAC and dual CAN capability on top of S70).


This post has been republished with permission from SemiWiki.com, where Eric Esteve is a principle blogger as well as one of the four founding members of SemiWiki.com. This blog first appeared on SemiWiki on February 22, 2015.

SMART MCUs for low power, smarter designs in Internet of Things, wearables, and the Industrial Internet

According to analysts at ABI Research, over the next five years businesses will integrate into their wellness plans more than 13 million wearable devices with embedded wireless connectivity. Wearable tech also ties into the rapidly evolving Internet of Things (IoT), which refers to a future world where all types of electronic devices link to each other via the Internet. Today, it’s estimated there are nearly 10 billion devices in the world connected to the Internet, a figure expected to triple to nearly 30 billion devices by 2020. The inherent versatility of Atmel | SMART microcontrollers and Atmel radio chips have made our silicon a favorite of Makers and engineers.

wearables-iot-sam4l-arm-based-processor

Along with this setting stage, the design aspects for low power are becoming more and more important in the next embedded design products. Atmel is right in the middle of the industrial and wearable tech revolution, with a comprehensive portfolio of versatile microcontrollers (MCUs) that power a wide range of platforms and devices.

Blood glucose meters, sport watches, game controllers and accessories, guess what they are all in common? In fact, many of these today are going to shift and evolve into new form factors and application use case as connectivity and clever interacting interfaces become designed. Yes, like a lot of other industrial and consumer devices, they are all battery powered and demanding a long or extended battery life. Translating it into an engineer’s challenge designing an embedded computing system, you will need a central heart, in this case a microcontroller, consuming as low power as possible in both active and static modes without sacrificing the performance. And, Atmel SMART | ARM Cortex-M4 based SAM4L series is designed with this in mind.

atmelglucosegraph

The SAM4L microcontrollers redefine the low power, delivering the lowest power in the same class in active mode (90uZ/MHz) as well as static mode with full RAM retention running and with the shortest wake-up time (1.5us). And they are the most efficient microcontrollers available today, achieving up to 28 CoreMark/mA. In this video, you’ll get an overview of Atmel | SMART SAM4L low-power microcontrollers (MCU), based on the ARM Cortex-M4 core. SAM4L MCUs operate at 90uA/MHz and achieve an efficiency rating of 28 CoreMark/mA. The devices feature an array of power-saving technologies, including Atmel’s proprietary picoPower technology. You’ll see a demo using the SAM4L-EK evaluation kit.

The SAM4L series integrates Atmel’s proprietary picoPower technology, which ensures the devices are developed from the ground up, from transistor design to clocking options, to consume as little power as possible. In addition, Atmel’s SleepWalking technology allows the peripherals to make intelligent decisions and wake up the system upon qualifying events at the peripheral level.

In this video, you will see how SAM4L microcontrollers support multiple power configurations to allow the engineer to optimize its power consumption in different use cases. You will also see another good feature of the SAM4L series, power scaling, which is a technique to adjust the internal regulator output voltage to further reduce power consumption provided by the integrated backup power manager module. Additionally, the SAM4L series comes with 2 regulators options to supply system power based on the application requirement. While the buck/switching regulator delivers much higher efficiency and is operational from 2 to 3.6V, the linear regulator has higher noise immunity and operates from 1.68 to 3.6V.

It’s all about system intelligence and conserving energy. Simply put, the SAM4L microcontroller (See SAM4L Starter Kit) is your choice if you are designing a product with long battery life but without sacrificing the performance — as demonstrated in this walkthrough of the Xplained Pro SAM4L Starter Kit.

The SAM4LC Cortex-M4 processor-based Flash microcontrollers offer the industry’s lowest power consumption and fastest wake-up. On top of what’s mentioned, this sub family of Atmel | SMART microcontrollers [labeled as ATASAM4L] devices are ideal for a wide range of industrial, healthcare and consumer applications.

Get a jump-start on your design with dedicated evaluation kits and software packages.  You can also easily catch up on some of the recent and past articles we posted related to Atmel | SMART SAM4L Microcontrollers.

Building real-time monitoring for IoT device state

You may have a couple Arduinos, or billions of IoT devices connected in a single instance. A common need today is the requirement to detect when devices are turned on and turned off, also known as device state. And, monitoring the device state of connected devices and machines in real-time is called presence.

In this blog post, we’ll walk you through how to use presence to monitor IoT devices and hardware connected with PubNub (for both Java and JavaScript).

PresenceIotDevices

Why You Need to Monitor Your IoT Devices in Real-Time

IoT hardware comes in all shapes, sizes, and prices. But despite their differences, monitoring device state is essential, and we need to know exactly when they’re online and offline. Say you have an (Atmel based) Arduino hooked up to your apartment doorbell for whatever reason. Your Arduino goes offline, the pizza man is standing outside, and you’re not eating. Or maybe the situation is more dramatic. You may have hundreds of IoT devices hooked up to manage your farm. Keeping tabs on those devices is vital for the health of your farm, and you need to know when they go offline.

Device Monitoring Using Presence

We’ll first walk you through using Presence for IoT devices with Java, then move onto JavaScript. With both, you’ll first need to sign up for a PubNub account. Once you sign up, you can get your unique PubNub keys in the PubNub Developer Portal. In the developer’s portal, click to enable Presence. Feel free to play around as much as you want in our free Sandbox tier.

Check out our simulated Presence demo to get a better idea of how Presence can be used for real-time monitoring of Internet of Things devices.

Java

Step 1: Presence and here_Now() are two features of PubNub that update device or user state in real-time. Whether you choose to use JavaScript or the PubNub Java Presence SDK, the output for Presence is the same. You will get an output in this format:

{"message":"OK","status":200,"uuids":["uuid1"],"service":"Presence",
"occupancy":1}

where “uuids” contains a list of the uuids online and occupancy gives the number of online users.

I will be using the code feature to see ‘who’s there?’. All you need to provide is the channel name, and then check if there is anyone on that channel. The code sample below is basic usage.

pubnub.hereNow("my_channel", new Callback() {
     public void successCallback(String channel, Object response) {
         System.out.println(response);
     }
     public void errorCallback(String channel, PubnubError error) {
         System.out.println(error);
     }
 });

This will output the devices that are online which is identified by the UUIDs. In order to consume this information, all you need is to modify the callback function a little. The following code shows you how:

Step 2:

Callback callback = new Callback() {
	public void successCallback(String channel, Object response) {
	    String temp = response.toString();
	    int start = temp.indexOf('[');
	    int end = temp.indexOf(']');
	    for(int index = start+1;index<end;index++){
		    if(temp.charAt(index)!=','){	
		    	uuid1 = uuid1 + temp.charAt(index);
		    }
		    else{
		    	System.out.println();
		    }
	    }
    	String replaced = uuid1.replace("\""," ");
    	String[] uuidlist = replaced.split("\\s+");
    	for (String tempstring : uuidlist){
    		System.out.println(tempstring);
    	}	
	}
		
	public void errorCallback(String channel, PubnubError error){
		System.out.println(error.toString());
	}
};
	
	public void herenow(){
		Pubnub pubnub = new Pubnub("demo", "demo");
		pubnub.hereNow("my_channel", callback);
	}

This code, modifies the information received by the hereNow function, and stores and prints it in an array called ‘uuidlist’. In this manner, you can now use this information according to your requirements.

JavaScript

Step 1: The PubNub JavaScript Presence feature is an optional parameter used along with the subscribe call in JavaScript. The code sample below is basic usage:

pubnub.subscribe({
     channel: "my_channel",
     presence: function(m){console.log(m)},
     callback: function(m){console.log(m)}
 });

The presence feature will output the devices that are online as identified by their UUIDs, along with their timestamp, an action that indicates join/leave/timeout and the occupancy of the channel. This information will be displayed in the console.

But what if you want to consume this information by publishing it to a screen or store it somewhere? The following code lets you do just that.

Step 2: Now we’ll bring the presence to life with JavaScript

var deviceList[],
devices =[];

pubnub.subscribe({

    channel: 'my_channel',
    presence: function(message,channel){
        if(message.action == "join"){
        	devices.push(message.uuid);
    		deviceList.append("<li text-align:
    		center>" + message.uuid + "</li>");
      		}
        else{
          devices.splice(devices.indexOf(message.uuid), 1);
          deviceList.find(message.uuid).remove();
	}
 }
});

Here, we define a custom function for presence which basically uses the different actions of a presence event that could occur, such as join, timeout and leave.

  • If a ‘join’ occurs, we append the UUID to the list of devices that are online.
  • If a ‘leave or a timeout’ occurs, we remove that UUID from the list of list of devices that are online.

You now have the online users, both in an array called ‘devices’ and also as list printed on a page.

This way, you can now be updated on the different devices joining and leaving your network in real-time.

You can check out the PubNub JavaScript Presence documentation here.

Additional PubNub Presence Resources

The Internet of Things and energy conservation

Humans are creative, and adaptive. We’ve done it all our lives, and all our existence. We needed more food, and so we created agriculture. We needed to live together, and so we created architecture. We needed to communicate, and so we created hundreds of ways to do just that; Internet, mobile telephone networks, computers. We are so fond of computers that we have them everywhere, often without noticing them. Yes, you might have a bulky desktop computer at home, or maybe even a flashy new laptop, but those are not the only computers. Your mobile telephone is a computer, but technically, so is your microwave, your car, your television set, and even your washing machine.

Our lives have changed greatly. We’ve all seen pictures and even films of medieval castles, and we know how we used to live. Today, our lives are made more comfortable by scores of machines; when was the last time you washed your clothes by hand? The clothes go in the washing machine, then in the dryer, and then in the cupboard. This all comes at a cost; financially, of course, but also in terms of energy.

Energy. The art of creating electrical power and delivering it to our homes and cities. For most people, this is as simple as having overhead power lines here and there, and paying a bill at the end of the month. Unfortunately, it is much more complicated than that. Power stations require scores of people to operate, and something surprising, data. In France, we have “too many” power stations, and most run at low capacity. When it gets hot, those who have air conditioning like to put it on, consuming electricity. Multiply that by a few thousand, and you get an idea of how much energy the power station needs to produce. When it gets cold, people like to heat their homes and businesses, and since everyone has radiators, electrical consumption soars. Imagine the amount of radiators an entire city can contain, and imagine even 50% of them turned on at the same time. Imagine.

Data is needed from other sources, not just from the weather. Imagine the amount of power required to let all the football fans watch the world cup. Our problem is that we can generate electricity, but we cannot store it (at least, not on this kind of scale). When everything gets turned on, the power station must be able to respond. If it can’t, bad things happen; the lights dim, or sometimes everything goes dark. We now know we cannot live without electricity.

SMART Energy Flow

We all know that we need to reduce our energy dependence, even if some of us don’t want to. To make more people aware, some cities turn off all the lights for an hour. It’s called Earth Hour. For one hour, people are encouraged to use as little electricity as possible; turning off the lights, for example. This does have an impact, but it is a double-edged sword. For one hour, the electricity usage drops considerably, while everyone thinks about the planet, and what we will leave behind for our children. At the end of the hour, everything goes back on, and this is where things get tricky. When electrical devices are first turned on, some can generate what is called an energy spike; a large consumption at first, before something more stable. It is visible just after Earth Hour, but it actually happens every day.

Building Appliances and Home Systems using Energy at Optimum Times

Peak hours. In my house, my electric water heater is connected to a peak-hour detection system. At 11:30 PM, my electricity provider starts “off-peak” hours, a time where electricity costs less. It costs less, an incentive to make me use power-hungry devices at a time when other devices are not needed. At this time of night, most businesses are closed, and so there is less demand. It is all about normalizing energy requirements, and to stop peaks during the day. At 7:30 AM, peak hours start, the water heater turns off, businesses start up, and my kettle turns on, the day is about to begin.

Ikea-kitchen_IoT-SMART-HOME-Connected

Energy is available, that isn’t the problem. Our problem is our use of energy. If only we had a way of using energy when it was available. Imagine, a certain amount of energy available. When I need light, I want my light to be usable immediately. I need a start time; now. However, when I put my clothes in the washing machine generally, I need them to be ready for the next day. I need and “end” time; I need the device to get the work done before a certain time. When will the washing machine start? Well, I don’t actually mind when it starts, and this is where I need help. This is where the IoT can help us, because we really need help.

The IoT will give us millions of connected sensors. This will also supply us with data, lots and lots of it. Why wouldn’t a small device in my house have direct control over my washing machine, or even better, actually be inside my washing machine? It could be programmed to start at a specific time, talking to other devices on the energy grid? Or even in my home; it could tell the water heater to wait until it has finished, and then the water heater gets its chance. The possibilities are endless.

Washing Machine is Connected - SMART HOME

IoT will give us an incredible amount of data, and data that can be used to help up control, and maybe even overcome our need to energy. But wait a minute, doesn’t the IoT itself need energy? It does, but the amount of energy that it will save outweighs the amount of energy it uses, and by a large factor. Take, for example, Atmel’s SAM D21 microcontroller. It uses less than 70µA per MHz, and that is when it is running at full speed. Of course, these devices have advanced power management, and with careful coding, they can last for months on cell batteries. Low power does not mean no power; it has enough flex to get the job done, and more. With built-in USB, ADCs, DACs and enough RAM and ROM for the most complex programs, it gets the job done. It also has the Atmel Event system, a powerful system that lets the microcontroller react to external events without the need to constantly look at inputs.

(Source CES 2014 - Samsung's Vision of the Now and Future of Connected Appliances)

We need a little help in our lives to make simple decisions; when should I turn the heating on? When is the best time to turn on the air conditioner? We think we know, but we don’t. IoT will allow us to know exactly when the cold weather is coming. IoT will know when to turn the lights off. In short, IoT will generate enough data that it will know better than us what to do, and when. What we have seen so far is only the beginning.