Ben Kokes works the titanium (left), and the finished ring (right). Courtesy of Ben Kokes

An inventor's romantic proposal idea has come to happy fruition. It took months of work, but Ben Kokes crafted an engagement ring for his girlfriend, Julie, that would light up from within — but only after he put it on her finger and took her by the hand.

(First, for those who can't stand the suspense, don't worry: She said yes, and she loves it.)

The idea of a ring that glows when he's near it occurred to Kokes a while back, but the actual design wasn't finalized until January. He spent the next few months slipping away to a nearby machine shop to work on the ring, which he code-named "Project Longhaul" — though it wasn't easy to escape his girlfriend, who also enjoys building things.

"She kinda likes this kind of thing, so it was tough making excuses for why I was going to the shop all the time," Kokes told NBC News in a phone interview.

Byers Market Newsletter Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

The ring Ben proposed with. Courtesy of Ben Kokes

At last, the moment came. "I took her hiking — we live in San Francisco, and the plan was to propose at dusk on top of one of the hills." Unfortunately, it was cloudy, which will surprise few residents — but once they were safe from the elements, the proposal went ahead anyway, and it wasn't long before Kokes was able to put the ring where it belonged.

Then he moved his hand closer — "the range is really small, only about 3 or 4 inches," he explained — and the hidden LED came on and lit the stones, to his financee's delight.

How did he do it? Wrapped within the interior of the ring was a coil of copper, which any electrical engineer will tell you generates a current when exposed to an alternating magnetic field. To supply the field, Kokes built a wrist-mounted device that he could wear and easily conceal, as well as surreptitiously activate when the time came.

The model for the ring, and the LED and copper coil. Courtesy of Ben Kokes

It worked like a charm for its moment of glory — and broke the next day.

In fact, it was no easy task to put the whole thing together, even though it turned out just fine in the end. The ring is made from titanium, which is extremely hard and not easy to work with, and affixing the stones to the interior had to be done with a temporary epoxy rather than a permanent mechanical solution. And a slight miscalculation made the ring a fraction of a millimeter too tight for his fiancee's finger.

But he's working on the replacement. The first may have taken months to design and test, but now Kokes says he could probably put together a new one in just a few days. And since he documented the whole process online, others can give it a shot too.

"Anyone with some reasonable shop experience could do it," he said, but they should be prepared for failure: Kokes himself destroyed quite a few rings during testing, and expects to lose a few more.

What's next for the inventor? He works at a company that makes accelerometers, the sensors that tell your devices which way they're facing and how they're moving, and has been toying around with putting them inside footballs. When thrown, the smart ball sends info back to an app he wrote, where it can be analyzed to give suggestions on throwing style.

He expects to have the football working by the end of the year, which is about when the couple expects the wedding to be — the ring, of course, will be done then as well. It was a lot of work and there's still lots to do — was it worth it? "Hell yeah!" said Kokes. "Absolutely."

Devin Coldewey is a contributing writer for NBC News Digital. His personal website is coldewey.cc.