The Story Behind CubeSensors: Building Hardware For iOS

Building a physical device is an enormous and costly risk. Ensure your project’s success by picking a problem that matters and using components and standards to solve it that make your solution unique. Most importantly, make it beautiful.

The Story Behind CubeSensors: Building Hardware For iOS

Marko Mrdjenovič and a team of developers in Slovenia had a problem to overcome. They needed an easy way to collect data from their indoor environment so that they could monitor and adjust conditions for the better. There are plenty of inexpensive thermometers, hygrometers, and the like, but they wanted a single small sensor in an elegant enclosure–something that produced digital output the team could both display on an iPhone and collect for viewing historical trends–a programmable device.


They’ve dubbed the results CubeSensors, and they will start shipping this summer. Put one of these small cube­-shaped wireless satellite receivers in your home or office, and you can monitor the room’s lighting, temperature, humidity, noise levels, barometric pressure, and air quality from an app on your smartphone.

I sat down with Marko Mrdjenovič, Chief Technology Officer of CubeSensor, to discuss the challenges of designing an attractive piece of complex sensing hardware, and then of developing an app that makes it easy for a typical consumer to control the hardware, with a UI that summarizes all of the data in a way that makes sense and is useful.

Find A Problem That Matters

“If you know what’s wrong with your environment, you can change it for the better,” Mrdjenovič says when I ask him about the motive to develop consumer-­grade environmental sensors. Since hardware is traditionally more expensive to develop than software, it’s vital you pick an acute problem, not something ancillary.

It’s easy to monitor and respond to the outside environment. There are all sorts of forecasts, websites, blogs, and agencies supplying data, and just think of all the different sorts of clothes, from galoshes to sou’westers, available for dealing with the most implacable conditions. But Mrdjenovič found very little aimed at indoor environments, the places where we likely spend the most time.

A sweater can be cozy, but we tend to think very little about the indoors beyond it being either too hot or too cold. And yet, indoor air pollution can be a serious problem, as in this example we reported on last year: Indoor air pollution from particulate matter triggers nearly 2 million premature deaths each year.

Mrdjenovič and the team envisioned the solution as a network of sensors. “In our minds we saw a base station and the cubes. You connect the base station to power and an Ethernet cable then put one cube in each room so you get measurements for all of your rooms. The cubes then read your environment and tell you ways you can change it for the better.”


It’s a wonderful-sounding vision, but with half-a-dozen power-hungry environmental sensors, how do you make the device small enough so that consumers will want to put one in each room of their house? And that’s just the hardware problem. Coming up with a compelling software presentation for so much data is another whole set of difficult problems to solve.

Nail Your Component Advantage

The team optimized the hardware for the main task by designing purpose­-built components. “The first prototypes, apart from the development boards, were actually small, little motherboards will all the sensors on them,” Mrdjenovič explains. “We started off with basic weather station sensors–temperature, barometric pressure, and humidity–and tried to get the data to display on our phone.”

The innards of early CubeSensor prototypes.

They started with fairly standard sensors, but Mrdjenovič wanted something more cutting edge. Could they find a carbon dioxide sensor? They discovered “that there’s actually been quite a lot of development in the air quality space recently, so we switched to a VOC [Volatile organic compound] sensor,” he says. Not all VOCs are ­toxic, but there are plenty known to cause negative health effects from long-term exposure.

Where CO2 sensors are cheap and abundant, you won’t find a lot of VOC sensors in homes and offices. Bingo, the team had hit upon a key differentiating component.

With VOC and six other sensors chosen, Mrdjenovič hacked together prototypes until everything was working correctly, at least from the hardware standpoint. Now he faced a whole new set of challenges.


Looks Are Everything

“Most of the weather stations are currently ugly, gray, cheap plastic things that you have in a corner and even the sensors are weird looking,” Mrdjenovič says. “Making something that people would put on their coffee table and not in a corner hidden behind books was also very important for us.”

So his next step was working with a designer to make an attractive package for the sensors, which ended up being housed in a little cube-shaped box.

Working with a designer, Mrdjenovič came up with a small cube-shaped box to house all the sensors and an accelerometer. It didn’t take a huge feat of engineering to fit everything into the small box, but it did take time. But one more big problem remained–power consumption.

Problem too Big? Find a Partner.

“The other sensors have been around for years so they’ve been optimized to run on relatively low power. VOC’s are sort of new and have seen more industrial use where power drain is not really a problem because you have them wired into huge machines that are connected to their own power sources,” Mrdjenovič explains.

“We contacted companies that make VOC sensors and tried to convince them to make something small and low power. One of them said yes and after a few months we had a testing unit to put on the testing boards. It works really well and we’re very happy with it.”

In addition, the cubes had to communicate wirelessly; this was an integral element of the design throughout. But “getting the cubes to work very long on a single charge while continuously reading the sensors and sending the data wirelessly was one of the biggest challenges,” says Mrdjenovič. Any of the 802.11 Wi-Fi or Bluetooth standard solutions would quickly drain power from the cubes, leaving them unable to process and transmit data every minute of every day.

Changing batteries in a single device every month or so isn’t terribly bothersome, but with half-a-dozen cubes scattered around the house, you could easily end up recharging batteries every week. If the rechargeable batteries in a Bluetooth mouse, which collects and transfers very limited amounts of data to your computer, lasts on average a single month, how long could one expect cube sensors, which are constantly collecting and transmitting six types of environmental data every minute of every day, to last?


“Two months,” Mrdjenovič answers.

Look At All The Standards

With all that data transfer, a two-­month battery life seems unbelievable. How is that possible?

“The thing is that we’re not using Wi­-Fi,” Mrdjenovič explains. “We’re using ZigBee, which is an industrial protocol for wireless transfer in mass networks. So, it’s low power. We measure everything every minute and send all the data, but the sensors are all low power. We use a low power chip, a low power ZigBee profile. The goal was to be at least one month with the Cubes, but with the combination CubeSensors system, the ZigBee profile, and the VOC sensor we got two.”

ZigBee is an IEEE 802 protocol (802.15) that allows devices to transmit data over distances of up to 1,000 meters using relatively low power. The standard is popular in industries that use devices in mesh networks (where one device transmits data to another, which transmits data to another, etc.), and for home automation (wireless lights and locks), medical devices (glucose and blood pressure monitors), and home energy smartmonitors.

ZigBee’s low power consumption and its ability to transmit data over a mesh network meant it was a perfect fit for the Cubes.

Inventing An Object? Invent Your Own Interface, Too

Censors chosen, enclosure designed, power consumption solved, wireless decision made, and the software challenges loom ahead. You’ve got large amounts of environmental data to deal with and a typical consumer who wants to make sense of it all. For Mrdjenovič, this isn’t a problem. It’s an opportunity to make up your own freaking indices, and thus, The CubeSensor Index was born.


The CubeSensor index.

“At first when we started we had no idea where the numbers should be but after we’d been using them for a while we knew that, ‘Okay, 55 is good for humidity, over 60 is bad,’” Mrdjenovič explains. “The index allows you to get the number on the same scale for different environments. For example, the optimal light in an office is not the same as in a cellar. The optimal values are taken from different research papers on indoor environment effects on productivity, stress, and the like.”

Each sensor is represented by an icon that changes color, and each icon has an index number in the CubeSensor app. A glance at the color and index number for an icon is all a user needs to know if an environmental indicator is too low, too high, or within range. “The key issue with the UI is how to make sure the users are not scared when they first start using the Cubes, but are allowed to dig into data later when they start to understand what the numbers are,” Mrdjenovič says.

Just as importantly, if a reading is out of range, the app will suggest ways to improve the environmental factors. For example, lighting is very important in an office environment but it’s easy to become so engrossed in work that we forget to turn on the lights until it’s nearly dark. The CubeSensor app senses day turning to night and tells the user to increase the amount of room lighting.

Build For The Web (If Possible)

The CubeSensor app is currently solely web-­based. “It was way faster for prototyping because we were turning around the interface a lot and the time to get all the apps done was quite a bit longer,” Mrdjenovič explains. “Also, we wanted to do something that would work on all our devices because obviously we were the first beta testers and not all of us are iOS­-based.”

An early prototype of the web app interface.


While it’s easier and quicker to develop a single web-­based app, doing so is not without its own challenges. “The biggest problem was handling all of the different phones and browsers” says Mrdjenovič. “They’re mostly all Webkit, but they’re not really all the same. Another problem we had was getting data to show in real time since the prototype CubeSensors give readings every five seconds. The phone browsers are not really the fastest in the universe.”

The web app has responsiveness issues, but Mrdjenovič expects to have them ironed out before the product ships. The team can easily maintain a presence on all the platforms immediately, with the web app, an advantage that easily outweighs any native app advantage for Mrdjenovič. “The mobile web is good enough for data apps and apps that are tied to other resources through links ­ inbound and outbound. Native apps are still the only thing powerful enough for graphics heavy development, but we don’t have that need at CubeSensors. Browsers and JavaScript engines are improving with a crazy fast rate, so more and more apps can use web technologies to provide easier portability and faster development. We think we might have to do native apps in the future, but that’s only because we want to provide an amazing, fast, and integrated experience for our users.”

As for expanding the ability of the Cubes, Mrdjenovič say that they will be releasing an API to developers interested in working with the sensors. He expects the API to be released shortly before the Cubes ship this summer.

Know Your Horizons

Finally, I put the question to Mrdjenovič about the future of personal sensing devices­­–what will the next several versions of CubeSensors become? Will we have Star Trek­-like Tricorders in our hands, soon?

“It would be good if we would know more about our environments. CubeSensors are the first step. But there’s still not a market where there’s a single dominating platform or even standards, so we’ll see how that goes,” says Mrdjenovič.

And what about other products in the home automation market–is there anything that impresses him? Is this the beginning of the automated home of the future?


“We see a lot of other development in the market, but unfortunately a lot of it is still targeted primarily towards the DIY market,” Mrdjenovič says. “There’s nothing wrong with that, but we want the ‘Internet of Things‘ to come to every home, and not just to people who know what to buy, how to put it together and connect it to the cloud. We hope more platforms and devices that are mass market friendly come out and that their makers will not opt for a walled garden approach when it gets to the data they produce and things they can do.”

Image courtesy of CubeSensors


About the author

Michael Grothaus is a novelist, journalist, and former screenwriter. His debut novel EPIPHANY JONES is out now from Orenda Books. You can read more about him at