Make an Analog Sensor Wireless without Writing a Single Line of Code

And Get a Push Notification when Values Change

Industrial sensors are often very simple: just an analog output signal. Today we make that signal remotely accessible – without writing a single line of code. And with push notifications that allow you to see any anomalies immediately on your smartphone.


Hardware

Step 0: Set up the Wireless Network

Set up the wireless network with the serial gateway and the Launchpad boards by following the instructions here.

You should now have a wireless IPv6 network up and running with one Launchpad as a serial gateway and one Launchpad ready to be used for the analog sensor.

Step 1: Connect the Analog Input

As the analog input sensor, we use an linear potentiometer with a slider. This device produces an analog input that depends on where the slider is positioned.

The Launchpad with an analog sensor connected to it.

This slider has three pins: two pins that power the device (one ground pin and one Vcc pin) and one signal pin. Most analog sensors are similarly constructed. This slider runs on 3.3 V power, but others may require 5 V – make sure to use the correct power for your sensor.

Connect the pins like this:

  • Connect the ground pin on the sensor to the GND pin on the Launchpad
  • Connect the power pin on the sensor to the 3V3 pin on the Launchpad (for a 3.3 V power sensor)
  • Connect the signal pin on the sensor to the DIO 23 pin on the Launchpad

The analog sensor and the Launchpad.

The three pins are located conveniently close to each other on the board. Make sure to not connect the 5V pin to the sensor, if it is not designed for 5 V – this may fry the sensor.

Step 2: Configure the Analog Input

We now have to tell the system that we plugged in an analog input to the Launchpad, and to what pin we connected it.

We open the device settings in the web frontend or the app and tap the Pin Config button. Tap the Analog input button and select the DIO 23 option. Then tap the Apply settings button.

Configure the analog input pin to DIO 23.

Step 3: Configure the Data Rate and Power Settings

Tap the Power Setup button to open the power settings. This lets you change the settings that affect the power consumption of the device, including the data rate.

The default data rate is to report the analog input every 30 minutes. Tap the Sensor Sample Period button and change it to 1 second, and then tap Apply Configuration. The analog sensor will now report its data once every second.

Tap the back button and the analog input gauge should start reporting data from the analog sensor.

For the gauge to auto-update, you need to set up a user account and register the device for remote access.

Configure the device to report sensor data every second.

Step 4: Set up Push Notifications

Now we are ready to set up push notifications. This will cause a notification to be shown on your smartphone when the value of the analog input signal changes.

Configure push notifications when the analog input goes above and below the value of 1500.

To configure push notifications, tap the Notifications button. You must have a user account and the device registered for remote access for notifications to be enabled.

Bonus Step: Make it Completely Wireless with a Coin Cell Battery

Our remote analog input reader is so power efficient that it can run even with a coin cell battery. Depending on the sensor reporting rate, the can live for years on a single coin cell battery.

Bonus step: completely wireless sensor powered by a coin call battery.

To set up the device with a coin cell battery, follow the steps in this post, starting at Step 6.


October 02, 2017

Get Started!

Interested in building your connected product with Thingsquare?
Get in touch with us today and we'll schedule a demo!

Sign up for our newsletter!

About Us


Stockholm, Sweden

Founded in 2012 by a team with a passion for connecting the world


sales@thingsquare.com

Join our newsletter!