The Official Raspberry Pi Projects Book - Projects_Book_v4

(singke) #1

raspberrypi.org/magpi The Official Raspberry Pi Projects Book 69


GOOGLE PI INTERCOM Projects


Left The project
used a repainted
and cleaned
intercom bought
from a car-
boot sale

MagPi to assemble the HAT and get
the software up and running on the
Pi,” he recalls. With the Pi and HAT
running on his desk, he tested some
voice commands before getting
on with the task of cracking open
the old intercom. “There’s always
a slight feeling of naughtiness in
ignoring the ‘do not open’ warning
and seeing what’s inside,” he says.
“The great thing about older tech is
things tend to be screwed or bolted
together, allowing them to come
apart nicely, leaving just the case.”
Having made lots of tiny
measurements, he was convinced
the kit would fit, so he cleaned and


spray-painted the front of the case,
let it dry, and began bolting the
Pi into the case, adding the other
components around it. “I set aside
the green push-button from the kit,
but kept the microswitch and fixed
it inside the case alongside the big
hinged intercom button.”
Getting the microswitch in exactly
the right place was the greatest
challenge and it involved lots of


>STEP-01
Using IFTTT
Martin wanted to expand the Google Pi
Intercom’s abilities, so he logged into ifttt.com,
clicked My Applets, selected New Applet, and
then clicked the ‘+’ icon on the next screen.

>STEP-02
Finding Google Assistant
Having searched for Google Assistant and
clicked Connect, he signed into his Google
account. He could then select a trigger
and fill in the phrases that would activate it.

>STEP-03
Organising the response
His idea was to get the intercom to
send a text to his wife when he says
he’s home. He chose SMS as the action
service and filled in his mobile number.

A CONNECTED HOME


trial and error: “Because it was
being activated at an angle by the
rear of the button, even a couple
of millimetres made the difference
between the microswitch sticking
‘on’ or there being too much play
in the action.”
Martin then removed the LED
from its case and soldered in a two-
hole component connector to secure
it between the Pi’s USB ports, under

There’s always a slight feeling


of naughtiness in ignoring the


‘do not open’ warning


the original microphone grille.
“The kit’s microphone board was
just glued into place once I’d drilled
holes in the top of the case. Once
that was in place, I connected the
cables and closed the case.”
Martin is pleased with the result:
“The kids have described it as
fancy and futuristic, which I’ll
happily take.” He has since linked
the intercom to his IFTTT account
(see ‘A connected home’ box).
“This took some configuring,”
he concludes, “but thinking up
responses for the intercom to read
out when the triggers are activated
was really good fun.”
Free download pdf