Raspberry Pi AI teasmade on Channel 4 TV show

By Russell Barnes. Posted

A Raspberry Pi teasmade was taken for a test run by speed junkie Guy Martin in Channel 4’s recent documentary, Guy Martin Versus the Robot Car.

The Pi powered tea-making robot, ingeniously named R2‑Tea2, was designed and built by Huddersfield’s Running in the Halls (RITH), a design and development studio whose “primary focus is designing and developing web and mobile apps, games and installations” according to RITH co-founder and director, Sam Croft.

 Guy Martin and RITH’s Alison Cox filming the show

RITH’s brief was “to demonstrate how AI could be used in technology that is readily accessible to anyone that has an interest in physical computing,” Sam tells us.

The idea to make a teasmade came from Guy’s love of tea, with the aim that Guy could interact with the robot tea-maker “through some kind of chatbot that would make decisions, based on his [Guy’s] responses in the conversation, about what kind of tea to make,” Sam explains.

However, Sam reveals that “Guy doesn’t have a smartphone and uses a 15-year-old Nokia. This limited our chatbot idea to using SMS text messages.”

Click here to get The Raspberry Pi Beginner's Guide with a Free Pi Zero W kit

Robo-tea: building an AI teasmade

R2-Tea2 has “two core components,” Sam continues: “The making robot [and] the chatbot, with language processing and basic AI.” The actual robot was based around the Pi, hooked up to a £12 Adafruit 16-channel PCA9685 PWM/servo driver board and two dual H-bridge motor drivers. As “the budget wasn’t huge” for R2‑Tea2, components needed to be cheap or easily sourced.

“We had one script [to control the robot] that sequenced the firing off of all the separate control scripts, which were nothing more complex than sending high and low signals to the correct pins with the correct delays,” recalls Sam.

 Most of the Raspberry Pi’s GPIO pins were needed to control the tea-making device

AI that understands a northern accent

It was important that R2-Tea2 could understand Guy’s “famous Northern turn of phrase,” as Sam puts it, so the language-processing element was programmed to comprehend some of Guy’s more unusual idioms.

RITH used Twilio to handle the SMS messaging, and Google Dialogflow for the conversational interface. RITH then needed a webhook to send texts from Guy’s phone to a Python application running on the Raspberry Pi. “To achieve this,” Sam explains, “we had to expose our localhost server to the internet by using a service called ngrok.” See ngrok.com for details.

See: Connect Raspberry pi to Cellular Network

The AI also analysed Guy’s day to “approximate his current stress level”. Blending SMS conversation and Guy’s activities, R2-Tea2 chose “what kind of cup to use, which kind of tea, how much (if any) milk, and how long the tea should brew for,” Sam reveals.

R2-Tea2 was built by two people at RITH: co-founder and director Alison Cox built the robot and the Python script while Sam built the chatbot portion.

Win! MonsterBorg & ThunderBorgs


From The MagPi store


Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.