Smart Black Soldier Fly Farming in Tanzania: Using SenseCAP Sensors and Outdoor Gateway for Sustainable Livestock Feed Production!

Spearheaded by Tanzania Open Innovation Organization (TOIO), local university students and citizens in Tanga co-created “BSF Farming – Creating Protein Content” project – a resource-efficient and low-cost protein production method by monitoring and optimizing BSFs’ living environment. This has been done by deploying Seeed’s SenseCAP LoRaWAN sensors, SenseCAP Outdoor Gateway, SenseCAP Portal, and SenseCAP Mate App.

I. Key Information

II. Background

One of the biggest agriculture challenges in the growing economy of Tanzania is quality feed for livestocks, which looks like Figure 1. Unfortunately, the current means and procedures used to attain quality feed supplements cause excessive usage of natural resources and adverse effects on the environment.

Figure 1. Quality Livestock Feeds
(Image Credits and Source: FUSMAR)

Now, Tanga is a region that has a long history of traditional agriculture, not yet fully equipped with smart agriculture techniques and emerging technologies that can digitize and automize labor-intensive methodologies. According to Shaukatali Zahir Hussein – Founder and Technical Director of Tanzania Open Innovation Organization (TOIO) and Robotech Labs (Figure 2) – such a knowledge gap is deepening as time goes by, and volatile microclimatic patterns lead to crop failures, that is actually demoralizing for local people.

Figure 2. Shaukatali Zahir Hussein
(Image Credits and Source: Shaukatali Zahir Hussein)

Shaukatali shares his in-depth reflections on the background of this project:

“Approximately 40% of people from 27+ districts in Tanga are engaged in agricultural activities – as their means for day-to-day livelihoods. In the beginning, we needed to visit them to understand what types of exact agricultural challenges needed to be tackled, so that we could figure out which technical skills and knowledge should be transferred and taken ahead. Keeping in mind that the project had to be unique, easy to adapt and adopt, while ensuring the city council would promote its uptake, we decided to engage with Smart Black Soldier Fly (BSF) farming powered by AIoT. Some of the advantages of this project was the use of organic food wastes to feed the BSFs’  larvae – a sensible choice to do less harm to the environment, while their compost generated was used as a by-product, lessening the farming needs for chemical fertilizers. Most importantly, it did not require much space and materials to set up, as the majority of them were locally sourced. The only thing that was missing to ensure the maximum efficiency was IoT sensors that could monitor vital environmental parameters that directly affect the BSFs’ growth and health (Figure 3). Hence, we deployed Seeed’s SenseCAP LoRaWAN sensors and outdoor gateway to remotely monitor the environment. Now, people can monitor each environmental parameter on their smartphones in both real-time and chronological manners.”

Figure 3. BSFs’ Life Cycle
(Image Credits and Source: Jennifer Larouche)

III. Challenge

The feeds that are currently fed to livestock animals all require high levels of protein. In Tanzania, that protein comes from soy or fish meals, both of which consume a great amount of natural resources at an unsustainable rate. The good news is that there is an increasing level of interest and attention towards BSF Farming, as an alternative, inexpensive, and sustainable way of producing protein for animal feeds, thanks to the fact that it simply requires human’s organic wastes to grow!

BSF is an insect native to Africa, and its larva contains about 45% of protein needed by fish, poultry and piggery for their feeds (Figure 4). The feed can be used live for livestocks, and it can also be dried and processed to make a protein meal. How to make BSF farming become more sustainable and smart? Indeed, the challenge was to figure out how to digitally monitor and maintain the most suitable living environment for BSFs’ different stages of growth, mating, and health.

Figure 4. How Animal Feeds Based on BSFs’ Larvae Can Benefit Farmers?
(Image Credits and Source: The Rockefeller Foundation)

IV. Solution

TOIO is a non-profit organization that focuses on developing a variety of local community-led initiatives in Tanzania. Spearheaded by TOIO, local university students and citizens in Tanga co-created “BSF Farming – Creating Protein Content” project – a resource-efficient and low-cost protein production method by monitoring and optimizing BSFs’ living environment. This has been done by deploying Seeed’s SenseCAP LoRaWAN sensors (S2104 – Soil Moisture and Temperature Sensor, S2101- Air Temperature and Humidity Sensor, S2102 – Light Intensity Sensor, S2103 – CO2, Temperature, and Humidity Sensor, Barometric Pressure Sensor), SenseCAP Outdoor Gateway, SenseCAP Portal, and SenseCAP Mate App (Figure 5). By the way,for those looking to install a gateway indoors,SenseCAP M2 Multi-Platform LoRaWAN Indoor Gateway would be an excellent choice. It is specifically designed for indoor use and offers an economical solution that perfectly caters to their needs.The project sheds light on cultivating smart BSF farming as an alternative, sustainable, and accessible protein content production method to complement animal feed.

图 5. 部署在坦桑尼亚坦噶 BSF 农场的 SenseCAP LoRaWAN 传感器 SenseCAP 室外网关
(图片来源和来源:Shaukatali Zahir Hussein

五、为什么选择 SenseCAP 传感器和室外网关?

Among the first launch of Seeed IIoT product series, SenseCAP is focusing on wireless environmental sensing applications: smart agriculture, precision farming, and smart city, to name a few. It consists of hardware products (sensors, data-loggers, gateways), software services (SenseCAP Portal, SenseCAP Mate App, open dashboard), as well as API for device and data management. The next generation of LoRa sensors, the S21XX/A110X series offers users’ industrial long-distance data acquisition via LoRaWAN. This series is suitable for a wide variety of different industries such as smart agriculture, smart buildings and industrial control. With the IP66 rating, -40 to +85°C operating temperature and built-in 19Ah high-capacity battery, combined with the devices’ low power consumption, the series can operate in harsh outdoor environments for up to 10 years with a range of up to 10km. The built-in Bluetooth facilitates setup and greatly reduces large-scale deployment costs. Users can focus on application development with the easy set-up, and start retrieving data in a few steps. Just install the device, bind it using the QR code and configure the network, then data can be viewed from the SenseCAP portal, which supports popular IoT protocols such as HTTP and MQTT. Learn more about the sensors here.

On this background, SenseCAP sensors, outdoor gateway, and software were chosen for BSF farming, because they can monitor BSF farm’s weather conditions and ensure maximum egg production rates – all through maintaining the optimal growth environment of BSFs. There were 3 elements that Shaukatali and his team kept in mind in choosing the best IoT products:

  1. IoT products that are affordable and cost-effective to measure environmental parameters wirelessly, without the need for any jumbling cables
  2. Easy configuration and data visibility on computers and smartphones
  3. Automize receiving hourly notifications on the updates of monitoring status quo of each environmental parameter

Shaukatali kindly notes,

“Hence, this is where the SenseCAP made perfect sense and choice for our applications!”

VI. Outcomes

The environmental parameters that needed to be monitored continuously were air temperature and humidity, barometric pressure, soil moisture and temperature, light intensity, and CO2. Ideally, there needs to be sufficient lighting suitable for BSF mating, and the air temperature needs to be between 26-28°C and humidity between 60-70%. Moisture level in substrates needs to be sufficient enough for BSFs’ eggs to hatch and become larvae, ensure that they don’t harden over time, and prevent larvae from moving around. Thereby, in case the environmental parameters exceed the predetermined number range, local people will get message notifications on their smartphones to take precautionary steps in maintaining the optimal environment range for various periods of BSFs’ life cycle (Figure 6).

Figure 6. Smart BSF Farm’s Environmental Data Is Being Visualized on SenseCAP Portal
(Image Credits and Source: Shaukatali Zahir Hussein)

After monitoring the environmental surroundings of a mini BSF farm indoors for 3-4 days, BSF larvae have begun to be hatched successfully within the suitable hatching environment. Considering the potential of widespread BSF farming in Africa to replace 60 million tons of traditional feed production and fertilizers, it is estimated that 15 million jobs can be created, 可以避免8600万吨二氧化碳排放,粗蛋白市场价值可增加至26亿美元。如图7所示,该项目顺利完成后,来自坦桑尼亚不同地区的200多名当地民众和政府官员参观了支持SenseCAP的智能BSF农场,了解了一个全新的未来农业实践世界!为坦桑尼亚的光明未来干杯,为青年人勇敢地为智慧、可持续发展的社会铺平道路!🙂

Figure 7. Local People and Government Officials in Tanzania Visiting the SenseCAP-Enabled Smart BSF Farm
(Image Credits and Source: Shaukatali Zahir Hussein)


“By far, the best part about this, is having this project shared with community members from different  areas within the region. Their disbelief and shock at the AIoT-enabled smart BSF farming! They have really found this project fascinating, and now are willing to form community youth groups to access loans from the city council to begin setting up their own farms. This is huge!”

– Shaukatali Hussein, Founder and Executive Director of TOIO


VII. About the Creators

TOIO is a non-profit organization that focuses on developing a variety of local community-led initiatives, projects, and events through facilitating the self-empowerment of local people by providing relevant skill training and expertise sharing regarding their diverse sectors of interest. In the end, it aims to help establish local co-operatives directly led by the local people themselves, so that they have a sustainable livelihood.


Robotech Labs is a maker space that provides a range of innovative and cutting-edge solutions for local communities. If you’re looking for software development, product design, or prototyping, Robotech Labs has the cutting-edge expertise and experience to help you actualize your ideas in life.

About Author

2 thoughts on “Smart Black Soldier Fly Farming in Tanzania: Using SenseCAP Sensors and Outdoor Gateway for Sustainable Livestock Feed Production!

  1. This is an excellent system. People can improve their lives and develop their farms. So, they can earn more money to improve their standard of life.

Comments are closed.


April 2023