- Hardware
This project consists of three parts, firstly the lora sender, which is our air monitor, it will monitor the temperature and humidity data sent to the 4G gateway; Secondly the lora receiver, which is our 4G gateway, it will receive the data uploaded to datacake; And finally the data visualisation in datacake. In datacake we can display the data in a variety of forms that can be analysed.
SenseLoRa_Industrial-grade Air Monitor supports the LoRa protocol, which achieves low power consumption, long distance and security. It will monitor the data every hour (of course, you can change the monitoring interval yourself via wifi) and all the sensor data periodically via LoRa P2P, this LoRa signal can be received by SenseLoRa_4G LTE CAT1 Gateway, and thus to display/record/analyze on PC.
The SenseLoRa_4G LTE CAT1 Gateway has an on-board LoRa receiver and a 4G module, so it receives the LoRa data and then transmits the data via 4G to cloud server such as Datacake, or to the monitor's phone via SMS.
- Datacake Setting
- Login datacake or Create Account.
- Click “Add Device”.
- Select API and click “Next”.
- Select a Product based on your needs, take "Create new empty product" as an example.
- Leave the default in “Add API Device” and click “Next”.
- Choose the type according to your needs, and click “Add 1 device”.
- Click to go to the device you just added.
- Click “Configuration”, follow the steps to add a field.
- To get a better look at the data, we can add widget.Click “Dashboard-->switch-->+ Add Widget”.
- Select “Value” and set Title, Field and presentation form as well as the interval color.
- Select Chart and set Title, Field, Kind, Line Thickness and click “save”.
- Humidity is the same step as temperature.
- Click the switch to save.
- Arduino
While the Air monitor is a ready-to-use product and the 4G gateway requires us to program it to work.Please follow the steps below to complete the upload of the 4G gateway code.
- Open the send_lora_data_to_datacake by Arduino. Install "RadioLib" and "ArduinoJson" library.
- Select "Tools-->Manage Libraries..."
- Search "RadioLib", select Version 4.6.0 and click Install.
Note: It is recommended to use version 4.6.0, using the latest version may cause compilation failure.
- Search "ArduinoJson" and click Install.
- Go back to datacake, click “Configuration”, copy the “Serial number” and “HTTP endpoint URL” into the code respectively.
- Plug the SIM card into the Senselora 4G gateway. Turning on the switch and use Type-C USB cable to connect the board and PC, and select the development board "ESP32S3 Dev Module" and the port and upload the code.
- Result
- Power on the SenseLora_Industrial-grade Air Monitor.
- Press the Senselora 4G gateway reset button and wait a few minutes to receive a message in Datacake.
As you can see from the image above, following the steps can be a great way to visualise temperature and humidity information using Datacake, so if you are interested, follow our tutorial and try it out for yourself !