Judge Roger Thomas QC sentenced Warren Connor to six months in prison, suspended for 12 months, after the 28-year-old pleaded guilty to one count of production of cannabis.
Sheffield Crown Court heard how when police officers executed a drugs warrant at a property in King Road, Askern, Doncaster they forced entry into the terraced house after no-one answered the front door.
During the sentencing on January 2, Andrew Smith, prosecuting, told the court that officers made their way into the loft after seeing a 'bright, orange light' emanating from it.
He said: "They found 15 plants that were 16 inches in length growing."
Police analysis found the plants had a potential yield of £7,700 - based on the value of one-gram street deals.
"The defendant said the plants were his, that he smoked weed," Mr Smith said, adding that Connor, of Earndale View, Doncaster told police he did not smoke a lot of the Class B drug due to the random drug tests he was subject to as part of his role in traffic management.
The court was told that Connor claimed to use the drug to self-medicate for back problems he suffers from.
"The police put it to him that the plants were for far more than his personal use because by his own admission he did not smoke very much. But this was not accepted by the defendant," added Mr Smith.
Robert Sandford, defending, told the court that Connor did not have any relevant previous convictions.
Passing sentence, Judge Thomas told Connor: "You get somebody whose chosen to grow cannabis in a house in South Yorkshire. A lot of people are choosing to do it and some people say it is for their own personal use.
"But the truth is, growing drugs is a very profitable business."
In addition to his suspended prison sentence, Judge Thomas also ordered Connor to complete 120 hours of unpaid work.