The Zero Waste Coffee Project

Feeding the Black Soldier Fly with spent coffee grounds - a research in Bandung, Indonesia

Have you ever seen a Black Soldier Fly (BSF) around your house? This type of insect with the Latin name Hermetia Illucens is known as a "decomposer of organic waste." Typically this species of fly is common in human settlements and is relatively easy to distinguish from the housefly (Musca domestica) due to its larger body size and body structure that is more like that of a wasp.

In the last three decades, the BSF has attracted the attention of various parties ranging from researchers, the public, and the agricultural industry. Various organic wastes, ranging from market waste such as vegetables, fruit, food waste from hotels, restaurants or hospitals to spent grains or tofu waste from breweries and food processors are used as feed for BSF larvae. The objective is to get the fast growing and protein rich pupas (or ideally the larvae just before they enter the pupal state) that are used as animal feed for poultry, pigs or fish.

Ducks (left) and Chickens (right) fed by BSF pupae.
Source: Permana, Agus Dana., Putra, Ramadhani Eka., Arifani, Rizki. 2022. Lalat Tentara Hitam, Hermetia Illucens: Bio Ekologi Lalat Pengolah Limbah Organik. Bandung, ITB Press

Sitting in a Coffee Shop

It was N. Ramadhani Eka Putra, a student of Dr. Agus Dana Permana at the School of Life Sciences and Technology, Bandung Institute of Technology who had an idea; “What if we feed BSF with spent coffee grounds?” He got the idea while sitting in his favourite coffee shop in Bandung (West Java, Indonesia), watching how lots of spent coffee grounds were being thrown away and mixed with other waste. “Eka Putra is a coffee fan and when he proposed the idea of feeding Black Soldier Flies with spent coffee grounds, I instantly agreed to his research proposal, which was executed on a laboratory scale in our building.”

Feeding the Flies

At first, Dr. Agus and N. Ramadhani Eka Putra infused spent coffee grounds with water until the water content reached 60-70% (note: upon collection, spent coffee grounds have a moisture content of around 40 %) and then fed BSF larvae/pupa for a total of 5-6 days during their growing phase; feeding and sampling was done every four days. The time required for larval/pupal growth is 25-27 days.

After testing several different feeding rates from 12 - 200mg/larvae/day with feeding the larvae every four days, the larvae fed with 200 mg/day showed the fastest development and with the highest development mean compared to other treatments.


Spent coffee grounds have a low protein-carbohydrate ratio, high crude fiber content, and low crude lipid content. It also showed that the quantity of feed affects the growth and development of BSF, from the larval stage to the adult. A greater quantity of spent coffee grounds provides the larvae with the sufficient nutrients to grow. At the lowest feed ratio of 12.5g/day the larvae didn't fully develop or just entered the prepupal stage and died on average after 16 days.

The growth rate is positively affected by a well-balanced protein/crude oil feed. Compared to studies that used a mixed organic feed with a higher nutrients balance*,  the larval growth with spent coffee grounds as feed is considered to be low.

The low growth rate is not a disappointment for Dr. Agus, but a stimulus to continue with the research on Black Soldier Flies. The next step would be testing a mixed organic feed (spent coffee grounds plus other organic waste, including other coffee by-products). This would most likely lead to better results as the large amount of fiber cannot be digested by BSF.

In Indonesia itself, BSF farming is barely done. One of Dr. Agus' colleagues, Mr. Ali, who lives in Ujung Berung, Bandung city, has a large BSF farm. He collaborates with a local hospital and uses the food waste as BSF feed.


A big opportunity that Dr. Agus sees in Indonesia is the use of protein rich powder for the manufacturer of animal feed. Indonesia sometimes has to import these ingredients from Thailand or Vietnam where bone meal and fish bone meal is usually used. And why not think about feeding BSF not with spent coffee grounds alone, but also with other coffee by-products like the fresh pulp from washed or honey coffees?

The team around Dr. Agus has already made a type of flour from the pupas of the BSF, but on a very small scale. Scaling up needs space and investments. Space luckily isn't a problem anymore as he is greatly assisted by his colleagues in the Bojong Koneng area in the West Java province where there is close to 20 hectares of land of which Dr. Agus can use as much as he needs for his BSF research purposes. Now it's about the investments...

Dr. Agus is curious if there are people or companies who wish to collaborate in his research. He hopes that one day the BSF will be one of the heroes of transforming coffee by-products into a highly valuable protein.

*Hahn DA 2005 Larval Nutrition Affects Lipid Storage and Growth, but Not Protein or Carbohydrate Storage in Newly Eclosed Adults of the Grasshopper Schistocerca americana, Journal of Insect Physiology 51 1210-1219

News & Events: