A dad-of-three has been banned from driving after taking cocaine just hours before getting in his car.