The Internet of Things (IoT), which connects various devices to each other and the cloud, is expected to be a huge growth market over the next few years. IDC expects IoT spending to rise from over $800 billion in 2017 to nearly $1.4 trillion in 2021, and Gartner sees the number of connected devices jumping from 8.4 billion in 2017 to 20.4 billion in 2020.

There are plenty of large cap companies, like networking giant Cisco and chipmaker Intel, that offer investors exposure to the IoT market. However, investors should also check out small cap plays in this market, which offer much more upside potential than their "mature tech" peers.

A depiction of the Internet of Things.

Image source: Getty Images.

Here are three small cap IoT stocks you should keep an eye on: Sierra Wireless (SWIR), CalAmp (CAMP), and (ALRM -0.88%).

A "pure play" on M2M communications

Sierra Wireless is the world's largest manufacturer of 2G, 3G, and 4G embedded modules and gateways, which are all essential for M2M (machine-to-machine) communications. It's expanded repeatedly by acquiring smaller wireless component companies, including AnyData, Maingate, Mobiquithings, GenX Mobile, Numerex, and GlobalTop Technology's GNSS (global navigation satellite system) unit.

Many bears believed that Sierra's margins would eventually contract as rival chipmakers (particularly in China) started selling cheaper M2M modules. Yet Sierra's "best in breed" reputation and inorganic growth strategy held those rivals at bay, and its gross margins expanded with the scale of its business.

SWIR Gross Profit Margin (TTM) Chart

Source: YCharts

Analysts expect Sierra's revenue to rise 11% this year, and another 17% next year. On the bottom line, its non-GAAP earnings are expected to jump 50% this year (thanks to the accretive benefits of recent acquisitions) and another 8% next year. Sierra has rallied 25% over the past 12 months, but it still isn't terribly pricey at 18 times forward earnings.

Tethering vehicles and machines to the IoT

CalAmp mainly provides wireless communications solutions for the automotive and industrial IoT markets. Its stationary and mobile telematics solutions enable companies to remotely track, analyze, and control vehicles and machinery. CalAmp than tethers those connected machines to its cloud SaaS (software as a service) platform for its enterprise customers, which generates stable subscription-based revenues.

Back in 2010, CalAmp mostly sold IoT hardware and DBS (direct broadcast satellite) solutions. By 2016 the company had pivoted toward higher-margin telematics products and services, and gradually phased out its lower-margin DBS business. Last year it started pivoting again toward even higher-margin cloud services for its connected devices. That's why its gross margins have consistently expanded over the past few years.

CAMP Gross Profit Margin (TTM) Chart

Source: YCharts

That constant margin expansion, along with growing demand for telematics solutions, enables CalAmp to post solid top and bottom line growth. Wall Street expects its revenue and non-GAAP earnings to respectively rise 4% and 9% this year, but accelerate with 7% sales growth and 11% earnings growth next year.

Furthermore, the stock is surprisingly cheap at just 18 times forward earnings, even after it rallied more than 50% over the past 12 months.

IoT-powered home security systems sells cloud-connected home security systems, which are installed by security service providers in millions of households in across US and Canada. Its security cameras are tethered to its subscription-based cloud service platform, and the fees vary based on the size of a user's home, the scope of the system, and the selected service provider. is also gradually expanding that ecosystem with other smart devices, like its smart thermostat.

Many homes in the US and Canada either lack home security systems or use traditional phone line-based ones, which gives a lot of room to grow. Its revenues jumped 33% annually to $90 million last quarter as its SaaS and license revenues surged 39% to $61.9 million. On the bottom line, its non-GAAP net income surged 45% to $13.3 million.

Analysts expect's revenue and non-GAAP earnings to respectively rise 28% and 29% this year. The stock admittedly isn't cheap at 39 times forward earnings, and some bears think that its growth will slow as it faces fresh competitors -- but might still have room to run.