Introduction
The Gravity: WiFi IoT Module is an essential accessory designed for the Gravity: Science Data Acquisition (SCI DAQ) Module, enabling efficient sensor data transmission to IoT platforms without requiring programming. With a compact design and versatile power options (Type-C or battery), it facilitates easy deployment of IoT sensor nodes. This module operates on the 2.4GHz WiFi frequency, ensuring stable connectivity and supporting features like automatic reconnection during network fluctuations. By integrating seamlessly with the Gravity: Science Data Acquisition (SCI DAQ) Module and its wide range of compatible sensors, users can rapidly deploy various IoT systems, such as environmental monitoring, smart homes, and weather stations, achieving intelligent management and monitoring.
Specification
- Operating Voltage:
- Type-C: 5V
- 2Pin PH2.0 Battery Port: 3.5~4.2V
- Operating Current: 30mA
- Output Signal: I2C
- WiFi Frequency: 2.4GHz
- Dimension: 37x32mm
Board Overview
Name | Function | |
---|---|---|
1 | D | I2C data line SDA |
2 | C | I2C data line SCL |
3 | - | Used to power SCI DAQ |
4 | + | Used to power SCI DAQ |
5 | RST | WiFi IoT module reset |
6 | L | status light |
7 | POWER IN | Battery power input |
8 | Type-C | Type-C power input (no charging function) |
WiFi module configuration
Note: The POWER IN battery interface, Type-C interface, and Gravity interface on the WiFi IOT module must not supply power simultaneously. Doing so may damage the WiFi module.
When using the WiFi module for the first time, you need to configure the WiFi and MQTT settings. This process can also be followed whenever you need to modify these settings.
Familiarity with the SCI DAQ module is not required to follow this tutorial. It is recommended to complete the entire setup process of the WiFi module first and then explore the details of the SCI DAQ module usage. If you wish to learn more about the SCI DAQ module, please refer to the SCI DAQ module Tutorial.
Before configuring the WiFi module, ensure that your IoT platform is properly set up. If you are already familiar with configuring the IoT platform, proceed to the next section of the tutorial. If you are unsure how to configure the IoT platform, please refer to the specific guides for your platform: EasyIoT, Siot v2, or Siot v1.
Power the WiFi module via the POWER IN or Type-C port located on the top of the module (note: do not connect any devices to the 4-pin I2C Gravity port during this process).
Wait for the white light on the WiFi module to turn off and the blue light to turn on. Use a computer or smartphone to search for and connect to the WiFi hotspot named "ESP32 Hotspot" with the password "12345678".
Once connected, open a browser and enter "192.168.32.32" in the address bar to access the configuration page.
Fill in the required configuration details. If you are unsure how to obtain the MQTT parameters for your IoT platform, please refer to the specific guides for your platform: EasyIoT, Siot v2, or Siot v1.
- WiFi SSID: Enter your WiFi network name.
- WiFi Password: Enter your WiFi password.
- MQTT Server: Enter the MQTT server address.
- MQTT Username: Enter your MQTT username.
- MQTT Password: Enter your MQTT password.
- Save: Enter 1 for Siot v2, or 0 for Siot v1 or EasyIoT.
- Topic Line 1: Enter the topic name for data displayed on the 1st line of the SCI screen.
- Topic Line 2: Enter the topic name for data displayed on the 2nd line of the SCI screen (If there are only 2 data, the following can be left blank. If the SCI DAQ module does not provide enough data but fills in all topics, the WiFi module will automatically skip it when reporting.)
- Topic Line 3: Enter the topic name for data displayed on the 3rd line of the SCI screen. ...
- Topic Line 10: Enter the topic name for data displayed on the 10th line of the SCI screen.
After completing the form, click "Submit" at the bottom of the page. The WiFi module's indicator light will turn green, signaling that the configuration is complete.
At this point, the WiFi module is fully configured. Disconnect its power supply.
WiFi module usage
Note: The POWER IN battery interface, Type-C interface, and Gravity interface on the WiFi IOT module must not supply power simultaneously. Doing so may damage the WiFi module.
If this is your first time using the module, please complete the WiFi module configuration steps outlined in the previous section. If configuration is already complete, proceed to the next steps.
Connect the sensor to be reported data to the left interface of the SCI acquisition module
When the WiFi module is powered off, connect the WiFi module to the right interface of the SCI acquisition module.
Power the WiFi module through the Type-C or POWER IN port (the WiFi module must power the SCI, and the SCI cannot power the WiFi module)
After powering on, the WiFi module will first display a white light, indicating initialization has started.
Approximately 5 seconds later, the initialization completes, and the light turns red, signaling that the module is attempting to connect to WiFi.
Once the WiFi connection is successful, the light changes to yellow, indicating the module is connecting to the MQTT server.
After a successful MQTT connection, the purple light will flash three times to indicate readiness for data reporting.
The WiFi module will begin reporting data based on the sampling rate configured in the SCI module. During data reporting, the purple light will flash once per report.
The maximum reporting frequency is once every 5 seconds. If the SCI sampling rate is set to less than 5 seconds, the WiFi module will still report data every 5 seconds.
The WiFi module reads the SCI sampling rate only once during initialization. Changes to the sampling rate after initialization will not affect the reporting frequency. To apply a new sampling rate, modify the SCI settings and then press the reset button on the WiFi module to restart the system.
Indicator Light Status Description
White Light Steady On: Initialization in progress
Blue Light Steady On: Waiting for web configuration
Green Light Steady On: Configuration successful
Red Light Steady On: Connecting to WiFi
Yellow Light Steady On: Connecting to MQTT
Purple Light Quick Flashes (3 times): MQTT connection successful
Purple Light Short Flash: Reporting data (the length of time it lights up is related to the amount of data reported. The more data reported, the longer the time it lights up)
Purple Light Steady On: SCI module disconnected during scheduled reporting
EasyIoT platform configuration
1.Open the EasyIoT Workspace: https://iot.dfrobot.com/workshop.html . If you don’t have an account, you will need to register first.
2.Create the required number of devices. For example, if you plan to report two data, such as temperature and humidity, you only need to create two devices. You can also create up to ten devices, leaving unused devices unconfigured for future use.
3.Record the following parameters from the EasyIoT platform to input into the WiFi module configuration:
- WiFi SSID: A WiFi network name.
- WiFi Password: The password for the WiFi network.
- MQTT Server: iot.dfrobot.com (this parameter is fixed in the EasyIoT platform).
- MQTT Username: Located at position 1 in the image below.
- MQTT Password: Located at position 2 in the image below.
- Topic Line 1: Located at position 3 in the image below.
- Topic Line 2: Located at position 4 in the image below.
- ...
- Topic Line 10: Located at position 5 in the image below.
- At this point, the EasyIoT platform configuration is complete, continue to configure the WiFi module
Siot v1 Platform Configuration
Download
- Windows 32&64 bit system Click to download
- MacOSClick to download
After completion, open the exe file
On your computer, press "Win + R" to open the cmd command line terminal.
Type the command
ipconfig
and press Enter. Locate and record the IPv4 Address of the wireless LAN adapter.
The wifi module and the device running siot must be connected to the same network
- Record the following parameters from the Siot v1 platform to configure the WiFi module:
- WiFi SSID: Connect to the same WiFi network as the computer running SIoT.exe. This can be a local area network.
- WiFi Password: The password for the WiFi network.
- MQTT Server: The IP address obtained in Step 4 (e.g.,
192.168.9.187
). - MQTT Username:
siot
(fixed parameter in the Siot v1 platform). - MQTT Password:
dfrobot
(fixed parameter in the Siot v1 platform). - Topic Line 1:
siot/Line1
(In the Siot v1 platform, the topic will be automatically created based on the name you provide, formatted assiot/xxxx
). - Topic Line 2:
siot/Line2
(Similar to Line 1, formatted assiot/xxxx
). - ...
- Topic Line 10:
siot/Line10
(Formatted assiot/xxxx
).
In your browser, enter the IP address obtained in Step 4 followed by
:8080
. For example:192.168.9.187:8080
.Siot v1 Platform Configuration Complete, Proceed to configure the WiFi module as outlined in the previous steps.
Expected Outcome: Once the sensor, SCI module, and WiFi module are properly connected and functioning:
- Open the Siot v1 page from Step 6.
- Click "View Device List" → "View Messages" to see the uploaded sensor data.
Siot v2 Platform Configuration
Explanation: It is recommended to use the Unihiker M10 to run the Siot v2 service. This tutorial is based on running the Siot v2 service on the M10.
If you prefer to run the Siot v2 service on a computer, Please download and install: SIoT V2 Download,run the .bat
file when you're done, other operations are the same as siotv1.
The wifi module and the device running siot must be connected to the same network
- Connect the Unihiker M10 to your computer using a Type-C cable.
- Power on the Unihiker, then open a browser and enter
10.1.2.3
to access the webpage. - In the "Network Settings" section, connect the M10 to WiFi and record the IP address displayed.
- Enable the SIOT service in the “Application Switch”, and then “Open Page”.
- Click New Topic, enter the topic name, here in order to better correspond to the number of lines displayed on the SCI screen, named Line x
- Create the required number of devices. For example, if you plan to report two data, such as temperature and humidity, you only need to create two devices. You can also create up to ten devices, leaving unused devices unconfigured for future use.
- Record the following parameters from the Siot v2 platform to configure the WiFi module:
- WiFi SSID: Use the same WiFi network connected to the M10 in Step 3. This can be a local area network.
- WiFi Password: The password for the WiFi network.
- MQTT Server: The IP address obtained in Step 3 (e.g.,
192.168.9.223
). - MQTT Username:
siot
(fixed parameter in the Siot v2 platform). - MQTT Password:
dfrobot
(fixed parameter in the Siot v2 platform). - Topic Line 1:
siot/Line1
(In Step 6, double-click to copy the corresponding topic name). - Topic Line 2:
siot/Line2
(In Step 6, double-click to copy the corresponding topic name). - ...
- Topic Line 10:
siot/Line10
(In Step 6, double-click to copy the corresponding topic name).
- Siot v2 Platform Configuration Complete, Proceed to configure the WiFi module as described earlier.
Expected Outcome: After the sensor, SCI module, and WiFi module are properly connected and working:
- Open the Siot v2 webpage from Step 6.
- Click "View Details" to see the uploaded sensor data.
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.