The Envelope Engineer - Putting Alexa in the Air

November 26, 2018 Simon Holt, Mouser Electronics

If you love technology like me, then there’s a good chance you have already started your journey toward a fully automated home. This goes beyond simple solutions to turn lights on and off with a clap of the hands, or a remote control that uses RF instead of IR - it’s about opening and closing things (doors, windows, curtains, taps) as well as turning anything with a plug into a much smarter thing with a plug. Even those things without a plug should be smarter, although I will probably have to draw the line at my goldfish. I mean, they are either easily entertained or just really interested in plastic treasure chests that open and close.

Actually, why not make the treasure chests smarter? Perhaps that’s a project for another day.

Right now, I’m looking for a way to make my digital assistant a bit more useful. Now, I don’t mean getting better responses from badly posed questions (hopefully that will come) or expecting it to know exactly what I mean when I’m not even sure myself (that too may come). I mean making it better at what it already does.

I found out pretty quickly that the best way to use a digital assistant is to buy a smart plug or smart light bulb. It instantly takes your experience to the next level, because in addition to telling the digital assistant to turn something on or off, you can create groups of devices that all work together, as well as setting up routines to do it automatically.

Now, it’s fair to say that you don’t actually need a digital assistant to use most of the smart plugs and smart bulbs on the market - as they generally communicate directly with their own cloud service, which most likely already supports routines, and they can normally be controlled using a dedicated mobile app. However, having multiple devices from different vendors controllable from one device makes it all a bit simpler to use and, let’s face it, that’s what automation is all about.

In general, I’m very happy with how my digital lifestyle is progressing, but there’s one thing that is still a bit of a barrier to total freedom - and that’s proximity.

There’s no denying that the far-field microphones on digital assistants do a great job of picking up your voice commands from across the room, often even when there’s background noise to contend with, but wouldn’t it be better if you didn’t have to shout when you’re out of the room? Yeah, that’s what I thought.

There are two practical ways of addressing this minor inconvenience, one is to put a digital assistant in every room, and the other is to have a digital assistant that follows you around your home. Of the two, I think the first one probably makes a lot of sense, but the second one would be a lot more fun - so I’m going to have a look at making a mobile Alexa.

One way of doing that would be to put an Echo unit on the back of an autonomous robot, which is feasible, given that they can be powered by any 5V supply. However, a wheeled robot would still suffer from mobility issues, such as getting up and down the stairs, or over thresholds - and it would be really good if the robot could follow me out into the garden, too. A more elegant solution would be to put an Echo on the back of a flying drone, however even though they are quite small, they’re not really small enough to fly around the house, at least not without the potential of causing havoc. No, if this is going to work, it needs to be as small as possible, which rules out using an off-the-shelf Echo unit.

In that case, if I’m going to achieve my dream of a digital assistant that follows me around, I’m going to have to build my own Alexa. That’s not as challenging as it may sound, because Amazon has made its Alexa Voice Services (AVS) accessible to developers. Signing up to be a developer should give me access to all the information I need, but I’ll still require a hardware platform to host it.

A quick web search turns up quite a few potential development kits, too, but looking at them it seems like many of the vendors are asking interested parties to get in touch. I don’t think I’m at that stage just yet, so let’s see if there’s anything else I can do in the meantime to get this idea off the ground (pun most definitely intended).

Figure 1: STMicroelectronics’ X-CUBE-VS4A kit running on the Discovery evaluation board

This could be it! STMicroelectronics has released a software package, the X-CUBE-VS4A, that enables AVS to run on an STM32F7 microcontroller. It’s released as an expansion pack for the STM32Cube software platform and contains libraries that support porting of the AVS SDK to the STM32F7, by providing layers of abstraction that handle the low-level connection to the AVS servers.

STMicroelectronics has even put an evaluation kit together to get me started, the STM32F768I_DISC1. What’s more, the software isn’t just limited to the Cortex-M7 based microcontrollers - apparently it can run on any STM32 MCU with enough processing horsepower, which could also be worth exploring.  

I’m now feeling pretty confident that I can make an AVS enabled device small enough to fit onto a drone that can follow me around the house and garden, I just need to work on the flight control system, the Wi-Fi connection and navigation, but how hard could that be?

The Intel Aero UAV platform appears to be an option, but the level of sophistication involved, and the associated costs are likely to make it an overindulgence. Also, the actual drone itself needs to be able to manoeuvre around my house comfortably - and the size of drones this kit is aimed at would simply be too bulky in this particular context. A more appropriate solution might be the Flymaple-A flight controller from DFRobot. This quadcopter controller board incorporates an STM32F103RET6 MCU, along with a 3-axis accelerometer and a 3-axis gyroscope. Now I’m hoping that the 32-bit MCU will have enough performance to handle both the flight controls and the voice commands.

The only outstanding challenges are the navigation and the Wi-Fi connectivity. If I can find an MCU with plenty of performance and wireless connectivity I could kill two birds with one SoC. Now, this might do the trick - the CC3220MODA RF MCU from Texas Instruments. It’s actually a module that integrates two MCUs; an application processor based on the Cortex-M4, plus a Wi-Fi network processor sub-system, which takes care of all the connectivity issues. That makes my life a lot easier, and I’m fairly sure I can develop a navigation system that will run on the application processor. 

Next, I just need to start working on the details, but first I think I’ll feed the goldfish.

Previous Article
Simplifying AI Edge Compute at < 2mW

The Tensai architecture employs multiple voltage regulators to support ultra-low-power, always-on processin...

Next Article
Amazon FreeRTOS Porting to new Processors, Support, Consultancy, and Commercial Licensing Available from WITTENSTEIN high integrity systems

WITTENSTEIN high integrity systems have long been involved with the FreeRTOS project. Today they formally e...