Arduino Clock Is HAL 1000

In the movie 2001: A Space Odyssey, HAL 9000 — the neurotic computer — had a birthday in 1992 (for some reason, in the book it is 1997). In the late 1960s, that date sounded impossibly far away, but now it seems like a distant memory. The only thing is, we are only now starting to get computers with voice I/O that are practical and even they are a far cry from HAL.

[GeraldF6] built an Arduino-based clock. That’s nothing new but thanks to a MOVI board (ok, shield), this clock has voice input and output as you can see in the video below. Unlike most modern speech-enabled devices, the MOVI board (and, thus, the clock) does not use an external server in the cloud or any remote processing at all. On the other hand, the speech quality isn’t what you might expect from any of the modern smartphone assistants that talk. We estimate it might be about 1/9 the power of the HAL 9000.

You might wonder what you have to say to a clock. You’ll see in the video you can do things like set and query timers. Unlike HAL, the device works like a Star Trek computer. You address it as Arduino. Then it beeps and you can speak a command. There’s also a real-time clock module.

Setting up the MOVI is simple:

 recognizer.init(); // Initialize MOVI (waits for it to boot)
 recognizer.callSign("Arduino"); // Train callsign Arduino (may take 20 seconds)
 recognizer.addSentence(F("What time is it ?")); // Add sentence 1
 recognizer.addSentence(F("What is the time ?")); // Add sentence 2
 recognizer.addSentence(F("What is the date ?")); // Add sentence 3

Then a call to recognizer.poll will return a numeric code for anything it hears. Here is a snippet:

// Get result from MOVI, 0 denotes nothing happened, negative values denote events (see docs)

 signed int res = recognizer.poll(); 

// Tell current time
 if (res==1 | res==2) { // Sentence 1 & 2
 if ( now.hour() > 12) 
 recognizer.say("It's " + String(now.hour()-12) + " " + ( now.minute() < 10 ? "O" : "" ) +
     String(now.minute()) + "P M" ); // Speak the time

Fairly easy.

HAL being a NASA project (USSC, not NASA, and HAL was a product of a lab at University of Illinois Urbana-Champaign – ed.) probably cost millions, but the MOVI board is $70-$90. It also isn’t likely to go crazy and try to kill you, so that’s another bonus. Maybe we’ll build one in a different casing. We recently talked about neural networks improving speech recognition and synthesis. This is a long way from that.

39 thoughts on “Arduino Clock Is HAL 1000

  1. “The only thing is, we are only now starting to get computers with voice I/O that are practical and even they are a far cry from HAL.”

    Thankfully. I don’t need a computer that’ll kill me.

    1. It was *quite* likely, since he actually did! As far as getting the computer to tell lies, meaning it goes on to kill everybody, I’d call that a “fault”, and “going crazy” isn’t a bad description of his robo-paranoia.

      If he was programmed that way, then it’s humans’ fault. But it’s like saying it’s the designers’ fault when you crash a car. Of course it’s not unlikely that HAL had a neural network, and learned most of his capabilities. So nobody knows exactly how he works, like many neural networks. We know the inputs, outputs, and intention, but the mechanism is a black box. We can study it, once it’s learned, but we don’t need to know in order for it to work, and it doesn’t have obvious, straightforward principles.

      This is a bit of a worry, in the back of one’s mind, about AI in general. There’s all sorts of amusing stories about NN’s getting things wrong. Really their safety will have to be statistical and based on results, rather than based on measurable principles.

    1. The moral of the story is, always have a manual override!

      Actually that pisses me off on Star Trek, among many, many, other examples of terrible writing on the later Star Trek series. “Something something problem! Override it! I can’t, the override won’t work!”. Then it’s not an override, is it?

      1. Not to mention automatic power switching – it seems like half of the small plot complications get solved by channeling power from one system to another after various bits of thrashing and panic. We’ve had automatic switching systems on our power grid for the better part of a century.

  2. It is a very nice result and I like the interface implementation, but it is a solution that is 5 to 10 times more expensive than is necessary given that there are complete Linux boards for under $15 so you can build a voice based interface to any local or remote service for a smaller amount of of money these days.

    1. The shield looks a lot easier to work with. Especially if you’re not up on Linux. Better than him running into some obscure, misleading problem in some half-finished system, and throwing the whole thing at the wall.

  3. Unlike most modern speech-enabled devices, the MOVI board (and, thus, the clock, does not use an external server in the cloud or any remote processing at all.
    Syntax error line 20 – unmatched left bracket.
    HAL9000# _

    1. That’s how it is in the code, but it is a typo I’m sure. If you look at the next test down he does use ||. But, as pointed out by [Ben] it still works. I didn’t catch it, but I wasn’t really looking for it either ;-)

  4. Something just makes my skin crawl when I see a “shield” that’s 100x more powerful than the Arduino driving it. Surely something like a raspberry pi would have been a much better choice, and cheaper too. Or, go for something like a LD3320, which is dedicated for the task, and much cheaper too. Oh well, as long as you had fun of course :)

  5. The MOVI shield is waaaay too expensive and the microphone sensitivity sucks. Unless you’re totally allergic to an internet connection (remember that you can tether to your phone on the go), it seems to me that hacking a $40-50 Amazon Echo Dot is the way to go for most voice-controlled projects.

    But I’m biased, because I bought a drawerful of Dots during Amazon’s Black Friday sale and I want to see everyone start hacking Dots to do awesome stuff. Then we move on to Google Home.

  6. When you use the highly subsidized Amazon Echo or Echo Dot, you are the product. The only reason for Amazon to bring these out is to increase sales on Amazon by getting your habits, preferences other data in real time right from your living room. So the price you pay for an Amazon Dot is way higher than the money you spend: It’s the privacy of you and your family. Also, who knows: Right now the Amazon service is free but in the future they might make you pay for a subscription, just like Sony for the Playstation Network (when you have a PS4, on a PS3 it is still free). I love your comment about the microphone though: Maybe I’ll write an Instructable of how to take the subsidized Amazon Echo Dot microphone array out and connect it to MOVI!

    1. The Echoes may be “subsidized”, but there is no requirement to ever buy another Amazon product (not even a Prime subscription) so that argument is moot. Also, I now have 20 Echoes of various types throughout my large house (love Amazon’s frequent sales on them!), so I have gotten ???????????????????????????????????? good value out of that “subsidization”. :-)

      As for the privacy issue, I can’t believe that someone smart enough to build your clever clock would fall for that totally ridiculous conspiracy theory.

      And, your idea that Amazon might someday charge for the service is pure speculation, and not very logical. If, as you believe, they’re using it as a marketing tool, it would be absurd to discourage users by charging for it.

      Be all that as it may, I’d love to see your contribution to Dot hacks, even if it’s just repurposing the mic array. But if you’re willing to spend more than a Dot costs anyway, then using the far-field mic array component (available separately) of this would be easier since it’s designed for hacking:

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.