It is estimated that yield losses due to pests, weeds, and disease account for roughly 30-35% of major crops cultivated globally.  This is quite significant and consequently needs to be curtailed to minimize risk and prevent major losses. Integrated pest management (IPM) shows satisfactory results in most farming operations. IPM may coincide with the traditional techniques of small-scale or subsistence farmers in developing countries. 
This paves way for the targeted use of homemade botanical pesticides as an alternative to expensive and often harmful conventional pesticides. Many states have allowed natural pesticides like essential oils from cinnamon or clove or garlic. These essential oils can be extracted using methods like distillation or supercritical carbon dioxide (sCO2) extraction. Of course, the average person doesn’t have sCO2 equipment in their house to make these materials for their home-grow, so other techniques using household equipment are needed.
Some products may use simple water extraction. Ethanol could work as well for isolation of essential oils (predominantly terpenes). You could grind the spices/botanicals using a spice grinder, macerate, and soak in ethanol. Weighing the dry feed and raffinate can shed light on mass yields if you want to get nerdy. You can try ethanol and water mixes too and compare notes on yields. Once you stop the extraction, you could gently heat to evaporate off the ethanol or evaporate in air. Test on a small patch to ensure you don’t do damage to your crops!
Safety and Effectiveness of Botanical Pesticides
A group of researchers recently investigated the safety and efficacy of several widely used natural insecticides in reducing the risk and harm caused by arthropod pest population on food and cash crops. 
The researchers reviewed literature on homemade insecticides (limited to simple methods, e.g., “grinding, pounding, aqueous extraction”) using the following botanicals recommended by 20 different countries:
- Garlic (Allium sativum)
- Neem (Azadirachta indica)
- Chili pepper (Capsicum spp.)
- Siam weed (Chromolaenaodorata)
- Mother of cocoa (Gliricidia sepium)
- Chinaberry (Melia azedarach)
- Moringa (Moringa oleifera)
- Tobacco (Nicotianatabacum)
- Clove basil (Ocimum gratissimum)
- Tephrosia (Tephrosia vogelii)
- Tree marigold (Tithonia diversifolia)
- Bitter leaf (Vernonia amygdalina)
Across reviewed studies, all investigated botanical applications possessed active ingredients that showed insecticidal benefits.
The researchers concluded that the above-mentioned botanicals could be used as insecticides with some level of success. The evidence varied based on the concentration of active ingredients in the samples and the preparation process. However, the botanicals were often less effective than common synthetic insecticides.
Where Mode of Action Comes In
Mode of action is the mechanism through which a compound exerts its effects. In this case, it refers to the biological process that is interrupted by the botanical.  Understanding the mode of action helps to determine the effectiveness and suitability of the botanical in pest control.
A different study concluded that many homemade botanicals act as deterrents rather than actual insecticidal agents. 
More evidence is needed to support the efficacy of homemade insecticides vis-à-vis the potential health and environmental risks. Meanwhile, homemade insecticides could be an “acceptable alternative to commercial pesticides, particularly where availability of and access to synthetic pesticides are limited,” the researchers reasoned. 
- Oerke EC. Crop losses to pests. J Agric Sci. 2006;144(1):31-43. Journal Impact Factor: 1.082; Times Cited: 2,397
- Abate T, van Huis A, Ampofo JK. Pest management strategies in traditional agriculture: an African perspective. Annu Rev Entomol. 2000;45:631–659. Journal Impact Factor: 13.796; Times Cited: 260
- Dougoud J, et al. Efficacy of homemade botanical insecticides based on traditional knowledge. A review. Agronomy for Sustainable Development. 2019;39(37). Journal Impact Factor: 4.531; Times Cited: 16
- El-Wakeil N. Botanical pesticides and their mode of action. Gesunde Pflanzen. 2013;65(4):125-149. Journal Impact Factor: 0.738; Times Cited: 136