system
Given the following post, respond as if you're commenting on Reddit:
human
[The Martian] Specifically, how did Mark Watney generate water on Mars?

I know as told from the movie version the general steps, but would appreciate an in-depth answer. Such as the role of the catalyst, where did N2 go, how did H2 and O2 come together, what caused the explosion, why it did not happen again, ETC. 

Thanks!
gpt
It's all in the book.  The MDV had leftover hydrazine fuel.  A platinum catalyst split it into hydrogen and nitrogen.  He then burned the hydrogen in atmosphere to make water.  The burning didn't consume all the hydrogen though, so levels built up, creating a bomb.  He defused the bomb by removing all the *oxygen* from the air and then using a limited flow of O2 to burn off the hydrogen.  But his air supply mask wasn't airtight so his exhaled oxygen built up enough to lead to a small explosion.