While exploring caves and dense forests, I often recall scenes from movies and series where adventurers venture into dangerous, unknown places, often unaware of the environmental conditions. These situations could easily turn perilous without even a rough idea of the surroundings.
That's where Env-Sense steps in as a game-changer. Imagine having a wearable device that continuously monitors key environmental parameters like Temperature, Humidity, Pressure, and VOC levels. This information is transmitted in real-time to nearby nodes, covering a range of up to 1 km.
With Env-Sense, you can assess the environment before stepping into the unknown, enabling smarter and safer decisions. Whether you're spelunking in a remote cave or navigating an uncharted forest, this device acts as a silent guardian, keeping you informed and prepared.
Exploration should be thrilling—but with Env-Sense, it’s also saferHardware Setup As it is a wearable device, I planned to make it compact so that it can be carried easily anywhere, so I have designed a PCB using EasyEDA website. The device consists of RP2040 Zero module as heart, BME680 by DFRobot for sensing TRH and gas values which is connected through I2C protocol, MMA8452Q, 3-axis, 12-bit/8-bit digital accelerometer, 128X32 OLED display SSD1306 all these are connected through I2C protocol to single RP2040 I2C. For data transmission a Semtech SX1262 based LoRa module is being used which is being developed by Waveshare electronics which talks using SPI protocol with the controller. The schematic made using EasyEDA is kept below. There is also option to add an push button and buzzer (these were not used for now will be used in future).
The PCB is a 2 layer board, all the modules are placed on female headers for easy prototyping and the gerber files for fabrication are kept below. There are few mistakes on my board which should be updated in, which are regarding power for adding voltage regulation and on/off switch.On the receiver side I have made the setup on a breadboard using Raspberry Pi Pico W connected with Waveshare SX1262 using SPI protocol, it has the capability to host a webserver without need of additional hardware. The connection are mentioned below.
busy = 6;
reset = 0;
nss = 1;
irq = 5;
sck = 18;
mosi = 19;
miso = 16;
txen = 2;
rxen = 3;
Software SetupSoftware is the part I have learnt many things, the main reason I took Pico is due to is due its dual core capability and its support for running TinyML which I kept as future target for the project. Programming Raspberry Pi devices using C/C++ SDK as Raspberry Pi foundation has recently released a direct VS code extension for building projects the life became so simple.
Coming to libraries I have used :-BME680 form Bosch LoRa Sx1262SSD1306Web Server for Pico W
Code base , this contains all the necessary files required to replicate the project you can also check the CMake files to understand the file dependencies.
The main folder contains the files for the transmitter the libraries for the peripherals are linked above. The code for the receiver is inside the webserver Reciver folder.Outputs
The data collected by the transmitter is will be send through LoRa will be parsed by the receiver then the data will be pushed to the web server which is hosted on the Pico W auto refreshed every 30s to get data from the received data. Once the receiver connects to the network it will return the website IP where we can check the data.
What to Do, What not to Do...........?Taking out this project after a long time taught me many things, the system was not tested outside as the flash on my pico damaged, need to get a new one. The accelerometer data is being read but still not used, this data can be used for motion tracking in case of any emergency when there is no change in accelerometer values for sometime, the alert can be directly sent to the web server TinyML may be............. Next fix should be on the PCB, this can be made even smaller and better, so a good enclosure can be made for easy of carry. Hope you guys find something useful from the article. Please do share your valuable suggestions and thoughts.
Comments
Please log in or sign up to comment.