A 34-year-old man has been sentenced to two years and six months' jail over the discovery of highly volatile explosives in Western Australia's south-west.

Ben McDonald Roberts pleaded guilty to five counts of making or possessing explosives in suspicious circumstances and two counts of unlawfully endangering the safety of a person.

Judge Allan Fenbury told the court he needed to send an emphatic statement to the community to discourage other people from making homemade explosives.

In sentencing submissions Roberts' lawyer said his client was a good man but had made the substance TATP to cause an explosion as entertainment for himself and his friends.

Two packages of the explosive TATP were found in the Leschenault Estuary last November, and a third suspicious package was later found at a caravan park.

The court heard Roberts found a recipe on the internet containing items including hydrochloric acid, acetone and peroxide, and mixed three readily available chemicals in a plastic drink bottle to make the substance.

The discovery of the explosives sparked a major police operation as TATP, a crystalline powder which can resemble methamphetamine or sugar, is used by terrorist organisations and clandestine drug manufacturers.

WA police were tipped off by a member of the public who found the first bag.

It was transferred to Perth and once it had been identified was driven slowly through city streets to a racing track, where a controlled explosion took place.

Police and defence personnel then searched the estuary and found the second package. That was also exploded.

The state said an immediate term of imprisonment was the only appropriate sentence to send a strong message to deter the community from manufacturing explosives.

Roberts has been made eligible for parole.

Lawyer Derek Hunter said his client planned to appeal against the sentence.