A cannabis user has been told his behaviour "could be classed as abuse" after growing the Class B drug in a Midway home he shared with his partner and her children.
Martin Lewis set up a 5ft by 8ft growing tent in one of the rooms at the property he lived in and claimed he bought all the equipment he needed for his set-up at a car boot sale.
Peter Bettany, prosecuting at Southern Derbyshire Magistrates' Court, said that when police raided the house, in Lincoln Way, they came across "mature and immature" cannabis plants growing in the tent which was foil-lined and had "all of the equipment" needed to cultivate the drug.
He said there was a lighting rig, ducts to take the smell of the cannabis from the property, compost and buckets filled with water.
A search also revealed evidence of a previous cultivation of the drug but there was no evidence the 42-year-old was selling for profit, said Mr Bettany.
District Judge Jonathan Taaffe, sentencing Lewis to complete a 12-month community order, said: "You attempted to justify your actions by saying you bought the equipment at a car boot sale. Well I don't buy that, you planned this.
"What aggravates your offence was that there were young children at this house. The stench of the cannabis was sufficient for it to be reported to the police from outside your property.
"Your children, or the children in the property, have been subjected to the fumes and the smell of cannabis on a daily basis. It is selfish and could be classed as abuse in some aspects."
Mr Bettany said officers raided the house on June 27, following a tip-off from a member of the public that cannabis was being grown inside.
He said: "They got inside and could smell cannabis for themselves. They found a 5ft by 8ft tent that housed 14 mature plants and two immature plants.
"There was also a 600-watt lighting rig, a carbon filter to remove the smell of the cannabis and water in large barrels. Under the bed they found a tin which contained plant stalks showing evidence of previous cultivation.
"There were a number of unused plant pots, compost and more lighting."
Lewis was arrested and told officers he bought the equipment at a car boot sale, was a cannabis user and was growing it for his own personal use.
He said he smoked between an eighth and a quarter of an ounce of cannabis a day and police estimated that the amount seized could have kept him going for more than a year.
Emma Leivers, for Lewis, said her client was "someone who had reduced his use of heroin but had unfortunately substituted that with using cannabis instead".
She said: "He is very disappointed with himself for the strain he is putting his partner and her children under."
Lewis pleaded guilty to being concerned in the production of cannabis. As well as the community order, he was fined £50 and was ordered to pay £85 costs and an £85 victim surcharge.