Cc2650 How to Read Time From Mobile

Power consumption literally is matter a life and expiry for battery-powered devices. Making devices last for a long fourth dimension volition reduce deployment costs. And existence able to predict the lifetime in accelerate makes planning easier and allow us to replace batteries at scheduled intervals.

Today we will use the Thingsquare system to make a wireless TI Sensortag live for a yr on ane coin cell battery.

We come across that making the right choices in software can brand a stunning 400x difference in ability consumption – two orders of magnitude – even with an already extremely power-efficient hardware.

We apply the Thingsquare system's built-in power consumption monitoring mechanism that allow us to predict the lifetime of a device without having to run it until the battery depletes – which would take us at to the lowest degree a year.

What We Want to Achieve

We want a wireless sensor that lasts a yr.

We apply the Texas Instruments Sensortag hardware, which is readily available and has a number of useful sensors. It likewise happens to exist powered past a single CR2032 coin cell battery.

But having it last a year is by itself not enough: we must be able to remotely access the data the sensor generates. We want the system to be secure, so that no outside people can overhear on the information generated by the sensor and so that it is impossible for someone else to imitation data coming from the sensor.

The wireless sensor sends its data, reliably and securely, to the backend server through its wireless mesh network. All wireless devices are running the Thingsquare 6lowpan firmware and the server is running the Thingsquare backend software.

To be able to place the sensor at the location we want to, we may need to use a mesh network: that is, another devices that help to extend the range of the network. The sensor itself need not accept an active role in helping others, but it may itself demand the aid of other mesh devices.

We also demand the organization to be robust. We exercise non desire information technology to neglect because nosotros need to replace other devices in the system and we practise not want data to get lost. For example, if the wireless sensor is office of a burglar alarm, designed to discover that a item door was opened, we absolutely need that information to reach us. We tin can not afford that the sensor drops the data.

Moreover, nosotros desire the ability to update the sensor in the field. We may need to modify how ofttimes it samples its sensors and we may fifty-fifty want to be able to update the firmware on the sensor over the air. We may have discovered a bug that needs to exist fixed, or we may desire to improve the system in another mode.

These requirements all add to the challenge of getting that wireless sensor to live for a long fourth dimension on 1 money jail cell bombardment. Fortunately, the Thingsquare system was built to tackle just these challenges. Let's kickoff turn to the factors that bear on the lifetime of a device.

The Factors that Bear on Device Lifetime

The lifetime of a device is adamant by how much power the device'southward components swallow.

The first pace is choosing hardware components that take a low power consumption. The Sensortag is built around the Texas Instruments CC2650 chip. The CC2650 is an impressive device: an extremely power-efficient fleck that packs an ARM Cortex-M3 microprocessor together with a combined Bluetooth and IEEE 802.15.4 radio into a single chip.

But choosing the correct hardware is no fashion near enough: as we see beneath, being wise about how to use the hardware can make a 400x difference in terms of lifetime.

We split up the components into 3 categories:

  • The microprocessor. At the heart of the device is the microprocessor. Today'due south low-power microprocessors are really low-power – only they still consume an amount of power that is significant enough to bear upon the lifetime of the device.
  • The radio. Every wireless device has a radio. Even really low-power radios such as IEEE 802.15.4 consumes ability, typically at to the lowest degree one order of magnitude than the microprocessor.
  • Any external components. A wireless device always has some form of external components, such equally sensors or actuators. Those will inevitably eat power, but since they are wildly unlike from device to device, nosotros will not consider them hither. Also, their power consumption is often relatively easy to command: but turn them off when they are not needed.

In this post, we focus on how to control the power consumption of the first two in this list: the microprocessor and the radio. We exit the external components equally an practise to the reader.

The microprocessor'due south power consumption characteristics is controlled by the operating system running it. Low-power microprocessors have a multitude of power modes that let the system's ability consumption to exist efficiently managed by the operating organisation.

The trickiest part of the system to manage is the wireless communication. Nosotros will look into that in a moment.

Batteries

In theory, a bombardment is a chunk of energy stored in a small-scale capsule from which power tin be drawn until the energy is depleted. In reality, there is a little more to it than that. The blueprint past which that power is fatigued from the battery affects the amount of free energy that tin exist drawn. And at some point the voltage that can be fatigued drops below a usable corporeality. (For more background of this, read Jack Ganssle's fantabulous in-depth articles here and here.)

A battery'due south energy storage capacity is measured in milliampere hours (mAh) – how many hours the battery can deliver a electric current of one Ampere. A CR2032 coin cell battery typically is specified with around 250 mAh.


A wireless sensortag with a CR2032 coin cell battery

From these 250 mAh, not all energy can be used. A reasonable rule-of-thumb is that 40% of the capacity can be used. This leaves united states with some 100 mAh of energy.

And 100 mAh is not a lot of energy for us to go to a year of lifetime. We must be prepared to really optimize our power consumption.

Measuring Ability Consumption and Predicting Lifetime

To optimize the ability consumption, we must offset exist able to measure it.

The Thingsquare arrangement tracks the ability consumption of every device by measuring how much time the device spends using its radio and microprocessor. By measuring the ability consumption and multiplying it with the time measurements, we tin build a model of a device's ability consumption and from this nosotros can predict its expected lifetime.

In the Device Viewer app, the lifetime guess is available via the `Power Consumption` push button. Via the `Power Settings` interface, we tin tune the device configuration to see how information technology affects the power consumption and expected lifetime.

The lifetime estimation uses the assumption from the battery model nosotros hash out higher up: that nosotros are able to employ only xl% of the available energy.


The `Ability Consumption` view in the Device Viewer app

Let's now turn to the baseline ability consumption of a wireless sensortag.

Baseline Power Consumption

The CC2650 has a power consumption that is an social club of magnitude lower than previous-generation fries, which makes it a dandy bit for united states to use. Only we need to handle the chip wisely, otherwise nosotros will not get anyway well-nigh that year of lifetime.

To find what the baseline power consumption is, we commencement run the CC2650 with the radio in an always-on mode. In this manner, the radio is able to receive a transmission at any time. In the Thingsquare organization, this manner of operation is chosen loftier performance fashion considering information technology gives us the best wireless performance, at the cost of a college ability consumption.

We mensurate the power consumption of the device to see how shut to i twelvemonth of lifetime this gets us. The result can exist seen in the screenshot beneath:

The power consumption of the system with the radio in high performance fashion, where the radio is in always-on way, e'er ready to receive information

We run across that the baseline power consumption of the ultra low-power CC2650 chip is effectually 6 mA, giving us an expected lifetime of about 16 hours with a coin cell battery. A far cry from the year-long lifetime we were hoping for.

Fortunately, we tin do better.

Optimizing the Wireless Ability Consumption

Every bit we've seen, wireless communication consumes a significant amount of power. It is also the nearly tricky component to optimize, because we need it to communicate with devices around u.s.a..

The counter-intuitive rule of low-power wireless communication is this: listening for information is much more than expensive than sending data. This is considering when listening for data, you demand to keep the radio turned on for longer time than the fourth dimension information technology takes to send the data: you need to be sure to exist awake when the data arrives, and y'all are not ever certain exactly when that happens.

To optimize the wireless power consumption, it is therefore not enough to only reduce the amount of data we send. Nosotros must be very smart about how much time nosotros spend listening for data. In general, striking a good balance is difficult. (There have literally been hundreds of PhD theses written on this topic alone.)

The first affair we can do to salve ability is to be smart about how to heed for incoming data. We duty-cycle the radio so that we listen only for a brief while, with a fixed corporeality of time in between, instead of listening all the time. Nosotros alter the sending side, so that the sender sends a railroad train of wake-upwardly messages before sending the bodily data. These wake-up packets tell the receiver that it is fourth dimension to wake upward to receive the data. This is called sampled listening and it a good way to significantly reduce the power consumption, while having almost the operation of the ever-on manner.

With Thingsquare's sampled listening, we can reduce the power consumption a lot. In fact, we can reduce the power consumed by the radio by 98%, while still beingness able to have a responsive communication with a device. In the Thingsquare system, this style is chosen responsive style.

The ability consumption of the system in responsive mode

This 98% reduction does get u.s.a. far, but not far enough. Equally we see above, nosotros get a current depict of most 0.232 mA, which is i social club of magnitude lower than before, but just gets us some 17 days of lifetime on a coin prison cell battery.

Getting to Months of Lifetime

To go beyond the 17 days nosotros can become with sampled listening, we demand go fifty-fifty further: we need to completely plow off all communication. To permit us to respond to remote commands, we periodically wake upwards to see if in that location is anything waiting for us. In the Thingsquare system, this manner is called lifetime mode.

In lifetime way, the device wakes up in a regular design to check if anyone wants to talk to the device. If so, it briefly starts to do sampled listening, but only for a short while. This allows the device to exist reachable while staying asleep for most of the time.

If we switch on lifetime manner with its default settings we get the power consumption seen in the screenshot below: 0.0444 mA. This gives us some 3 months of lifetime.

The power consumption of the organisation in lifetime way

This power consumption is one social club of magnitude lower than what we had before – meet the chart below. Only a iii month life is still not quite the yr that we were looking for.

The current draw of high performance mode is an guild of magnitude college than that of responsive mode, which in plow is an order of magnitude college than lifetime mode

Getting to a Twelvemonth – and Beyond

We still take some way to go before nosotros get to a year of lifetime, only then far we have seen significant improvements in each step of the way.

Let'southward now look at the remaining knobs nosotros tin plough to further improve lifetime:

  • Data rate. How oft we send information will obviously touch on the power consumption and lifetime.
  • Responsiveness. Every bit we've seen, how often we want the sensor to be able to reply to commands does affect the ability consumption and lifetime.

To meet what issue varying these parameters have, we set up a bunch of sensortags and give them unlike configurations through the Power Settings window. Nosotros make sure to turn off proximity beacons to salvage additional power.

We set up upwards a bunch of sensortags and requite them different power settings with the `Ability Settings` window. Nosotros then measure the resulting power consumption via the `Power Consumption` window.

The Effect of Data Rate

We expect that lifetime will increase with lower information rate. That is, the less data we send, the longer we live.

To see the effect of data rate, we vary the rate between sending once per minute to once every 12 hours. Nosotros keep the responsiveness abiding with ane wake-up per infinitesimal.

As seen in the graph, our measurements support our hypothesis that lower data rate results in longer lifetime.

The less data we send, the longer we alive – up to a sure point.

If we send data in one case every minute, we can expect about 50 days of lifetime. If we reject the sending rate to transport only once every 12 hours nosotros tin look a longer life.

Unfortunately, modifying the sending charge per unit alone does non requite united states of america 1 year of lifetime. Nosotros reach only about some 280 days, about 9 months, which is some three/four of a year of lifetime. To achieve the year-long life we want to, we must turn to tuning the responsiveness.

The Effect of Responsiveness

The responsiveness make up one's mind how often each sensor will wake up to listen for commands or information. In most cases, a wireless sensor does not need to be very responsive: waking upwardly only a few times per hr may exist enough.

To encounter the consequence of responsiveness, we go along the data rate constant at one measurement per 30 minutes and vary the responsiveness betwixt x wake-ups per second to i wake-up per 10 minutes.

The results are in the graph below.

The less responsive we are, the longer we live.

We see that the responsiveness has a profound impact on lifetime. With a data rate of one measurement per 30 minutes and a responsiveness of one wake-upwards per 5 minutes, nosotros are finally higher up i yr of lifetime.

And with a wake-upwardly rate of once per x minutes, we are well above ane twelvemonth of lifetime. In fact, with nearly 600 days of predicted lifetime, we are closer to a ii-year life for our wireless sensor.

Conclusions

Nosotros set out with an aggressive goal: to brand a wireless sensor live for a year on one coin cell battery. And nosotros wanted the sensor to be secure, robust, remotely available, and remotely upgradeable. A challenging task, just a job for which the Thingsquare arrangement was congenital.

Nosotros utilize very power-efficient hardware and the built-in power measurement mechanism in the Thingsquare system to find a system configuration that gets us a year of lifetime.

This result allows for large-scale installations of wireless sensors with very long life expectancy – and the ability to predict the lifetime before deploying them.

Interested in trying this out yourself? Get started here!

garvinposixed.blogspot.com

Source: https://www.thingsquare.com/blog/articles/sensortag-power/

0 Response to "Cc2650 How to Read Time From Mobile"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel