Smart Energy Meter IoT Kit Quick Start Guide
This tutorial will show you how to get started with the Smart Energy Meter IoT Kit which includes the Renesas RL78/I1B, Renesas RX111, Medium One Cloud services and IoT workflows.
What you need to get started:
RL78/I1C MeasureIt! Kit (Order here)
RX111 YWireless Kit (Order here)
Opto-isolation UART module
WiFi Internet access
Step 1: What’s Included in the Smart Energy Meter IoT Kit
The Smart Energy Meter IoT kit includes the Renesas RL78/I1C and RX111 Wifi Connectivity Kit which supports 4 PMOD headers, and is flashed with the SmartEM IoT Demo. It includes a Qualcomm GT202 WiFi module for Internet connectivity. It also includes a free subscription to Medium One’s IoT Cloud platform for real-time data stream processing.
Renesas RL78/I1C + RX111
Medium One Cloud Services
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 SmartEM 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 RX111 board and Medium One API keys.
Step 3: Connect RX111 to the Cloud
When you connect the RX111 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 RX111 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 RX111, please see Appendix A: Troubleshooting (below) for help.
Once the green LED is illuminated and the device is connected to the Internet, 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 RX111 board appearing in the log in real-time. The RX111 board sends a statistics event every 60 seconds while idle.
Now you have real-time data flow from your module to cloud.
Tip: You can always restore the RX111 board to factory settings by holding RESET + SW4 down, then letting go of RESET, then finally letting go of SW4.. This should restore the original config file.
Step 4: Connect to the Smart Energy Meter
The UART module must first be connected to the RL78 Power Meter.
Ensure the UART signal wires are brought safely out of the RL78 enclosure. Next connect the UART signals to the RX111 board as shown below.
Now connect your RL78 Power Meter to any electrical appliance or device.
The RX111 board will acquire data every 60 seconds and send it to Medium One. For a full list of the data collected refer to Appendix C.
Step 5: Configure Workflows
Let the board acquire data for several minutes. After a few minutes, you can analyze the Greenhouse Gas emitted by the electrical appliance, as well as, the energy consumed using the two pre-built workflows in the Smart Energy Meter IoT kit.
The Greenhouse Gas workflow uses the following U.S. EPA carbon dioxide emission calculation: 7.03 × 10-4 metric tons CO2 / kWh
The Time of Use workflow uses PG&E’s rate scale based on electricity usage during peak and off-peak hours during summer and winter.
Step 6: Reports
There is a wide variety of reports and dashboard visuals you can obtain about your electrical appliance/device. You can view data in real-time such as Active Energy KW, Frequency Hz, and Active Power W.
Step 7: What’s Next
Congrats! You have just created an IoT Enabled Smart Energy Meter prototype! The rest is up to your imagination.
Follow these guides to learn more.
Renesas: Add-on PMODs
Here is a link to the schematic (RX111) / schematic (MeasureIt! Kit)
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.
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.
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.
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.
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
# 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]]
# ssid: The access point SSID is case-sensitive and must not exceed 32 characters.
# auth-type: open, wpa, wpa2, wpa-psk, wpa2-psk, wpa-cckm, wpa2-cckm,
# crypto-type: wep, tkip, aes, wapi
# passphrase: Case-sensitive. Must be 64 characters or fewer.
# ip/subnet/gateway: Settings for static IP address configuration.
# Format: xxx.xxx.xxx.xxx
# 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 10.10.1.123 255.255.255.0 10.10.1.1
# dns: 188.8.131.52 184.108.40.206
auth: wpa2 aes MyPassphrase
# MQTT Broker Settings
# Medium One MQTT end point, do not change
# Medium One MQTT end point, do not change
# 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.
# Medium One MQTT publish and subscribe topics. <deviceid> is arbitrary.
# 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
demo-type: smart-em 10
peripheral-port: 1 uart 38400
C: DATA COLLECTION
The following tags are collected by the IoT Enabled Smart Energy Meter Kit (sent every 10 seconds):
Tag NameDescriptionerrorError messagesip_addressWAN IP Addresssocket1ActiveEnergyKWhSocket 1 Active Energy (kWh)socket1PowerFactorSocket 1 Power Factorsocket1FrequencyHzSocket 1 Frequency (Hz)socket1IRMSASocket 1 Current (RMS-A)socket1ActivePowerWSocket 1 Active Power (W)socket1VRMSVSocket 1 Voltage (RMS-V)socket1CostPerHourSocket 1 Cost / hoursocket2ActiveEnergyKWhSocket 2 Active Energy (kWh)socket2PowerFactorSocket 2 Power Factorsocket2FrequencyHzSocket 2 Frequency (Hz)socket2IRMSASocket 2 Current (RMS-A)socket2ActivePowerWSocket 2 Active Power (W)socket2VRMSVSocket 2 Voltage (RMS-V)socket2CostPerHourSocket 2 Cost / hour