As a boy, Michael J. Cudahy was known for pranks.

When his father was U.S. ambassador to Poland, young Mike taught himself to make exploding cigarettes. One of them singed the mustache of a Polish general at a diplomatic reception.

He later skipped college and had trouble settling into a career.

In his 40s, however, M r. Cudahy co-founded Marquette Electronics Inc., a pioneering maker of medical equipment that withstood competition from far larger companies, including 3M Co. and Hewlett-Packard Co.

Marquette, based in Milwaukee, got off to a rocky start in the mid-1960s. Some of the company’s early electrocardiogram, or EKG, machines leaked so much electricity that they might have risked electrocuting patients, Mr. Cudahy wrote later. After product quality improved, Marquette thrived as an international supplier of high-tech hospital equipment, including patient-monitoring devices.

A self-described “benevolent dictator,” Mr. Cudahy spurned such corporate conventions as meetings, consultants and organizational charts. His factory workers didn’t have to punch the clock and were on an honor system. His office cafeteria offered beer and wine at lunchtime. Mr. Cudahy, who liked a glass of Early Times whiskey with his lunch, trusted his colleagues not to overindulge.

He sold the company to General Electric Co. for about $824 million in 1998. Mr. Cudahy then devoted himself to philanthropy and civic causes in Milwaukee, notably a renovation of the Pabst Theater, featuring a new space called Cudahy’s Irish Pub.

He died March 11 at his home in the Milwaukee suburb of Cedarburg. He was 97.

Michael John Cudahy (pronounced CUD-uh-hay) was born in 1924 and grew up partly in Milwaukee. His father, John Cudahy, a lawyer and real-estate executive, was appointed U.S. ambassador to Poland under President Franklin D. Roosevelt and later served as U.S. minister to the Irish Free State and ambassador to Belgium.

Before his first appointment, “I don’t think the old man knew a bloody thing about being an ambassador,” Mr. Cudahy wrote in his 2002 memoir, “Joyworks.”

While living in Warsaw, young Mike learned how to create an exploding cigarette by injecting glue. He slipped one into a silver cigarette box. The general who lit it up was furious. Ambassador Cudahy couldn’t suppress a smirk but warned Mike never to do that again.

Having renounced explosives, the young man looked for watches, record players and other devices to take apart and learn how they worked. Around age 10, he invented a gadget that would turn on a hallway light when someone stepped on a certain spot in the carpet.

Later, when his father was stationed in Dublin, Mike learned to be a ham radio operator and was thrilled to talk by radio to someone in Havana.

During World War II, he was drafted into the Army Air Corps. “I was a spoiled brat, and the service was about to knock this unattractive characteristic out of me,” he wrote. After training in radio and radar technology, he became a teacher of those courses and was spared from overseas duty.

Once discharged from the military, he decided to hop directly into the job market rather than going to college. In New York, he found audio work for NBC television. An acquaintance there got him started on a project to put Muzak on airplanes to soothe passengers. That led to a meeting with Warren Cozzens in Chicago, who wanted to put Muzak on trains. Mr. Cudahy soon began working with Mr. Cozzens as a sales representative for electronics firms.

Fearing that “we’d end up like the guy in ‘Death of a Salesman,’” Messrs. Cudahy and Cozzens decided to become manufacturers. They tried making an electronic bass fiddle controlled by a pedal—allowing musicians to play the piano and fiddle at the same time—but couldn’t sell it.

A medical doctor asked them to come up with a better way to display information from EKGs, which record electrical activity in the heart. Messrs. Cudahy and Cozzens invested $7,500 each in what became Marquette Electronics and began devising a machine that could transmit data from the patient’s bedside to a central terminal for analysis. That eliminated the need for shuffling paper.

The first model was delivered to Northwestern University’s medical school in 1964. Then came the headaches: “Designs didn’t work, the customer didn’t pay, the money ran short, and I worked 15 hours a day,” Mr. Cudahy recalled.

As for the electrical leakage, he wrote, today’s regulators probably would never have approved the original devices, but “we just didn’t know the dangers.”

After selling the company he ran for 34 years, Mr. Cudahy felt lost. He regained his poise by focusing on civic affairs, including advice for Milwaukee politicians and gifts to the YMCA, Boys and Girls Clubs and Marquette University, whose prestige he had borrowed in naming his company. In his free time, he tinkered in his home workshop, took photos and made documentaries.

Mr. Cudahy’s survivors include five children, 10 grandchildren and his wife, Lisa Cudahy, whom he divorced in the early 1990s but later remarried. Three earlier marriages ended in divorce.

Of his frequent marriages, he wrote, “it seems to demonstrate that I have been careless in my judgment of women, or intolerant, or immature, or impossible to live with.” Even so, he added, “it was all perfectly logical each time I stepped up to the altar—at least in my mind.”

Write to James R. Hagerty at bob.hagerty@wsj.com