Software apps and online services
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.
- One Raspberry Pi, either the Model 3 or the Zero W, or equivalent Linux board.
- One analog input sensor
- Optional: one Coin Cell board to connect a coin cell battery to the Launchpad
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.
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.
This slider has three pins: two pins that power the device (one ground pin and one
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
GNDpin on the Launchpad.
- Connect the power pin on the sensor to the
3V3pin on the Launchpad (for a 3.3 V power sensor)
- Connect the signal pin on the sensor to the
DIO 23pin on 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.
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
button. Tap the
button and select the
option. Then tap the
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
. 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.
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.
To configure push notifications, tap the
button. You must have a user account and the device registered for remote access for notifications to be enabled.
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.
To set up the device with a coin cell battery, follow the steps in this post, starting at Step 6.