A gunpowder explosion is just charcoal burning really fast. You would have gotten the same energy released by burning a lump of charcoal in your BBQ. When coal is burned, it turns into hot carbon dioxide gas. This gas expands to significantly larger volume than the lump of coal which got burned. In this story, we will look at how mixing in saltpeter and sulfur with charcoal to create gunpowder, allows us to burn charcoal much more rapidly than you would achieve in your BBQ.
Rapid combustion produce rapidly expanding gases. If these gases expand within an enclosed space, they will eventually cause the buildup of enough pressure to cause an explosion. In fact, we don't even need a combustion. If you heat water within an enclosed space, then you can cause an explosion. When water is boiled, it expands to 1600 times the volume of the boiled water. That is the reason boiler explosions were so common during the industrial revolution.
When gunpowder burns, it produces gases which would take up 380 times as much space as the original powder at room temperature. However, the burning also makes the gases hot. Hot gases consume more space. Remember, that is the principle used in hot air balloons. The hot gases from a gunpowder explosion will consume 3000 times the original volume of the powder. As this happens in 25 microseconds, we hear it as a bang.
The question is: What makes a lump of charcoal burn slowly, while the ground up charcoal in a gunpowder mixture burns extremely fast?
Combustion is about combining a fuel with oxygen. For this combustion to happen, the fuel molecules such as gasoline or coal need to be brought close to each other. The carbon atoms inside a lump of coal cannot burn because there is no oxygen inside the lump of charcoal. The oxygen is only at the surface. Carbon and oxygen combine at the surface, creating carbon dioxide.
Thus, the trick is to find a way to give as many carbon atoms as possible access to oxygen at the same time. In coal mines, that happens occasionally. The air is filled with coal dust. A lump of coal turned into dust and suspended in the air is almost like gunpowder. Ignite it and all the dust burn instantly because every dust particle of coal has access to oxygen. That is what makes air filled with combustable material such as coal, sugar, or sawdust so dangerous. There have been numerous explosions in coal mines, sugar mills and saw mills.
These kinds of explosive conditions can be created artificially and controlled in different ways. The carburetor in a gasoline engine is used to create a mist of gasoline droplets mixed with air. This mix is highly explosive because each fuel droplet has access to oxygen needed to combust. Modern coal plants work on the same principle. They grind coal into dust and blow the coal dust into a combustion chamber, where it gets burned.
Theoretically, you could create a gun by having a cyclone blowing around coal dust before igniting it to create an explosion. Naturally, this type of gun would have been really clunky and impractical. What if we could get oxygen in powder form and just mix it with coal? That way, every coal grain would have had access to oxygen. Of course, there is no such thing as powder oxygen. We could have used liquid oxygen and mixed it with coal powder. Again, not very practical. How about oxygen chemically bound, which gets released when the compound is heated up?
That is precisely what potassium nitrate (KNO₃) is. It is a white powder which contains a lot of oxygen. When heated to over 400 °C, it decomposes to potassium nitrite and oxygen:
2 KNO₃ → 2 KNO₂ + O₂
Potassium nitrate is also widely known as saltpeter and niter. It is a key ingredient in gunpowder. If we mix powder charcoal with potassium nitrate, we have essentially managed to mix coal with oxygen without having to suspend it in air as dust. By heating this mix up to 400 °C we would get a rapid combustion producing an explosion.
There is one problem, though, 400 °C is a rather high temperature. Heating a powder mix to 400 °C uniformly is impractical. We face a similar challenge when putting fire to a pile of wooden logs. To get logs to burn, we need a tinder, something that ignites more easily. In gunpowder, sulfur is mixed in to serve that purpose. Charcoal is not made of pure carbon. It contains hydrocarbons, which reacts with sulfur at relatively low temperatures to create hydrogen sulfide (H₂S).
2 H + S → H₂S
KNO₃ + H₂S → S + KNO₂ + H₂O
Hydrogen sulfide reacts with potassium nitrate, creating potassium nitrite. This reaction is what we call exothermic, meaning it produces more energy than it consumes. In practical terms, that means this reaction causes the temperature to rise until it gets hot enough for the chemical bonds in potassium nitrate to break apart and release oxygen, which can then react with carbon.
Let me try to rephrase this: Potassium nitrate can be thought about as oxygen in powder form. The oxygen is not readily available as it is trapped inside a chemical bond. We use sulfur as a way to facilitate the breaking of this bond. In some ways, we could almost consider sulfur to be a catalyst for the reaction between carbon in the charcoal and the oxygen in the potassium nitrate.
These details also help you understand why regular coal does not work in gunpowder. You need charcoal because charcoal is more complex than just carbon. Charcoal contains the hydrocarbons which can react with sulfur to form hydrogen sulfide (Hâ‚‚S).
Let us conclude. The gunpowder recipe with 75% saltpeter, 15% charcoal and 10% sulfur may look complex, but it is really just a clever way of allowing coal to be mixed with oxygen so that the combustion of coal can happen really fast. A rapid combustion cause a rapid volume expansion which can be used to push out bullets, cannonballs, or fracture the metal enclosure of a bomb.