Start building your project
When you create an Open Source PCB design, you can share it on public so that others can buy it, and PCBWay will donate 10% PCB cost to you for your contribution to Open Source Community.
Add Gerber File
.rar or .zip Maximum 20M
Top side
Bottom side
Real shot
Side view
Please upload at least one image in JPG, JPEG, PNG or GIF. Maximum file size: 5MB.
Bill of materials,Tools,Software etc.
Please input the components of your project. It will help others try to DIY your complete projects.
Item # Component Quantity
QuickLogic Corp. QuickFeather Development Kit
Carbon Monoxide Sensor (MQ7)
Grove Soil Moisture
Adafruit ADS1015
Analog LM35 Temperature Sensor For Arduino
Heltec Strick Lite Wireles
Add BOM file
.rar or .zip Maximum 10M
SensiML Analytics Studio
SensiML Data Capture Lab
Helium Console
Detail Description
what's you project about? why did you decide to make it? How does it work? Show us with images and videos!
(Great project description will get PCBWay Beans for modules and $10-$30 Coupon)

The 1997 Indonesia fire burned 9.7– 11.7 million ha on Borneo and Sumatra, destroying 4.5–6 million ha of species rich Dipterocarp forest (including 1.5–2.1 million ha on peat soils). Estimated carbon emissions from these 1997-98 fires on peatlands were 0.81–2.57 Pg, equivalent to 13–40% of annual global fossil fuel emissions [source internet ]

Peatlands and climate change

Peatlands are a type of wetlands which are among the most valuable ecosystems on Earth. They are critical for preserving global biodiversity, provide safe drinking water, minimize flood risk and help address climate change.

Peatlands are the largest natural terrestrial carbon store. The area covered by near natural peatland worldwide ( >3 million square km) sequesters 0.37 giga tons of carbon dioxide (CO2) a year – storing more carbon than all other vegetation types in the world combined.

Damaged peatlands are a major source of greenhouse gas emissions, annually releasing almost 6% of global CO2 emissions. Peatland restoration can therefore bring significant emissions reductions.

Importance Of Peatlands

Peat swamp forests are lowland vegetation in tropical peatlands where most of the flora and fauna are uniquely adapted to the environment – i.e waterlogged and acidic water. Peat swamps are important for many reasons, mainly as a source of fresh water, flood mitigation, carbon sink and store, and to safeguard biodiversity.

Unfortunately, Western Europe has lost nearly 90% of its peatlands while Central Europe only has 50% of functioning peatlands. In Asia, 70% of peat swamps have been lost. Now, more than ever, safeguarding and rehabilitating peatlands are an important effort for the good of the planet and its inhabitants.

1. Peatlands as carbon sinks

One very surprising fact about peatlands is that these forests store about 30% of all carbon on land. That’s about 500 billion tonnes of carbon! Peatlands in Southeast Asia alone hold 14%, or approximately, 68 billion tonnes of carbon in the world. Making sure the carbon in peatlands go undisturbed is the key to regulating climate as improperly managed peatlands can cause a massive release of carbon into the air, which even basic science will tell you is very, very bad.

2. Peatlands and water regulation

Apart from storing vast amounts of carbon, peatlands consists of approximately 90% of water in soil, stored amongst the decaying, porous organic matter (dried leaves, etc). This gives the forest floor a muddy quality typically associated with swamps and bogs, both different types of peatlands.

Healthy, wet peatlands absorb pollutants from the atmosphere, including nitrogen, sulphur dioxide, heavy metals and carbon. These pollutants are what make peat soil acidic. Since the pollutants are absorbed into the soil, water that flows out of peatlands into the ground or rivers come out clean – like a natural filtration system.

When peatlands are drained, it will not be able to regulate pollutants in the atmosphere as well as it should, and that will result in an increase of carbon in water. Water with high carbon content will need to be treated before it can be safely used, and the treatment process is both expensive and results in harmful by-products.

Apart from regulating pollutants, peatlands also regulate excess water. Peatlands can reduce downstream flooding as it acts like a sponge to soak up excess water. And in dry seasons, peatlands slowly release water, thus ensuring a source of fresh water for surrounding communities. Peatlands are great water reservoirs for irrigation, hydro-electricity, recreation, aquatic farming, and as a source of clean water.

Drainage Process

Reasons Behind Draining

It's quite evident that draining of peatland is a serious problem and has direct impact on climate change. Though some peatlands are draining naturally but in many countries they are draining because of us.

In Southeast Asia, peatlands have been drained for conversion to plantations (for palm oil and paper pulp); in Europe and North America, lowland peatlands have been drained for vegetables, cereals and livestock pastures.

Agriculture, forestry and mining have so far impacted about 25% of the peatlands on Earth. While large parts of the enormous peatlands of North America and Russia are still relatively intact, in many parts of Europe, Central and Southeast Asia, Argentina and Chile, peatlands have been significantly degraded. There is increasing interest in protecting and restoring peatlands in order to conserve existing C stocks, help mitigate climate change, and preserve ecosystem benefits.

Drainage And Peat Fire

As you have seen in drainage process above, dry peatlands are prone to catch fire and accelerates the drainage process.

When peatlands are drained, they become highly vulnerable to peat fire. A simple discarded cigarette butt or a match can cause huge devastation, degradation of the resource base, accelerated carbon emission and a host of health issues for local communities. Dry peat ignites very easily and can burn for days or weeks, even smoldering underground and reemerging away from the initial source. This makes these fires incredibly difficult to extinguish, and highly unpredictable and uncontrollable.

How AI Can Help To Protect Peatlands?

If you are following the article so far, you have realized dry peatlands are prone to fire. When fire is set or even when peatlands are drying, it releases all the CO2 into atmosphere. Sometimes human set fire intentionally to burn the peatlands to expand farming lands. AI can help to predict when peatlands are drying or set on fire collecting sensor data such as Soil Moisture level, CO2 emission in the air, increase in Temperature and then analyzing these data to predict the situation such as drought, fire etc.

Based on the early prediction, we can take some preventive & proactive measures such as put out the fire before it burns the peatland or rewet the peatlands when it's drying.

Peat Guard

Introducing Peat Guard - A Solar powered device running tinyML model on Quick Feather board equipped with a Soil Moisture Sensor, Analog Temperature sensor and MQ7 CO2 gas sensor. The has a LoRa node - Heltec Wireless Stick Life which sends UPLINK data to Helium, The People Network which feeds data to Ubidots dashboard.

I am going to take a deep dive from here to explain different components of my device in detail.

Quick Feather Board And SensiML

SensiML Analytics Toolkit suite automates each step of the process for creating optimized AI IoT sensor recognition code. The overall workflow uses a growing library of advanced ML and AI algorithms to generate code that can learn from new data either the development phase or once deployed.

I strongly recommend you to visit website and watch the workflow video which would give you a pretty good overview of SensiML software suit.

QuickFeather is based on open source hardware, compatible with the Adafruit Feather form factor, and is built around 100% open source software (including the Symbiflow FPGA Tools).

The QuickFeather is powered by QuickLogic’s EOS? S3, the first FPGA-enabled Arm Cortex?-M4F MCU to be fully supported with Zephyr RTOS. Other functionality includes:

  • GigaDevice 16-Mbit of flash memory #GD25Q16CEIGR
  • mCube MC3635 accelerometer
  • Infineon DPS310 pressure sensor
  • Infineon IM69D130 PDM digital microphone
  • Powered from USB or a single Li-Po battery
  • Integrated battery charger
  • USB data signals tied to programmable logic

Visit for more information on this board.

Data Collection Through SensiML Data Capture Lab (DCL)

Before you start collecting data, you need to connect your I2C sensor to Quick Feather board and make some modification in software. You will find my code in the code section of this project. I recommend you to visit this tutorial page where you will very useful tutorials to get started with new I2C sensor and data collection process.

Image: Simulating dry peatland

Image: Simulating Peatland on fire

You can see in above images how I hooked up 3 sensors with Quick Feather board and start collecting data. I have stacked QF on top of Huzzah ESP32 so that I can capture data over WiFi.



int16_t *p_adc_data = (int16_t *)p_dest;

int16_t channel_A0 = qorc_ssi_adc.getSingleEnded(0); //MQ7

int16_t channel_A1 = qorc_ssi_adc.getSingleEnded(1); //Soil Moisture

int16_t channel_A2 = qorc_ssi_adc.getSingleEnded(2); //Temperature

Train Your Model Using SensiML Analytic Studio

Once you have collected enough data and segmented, head over to Analytic Studio to train your model.

Integrate Knowledge Pack With Firmware

Follow this nice tutorial on youtube posted by Chris Knorowski or follow below simple steps.

Download the knowledge pack from SesniML analytic tool.

Copy entire qf_ssi_ai_app as qf_ssi_ai_myapp (don't want to mess existing app )

Go inside qf_ssi_ai_myapp folder and delete knowledgepack folder

Unzip the download KP and you will see a folder named knowledgepack_project. Copy this folder to qf_ssi_ai_myapp and rename to knowledgepack

Open sensor_ssss.h file and set SENSOR_SSSS_RECOG_ENABLED to 1 and SENSOR_SSSS_LIVESTREAM_ENABLED to 0

Delete output folder from qf_ssi_ai_myapp

Build the program using make command

This will generate output/bin/qf_ssi_ai_myapp.bin file

Flash the file and you are good to go!


If you are seeing `dcl_commands.h: No such file or directory` while compiling KP library, you are on same page as I was. You need to remove that header file and include "sensor_ssss.h" in sml_recognition_run.c file. The methods sml_recognition_run_batch and sml_recognition_run_single may come with empty implementation. You need to provide implementation. Checkout code section for a reference. Checkout below link for further information

After you compile and flash the bin to your QF board, you may connect to SensiML gateway app to test recognition.

Send Data To Helium Network

Helium the world's first peer-to-peer wireless network that provides a secure and cost-effective way for low-power Internet of Things devices to send data to and from the Internet. The network enables companies to focus on applications and use cases, not worry about cellular plans for devices or managing network infrastructure. To quickly compare the cost, let's take an example.

To send GPS coordinates every minute would cost you only 43centsper month! Yes, only 43 cents compared to > $5 using regular GSM.

I have used low power Heltec Wireless Stick Life as LoRa node which is sending data to helium network every 2 minutes. See code section below for Arduino sketch. Also checkout my project for more information about how to get started with helium network.

Helium Console

Integrate Helium With Ubidots

It's nice to see data coming to Helium console but what would you do with that? You need some sort of dashboard to visualize the data and prediction. I have decided to use Ubidots STEM which is free and most elegant dashboard solution I came across so far.

Sending data from Helium console to Ubidots is very simple and straight forward. Follow this tutorial.

Once important thing is to decode the message before sending to Ubidots. I have created a decoder function in helium console to extract data from byte array and convert to JSON format.

function Decoder(bytes, port) {

var clas = bytes[0] | bytes[1] << 8;

var lat = ( bytes[2] | bytes[3] << 8 | bytes[4] << 16 | (bytes[4] & 0x80 ? 0xFF << 24 : 0)) / 10000;

var lon = ( bytes[5] | bytes[6] << 8 | bytes[7] << 16 | (bytes[7] & 0x80 ? 0xFF << 24 : 0)) / 10000;

var temperature = (bytes[8] | bytes[9] << 8);

var moisture = bytes[10] | bytes[11] << 8;

var pressure = bytes[12] | bytes[13] << 8;

var gas = bytes[14] | bytes[15] << 8;

var bat = (bytes[16] | bytes[17] << 8)/1000;

bat = bat * 2.3857143;

var decoded = {

clas: 0,

temperature: temperature,

moisture: moisture,

gas: gas,



latitude: lat,

longitude: lon



return decoded;


It's all good to visualize data on Ubidots dashboard. But who is going to constantly stare at the screen and act when there is a fire predicted? Here is the good news! Ubidots can send real time alerts via email, text or even slack.

Watch Demo


1. Low Power Consumption

Heltec Lora node wakes up for 10s every 2 minutes and powers the sensors and QF board. This saves power significantly. Using 5000mA LiPo battery, it can run the device for few days.

QF powered by Heltec 3.3V output

2. Solar Power

Along with low power consumption, LiPo battery is recharged by solar energy during day time which make the device run for a very long period of time without replacing the battery or plug into any power outlet.

3. No Cellular / WiFi

No need for cellular or wifi connectivity, which reduced the data transfer cost significantly. This device uses LoRaWan protocol to send data to Helium Network.

Project Tags (Optional, add up to 6 keywords)
4th PCB Design Contest-IoT Theme
Upload or paste code
Upload image or file
Upload a CAD file