The little-known story of the first IoT device
In the '80s, some techies at Carnegie Mellon tinkered with a soda machine and made history.
Before there were Internet-connected umbrellas and juicers, water bottles and factories — before there was even a modern Internet — there was a humble Coke machine in Pittsburgh, Pennsylvania that could report its contents through a network. Though it was primitive by today’s standards, it holds a unique distinction: It was, as far as anyone knows, the world’s first IoT device.
Necessity, as always, was the mother of invention. One day in the early 1980s, David Nichols, a graduate student in Carnegie Mellon University’s computer science department, was in his office on campus at Wean Hall craving a soda. But his office was “a relatively long way” from the building’s Coke machine, and considering his fellow students’ substantial caffeine habits, Nichols knew there was a good chance it would be empty — or that, if the machine had recently been refilled, the sodas inside would be tragically warm.
“Suddenly, I remembered tales of the Prancing Pony [the first computer-controlled vending machine] at Stanford and realized that we didn’t have to put up with this, that we had the technology,” Nichols later recalled.
Nichols wrote a few friends about his idea to track the machine’s contents remotely and put an end to unsatisfying soda runs once and for all. Soon, two other students — Mike Kazar and Ivor Durham — and a research engineer at the university, John Zsarnay, began working alongside him to make it happen.
The key to determining the contents of the Coke machine from afar was keeping close tabs on its lights. The machine had six columns of glass soda bottles. When someone purchased a Coke, a red indicator light for the corresponding column would flash for a few seconds before turning back off. When a column was empty, the light stayed on until the sodas were replaced.
To pull data from the machine, Zsarnay installed a board that sensed the status of each of the indicator lights. A line from the board ran to a gateway for the department’s main computer, which was connected to the ARPANET — a precursor to today’s Internet, which, at the time, served less than 300 computers worldwide.
Kazar wrote a program for the gateway that checked the status of each column’s light a few times per second. If a light transitioned from off to on but then went off again a few seconds later, it knew that a Coke had been purchased. If the light stayed on more than five seconds, it assumed the column was empty. When the light went back off, the program knew that two cold Cokes — which were always held in the machine in reserve — were now available for purchase, while the rest of the bottles were still warm. The program tracked how many minutes the bottles had been in the machine after restocking. After three hours, the bottles simply registered as “cold.”
Finally, the group added code to the main computer’s finger program, which allowed anyone on a computer connected to the ARPANET — or anyone connected to Carnegie Mellon’s local Ethernet — to access information about the machine. With a few simple keystrokes, they could find out if there were any Cokes in the machine, and, if so, which ones were cold.
“I never used it, except to see if it was working,” Kazar told Industrious. “I never liked Coke.”
But Carnegie Mellon was full of Coke drinkers, and according to Kazar the program became “pretty popular pretty fast” in the computer science department when it became operational in 1982. “After a while, it became standard procedure to check the status of the Coke machine before you’d go downstairs because you wanted to make sure you got the coldest Coke available,” he said. At some point, another graduate student set up a similar system to monitor the status of the nearby M&M machine.
Some years later, the local Coke distributor stopped selling the glass bottles that fit into the department’s machine, and eventually the device was replaced with a newer model that students never got around to connecting to the Internet. But in the decades that followed, the new machine continued to be a platform for offbeat experimentation.
In the early 2000s, Mike Vande Weghe, Chuck Rosenberg and Kevin Watkins installed a video camera in the machine that filmed a nearby counter where people sometimes left free food. Students often checked the camera’s feed online to see if anything was up for grabs. A few years later, Charlie Garrod and some other students installed a screen in the machine that displayed the weather and other information of general interest.
“We didn’t want to get rid of our modified Coke machine entirely, but the people who would have made the deep changes were no longer around. It’s not that we wanted less functionality, it’s that we didn’t have the resources to redesign the system,” Garrod told Industrious. “The interesting work on this project was really in the 80s.”
For years, members of the computer science department’s main graduate student organization, Dec/5, continued to operate the machine. Though Coke owned it, the students kept it stocked and set the prices. Volunteer “machine maintainers” like Garrod attempted to make any necessary repairs to the machine without calling for outside help, since Coke repairmen frowned upon the techy modifications.
“They told us to revert it to its unmodified form, which we didn’t do but we reverted it temporarily to its unmodified form whenever they had to come out,” Garrod said.
Eventually, Garrod said, graduate students decided operating a soda machine on their own “wasn’t worth the time or effort.” As of 2014, there was a Coke machine in the Gates Center for Computer Science, but Garrod said “it’s just an everyday Coke machine.”
While the history of the computer science department’s Coke machine is preserved on the Carnegie Mellon website, Kazar said the university didn’t formally celebrate the original invention at the time, and it never occurred to him in the 80s that the device was particularly groundbreaking. “I never thought anyone would be asking me about it 30 years later,” Kazar, now CTO at Avere Systems, said.
Kazar certainly never imagined the Coke machine would be just the first of billions of everyday devices connected to the Internet. Today, there are more than 8 billion connected things in use worldwide and by 2020, that number is expected to grow to 30.7 billion. The market for IoT sensors alone is expected to be worth more than $27 billion by 2022.
But back in 1982, when computers cost a million dollars and the ARPANET was still the only game in town, Kazar said a world dominated by IoT seemed like a far-off fantasy.
“There was a running joke about how your toaster was one day going to be on the Internet,” he said. “People laughed at that.”