• Medium One

Smart Machine with IoT Vibration Monitoring Kit – Quick Start Guide

This tutorial will show you how to get started with the Smart Machine with Vibration Monitoring Kit which includes the Renesas RX231 and Medium One Cloud services and IoT workflows.

What you need to get started:

  1. RX231 Kit (Order here)

  2. PmodACL2 Sensor (Order here)

  3. WiFi Internet access

Step 1: What’s in the RX231 Kit

The RX231 kit includes Renesas’ RX231 module which supports 4 PMOD headers, and is flashed with the Smart Machine with IoT Monitoring Demo. It includes a Qualcomm GT202 WiFi module for Internet connectivity, and a 3-axis accelerometer module for monitoring vibration levels. The kit also includes a free subscription to Medium One’s IoT Cloud platform for real-time data stream processing.

Connect the PmodACL2 Sensor to PMOD1 port as shown

Step 2: Activate Kit on Medium One’s IoT Cloud

Click here to activate the kit and complete the registration process to create a Medium One account preloaded with the RX231 demo workflows. Please note your wireless network settings, as you will be prompted for them during the activation process.

Note: Medium One does not store your WiFi credentials, so you can leave any fields blank and manually enter the information yourself in the application.cfg file that will be generated after activation. Refer to Appendix B below on how to manually edit the application.cfg file.

Once activation is completed, you will receive an email with your Medium One account credentials and a separate email with your application.cfg file attached. This file contains WiFi settings for the RX231 board and Medium One API keys.

Step 3: Connect RX231 to the Cloud

When you connect the RX231 board to your computer, it will appear as a USB thumb drive. Delete the existing application.cfg file before replacing it with the one provided in Step 2. Then, press and release the reset button to reboot the RX231 module and apply the new settings. If the WiFi settings are correct, you will see the green LED light up. This may take up to 15 seconds depending on your network. If the WiFi settings are incorrect, the red LED will illuminate and you will need to correct the settings by editing the application.cfg file. If you encounter any issues with loading the configuration file onto your RX231, please see Appendix A: Troubleshooting (below) for help.

Once the green LED is illuminated and the device is connected to the Internet, visit www.mediumone.com and login to your newly created sandbox account with your credentials from Step 2. Once logged in, you will see several charts on the Dashboard. On Real Time Events Log, you will see the device user selected.  You should now see events coming from the RX231 board appearing in the log in real-time. The RX231 board sends a statistics event every 60 seconds while idle.

Now you have real-time data flow from your module to cloud.

Attach or place the board close to a cycling source of vibrations, like the compressor of a refrigerator, a motor or other vibrating device.

Tip: You can always restore the RX231 board to factory settings by holding pb1 + pb3 down and waiting for a power cycle, before letting go. This should restore the RX231 to the ast hex file flashed onto it, including the original config file.

Step 4: Visualize Data on Dashboard

Login to Medium One with your web credentials.  Select Dashboard from the left navigation panel.   On the default view, specified in the upper right corner, you will see the Dashboard with multiple widgets.

The second widget is the Real Time Event Log.  This widget will flash messages received from the board.  You can use this as an indicator that the board is successfully connected to Medium One.

Restart the board once again.

When the board is connected to Wifi, you should see messages appear in the Real Time Event Log after a few seconds.  If you do not see data, then go back to Step 3 to ensure that you have entered the correct Wifi credentials.

The Line Chart and Table will display changes in acceleration. Refresh this page after the board is connected for some time to see data appear.  Explanation of the data types are explained below.

Refer to the documentation to learn more about the dashboard and widgets.

Step 5: Configure Workflows

Let the board acquire data for several minutes, depending on the frequency of the ON/OFF cycles to monitor. After a few cycles have occurred, you can specify the upper and lower bounds of the ON state in the workflows to properly analyze the cycles (the vibration level highly depends on the placement of the board and the source of vibrations, so this needs to be adjusted carefully once the board has recorded enough data points).

To make the adjustment, first, click on “Workflows” in the sidebar. Your screen should look similar to this:

Click on the “Data Processing (Update status ON-OFF)” Workflow. The workflow should look like this:

Double click on the ‘Base Python’ module and look for ‘upper_bound’ and ‘lower_bound’ of the ON state in the script. You may change these values to fit the vibration monitoring of your smart machine.


# Upper and Lower threshold for the ON state.

# Below lower bound is considered OFF

lower_bound = 1.3

upper_bound = 2.9

This can be determined on your Dashboard viewing the line chart.  Remember to Save and activate the latest changes.

Step 6: Daily Reports

You will receive a report daily at midnight that has the daily statistics of your vibration monitoring. These statistics include Current Status, Last Day Activity, Last 7 Days, Lifetime Estimate, and Location.

You can change the email notification setting by sending an event containing the key report_settings.daily_subscribe: set to true or false

To do that, you can use command line such as curl.  Refer to our Getting Started Guide on how to send json events to Medium One.  Here’s the json config you would send. {“report_settings”: {“email_address”:”sample_email”, “daily_subscribe”: true, “project_name”: “SampleName”}}

Step 7: What’s Next

Congrats! You have just created a Smart Machine IoT Vibration Monitoring prototype! The rest is up to your imagination.

Follow these guides to learn more.

  1. Medium One Getting Started guide on docs.mediumone.com

  2. Renesas: Add-on PMODs

  3. Here is a link to the schematic


A: Troubleshooting

  1. Mac OS X Finder often creates additional files on the USB storage device which is very limited, so you must use the command line shell (bash or sh) to remove the old file and copy over the new one. Open up the Terminal application and try the following commands, replacing <volume_name> with the name of the USB device.

  2. rm /Volumes/<volume_name>/application.cfg

  3. cp /path/to/new/application.cfg /Volumes/<volume_name>/

  4. Windows 10 does something similar, but this should be resolved now, since the device will always contain the application.cfg files, preventing the OS from creating any. If you are having trouble copying the file over, try editing the existing file and pasting the new file’s content into it then save.

  5. Some text editors have trouble saving onto the device because the file system is so small (2KB). If you encounter an issue with your favorite text editor, create the file on your desktop, then move it over to the USB device.

  6. If your device is connected to the Internet (the green LED is lit up) but you do not see any activity on your feed, you may not be connected to the Medium One cloud. When the device cannot connect to the cloud, the orange LED should blink periodically. Verify your network configurations are correct in the application.cfg file.

  7. You can always restore the device to factory settings (reformat the storage medium and create a default cfg file) by holding SW4, pressing and releasing reset, then releasing SW4.

  8. Common wifi connectivity issues:

  9. SSID with spaces are not supported

  10. If additional authentication is required after connection (such as internal webpages), the board will not work

  11. Some potential issues with 5.0 GHz wifi band, recommend connecting to 2.4 GHz if possible

B: Editing application.cfg

Here is a an example configuration file with an explanation on options.


# Vibration Monitoring Configuration


# WiFi Settings

# format:

# ssid: access-point-ssid

# auth: auth-type [crypto-type] [passphrase]

# ip: dhcp|[static ip-address subnet-mask gateway]

# [dns: [dns-ip] [dns-ip2] [dns-ip3]]


# Options:

# ssid: The access point SSID is case-sensitive and must not exceed 32 characters.


# auth

# auth-type: open, wpa, wpa2, wpa-psk, wpa2-psk, wpa-cckm, wpa2-cckm,

# wpa2-psk-sha256

# crypto-type: wep, tkip, aes, wapi

# passphrase: Case-sensitive. Must be 64 characters or fewer.


# ip

# dhcp|static

# ip/subnet/gateway: Settings for static IP address configuration.

# Format: xxx.xxx.xxx.xxx


# Examples:

# Open WiFi using a dynamic IP and the default DNS server.  Wifi SSIDs with spaces in the name not supported

# ssid: linksys

# auth: open

# ip: dhcp


# WPA2 (AES) authentication using a static IP and the FreeDNS DNS server

# ssid: MyAccessPoint

# auth: wpa2 aes MySecretPassphrase

# ip: static

# dns:

ssid: MyAccessPoint

auth: wpa2 aes MyPassphrase

ip: dhcp

# MQTT Broker Settings


# Medium One MQTT end point, do not change

host: mqtt.example.com

# Medium One MQTT end point, do not change

port: 61619

# MQTT username <project_id> can be found by logging into your Medium One account => settings => MQTT.  <user_login> is your user’s login_id hash which can be found from the /users/<login_id> client-api endpoint


# Medium One API user password <API_KEY> is any valid enabled api key in your project.

# <user_password> is the plaintext password for your user

# the password is automatically generated by Medium One. if you change it through the Web User Interface, make sure to update it on the board.

pw-hash: <API_KEY>/<user_password>

# Medium One MQTT publish and subscribe topics.  <deviceid> is arbitrary.

topic-publish: 0/<project_id>/<user_login>/<deviceid>

topic-subscribe: 1/<project_id>/<user_login>/<device_id>/event

# You can find the MQTT project ID under the Setup -> MQTT tab in the Web Interface, and the user MQTT ID under Setup -> Manage Users

C: Explanation of Data Tags

The following tag are created in this kit.  Please refer to docs.mediumone.com on the meaning of data streams and tags.StreamTagDescriptionrawx_avg, y_avg, z_avgaverage vibration level per axisrawx_min, y_min, z_minmin vibration level per axisrawx_max, y_max, z_maxmax vibration level per axisrawx_zero_cross, y_zero_cross, z_zero_crossnumber of times the vibration crossed zero axisrawsample_cntnumber of vibration sample count on deviceprocessedcycleWhen machine goes from OFF->ON->OFFprocessedanomaliesincrements by when when a vibration level goes above 20% threshold.  Resets daily.processedaverage_cycle_lengthaverage duration of each cycle per dayprocessedaverage_on_timeaverage time (on_time) for each cycleprocessedaverage_on_valueaverage value of xyz_diff over the course of one cycleprocessedcycle_above_daily_average_lengthwhen cycle length is above daily average by 20%processedcycle_countcurrent number of cycle for todayprocesseddaily_cycle_countfinal number of cycles in a dayprocesseddaily_anomaliesfinal number of anomalies in a dayprocessedcycle_lengthlength of the cycleprocesseddaily_off_timetotal time off in dayprocessedduty_cycle percentage of on_time vs total cycle timeprocessedstatus change in status (can be ON, OFF, ON Anomaly, OFF Anomaly)processedx_diff – movement x axis range: x_max – x_minprocessedy_diff – movement y axis range: y_max – y_minprocessedz_diff – movement z axisrange: z_max – z_minprocessedxyz _diffmovement all 3 axis added together:

x_diff +y_diff +z_diff

1 view

© 2018 Medium One   All Rights Reserved

4633 Old Ironsides Dr. #280, Santa Clara, CA  95054                



  • LinkedIn - White Circle
  • Twitter - White Circle
  • YouTube - White Circle
  • Google+ - White Circle