The Canteen Counter: helping people avoid lunch line since 2018

Erik Borge
4 min readFeb 25, 2019

--

The Deloitte building in Oslo is a nice place. It’s in the city centre, got a nice rooftop terrace, big weird shaped windows all over it, but a not so functional canteen. The food is actually quite nice, but the layout of the food serving area is not made for serving hundreds of people at a time. Each day when it opens at 11, people rush upstairs to get their food and the same thing happens every time. Way too many people at once and the result is a bunch of hangry people having to wait way too long to get food. For the next two hours there will be several cases of this clutter, and the disappointment is equally big every time you have to travel 10 stories up just to find out you have to wait like 20 minutes to eat. I’d say there’s room for improvement.

That’s when the IoT journey of Deloitte Digital started. Introducing the…

Canteen Counterhelping people avoid lunch line since 2018.

So basically we had this idea of measuring the food line so we can check the traffic before we go up to eat. So we did, and it wasn’t actually that difficult. At work we have our ID cards, which also functions as payment when we enter the canteen. When we pay, we punch the card on a terminal, which makes this high pitched ‘beep’ sound. So we put up a small microcontroller (Arduino ish) with a sound intensity sensor, enabling us to capture that ‘beep’. An HTTP Post request is then sent from the Arduino to a database that with a simple API forwards the number of people in line to the web page on request. We also scrape the canteen service company’s web page to get today’s menu.

Hooray, now we can avoid the unfortunate situation of hangryness!

The IoT device: A NodeMCU microcontroller with the ESP8266 WiFi chip, connected to a SparkFun sound intensity sensor
The arcitecture. IoT in practice.

So you’re wondering how we could actually determine the amount of people in line just by counting when people enter the canteen? Good question! The database has got some logic for that. Firstly, when you enter you get a ‘base time’, that is, the time we assume you would use through the food area when there’s no people there. It’s like 2,5 minutes. Then you’re put in a list that contains all the people that still have time left, and when your 2,5 minutes run out you pop out of the list. For each person entering the canteen, we check that list and multiply your time by a factor that increases exponentially as the list is populated. So if there’s already 20 people there, your time will end up being something like 4 minutes. The general idea is that the more people you have in front of you, the more you would have to wait. So if you have 4 minutes, the guy in front of you will have maybe 3,8 minutes. It’s an estimate, but it works as a quick prototype! Smart, huh? We also cap the time at around 6 minutes because it doesn’t seem to increase infinitely.

How much time you get based on the amount of people in the list.

As of now, it’s just a real time representation of how many people there is in line, but in theory we could do some AI smartness stuff with it to forecast how many will be there in 10 minutes. Or even simpler, show a graph that shows the most popular times so you can be proactive in your lunching. Furthermore, since we currently only have a reference point at the beginning of the lunch line, we’ve thought about adding a Raspberry Pi with a camera and some image processing at the end of the line that counts people as they leave the food area. This would then enable us to have the exact number of people in line by simply doing

people in line = people going in - people going out

We’ll table that for version 2.0.

If you wanna check it out you could (It only shows the amount of people during the opening hours 11am-1pm CET):

Maybe we could use it to monitor other places as well, like lines on bars and discotheques for example?

Do you have another IoT challenge for us? Wanna check out other projects we’ve done? Check out our Medium Publication or get in touch through deloittedigital.no.

--

--

Erik Borge

Product developer, tech geek and musician. Tries to make things as fun as possible.