SparkFun Edge: First Impressions

Announced at the TensorFlow developer summit in early March, the SparkFun Edge is designed to allow developers to add simple voice or image recognition functionality to their IoT devices without having to connect to a cloud service. As I picked mine up from the SparkFun store Friday (they’re located near Boulder, Colorado, which makes my life a little easier :p), I’ve had a chance to poke around with the device. This post will go over my first impressions with the board and my experiences with using it over a couple evenings.

Resources

Before I dig into my first impressions, it’s worth highlighting the resources that are currently available for the board.

The Good

When you first plug in the board, it’s loaded with an example that blinks a blue LED on the device, and responds to the words ‘yes’ or ‘no’ by blinking a yellow or red LED. It’s definitely a nice out of the box experience.

One thing that sticks out is that the documentation is pretty solid. Usually with a new board, you’ll end up spending more time than not just trying to find information on how to use it, so it’s nice to see content available from SparkFun and Google at launch that (mostly — more on that in the next section) helps get things up and running. Given that this is an early board, there’s no IDE, and not a ton of people out there with experience using it, so being able to follow along with something to swap between the initial code and a different sample is pretty nice. The first sample they have you run through simply turns on all of the LEDs.

Additionally, the possibility of hardware extensions is nice. The board supports a qwik connector, as well as regular GPIO pins, so it should be pretty straightforward to connect to a different board (like an Arduino) to add basic machine learning functionality to your projects. One thing I really appreciate is that it supports a coin battery on the board, so you don’t need to keep it constantly plugged in to try it out.

The Bad

Unfortunately, I wasn’t actually able to flash the board using Google’s code lab instructions. Following the instructions, I ran into this error.

They do have a nice section at the bottom titled “What if it didn’t work?”, however it just reiterated the regular instructions. If you run into issues outside of the current scope of documentation, you may have to throw in a bit of time to work around it. I did run into this issue with both the edited script file, and the original script file. Likewise, I had the same issue with SparkFun’s version of the uart_wired_update script.

Following SparkFun’s instructions with a new download of gcc-arm-none-eabi, pycryptodome and pyserial to run with python3 mostly worked, though they say to use pip3 to install pyserial, and I ran into an issue where I needed to install it using pip to work with whatever scripts were running behind the scene. You’ll also want to carefully go through the readme for gcc-arm-none-eabi to make sure it’s installed correctly. Nothing too major, but definitely took some time to figure out. Most of this could also have just been some weirdness with my own environment, so this is more of a “just in case someone else runs into it, too” warning :)

A small note, but definitely something worth being aware of, is that the board does not have a built in voltage regulator, so you need to make sure you’re only connecting to it with a 3.3v UART serial connector. My connector has a jumper built in that allows it to switch between 3.3v and 5v, so I had to make sure I swapped the jumper before plugging in so that I didn’t damage the Edge. This fact was mentioned in SparkFun’s hookup guide as a warning, but not mentioned in Google’s code lab.

Warning! The Edge board has no onboard regulator to provide 3.3V and will be damaged if exposed to 5V. Make sure that your USB-serial bridge is set to output 3.3V power and logic. Check out the voltage selection jumper in the Serial Basic Hookup Guide.

The biggest issue I had with the board is that the voice recognition in the initial sample is pretty unreliable. When I say ‘yes’, it picks it up the majority of the time, but ‘no’ only gets picked up once in a while. When my friend wanted to try the board, she couldn’t get it to pick up either ‘yes’ or ‘no’ reliably, so not sure if it’s mainly trained against deeper voices, or if it’s just a bit flaky. This’ll be something I dig into deeper later when I train my own models, but worth noting for now.

The Unknown

The one unknown (and it’s kind of a big one, given image and speech recognition were the big selling points for the component), is that the camera hardware isn’t currently supported. Per SparkFun’s documentation:

We’ve included this for use in ongoing development — preliminary stages are looking good and we hope to have this fully functional in very short order.

so hopefully this will be ready to go soon-ish, but until then it’s just unknown how well it’ll work. The other issue I ran into here is that I couldn’t find any documentation around what sort of camera will work with the device. The connector is definitely too small for a standard Raspberry Pi camera ribbon

however the camera connector from a Pi Zero/AIY Vision kit seems like it should work (it at least fits), but until cameras are supported or there’s more clarity around it, I’m just not sure.

Also, buried in the product page but not in the SDK documentation, is a mention to gesture recognition. Hopefully that’ll also be available sometime, but we’ll see.

Voice, gesture, or image recognition possible with TensorFlow Lite. (Note: Voice examples are provided. Gesture and image examples hope to be released by TensorFlow soon)

Conclusion

So far the board seems great for its specific use-case. Given that the voice recognition is happening on a small peripheral without cloud support, it’s pretty damn good, and if that’s an requirement for your project, then this is a good bet. If you’re able to get Internet access for your project, then other options may be a better bet. All in all, since the SparkFun Edge is only $15 USD, it’s worth at least grabbing to play with TensorFlow audio recognition, though will be more worthwhile once image and gesture recognition are supported.