Judge Jim Large said it was "an unusual piece of offending".
He said there were another two explosives that had been set off by Collins as well. When Collins' car was searched, a bottle of gunpowder was found.
"He said he was interested in making explosives," Judge Large said.
Collins told police he thought the area he was setting them off in would be safe.
The judge said Collins was "in the category of young men" who developed mental health issues and "probably psychosis" when they smoked cannabis.
He handed down a six-month community detention sentence with a 7pm to 7am curfew, as well as 12 months of supervision.
The young defendant also received a strike warning under the three strikes law.
Judge Large ordered the destruction of the explosive and gunpowder.