Shane Towland was stopped at 1am, on July 12, when police found an empty cannabis grinder in his silver Vauxhall Vivaro van, and he tested positive for cannabis.
But at Mansfield police station he argued with officers and said "he hated needles and felt dizzy," said prosecutor Neil Hollett.
Probation officer Greta Percival said Towland has "a long history of really serious offences" and was jailed for three years for dangerous driving, in May 2015 .
The medical practitioner failed to find a vein for a blood test twice at the police station, and this "confirmed his apprehension," said Michael Jones, in mitigation.
The court heard Towland bought the van to get gardening work, and had a driver, but admitted using cannabis on a daily basis.
"He has been clean of Class A drugs for five and a half years," said Mr Jones.
Towland, 38, of Dockinghill Road, Doncaster, was convicted of failing to provide a specimen after a trial on October 24, and admitted driving while disqualified and without insurance.
Mansfield magistrates told him he came "within a whisker of going to prison", when they sentenced him on Thursday.
He received a 12 month community order, which includes a "re-think" programme and five rehabilitation days, with 200 hours of unpaid work.
He must pay £300 towards costs, and a £90 surcharge. He was banned for 12 months.
To read more of the latest court cases from Mansfield and Worksop click here.