Johnny Depp has openly admitted to having several run-ins with the law in his past.

The most recent revelation came when he was talking about the preparation he made before playing a scientist in new sci-fi film 'Transcendence.'

The 50 year-old actor met with some of the brightest minds in the US, but on one particular day the film's director, Wally Pfister, introduced him to Elon Musk, the head of the Tesla electric car company, while on set.

When meeting the business magnate, Depp couldn't resist going for a drive in one of the luxury electric vehicles, and joining him was Brit co-stars Rebecca Hall and Paul Bettany.

But their test run was cut short after local police pulled the electric car over.

"I had one of the best experiences I've ever had," Depp is quoted saying by The Sun newspaper. "The director introduced me to Elon Musk at Tesla."

It wasn't long before the Hollywood hunk admitted that their journey was cut short: "He came and visited the set and we had a ride around in his car but then the police pulled us over."

"We had a first - maybe the first -Tesla jam," Depp continued. "I was in the front seat while Paul Bettany was sitting on my lap. Rebecca and Wally (Pfister) were in the back. Elon was driving and we were pulled over speeding."

"Elon had a good sense of humour about it," he stated. "The cop did not. He needed a humour chip. But it was a good time, nonetheless."