HAL 9000 Google Assistant Using A Raspberry Pi

In this project I’ll show you how I made a Google Assistant using a Raspberry Pi. I went a step further and made it look like the HAL 9000 from the science fiction film 2001 A Space Odyssey!

materials:

Installing Google Assistant on the Raspberry Pi

I followed this tutorial to setup the raspberry pi. The basic steps were to connect the USB microphone to the raspberry pi and find and record the card and device numbers for the microphone. Then I did the same with the built in speakers and configured them as the default playback and capture devices. Next I setup a project in the Google API console and configured a Google Assistant instance. Then I installed the Google Assistant API on the Raspberry Pi and configured my credentials. Next I created a python virtual environment to run the Google Assistant project. From what I understand (at the time of this writing) the current version of the Google Assistant API doesn’t allow users to use an activation word, but instead requires a “push to talk” function. I wired up a momentary push button to one of the GPIO pins and used Adafruit’s retrogame software to detect the button press and emulate pressing the “Enter” key. With this all setup I ran the Google Assistant sample and pressed the button to ask the assistant a question. I heard the response through the speakers! The last thing to do was to setup a bash script that would source the virtual environment and run the assistant on boot up.

Designing and printing the enclosure

The next step in the process was to design a 3D printable enclosure that looks like the HAL 9000 from the film. I imported a photo into Fusion 360 and created a basic sketch. From there I extruded features and added a place for the plastic dome. I wanted the dome to act as the push button so I modeled a mechanical actuator to press the push button I used earlier. This process took a huge amount of time with several test prints and iterations. I ended up reducing the overall size of the enclosure so that I could print it in one piece on my 3D printer, but that came with added problems. I had to move the Raspberry Pi to the top and come up with a way to plug in the power and external speakers.

Assembling all the components

Once I had all the pieces 3D printed, I assembled the micro switch into the enclosure. Then I installed the 10mm red LED with its resistor and the clear dome into their mount. With this complete I could connect the wires to their proper pins on the Raspberry Pi. I designed the enclosure to be in several pieces so that I could print them in different colors, rather than having to paint the different colors onto one monolithic print. I glued all these pieces together before putting on the back panel and securing it with screws. At this point the HAL 9000 Google Assistant using a Raspberry Pi was complete! Check out the video for a demonstration.

Previous
Previous

Rebuilding The Covered Bridge Mailbox

Next
Next

Wood Lathe Digital Readout