Charles Bromley Earnshaw admitted having cocaine, cannabis, and dimethoxy-4-chloroamphetamine (DOC) at his home.
They found 16.4 grams of cocaine, which they valued at £1,640, and 6.1 grams of cannabis, said to be worth £122.
Also found were doses of a drug said to be known as DOC, is psychedelic drug of the phenethylamine and amphetamine chemical classes.
During an interview, Earnshaw told police that all the drugs were for personal use.
The defendant was represented in court by advocate Peter Taylor, who submitted character references on behalf of his client.
Mr Taylor asked for credit to be given for his client’s guilty pleas and co-operation with the police.
The advocate referred to a probation report, which he said assessed Earnshaw as a low risk of reoffending and harm to others.
Mr Taylor said that his client had been using the drugs to self-medicate and had used cocaine initially as part of a training regime, but things had developed from there.
The advocate went on to say that any sentence should focus on rehabilitation, and that Earnshaw had put in place strategies to cope without drugs.
Magistrates also ordered the defendant to pay £125 prosecution costs within one month.