Smart Machine with IoT Vibration Monitoring Kit RX231- 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 Renesas IoT Sandbox services and workflows.

What you need to get started:

  1. RX231 Kit (Coming Q1 2017 – contact Renesas)
  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 (units in G). The kit also includes a free subscription to Renesas IoT Sandbox’s IoT Cloud platform for real-time data stream processing.


Connect the PmodACL2 Sensor to PMOD1 port as shown


Step 2: Flash your RX231 Board (optional)

Typically, you would flash your board if it is not programmed with the latest image. To do this, please download the hex file below and follow the ‘How to Flash your RX231‘ guide.

  • Hex File – Download (Last Updated – Nov 11, 2016 )

If you are unsure of whether or not you need to flash your board, please see the Troubleshooting section in the Appendix Section A below.


Step 3: Activate Kit on Renesas IoT Sandbox

Click here to activate the kit and complete the registration process to create a Renesas IoT Sandbox 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: Renesas IoT Sandbox 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 Renesas IoT Sandbox account credentials and a separate email with your application.cfg file attached. This file contains WiFi settings for the RX231 board and Renesas IoT Sandbox API keys.

Step 4: 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 3. 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 eventually 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 and login to your newly created sandbox account with your credentials from Step 3. 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 last hex file flashed onto it, including the original config file.

Step 5: Visualize Data on Dashboard

After logging on to Renesas IoT Sandbox , 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 Renesas IoT Sandbox.

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 Real Time Gauge widget will show board connection events and accelerometer data periodically.

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 6: 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 7: 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 Renesas IoT Sandbox.  Here’s the JSON config you would send.
{“report_settings”: {“email_address”:”sample_email”, “daily_subscribe”: true, “project_name”: “SampleName”}}

1 2 3 4

Step 8: 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.


A: Troubleshooting / FAQ

  • I’m trying to power on my board but the heartbeat (LED D5) is a solid red and not blinking.
    • The heartbeat LED may not blink if a sensor module is not inserted in the correct port or upside down, or if the jumper wires are put in the wrong position. If that is not the case and your board is correctly connected to a power source, then the firmware may need to be reflashed. Please see the ‘How to Flash RX231‘ guide
  • How do I find out my firmware version number to decide if it’s the latest version?
    • To do this, you will have to had already sent data to Renesas IoT Sandbox by completing Step 4. Login to your Renesas IoT Sandbox account and go to Data Viewer > Users Last Values on the left navigation bar. Here, you should see one user named ‘device’ listed in the table. Click on ‘configure’ and select ‘raw:version’. Click ‘Save’. Now, you should see the latest firmware version that sent data to your account. If nothing is listed, you have not yet sent data to Renesas IoT Sandbox.
    • To check the most recent release and version number, see the GitHub. The version number is as listed below, in the red box.
  • I’m trying to drag over my application.cfg file but it says the board ran out of space.
    • 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.
    • rm /Volumes/<volume_name>/application.cfg
    • cp /path/to/new/application.cfg /Volumes/<volume_name>/

      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.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.
  • My green LED is lit up (meaning I am connected to wifi) but I don’t see any activity on my Dashboard
    • Your sensor sends data every 10 minutes. If  over 10 minutes have passed and you still don’t see activity, you may not be connected to the Renesas IoT Sandbox 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. 
  • I want to restore my device to factory settings
    • You can always restore the device to factory settings (reformat the storage medium and create a default cfg file) by holding pb1 + pb3 down and waiting for a power cycle, before letting go. This should restore the RX231 to the last hex file flashed onto it, including the original config file.
  •  Common wifi connectivity issues:
    • SSID with spaces are not supported
    • If additional authentication is required after connection (such as internal webpages), the board will not work
    • 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:


# 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


# Renesas IoT Sandbox MQTT end point, do not change


# Renesas IoT Sandbox MQTT end point, do not change

port: 61619

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


# Renesas IoT Sandbox 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 Renesas IoT Sandbox. if you change it through the Web User Interface, make sure to update it on the board.

pw-hash: <API_KEY>/<user_password>

# Renesas IoT Sandbox 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 on the meaning of data streams and tags.

Stream Tag Description
raw x_avg, y_avg, z_avg average vibration level per axis (units in G) 
raw x_min, y_min, z_min min vibration level per axis (units in G) 
raw x_max, y_max, z_max max vibration level per axis (units in G) 
raw x_zero_cross, y_zero_cross, z_zero_cross number of times the vibration crossed zero axis
raw sample_cnt number of vibration sample count on device
processed cycle When machine goes from OFF->ON->OFF
processed anomalies increments by when when a vibration level goes above 20% threshold.  Resets daily.
processed average_cycle_length average duration of each cycle per day
processed average_on_time average time (on_time) for each cycle
processed average_on_value average value of xyz_diff over the course of one cycle
processed cycle_above_daily_average_length when cycle length is above daily average by 20%
processed cycle_count current number of cycle for today
processed daily_cycle_count final number of cycles in a day
processed daily_anomalies final number of anomalies in a day
processed cycle_length length of the cycle
processed daily_off_time total time off in day
processed duty_cycle percentage of on_time vs total cycle time
processed status change in status (can be ON, OFF, ON Anomaly, OFF Anomaly)
processed x_diff – movement x axis range: x_max – x_min
processed y_diff – movement y axis range: y_max – y_min
processed z_diff – movement z axis range: z_max – z_min
processed xyz _diff movement all 3 axis added together:

x_diff +y_diff +z_diff



D: SRAM PUF Authentication 

The RX231 Vibration Kit uses SRAM PUF based authentication. When the Orange LED is on, it means that the board is connected to the wifi. If the green LED is on, it means the board is connected to Medium One’s server. The flow of information is:

  1. The board asks M1 if it is enrolled.
    • M1 responds YES or NO. If it is enrolled, the board skips to step 3. Otherwise, it proceeds to step 2.
  2. The board asks to enroll.
    • M1 responds confirming it is enrolled.
  3. The board asks M1 to authenticate.
    • M1 responds with a Challenge.
  4. The board asks M1 to verify it.
    • M1 responds Authentic or Not Authentic. If it responds non authentic, it sends the following email to whoever created the tenant:

To unenroll your board, go to the “User Input” widget on the IoT sandbox dashboard. Send the string ‘un_enroll’ to raw.auth_cmd. The widget should already be on your dashboard when you activate the kit.