Building with IoT sensors: a developer's guide
Sign up for Developer monthly newsletter
Join thousands of developers around the globe who receive latest news and updates from our monthly curated newsletter.
Sign upCome for support, stay for the community
Get support from experts, connect with like-minded developers, and access exclusive virtual events.
Join Developer DiscordYou’re probably familiar with the term IoT, or the Internet of Things. Even if you’re not, you’ve definitely interacted with it. The category is as broad as the name is vague: the microwave that sends text messages when your coffee is hot; the car that remembers where you parked; the printer that orders new cartridges for itself.
Beneath the surface of these different devices, you often find similar components, a crucial category being IoT sensors — these create a real-time connection between the physical world and big data.
IoT sensors have the potential to be a lot more transformative than just smart cars, microwaves and printers. But the element that leads to the greatest transformations is creativity. This article breaks down IoT sensors and their real-life applications and helps you identify the knowledge and skills you need to work with them. The rest — the innovation and the fun — are up to you.
What are IoT sensors?
A sensor is a device that measures the physical property of some other thing and reports or records that data. At its most basic level, an IoT sensor is one that reports measurements over an internet connection.
Examples include thermometers, pH meters, audiometers, hygrometers and cameras. Connect any of these to the internet, and it becomes an IoT sensor. That’s an oversimplification, but only by a little — and that small difference is the start of something powerful.
Types of IoT sensors
IoT sensors can be complex and specialized, but they can also be simple and inexpensive. Some of the most accessible IoT device controllers are open-source products from Arduino and Raspberry Pi.
You can find a wide range of inexpensive sensors and other components built for these devices by the OSS community, making them a good choice for DIY and prototype builds.
IoT sensors enable new applications
Connecting sensors to the web offers several advantages:
- Scalability: IoT sensors eliminate the overhead of manual data collection, allowing you to deploy and track a lot more sensors with minimal additional effort.
- Remote monitoring: Connected sensors enable you to observe multiple environments simultaneously, further supporting scalability.
- Real-time data: You can configure IoT devices to send data almost instantly, so you know what’s happening as it occurs, not just when someone manually syncs the data.
- Maintenance and cost: Some IoT sensors come with built-in health checks, allowing them to report when they require maintenance. This means you can address problems before critical sensors go offline, saving money and time.
- Flexibility: Embedded sensors don’t need to be as accessible as conventional sensors, so there’s no issue if you place them in hard-to-reach places.
- AI integration: With the scale and speed of data collection enabled by IoT sensors, machine learning and other AI applications become much more feasible. Some IoT sensors even handle AI processing locally.
Below are a few examples of devices that use IoT sensors, showing how the advantages play out:
- Smart thermostats: Thermometers and hygrometers manage HVAC systems for optimal heating and cooling.
- Automated lighting systems: Light and motion sensors save energy and improve safety and livability by coordinating lighting.
- Inventory scanners: IoT camera sensors capture images to track stock and streamline ordering processes.
- Building security systems:
- Moisture sensors immediately alert homeowners or maintenance staff to leaks and can be paired with an IoT valve to shut off water instantly.
- Motion sensors and cameras notify users of vehicles or people, integrating with AI systems to identify unknown or unusual behavior.
- IoT temperature and air quality sensors activate fire protection systems.
In each of these scenarios, conventional sensors could measure the same data as the IoT sensors, but the connection to the internet creates new use case possibilities. The power of IoT sensors isn’t just in the scale and availability of data — it’s in what you do with the data.
How IoT sensors make data better
Connected sensors make it possible to collect a vast amount of data, but that isn’t inherently valuable. What makes data useful is how you process, store and respond to it. Data from IoT sensors is flexible, providing you plenty of options at each stage.
You get the most value from your data by making choices that match your use case, so it’s good to start with a clear sense of your goals. If you know what you want to achieve, you can shape IoT sensor data to meet your needs.
Processors to fit the task
Transforming the data into a usable format requires connecting sensors to processors. When selecting a processor, consider factors such as power consumption, processing power, security and scalability. Wireless protocols on IoT processors include the general-purpose standards of Wi-Fi and Bluetooth, but also more specialized protocols like Zigbee and LoRa.
It’s a lot to think about, but breaking the options down into three main categories can help you pair your use case with the right processor:
- Microcontrollers: Lightweight, low-cost, and energy efficient. Great for applications like wearable devices and embedded sensors but limited to smaller data volumes and simpler operations. Scalable by adding more sensors and chips, with security handled in applications away from the device. Microcontrollers tend to use a single wireless protocol.
- System-on-chips (SoCs): SoCs contain CPU, GPU, memory and other components on a single chip. Compact and relatively lightweight for a high-performance processor. Higher costs and energy consumption make SoCs a better fit for larger, higher-performance IoT devices like handheld computers, cameras or multi-sensor devices. They have variable levels of security and scalability to suit different needs and more connectivity options.
- Edge AI processors: These processors are specialized SoCs that enable advanced data analysis on your device. Although the costs and energy consumption are higher, this technology is essential for tasks like rapid image recognition, predictive maintenance and adapting to local environments with low latency. Built to handle large data volumes securely. Usually reliant on Wi-Fi, Bluetooth or a wired internet connection.
Keep in mind that AI analysis can also happen remotely — you can even use data from microcontrollers in AI applications, so long as it’s collected in an appropriate format. Edge AI processors are more expensive, so they’re best for when you need AI outputs in real time.
Gathering data from IoT sensors doesn’t have to be expensive or complicated, but you must set yourself up for long-term success by choosing the right tools for your task.
Sending and receiving data efficiently
IoT sensors are internet-connected devices, which means they come ready to send data. Most have built-in limitations on the data formats they support, but many also offer choices during configuration. You determine what shape the data takes and how you get it from device to application.
Choose the right format…
The data formats below are listed from least to most complex. Low-complexity formats are faster to transfer but take more processing and handling to be application ready. Higher-complexity formats are slower to transmit, but arrive ready to use:
- Binary: Best for simple sensors and questions answered by aggregating lots of small data points. Is the door unlocked? Is the light on? When does the temperature peak? Get answers to these questions quickly with little overhead.
- CBOR (Concise Binary Object Representation) / BSON (Binary JSON): Two similar formats practical in constrained environments with low memory and processing power availability. Not human readable. Often used with Zigbee and LoRa protocols for devices like solar panels, air quality sensors and smart locks.
- CSV (Comma-separated values): Easily parsed for database storage or to populate data tables. A simple, lightweight, universal data format for basic data exchange. Human readable, familiar to non-technical users and compatible with most legacy systems. A good fit for industrial and enterprise applications.
- JSON (JavaScript Object Notation): Uses key-value pairs to organize more complex data. Human readable, supported by most application environments and familiar to most developers. Requires more processor power on the device. Good for complex, hierarchical data like large building management or fleet management systems.
- XML (Extensible Markup Language): Similar advantages to JSON, and preferred by some developers and in some applications. More metadata capacity and type control than JSON, making it better for media files and sensitive applications. More verbose, requiring more bandwidth to transmit.
Other options include Protobuf and Apache Avro, but format is only one consideration in getting your data from device to application. You also need to consider the protocol, i.e., how you send and receive the data.
…and the right protocol
The best data transfer protocol depends on how you plan to use the data. Suppose you plan to aggregate data for analysis. In that case, your needs are quite different from someone designing an application to trigger IoT devices in remote locations, and different still from someone looking to send emergency alerts.
The way you transmit data is at least partly determined by your chosen data format. Certain protocols favor lighter-weight data formats, so you have fewer choices if you use JSON or XML.
Consider a few common protocols and their features to find the best one for your use case:
- MQTT (Message Queue Telemetry Transport): MQTT is a publish/subscribe protocol developed for machine-to-machine (M2M) communication. Often used to build event-driven systems, it’s best for applications like maintenance dispatch systems or inventory management platforms.
- CoAP (Constrained Application Protocol): A request/response framework, similar to a REST API, but optimized for resource-constrained environments with simpler architecture. Especially good for smart homes and other multi-device / single-location scenarios.
- AMQP (Advanced Message Queuing Protocol): A more robust, flexible variation on MQTT that requires expert support in exchange for more features. Best for enterprise applications and sensitive data environments.
- ● SSI (Simple Sensor Interface): An extremely simple point-to-point, serial synchronous protocol. Popular in scientific and engineering applications. Good for logging data in CSV or binary formats. It works smoothly on microcontrollers but struggles with long distances and complex architectures.
This isn’t a comprehensive list. You can find other protocols for specialized use cases and variations on some of the technologies above that may more closely meet your needs.
If your needs aren’t large-scale or highly specialized, consider using a general-purpose protocol, like a REST API, gRPC, Webhooks, websockets or polling. These approaches may not scale as well as more specialized protocols and are too resource-intensive for some processors, but they do have the advantage of being adaptable to a range of data formats, familiar to most developers and easy to integrate into many programming languages and platforms.
If you’re looking to build a prototype or proof of concept, these protocols may be a more manageable task for a small, less specialized team.
Monitor passively, respond actively — or respond passively?
Conventional sensors are passive — they simply observe and record data points, so any actions triggered by the data are remote and manual. That is, someone has to transfer the data into a computer system, call a function, pass a result, and trigger some other function, including functions like “send someone to turn up the thermostat.”
Of course, you can do that with data from an IoT sensor, and there are sometimes good reasons to manually monitor data. But the main advantage of IoT sensors is automation, which takes a few forms:
- Real-time analytics:
- Populate dashboards to monitor many devices simultaneously.
- Transform simple data from microcontrollers into a more complete picture of an environment or system.
- Trigger alerts, activate devices and adjust parameters in response to data changes.
- Use SoCs to run complex analytics on handheld devices.
- Feed data to AI algorithms in real time or at a later point for deeper analysis.
- System automation:
- Integrate with other IoT devices through an automation platform.
- Device-to-device communication with SoCs enables systems to adapt faster and automatically respond to data.
- Control complex systems and environments across multiple locations with a single application, including HVAC, lighting, irrigation and security.
- AI-enhanced systems:
- Sensors with Edge AI processors perform complex tasks like image classification, predictive maintenance, self-repair and speech recognition.
- The application structure can be mostly administrative, used to track devices and archive data, or it can be a complex automation system that acts on AI outputs.
The power of data lies in how it informs future actions. IoT sensors can help you build applications that collate data for analysis, but they can also help you turn that data into immediate actions.
Use IoT sensors to measure and improve your world
How might you use IoT sensors in the environments where you work and live? To get a sense of some of the possibilities, we’ll walk through some of the ways you might use them in a common, relatable setting — a public library.
Identify problems in the environment
Public libraries serve more functions in the community than you might first imagine. Those functions each come with challenges.
- Public meeting spaces and “third places”: Libraries host formal and informal groups throughout the day and need to maintain safety for all patrons in open spaces and meeting rooms.
- Inventory control and materials management: Tracking books and other materials is a core function for libraries, but self-check and in-library use can make it more complicated.
- Social service hubs: Public libraries often provide a safe place for people who need to connect with community resources, but library staff may be unprepared for the range of needs.
- Educational resources: The way people consume information is changing rapidly, and library usage patterns could help us understand how to meet the learning needs of our communities better.
- Material preservation: Although the demand for physical media is nowhere near what it once was, libraries play an essential role in preserving historical records and out-of-print publications. Those materials are climate-sensitive and can be expensive to store.
Given shrinking budgets, libraries face pressure to solve these problems with fewer resources. IoT automation offers some possibilities for doing more with less.
Put IoT sensors on the job
Deploying common IoT sensors in a library could address many of the above challenges:
- Thermometers: Monitoring and controlling temperature can help maintain a healthy, comfortable environment for people and materials.
- Air quality sensors: Monitoring indoor air quality, including particulates, carbon dioxide and carbon monoxide, can make meeting rooms and enclosed study rooms more comfortable and can help alert staff to problems and emergencies.
- Hygrometers: Moisture is an enemy to books, but it’s also a byproduct of people gathering and doors opening to city streets. Connecting the HVAC system to IoT hygrometers can help keep moisture in the air at appropriate levels.
- Audio sensors: We all know the library should be a quiet place, but audio sensors can do a lot more than ask people to whisper:
- Simple decibel meters can alert library staff to areas of the library that are too loud, making noise control easier without adding staff.
- More complex audio sensors could use speech recognition to enhance public safety — monitoring private study rooms for problems or equipping library staff with a “wake word” to remotely activate emergency procedures.
- AI-connected audio sensors could even provide automatic close-captioning for meetings and aid communication for patrons with disabilities.
- Pressure sensors: Understanding which library sections receive the most foot traffic can help allocate staff and resources where they’ll be most useful. Pressure sensors in floors and seating could provide real-time data on where people gather; this data can be useful for long-term analysis.
- Motion detectors and optical/camera sensors: These sensors have more than the obvious security applications:
- Data from motion sensors could help predict traffic patterns.
- AI-enabled camera sensors could identify potential problems by alerting staff to unexpected behavior.
- Optical sensors could help manage inventory by monitoring what patrons are carrying in and out of the building.
Some of these use cases might not be cost effective for a public library, but building small-scale applications to test out ideas could be a way for communities to experiment with new solutions to persistent problems.
What IoT sensors can deliver
When IoT sensor applications match their use cases well, they bring a host of benefits. It’s typical to think of automation mostly in terms of cost and labor savings, but the public library example shows that the potential doesn’t end there.
Certainly, better management of materials and facilities leads to cost savings. It also enhances the value of the library to the community, encouraging a broader group of people to utilize the facilities and making more resources available for public use. Saving money is good but simplifying stewardship and maintenance results in a service that has more worth to the community.
The same goes for safety improvements. Fewer disruptions to staff routines mean essential tasks are done on time, and staff turnover is lower when a workplace feels calm and orderly. But everyone, including those who use the library for social services, is better served by a safer environment. Staff and volunteers can dedicate more brainpower to meaningful projects and positive interactions with patrons.
This freed-up bandwidth also means IoT sensors can help drive innovation. Improving our understanding of how people interact with library resources can guide librarians and educators in developing new services and curricula that meet real needs. Infrastructure and technology investments can be directed to places where staff know they’ll be used.
The public sector isn’t the only one facing significant budget issues that make it difficult to pursue innovation — the private sector can experience similar challenges. Part of the transformational power of IoT sensors is that they can make innovations more accessible than ever.
By making it easier to collect and connect data, IoT sensors give us more insight into our world and more ability to control and adapt. More importantly, they do it without requiring huge up-front investments in staff or infrastructure.
The biggest challenge with IoT sensors is imagining how to use them — and that’s a challenge we’re excited to tackle alongside you.
Your IoT journey starts here
In the coming months, we’ll share more IoT stories and projects to help you see what’s possible. Starting with an IoT camera, we’ll pick a few representative sensors and walk through the application lifecycle. For each one, we’ll:
- Explain the basics of how the sensor works, what data formats and protocols it supports and other essential technical details.
- Present a common use case for the sensor and design a basic application to consume and use its data.
- Talk through the deployment process, including best practices and potential pitfalls for installing sensors and connecting them to the internet.
- Show you what the data you’ll collect might look like and how the application handles it.
We welcome your questions and ideas and look forward to helping you build something exciting. You can explore our open source community and learn more about IoT devices that utilize Qualcomm Technologies processors. IoT sensors are connecting our world, and we’re excited to help you start your travels!


