At the Old Bailey, Ahmed Hassan told the court how during the summer of 2017 he had become bored, depressed and considered suicide.
He said he was haunted by bad dreams and would drink four or five cans of energy drinks to make himself stay awake.
He told jurors: “I wasn’t thinking as a normal person would do. I was very stressed, very confused and I watched a lot of action movies.”
Hassan said he came up with the idea of making a homemade bomb after watching films.
“It became a kind of fantasy…the idea of being a fugitive got into my head,” he said.
Hassan told the court how he purchased ingredients and looked at YouTube videos that showed how to make the explosive TATP.
He told the jury he tested a small amount on a can of coke. Having done this he said he “felt certain that it would not explode. It would just burn” when it was detonated.
He denied suggestions from the prosecution that he had included cutlery, bolts and metal screws to try to inflict the maximum amount of damage that day, telling the court: “I wanted it to look serious so I added the shrapnel.”
When asked by the defence if he ever wanted to hurt anyone, he responded: “The idea of killing another human being never crossed my mind at all, never in my life.”
He told the court he regretted what he had done that day.
“I wish I hadn’t done it, I wish I could travel back in time,” he said.
Hassan denied being disappointed that there were no deaths, claiming news headlines confirmed to him that all had gone to plan.
“I wanted to know what had happened. I expected to see what I saw, a minor incident.”
Under cross-examination, the prosecution accused Hassan of being a “proficient liar” after he told the court he had not told the truth to immigration officials in 2016 about being taken prisoner by Islamic State.
Hassan said: “I never lied. I made up a story for the Home Office to accept me.
“Because I came from a wealthy safe area of northern Iraq and if I told the truth, my only reason to leave that country was to further my studies, I felt I had to make up something strong.”
The court heard how, at college, Hassan had wanted to be a wildlife photographer and had aspirations of being the next David Attenborough.
He denies attempted murder and causing an explosion that was likely to endanger life.
The trial continues.