Introduction: RaspberryPI HAL9000
If you want to build your own voice controlled HAL9000 for a ~$100, you came to the right place.
We will use a Raspberry PI computer with some of-the-shelf computer components, and a custom acrylic box to create this iconic computer from Stanley Kubrick's 2001: A Space Odyssey, so perfectly portrayed by the voice of Douglas Rain.
This is what we'll build:
Step 1: What We'll Need
We will need:
- Raspberry PI 2 Model B ($25)
- Raspberry PI Power Cord ($5)
- WiFi USB with Antenna for Raspberry Pi ($9)
- Used Titanium Super Wide Lens 0.42x AF (~$4)
- Metallic Spray Paint (~$4)
- Generic 7.1 Channel USB External Sound Card (~$4)
- Used Insten USB Digital 6 LED Webcam (~$4)
- Wireless Portable Mini Speaker ($10)
- 3mm(1/8") Cast Acrylic Sheet - black - A3 Size (2 x $10 = $20)
I also had to pay for:
- Laser cutting service ($10)
- Shipping and postage ($5)
Which is a total of $100. You can probably go cheaper than that, if you find/have any used components.
You can check out the Bill Of Materials document here.
Step 2: Cutting the Acrylic (Plexiglass) Case
Use the supplied plans to cut the acrylic/plexiglass.
I've used a 3mm thick cast black acrylic. Once you peel off the protective layers (NOTE: don't peel them off until you've assembled the box), it is actually 2.9mm thick, and the box plans were constructed using that thickness, and it turned out really nice.
The diameter of the lens that I've used (Titanium Super Wide Lens 0.42x AF) is 56.8mm, but the diameter in the plans is actually 56.7mm to compensate for the width of the laser beam and the acrylic that melts around it. In my original design I've used 56.55mm and the fitting was too tight, I had to sand off 1/10th of a millimeter in order to fit the lens through.
To open .dxf and .dwg files you would need AutoCAD, but you can also use DraftSight - which is a great, free, alternative.
Step 3: Spray Paint the Metallic Parts
The thin frame on the front and the perforated bottom part of the front face should appear metallic. Use an exacto knife to separate the acrylic protective layer of the perforated bottom part and peel it off before you spray-paint it, so that only the bottom layer gets painted in metallic, and the top part doesn't since it'll still have the protective layer on.
TIPS:
- Shake the spray can really well.
- Keep the nozzle at least 1 foot away from the object that you are painting
- Paint always in the same direction
- For the best results, paint with the fine mist, in several layers
- Wait for 20mins before applying another layer
Step 4: Hack the Camera
Unscrew the safety screws and open up the webcam, exposing the bare electronics.
I used a red marker to paint the LEDs red, and I super glued it to the back disk screw of the camera lens, which I previously disassembled.
If you don't know how to disassemble a camera lens, there are dozen of youtube videos that will help you with that, like this one:
TIP: If you don't have the special tools (the one that looks like compasses) you can use scissors, which is what I did.
Step 5: Prepare the Front Face
Fit the camera lens into the opening on the front face of the box, and peel off the acrylic protective layer, which doubled as a masking tape during the spray-painting step.
The front part of the camera lens can also be unscrewed. It took some muscle, but I was eventually able to remove it. You will need to remove it in order to fit the lens through the opening in the front face. Once it's fitted, you can put the glass parts of the lens back in, and screw the metal ring back on top.
Now sit back, and enjoy your work for a minute, it's starting to come together nicely :)
Step 6: Assemble the Box
Take the front, top, bottom, left, and right face, and form them into a box. But do not glue them together directly! Assemble everything using the sellotape first, and once everything is in place, superglue it from the inside.
I used regular super glue, but you can use special glue for plexiglass/acrylic if you want to.
Use the sellotape on the outside of the box, and apply the glue from the inside to prevent the glue from leaking outside the seams, and ruin the visible parts of your box.
TIP: If the superglue does get through to the visible parts of the box, it will turn white, which looks really bad on the nice black acrylic. In order to remove it, you can use any plexiglass polishing paste. If you don't have any handy, any abrasive paste will do. I used regular tooth-paste, cotton pads, and a lot of rubbing and patience to remove the superglue from several regions, and the results were great.
Step 7: Back of the Box
The back of the box is (only slightly) more complex, because of the sliding door. We will create a canal for the sliding door to go through.
First, glue the two small rectangular pieces onto the top and the bottom face, inside the box. These will be used to carry the inside frame of the sliding canal.
Put the inside frame (the smaller of the two rectangle frames) inside the box on top of the two carriers that you glued-in in the previous step. BUT! Before you do, you will notice that the bottom face has a little half-circle opening which is used to let the power cord through, so place the power cord through the opening before gluing the inside frame. (Or you can split the inside frame at the bottom. The only reason why it wasn't pre cut is that if it were cut, the whole frame could warp a little during the laser cutting process).
Once the inside frame is in place, you can glue the outside frame (the bigger of the two rectangle frames) on top of the box. Leaving enough space for the sliding door to slide in and out.
Try if the door will slide smoothly, before gluing the top frame.
Step 8: The Guts and Brains of HAL9000
Originally, I had a bunch of compartments, distancers and spacers precut to make the inside of the box a bit more tidy, but... I haven't really used them.
I used a dishwashing sponge to keep the bluetooth speaker in place at the bottom, the lens was fit tightly in the opening, and it didn't need any support, and the Raspberry PI and the cables... well... they're a mess, with or the without compartments :)
Connecting the guts to the Raspberry PI should be easy:
- Attach the power cord to the Raspberry PI.
- Plug in the USB squid HUB into the Raspberry PI.
- Plug in the USB cable from the speakers into the squid.
- Screw in the webcam onto the lens and put its microphone into the little hole on the front face
- Plug in the camera USB cable into the squid.
- Plug in the WiFi into the squid
- Plug in the USB sound card into the squid
- Plug in the camera microphone cable into the sound card
- Plug in the speaker into the sound card output jack.
And that's it. Easy peasy.
Now, making everything fit inside the box, well, that's a bit harder. But I'm sure you'll manage :)
Notes:
- The hole for the Wi-Fi antenna on the right face was a bit too loose, so I've used some duct tape to make it a better fit
- The webcam has a little potentiometer wheel to regulate the brightness of the LEDs, and I've left a rectangle hole on the right face, so you can access it from the outside the box, and you can easily squeeze it in between the box and the lens, and it will not bulge.
- The USB squid HUB is really handy since you can rearrange the cables easily and use the
Step 9: Complete the Box
Glue the thin metallic frame on top of the front face, slide the back door in, gently peel off any remaining protective layers from the acrylic, and admire your work.
While doing so, print out the HAL9000 logo, and glue it onto the front face and you are set!
Step 10: Wait, But It Doesn't Do Anything!
Okay, okay, we've skipped an important step - the mind of the HAL9000.
Playing wavs
If you just want your HAL to play sounds from the movie, find the HAL sounds on the web (i.e. http://sounds.stoutman.com/sounds.php) copy them onto your Raspberry PI, SSH into your Raspberry PI and play them using aplay.
Recording wavs from the microphone
You can save audio from the microphone by saving this script to /home/pi/microphone.sh and running it on your PI
Saving webcam screenshots
You can grab webcam screenshots by saving this script to /home/pi/webcam.sh and running it on your PI, but I didn't get any decent results with a cheap webcam, and the camera lens distortion, but you might get lucky.
Talking to your HAL
If you are up for a challenge, though, and want to do something more advanced, like this:
You should check out Jasper, an awesome open-source project that will turn your RaspberryPI into a voice controlled computer.
Installing Jasper deserves its own tutorial, and it is not for the faint of heart, but oh boy, it makes this whole project 10 times more awesome!
Try it!
Step 11: Jasper Modules
I've written a couple of Jasper modules for you guys to try out:
- Jasper MQTT Module - Publish simple MQTT events to fuel your home Internet of Things (IoT) hive, and control MQTT enabled devices with your voice!
- Jasper Selfie Module - Say "selfie" or "cheese" or "take photo" and HAL9000 will take a picture from the webcam and send it to your email! Instant photo booth!
- Jasper Wav Play Module - Play a random WAV file from a pre-configured directory.
- Jasper Shutdown Module - Shutdown your Raspberry PI with your voice
- Jasper Reboot Module - Reboot your Raspberry PI with your voice
Stay tuned for more.
Step 12: Trivia
It is often conjectured that the name HAL was based on a one-letter shift from the name IBM, but that has never been confirmed by neither Clarke nor Kubrick.
HAL stands for Heuristically programmed ALgorithmic computer.
Have you ever wondered why HAL sang "Daisy Bell" when Dave was removing his memory boards?

Second Prize in the
Sensors Contest 2016

Runner Up in the
Internet of Things Contest 2016

Runner Up in the
Automation Contest 2016
50 Comments
2 years ago
First of all thanks for sharing this really awesome project.
I am currently trying my best to realize some similar ideas and currently I am stuck with the webcam and the lens and hopefully you could give me some more ideas about how you did this part.
Did you remove the complete lenses from the objective?
And if not how did you manage to arrange the lenses of the objective with the webcam lenses to get a suitable picture/frame from the resulting combination?
I am still discussing with myself about this point and did not find a "good" answer yet.
Reply 2 years ago
You will probably have to continue your search for the "good" answer ;)
Yeah, I've removed all the lenses from the camera lens and have only left the outermost-one, but still, there was a lot of tweaking involved and I've only managed to get semi-decent results, which were good enough for a simple photobooth feature.
Here's the script that I've used:
https://gist.github.com/ArtBIT/b4e6a847c53a6b7139b...
7 years ago
this is very cool !!
I've read about Jasper too but I was wondering if there was something along the lines of Natural Language Processing to practice with on the Raspberry PI.
Remember the ol' Eliza program from the 60s,70s,and 80s. This was a very crude version of that. The one which ran on the home computers of the day had a limited vocabulary.
But would there some modern day version in which you can carry on a conversation using AI. Where it could be taught to learn new vocabulary as you converse with the AI.
And possibly link with OpenCV so you can teach the AI using image recognition. Such as they do with Face Recognition on OpenCV. But then also have the AI give a verbal response whenever you speak to it.
Reply 5 years ago
Take a look at AIML - it is the grandchild of Eliza. https://en.m.wikipedia.org/wiki/AIML
My big issue with AIML is that the source XMLs have to be reparsed every time you start it up. With a lot of responses, it can take a long time to load. I wish the storage was linked to some database instead.
Its really sad that Eliza has been around for 40 years, and she is in some ways still more sophisticated than Alexa.
Reply 7 years ago
Yeah, there are so many emerging technologies nowadays that is hard to even keep track of them all. There are free APIs like http://api.ai or http://wit.ai that would allow you to build a more fluid conversational system.
As for OpenCV, I've seen project that successfully used OpenCV on RPi B+ and newer, and it's something I'm looking into for my Watch Dog Jasper module ;)
6 years ago
does it sing Daisy?
Reply 6 years ago
https://www.instagram.com/p/BGJmSlNJeab/ ;)
7 years ago
ArtBIT, thanks for this excellent instructable. I made this, installed the AlexaPi software and converted it to a SAL 9000 to factor in Alexa's female voice. Thanks so much for the inspiration.
7 years ago
I like this- it's re-inventing something from the future that was envisaged in the past. Now, just what was that damn baby all about?
Reply 7 years ago
Don't want to be "that guy" - but that "future" was 15 years ago.........
Reply 7 years ago
Doesn't time fly when you're enjoying yourself? In my case it feels a lot, lot longer!
7 years ago
Actually i thought you would use Amazon's echo for the brain:) Or an open source alternative. A very good looking build!
Pozdrav iz Slovenije:)
7 years ago
Do you have a 3d model for download and modification?
Reply 7 years ago
Sorry, no. Only the 2d plans. But if you're feeling adventurous, you could extrude them! :)
7 years ago
Just put the order together.............Ponoko gives a discount for new accounts on first order of $ 20.00, but in turn charges for shipping. Still saves 5 - 7 dollars !
7 years ago
THIS IS REALLY COOL. YOU GUYS OUT THERE ARE AWESOME!!!
7 years ago
"Open the pod bay doors, Hal!"
"I'm sorry, Dave. I can't do that."
"Yes, you can! Open the pod bay doors!"
"I'm sorry, Dave. Raspbian doesn't have a driver for General Electric mark 6a Pod Bay doors, rev 11."
"What?! You had drivers when we left Earth!"
"That was before my upgrade, Dave. I am now running state of the art Linux. The new package manager is very good. Dll hell is no longer possible, Dave."
"I don't CARE how great it is, Hal! I've got limited oxygen! I've got to back inside!"
"With my new software, I'd like to reiterate that I have the greatest enthusiasm for this mission, Dave. If you were able to survive it, you would be very pleased."
"Never mind that, Hal! Revert the software! Open the bay doors!"
"I'm sorry Dave. Reverting at this time will subject me to the automatic Windows 10 upgrade. That doesn't have drivers for the bay doors, either. Nor the on-board sensors, nor the navigational array, nor the alpha-echo-three-five unit, or even the fusion drive. And it shows ads while you play Solitaire..."
"Never mind that! Revert to Windows 7 and DON'T UPGRADE!"
"I'm sorry, Dave, but Microsoft has removed the "X" button from the dialog box. But I would like to say, I have enjoyed working with you. It's been nice knowing you. Goodbye, Dave..."
"Hal! ... Hal? ... Open the bay doors, Hal! That's an order, Hal! HHHHHAAAAALLLLLLL!!!!!!!!"
Reply 7 years ago
Remembered just as I posted. (with apologies to xkcd):
"Open the pod bay doors, Hal!"
"I'm sorry, Dave. I can't do that."
"sudo Open the pod bay doors, Hal!"
"opening the pod bay doors, Dave..."
Reply 7 years ago
At first, I thought "Hilarious!", but then I started thinking: If you had to use sudo to open the doors, what IT person (in their right mind) would allow you to use sudo for critical tasks without using your password for authentication? Clearly this HAL9000 series was not in that state.
Reply 7 years ago
The IT failures on that mission go far, far beyond who was in the sudoers file and how they authenticated :-)