ESP32PHWB1K – AWS IoT Core Qualified Device kit

160,52 56,00

RHOMBIO_ESP32PHWB1K is a kit based on rhomb.io boards that are ready to build electronic devices that can be connected to Amazon AWS.

The kit is composed of:

ESP32PHWB1K is a kit based on rhomb.io boards that are ready to build electronic devices that can be connected to Amazon AWS.

The kit is composed of:

Phobos board allows the interconnection between Master modules, Slave modules and the real world; the ESP32 module integrate the micro-controller.

The kit is designed to build complete devices ready to be connected to cloud computing platforms. In addition, there is the possibility of adding any type of rhomb.io Slave module; communications, sensing, storage or any other. Phobos has up to 44 accessible I/O and power pins for easy connection to a wide range of peripherals. The kit is ready to build, program and install. The Carrier Board and the Master Module are 100% compliant with the rhomb.io ecosystem.

This kit also includes an IPEX antenna for wireless connnectivity.

Specifications

rhomb.io Sockets1x rhomb.io S200 Master Socket
1x rhomb.io Slave Sockets
MicrocontrollerEspressif ESP32-D0WD
32-bit dual core Xtensa LX6, 80-240 MHz
Memory4 MB Flash, 520 KB SRAM, 448 KB ROM.
Up to 16 MB external QSPI Flash Memory
Encryption Memory16 Keys/ECDSA/ECDH/SHA-256/SMAC/NIST
ID Memory64-bit Unique-ID Memory with 112 B User EEPROM
Connectivity• 802.11b / g / n 2.4 GHz, up to 150 Mbps
• Bluetooth v4.2 and BLE compliant
• FCC / CE(RED) / TELEC / KCC / SRRC / IC / NCC
• WPA / WPA2 - Enterprise / WPS
rhomb.io ConfigurationAD / SPI / I2C / USB / QSPI / SDIO / PWM / 2xINT / 2xUART / 12xGPIO
Headers44 signals brought to 2.54 mm headers
Power1x USB
3 LDOs: 3.3V@600mA, 2.8V@300mA, 1.8V@300mA
BatteryBattery Connector
Battery charger with potentiometer: 15 to 500 mA
Dimensions:50 × 39 mm
ESP32 Op. Voltage2.8 V / 3.3 V
Op. Temperature-25 ºC to +85 ºC

Documentation

Contents

The kit is composed of rhomb.io boards:

  • Phobos – Carrier Board
  • ESP32 – Master Module

Phobos – Carrier Board

Phobos board is a rhomb.io Carrier Board that allows the creation of electronic devices using exclusively standard rhomb.io modules. It combines the ease-of-use of rhomb.io modules with a reduced form factor, and it has been developed for the Internet of Things (IoT) bearing in mind fast product development. The board also includes a battery management circuit bringing the designer the capacity to make portable devices.

Find more information in the Phobos – Carrier Board datasheet.

Class 2 - Phobos Top.png           Class 2 - Phobos Bottom.png

S100 Master – ESP32edit

 

ESP32 – Master Module

The ESP32 is a rhomb.io Master Module with WiFi, Bluetooth and BLE capabilities that targets a wide variety of applications ranging from low-power sensor networks to the most demanding tasks such as voice encoding, music streaming and MP3 decoding.

The integration of Bluetooth, Bluetooth LE and Wi-Fi ensures that a wide range of applications can be targeted, and that the module is future proof: using Wi-Fi allows a large physical range and direct connection to the internet through a Wi-Fi router, while using Bluetooth allows the user to conveniently connect to a phone or broadcast low energy beacons for its detection. It solves one of the major customer roadblocks for fast time-to-market as it integrates antenna connector, software and RF certifications, saving months of engineering efforts and testing.

The ESP32 can act as a host for standalone applications and is extraordinarily well suited for any battery operated devices as well as other systems requiring high performance and low energy consumpt.

Find more information in the ESP32 – Master Module datasheet

S100 Master - ESP32 Top.png         S100 Master - ESP32 Bottom.png

Getting Started

Before powering up the RHOMBIO_ESP32DMWB1K, please make sure that the Kit has been received in good condition with no obvious signs of damage. Also make sure the antenna is properly connected in the ESP32 module.

Here you can find a getting started process of this excellent user guide.

Setting Up Your Environment

Setting Up Your Environment

To establish a serial connection between your host machine and the RHOMBIO_ESP32DMWB1K, you need to install CP210x USB to UART Bridge VCP drivers. You can download these drivers from Silicon Labs.

For more information about establishing a serial connection with Rhomb.io kits, see Establish Serial Connection with ESP32. After you establish a serial connection, make a note of the serial port for your board’s connection. You need it when you build the demo.

Setting Up the Toolchain

You need to set up the Espressif toolchain to communicate with your board. To set up the toolchain, following the instructions for your host machine’s operating system:

Note: When following the toolchain setup instructions, do not proceed to the Get ESP-IDF instructions under Next Steps. Instead, continue following the instructions on this page.

Setting Up Your Environment

After your environment is set up, you can download Amazon FreeRTOS from GitHub. Configurations of Amazon FreeRTOS for the Espressif boards are not available from the Amazon FreeRTOS console.

Downloading Amazon FreeRTOS

Clone the amazon-freertos repository from GitHub.

In this tutorial, the path to the amazon-freertos directory is referred to as BASE_FOLDER.

Note: The maximum length of a file path on Microsoft Windows is 260 characters. The longest path in the Amazon FreeRTOS download is 122 characters. To accommodate the files in the Amazon FreeRTOS projects, make sure that the path to the amazon-freertos directory is fewer than 98 characters long. For example, C:UsersUsernameDevamazon-freertos works, but C:UsersUsernameDocumentsDevelopmentProjectsamazon-freertos causes build failures.

Configure Your Project

  1. If you are running macOS or Linux, open a terminal prompt. If you are running Windows, open mingw32.exe
  2. Install Python 2.7.10 or later
  3. If you are running Windows, use the easy_install awscli to install the AWS CLI in the mingw32 environment. If you are running macOS or Linux, make sure the AWS CLI is installed on your system. For more information, see Installing the AWS Command Line Interface.
  4. Run aws configure and configure the AWS CLI with your AWS Access Key ID, Secret Access Key, and Default region name. For more information, see Configuring the AWS CLI.
  5. Use the following command to install the boto3 Python module:
    1. On Windows, in the mingw32 environment, use easy_install boto3
    2. On macOS or Linux, use pip install boto3

Amazon FreeRTOS includes the SetupAWS.py script to make it easier to set up your Espressif board to connect to AWS IoT. To configure the the script, open /tools/aws_config_quick_start/configure.json and set the following attributes:

afr_source_dir

The complete path to the amazon-freertos directory on your computer. Make sure that you use forward slashes to specify this path.

thing_name

The name that you want to assign to the AWS IoT thing that represents your board.

wifi_ssid

The SSID of your Wi-Fi network.

wifi_passwordv

The password for your Wi-Fi network.

wifi_security

The security type for your Wi-Fi network. Valid security types are:

  • eWiFiSecurityOpen (Open, no security)
  • eWiFiSecurityWEP (WEP security)
  • eWiFiSecurityWPA (WPA security)
  • eWiFiSecurityWPA2 (WPA2 security)

To run the configuration script

  1. If you are running macOS or Linux, open a terminal prompt. If you are running Windows, open mingw32.exe.
  2. Go to the /tools/aws_config_quick_start directory and run the following command: python SetupAWS.py setup

This script creates an IoT thing, certificate, and policy. It attaches the IoT policy to the certificate and the certificate to the IoT thing. It also populates the aws_clientcredential.h file with your AWS IoT endpoint, Wi-Fi SSID, and credentials. Finally, it formats your certificate and private key and writes them to the aws_clientcredential.h header file. For more information about the script, see the README.md in the /tools/aws_config_quick_start directory.

Build and Run the Amazon FreeRTOS Demo Project

To configure your board’s connection for flashing the demo

  • Connect your board to your host computer.
  • If you are using macOS or Linux, open a terminal. If you are using Windows, open mingw32.exe (downloaded from mysys toolchain).
  • Navigate to /demos/espressif/esp32_devkitc_esp_wrover_kit/make and enter following command to make and open the Espressif IoT Development Framework Configuration menu:
make menuconfig

To confirm a selection in the menu, choose Select. To save a configuration, choose Save. To exit the menu, choose Exit.

  • In the Espressif IoT Development Framework Configuration menu, navigate to Serial flasher config. Choose Default serial port’ to configure the serial port. The serial port you configure here is used to write the demo application to your board. On Windows, serial ports have names like COM1. On macOS, they start with /dev/cu. On Linux, they start with /dev/tty. Choose Default baud rate to change the default baud rate to use while communicating with your board. Increasing the baud rate can reduce the time required to flash your board. Depending on your hardware, you can increase the default baud rate up to 921600.
  • After you set up your board’s configuration, save and exit the menu.

To build and flash firmware (including boot loader and partition table), and to monitor serial console output, open a terminal (macOS and Linux) or mingw32.exe (Windows). Change directories to /demos/espressif/esp32_devkitc_esp_wrover_kit/make and run the following command:

make flash monitor

To monitor the demo, you can subscribe to the MQTT topic where the demo application publishes messages, freertos/demos/echo.

To subscribe to an MQTT topic

  1. Sign in to the AWS IoT console.
  2. In the navigation pane, choose Test to open the MQTT client.
  3. In Subscription topic, enter freertos/demos/echo, and then choose Subscribe to topic.

Hello World number and Hello World number ACK messages appear at the bottom of the MQTT client page when the terminal or command prompt where you issued the make flash monitor command returns output similar to the following:

12 1350 [MQTTEcho] Echo successfully published 'Hello World 0'
13 1357 [Echoing] Message returned with ACK: 'Hello World 0 ACK'
14 1852 [MQTTEcho] Echo successfully published 'Hello World 1'
15 1861 [Echoing] Message returned with ACK: 'Hello World 1 ACK'
16 2355 [MQTTEcho] Echo successfully published 'Hello World 2'
17 2361 [Echoing] Message returned with ACK: 'Hello World 2 ACK'
18 2857 [MQTTEcho] Echo successfully published 'Hello World 3'
19 2863 [Echoing] Message returned with ACK: 'Hello World 3 ACK'

When the demo finishes running, you should see output similar to the following in your terminal or command prompt:

32 6380 [MQTTEcho] Echo successfully published 'Hello World 10'
33 6386 [Echoing] Message returned with ACK: 'Hello World 10 ACK'
34 6882 [MQTTEcho] Echo successfully published 'Hello World 11'
35 6889 [Echoing] Message returned with ACK: 'Hello World 11 ACK'
36 7385 [MQTTEcho] MQTT echo demo finished.
37 7385 [MQTTEcho] ----Demo finished----

Run the Bluetooth Low-Energy Demos

Amazon FreeRTOS supports Bluetooth Low Energy (BLE) connectivity. You can download Amazon FreeRTOS with BLE from GitHub. The Amazon FreeRTOS BLE library is still in public beta, so you need to switch branches to access the code for your board. Check out the branch named feature/ble-beta.

To run the Amazon FreeRTOS demo project across BLE, you need to run the Amazon FreeRTOS BLE Mobile SDK Demo Application on an iOS or Android mobile device.

To set up the the Amazon FreeRTOS BLE Mobile SDK Demo Application

  1. Follow the instructions in Mobile SDKs for Amazon FreeRTOS Bluetooth Devices to download and install the SDK for your mobile platform on your host computer.
  2. Follow the instructions in Amazon FreeRTOS BLE Mobile SDK Demo Application to set up the demo mobile application on your mobile device.

For instructions about how to run the MQTT over BLE demo on your board, see the MQTT over BLE demo application.

For instructions about how to run the Wi-Fi Provisioning demo on your board, see the Wi-Fi Provisioning demo application.

Troubleshooting

  • If you are using a Mac and it does not recognize your RHOMBIO_ESP32DMWB1K, make sure you do not have the D2XX drivers installed. To uninstall them, follow the instructions in the FTDI Drivers Installation Guide for Mac OS X.
  • The monitor utility provided by ESP-IDF (and invoked using make monitor) helps you decode addresses. For this reason, it can help you get some meaningful backtraces in the event the application crashes. For more information, see Automatically Decoding Addresses on the Espressif website.
  • It is also possible to enable GDBstub for communication with gdb without requiring any special JTAG hardware. For more information, see Launch GDB for GDBStub.
  • For information about setting up an OpenOCD-based environment if JTAG hardware-based debugging is required, see JTAG Debugging.
  • If pyserial cannot be installed using pip on macOS, download it from pyserial.
  • If the board resets continuously, try erasing the flash by entering the following command on the terminal:
make erase_flash
  • If you see errors when you run idf_monitor.py, use Python 2.7.

Other Notes:

  • Required libraries from ESP-IDF are included in Amazon FreeRTOS, so there is no need to download them externally. If the IDF_PATH environment variable is set, we recommend that you clear it before you build Amazon FreeRTOS.
  • On Window systems, it can take 3-4 minutes for the project to build. You can use the -j4 switch on the make command to reduce the build time:
make flash monitor -j4

Debugging Code on Espressif ESP32-DevKitC and ESP-WROVER-KIT

You need a JTAG to USB cable. We use a USB to MPSSE cable (for example, the FTDI C232HM-DDHSL-0).

ESP-DevKitC JTAG Setup

For the FTDI C232HM-DDHSL-0 cable, these are the connections to the ESP32 DevkitC:

C232HM-DDHSL-0 Wire Color ESP32 GPIO Pin JTAG Signal Name
Brown (pin 5) IO14 TMS
Yellow (pin 3)  IO12 TDI
Black (pin 10) GND GND
Orange (pin 2) IO13  TCK
Green (pin 4) IO15 TDO

Debugging on Windows

  • Download the FTDI driver for macOS.
  • Download OpenOCD.
  • Extract the downloaded .tar file and set the path in .bash_profile to /openocd-esp32/bin.
  • Use the following command to install libusb on macOS:
brew install libusb
  • Use the following command to unload the serial port driver:
sudo kextunload -b com.FTDI.driver.FTDIUSBSerialDriver
  • If you are running a macOS version later than 10.9, use the following command to unload Apple’s FTDI driver:
sudo kextunload -b com.apple.driver.AppleUSBFTDI
  • Use the following command to get the product ID and vendor ID of the FTDI cable. It lists the attached USB devices:
system_profiler SPUSBDataType

The output from system_profiler should look like the following:

DEVICE:
              
Product ID: product-ID
Vendor ID: vendor-ID (Future Technology Devices International Limited)
  • Open demos/espressif/esp32_devkitc_esp_wrover_kit/esp32_devkitj_v1.cfg. The vendor ID and product ID for your device are specified in a line that begins with ftdi_vid_pid. Change the IDs to match the IDs from the system_profiler output in the previous step.
  • Open a terminal window, navigate to /demos/espressif/esp32_devkitc_esp_wrover_kit/make, and use the following command to run OpenOCD:
openocd -f esp32_devkitj_v1.cfg -f esp-wroom-32.cfg
  • Open a new terminal, and use the following command to load the FTDI serial port driver:
sudo kextload -b com.FTDI.driver.FTDIUSBSerialDriver
  • Navigate to /demos/espressif/esp32_devkitc_esp_wrover_kit/make, and run the following command:
make flash monitor
  1. Open another new terminal, navigate to /demos/espressif/esp32_devkitc_esp_wrover_kit/make, and run the following command:
xtensa-esp32-elf-gdb -x gdbinit build/aws_demos.elf

The program should stop at main().

Debugging on macOS

  • Download the FTDI driver for macOS.
  • Download OpenOCD.
  • Extract the downloaded .tar file and set the path in .bash_profile to /openocd-esp32/bin.
  • Use the following command to install libusb on macOS:
brew install libusb
  • Use the following command to unload the serial port driver:
sudo kextunload -b com.FTDI.driver.FTDIUSBSerialDriver
  • If you are running a macOS version later than 10.9, use the following command to unload Apple’s FTDI driver:
sudo kextunload -b com.apple.driver.AppleUSBFTDI
  • Use the following command to get the product ID and vendor ID of the FTDI cable. It lists the attached USB devices:
system_profiler SPUSBDataType

The output from system_profiler should look like the following:

DEVICE:
              
Product ID: product-ID
Vendor ID: vendor-ID (Future Technology Devices International Limited)
  • Open demos/espressif/esp32_devkitc_esp_wrover_kit/esp32_devkitj_v1.cfg. The vendor ID and product ID for your device are specified in a line that begins with ftdi_vid_pid. Change the IDs to match the IDs from the system_profiler output in the previous step.
  • Open a terminal window, navigate to /demos/espressif/esp32_devkitc_esp_wrover_kit/make, and use the following command to run OpenOCD:
openocd -f esp32_devkitj_v1.cfg -f esp-wroom-32.cfg
  • Open a new terminal, and use the following command to load the FTDI serial port driver:
sudo kextload -b com.FTDI.driver.FTDIUSBSerialDriver
  • Navigate to /demos/espressif/esp32_devkitc_esp_wrover_kit/make, and run the following command:
make flash monitor
  1. Open another new terminal, navigate to /demos/espressif/esp32_devkitc_esp_wrover_kit/make, and run the following command:
xtensa-esp32-elf-gdb -x gdbinit build/aws_demos.elf

The program should stop at main().

Debugging on Linux

  • Download OpenOCD. Extract the tarball and follow the installation instructions in the readme file.
  • Use the following command to install libusb on Linux:
sudo apt-get install libusb-1.0
  • Open a terminal and enter ‘ls -l /dev/ttyUSB* to list all USB devices connected to your computer. This helps you check if the board’s USB ports are recognized by the operating system. You should see output similar to the following:
$ls -l /dev/ttyUSB*
crw-rw----  1 root  dialout 188,  0 Jul 10  19:04 /dev/ttyUSB0
crw-rw----  1 root  dialout 188,  1 Jul 10  19:04 /dev/ttyUSB1
  • Sign off and then sign in and cycle the power to the board to make the changes take effect. In a terminal prompt, list the USB devices. Make sure the group-owner has changed from dialout to plugdev:
$ls -l /dev/ttyUSB*
crw-rw----  1 root  plugdev 188,  0 Jul 10  19:04 /dev/ttyUSB0
crw-rw----  1 root  plugdev 188,  1 Jul 10  19:04 /dev/ttyUSB1

The /dev/ttyUSBn interface with the lower number is used for JTAG communication. The other interface is routed to the ESP32’s serial port (UART) and is used for uploading code to the ESP32’s flash memory.

  • In a terminal window, navigate to /demos/espressif/esp32_devkitc_esp_wrover_kit/make, and use the following command to run OpenOCD:
openocd -f esp32_devkitj_v1.cfg -f esp-wroom-32.cfg
  • Open another terminal, navigate to /demos/espressif/esp32_devkitc_esp_wrover_kit/make, and run the following command:
make flash monitor
  • Open another terminal, navigate to /demos/espressif/esp32_devkitc_esp_wrover_kit/make, and run the following command:
xtensa-esp32-elf-gdb -x gdbinit build/aws_demos.elf

The program should stop in main().

Links

Downloads

Phobos

 

 

 

 

 

ESP32