URBANA — Dug the Dog has nothing on Alma.
Inspired by the adorable character from the movie "Up," a team of University of Illinois engineering students created their own talking dog for this year's Engineering Open House.
Yes, Alma is a real dog, who wears a special scarf fitted with electrodes attached to a system that can decode her brain waves and translate them into human speech.
Walk up to greet her and a pre-recorded voice responds: "Hi, my name is Alma, I am so excited to meet you, and I love my master so, so much, and I am very happy at the moment, and life is wonderful."
Show her a treat, and she says, in a very Dug-like way, "Treat, treat, yes, I want the treat. I do so definitely want the treat."
The students recorded a video demonstration and put it on YouTube:
Months of work went into the effort, led by UI senior Jessica Austriaco, a bioengineering major.
Austriaco said she'd worked on electroencephalography projects for several years, measuring and recording electrical activity in different parts of the brain as people played video games. But this year she wanted to do something with animals.
"I love dogs," she said. "They love you no matter what."
She's also a big Disney/Pixar fan.
"The dog collar from 'Up' was kind of the inspiration, but those project experiences made me think that this is actually really possible," she said.
Austriaco recruited fellow bioengineering student Matthew De Venecia, technical lead for the experiment, and Bliss Chapman, a senior in computer science, who was hoping to collaborate with her on a project.
"When a normal person texts you, 'I want to build the dog collar from "Up,"' you kind of give them a funny look," Chapman said. "But with Jessica, you know it's a 'Get on board or get out of my way' kind of thing. It's gonna happen. I decided to get on board."
They recruited other students — mechanical engineering major Amanda Maher, who led design of the electrodes and other materials; Christine Lannon, Alma's owner and a bioengineering major; and bioengineering students Suva Laxminarayanan, James Soole and Kyla Swain.
Bliss said they spent the fall semester reading through research on the technical components involved, then started building the system in January.
So how does it work?
The electrodes measure the different electrical waves produced by Alma's brain when she's at rest and when she sees a happy stimulus, such as a treat or her owner.
The waves travel through wires coated with nickel paint for conductivity and wrapped in electrical tape and braided to cut down interference from other sources of electricity.
The wires run down Alma's back into a custom-engineered analog circuit on a harness that amplifies the waves and to a small computer built using Arduino, an open-source prototyping platform, that is programmed to filter out any interference — all but the alpha waves (emitted when the brain is relaxed) and beta waves (associated with alertness and activity).
The Arduino board feeds the data into a small Raspberry Pi computer, which has been coded to detect the difference between the two kinds of brain waves.
That process in itself was complex, Chapman said. The team tried several machine-learning techniques before finding success with one known as a "neural network." The computer essentially recognizes patterns from the data, and if it detects the "treat" stimulus, it triggers the corresponding recorded message.
The team picked the "treat" stimulus because, well, dogs love food.
"It seemed to be the one where Alma reacts very strongly," Austriaco said. "It gives better brain signals when she's focused."
The team first tested the system on De Venecia, to make sure it worked, then tried it on Alma.
"Last week, we started to see results," Chapman said, who wasn't sure until then it was going to work.
"We all went crazy," said Lannon, Alma's owner, who was a bit emotional, too.
"I know what Alma's thinking, she's my dog," she said. "To hear her say and visibly want it, we all went nuts."
Alma was a bit hesitant at first but warmed up quickly once treats got involved, she said.
The students had to invent their own electrodes using 3-D software and 3-D printing, paint them with conductive paint, then "do the whole process again if it wasn't comfortable for the dog," Chapman said.
Other components presented challenges, including the design of the harness.
"If you flex your (arm) muscle next to the wire that's carrying the signal from the electrodes down to the harness, your muscle produces electrical activity and the system is so sensitive, it can pick that up," he said, explaining the need to wrap the wires.
His pro tip: make sure your team has people who are "very, very smart" in different ways from you. If the students had more time and money, they could train the system to recognize more responses, such as when Alma is feeling anxious or hungry, Austriaco said.
In terms of research, the work could be useful to help map dogs' brains to find out what stimuli trigger certain emotions or responses, which could be useful to veterinarians trying to figure out where a dog is feeling pain, for instance.
That work could also translate to human patients who are unable to communicate, she said.
So is a dog collar like Dug's feasible?
It turns out there are scientists doing research on whole-body systems to pick up data from heart rates and muscle movements and encode those into interpretations of dog behavior, Chapman said.
"It definitely is a possibility. Hopefully, some of the young kids here today will take that on as their challenge," he said.
That's the goal, to inspire budding engineers.
"We want kids to be interested in engineering because engineering is cool, and not all kids know what engineers do," Austriaco said.
Alma can't demonstrate the system live at the open house, as there's too much background noise from crowds. But she was on hand to greet students Friday, and the video demonstration was shown.
Urbana Middle School seventh-grader Ezariah Brown was impressed.
"It's pretty cool that the dog would be able to talk like a person," she said.