Generalities about Powder
The origins of gunpowder, while uncertain, was likely somewhere in Early Medieval China, prior to the formation of the Jin Dynasty (1115). Initially, usage of this material was limited to propellants; however, by the time of the Mongol invasion of Japan, its use as an explosive was recognized, and primitive forms of firearms--known as "fire-lances", began to make an appearance.
Soon, this technology spread along the Silk Route, and into the Near East, and Europe, where the potential for gunpowder weapons came to be realized. Early recipes for gunpowder are first attested in the two regions in the 13th century, and by the 14th century, primitive firearms and artillery began to make an appearance, in order to take advantage of the powder. At first, these pieces played relatively little role in Medieval combat: the bombards of the English Army at Crecy (1346), played a relatively unimportant role, compared to the decisive impact of the ancient technology of the longbow. However, with improvements in metallurgy, and improvements in the production of gunpowder, the full potential of this technology soon showed. By the beginning of the 16th Century, Gunpowder weapons were a common sight on the battlefield, and by the end of that century, had become the most important weapon systems available to the armies of the period. This trend continued through to the 19th century, when better propellant and explosives were introduced. By that time, firearms and artillery had come to completely dominate the modern battlefield.
The reason behind the eventual success of gunpowder, and the weapons that utilized it, are relatively straightforward: the chemical nature of the energy emitted by the burning of gunpowder did not rely on the skill or training of the soldier to generate, in the way a longbow or hand weapon required. Additionally, the amount of energy released was sufficient--when properly harnessed--to hurl relatively small projectiles with great force, sufficient to defeat any armor of the period. The combination of the two factors meant that a soldier could be trained to defeat any opponent at range, with little training or effort; the greater part of raising an army was invested into the weapons and equipment itself. This then began a process where greater armies could be raised, at reduced cost. By the middle fo the 18th century, whole armies were equipped with weapons primarily dependent on this mixture.
Basics of gunpowder: chemistry
All gunpowder (which refers to what is now called "black powder") is composed in effect, of three components:
1-An oxidizer 2-Fuel 3-Matrix constituent
The oxidizer--traditionally composed of Potassium Nitrate (KNO3), common called Saltpetre or Nitre--serves to provide oxygen to consume the fuel, which in this case is carbon, in the form of wood charcoal. To maximize the energy of the reaction between the two components, and also stabilize the rate of the reaction for greater reliability and uniformity, sulfur is added as a matrix constituent. The above chemicals could be substituted--notably sugar in place of charcoal; however, these would be less that ideal.
Traditionally the ratio between the ingredients was 75% saltpeter, 15% charcoal, and 10% sulfur, which is quite close to the ideal; while this is not the optimal ratio, it is quite close to it, and is still the standard for gunpowder to this day.
The reaction of all three components is precipitated by the introduction of a heat source--a flame or spark, which produces a series of gasses, as well as sulfate and carbonate salts, alongside a series of other assorted chemicals which result from partial combustion of powder--sulfides, cyanites, etc.
The salts and other solids, alongside unburnt powder, are what produce the fowling that plagued all weapons of the period on firing. The gases--or rather, their rapid expansion--are what generate the energy needed to propel projectiles. If sufficiently confined, the same effect can also generate a blast. Additional chemical, particularly the sulides, sulfates, and unburnt sulfur, will also generate the distinct rotten-egg odor of burnt powder.
The gases generated, when combined with the impurities and partly burnt powder, create the distinctive blue-grey smoke associated with gunpowder. As most of the gases are heavier than air, thee tended to settle readily, and stay in the air for extended periods of time; large quantities of powder spent could thus cloud the field in a dense haze or fog--the famous "fog of war", which hampered visibility on battlefields of the time.
Types and Quality of powder
Bräker, Ulrich, Der Arme Mann im Tockenburg, 1789
Rosen, M.A., 2006, Historical Aspects and Black Powder Manufacturing, Civil War Artiller project, http://www.civilwarartillery.com/disarm/blackpowder.htm accessed 8/15/2019
User:Ibrahim90 and W.D. Liddell, for the initial version of this article