A Florida college student’s graduation cap backfired on the engineering wiz when police mistook his decoration — a homemade, battery-powered digital clock — for a bomb.

Can Cevik, a computer engineering student at Florida International University, was going through security July 29 on his way to get his degree when things went awry.

“I was stopped by police for what they saw on my graduation cap; them assuming the worst, my cap and cellphone (temporarily) were seized as police were investigating what it was,” Cevik wrote on Instagram. “All of a sudden, they closing doors and leading people away from the local vicinity.”

Cevik described the device on his cap as “an Arduino Uno with a 7-segment display on it and was powered by a 9V battery; it was not an explosive.”

He said an Arduino is a microcontroller, “like a small programmable computer.”

“I thought I’d try something different,” he told WSVN-TV in Miami. “It wasn’t intended to be harmful in any way — just as a small creative project that I just wanted to show off for graduation.”

The graduation finally got off 10 minutes late, with Cevik apologizing to police and even posing for a photo with one of the responding officers — but with a different cap.

Police confiscated the suspicious-looking headgear, which Cevik said cost him $20 to build.

“I’m just an engineering student trying to get my degree!” he said in his Instagram post. “#FIUGrad.”

Officials at the university referred questions to campus police, who did not immediately respond.