Shouting at a box!

So, I finally got my RaspberryPi powered GoogleAIY box to talk nicely to both Google and a Scroll pHAT.

GoogleAIY a RaspberryPi and a Scroll pHAT Overview

I decided to find it a permanent home, but it was in pieces.

So I thought that I’d put it all together.

In a gorgeous blue Perspex cube.

All the bits

All The Pieces

The full pHAT board and headers

I soldered a female header in the middle of the full pHAT board so that the GPIO cable can fit relatively flush to the surface of the PCB.

I know I could have put the female end of the GPIO cable to a male header but my Scroll pHAT had already been soldered with male headers.

I’m not sure if this will create any future problems but I guess I’m going to find out.

Full pHAT Board Headers

Extending the headers

There was a few millimeters of space short between the boards so I had to extend the headers and standoffs.

Because I only had a header with extra long pins I had to pad the top of each standoff with a bolt to meet the bottom of the GoogleAIY board.

(The GoogleAIY board is the ‘VoiceHAT’ board in the top right and is yet to be place on top of the full pHAT board.)

Extending The Headers And GPIO Cable

A RaspberryPi, a GoogleAIY Board and Scroll pHAT all connected

If you look closely you can see the gap between the top of the standoffs and the bottom of the top ‘VoiceHAT’ board.

I could have trimmed all of the header pins by a bit but didn’t want the extra hassle.

I’m sure it’ll all be fine.

Voice HAT And Scroll pHAT

A RaspberryPi nestling under a GoogleAIY VoiceHAT talking to a Scroll pHAT

A side view of the assembled boards before squeezing them into the case.

There is quite a collection of boards being stacked atop each other but it all seems stable enough.

Bridging The Gap Between Headers

Testing the RaspberryPi and GoogleAIY VoiceHAT

To make sure that both the AIY and Scroll pHAT processes were working, the whole thing has been powered up and is connected to the network via WiFi.

VNC is running on the laptop so I can see the GoogleAIY desktop.

(There is a handy shortcut to ‘check_audio.py’ file on the desktop.)

The result: I get to hear and respond to the Google voice prompts and can check both the microphone input and speaker output.

Testing Testing

Will it all fit?

There’s not a lot of room in there especially as the LED button has to be squeezed in as well.

But I’m sure it will all fit.

Will It All Fit?

A longer Scroll pHAT cable?

The Hat isn’t sitting quite where I want it to, so it’s time to disassemble and fit a longer GPIO cable.

It was all a bit of a squeeze and of course I managed to ding one of the acrylic clips.

(The people at ModMyPi sent me a replacement FOC, which was really kind of them.)

Longer Cable Needed

Finally, my RaspberryPi GoogleAIY box talking to both Google and a Scroll pHAT and blinking away!

And here is the finished article running the test-all.py script.

Finished !

The Scroll pHAT code

At the moment I’m running a very simple clock script but in the future maybe I could run some animations ?

#!/usr/bin/env python

import sys
import time

import scrollphat

brightness = scrollphat.set_brightness(5)

while True:
    try:
        scrollphat.write_string(time.strftime("%H:%M     "))
        scrollphat.scroll(1)
        time.sleep(0.5)

    except KeyboardInterrupt:
        scrollphat.clear()
        sys.exit(-1)

Also, all of the Scroll pHAT code examples can also be found at .

Update to ‘GoogleAIY a RaspberryPi and a Scroll pHAT’ : May 2023

This has now been running for 7 years flawlessly.

The only things I have ever done are to re-flash it once for a Debian update (to Buster).

Then update the software occasionally with an apt-get update

However there are a couple of things that I’ll tinker around with eventually:

  • Turn off the flashing blue light whilst it is in listening mode, it get very annoying
  • Somehow activate a playlist, the speaker seems as if it would cope OK-ish with basic audio out