Overview

Machine learning has come to the 'edge' - small microcontrollers that can run a very miniature version of TensorFlow Lite to do ML computations. 

But you don't need super complex hardware to start developing your own TensorFlow models! We've curated a simple kit to dip your toes into machine learning waters.

Kit includes:

The kit uses our PyBadge as your edge processor. It's a compact board - it's credit card sized. It's powered by our favorite chip, the ATSAMD51, with 512KB of flash and 192KB of RAM. We add 2 MB of QSPI flash for file storage, handy for TensorFlow Lite files, images, fonts, sounds, or other assets.

You can plug in a microphone into the ports at the bottom, to add microphone input for micro speech recognition. Our Arduino library has some demos you can get started with to recognize various word pairs like "yes/no", "up/down" and "cat/dog". TensorFlow Lite for microcontrollers is very cutting-edge so expect to see a lot of development happening in this area, with lots of code and process changes.

Parts required

You can get everything you need minus tools in this kit:

TensorFlow Lite for Microcontrollers Kit

PRODUCT ID: 4317
Machine learning has come to the 'edge' - small microcontrollers that can run a very miniature version of TensorFlow Lite to do ML computations. But you don't...
OUT OF STOCK

Or as individual parts:

Adafruit PyBadge for MakeCode Arcade, CircuitPython or Arduino

PRODUCT ID: 4200
Coming soon! Sign up to be notified when we have these in stockWhat's the size of a credit card and can run CircuitPython, MakeCode Arcade or Arduino? That's...
OUT OF STOCK

JST PH 3-Pin to Female Socket Cable - 200mm

PRODUCT ID: 3894
This cable will let you turn a JST PH 3-pin cable port into 3 individual wires with high-quality 0.1" female header sockets on the end. We're carrying these to match up with...
$1.25
IN STOCK

Electret Microphone Amplifier - MAX4466 with Adjustable Gain

PRODUCT ID: 1063
Add an ear to your project with this well-designed electret microphone amplifier. This fully assembled and tested board comes with a 20-20KHz electret microphone soldered on. For the...
$6.95
IN STOCK

Lithium Ion Polymer Battery with Short Cable - 3.7V 420mAh

PRODUCT ID: 4236
Lithium ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery...
$6.95
IN STOCK

Assembly

Step 1 - Solder Headers onto Microphone

You'll need to plug into your microphone, so visit this guide for step by step instructions on soldering the headers on

Step 2 - Connect JST PH Cable to Microphone

Connect Red to VCC, Black to GND and White to OUT

Step 3 - Cut and solder the 3V selection jumper on the back of the PyBadge or PyGamer

On the back of your board, find the STEMMA cable voltage selection jumper. Cut the trace from Vcc to 5V

Then solder in the Vcc to 3V pads

Step 4 - Plug in Microphone into D2

Software Setup

We're going to be using the popular Arduino IDE to compile and load code. Start by following the PyBadge setup guide to

  1. Install the latest desktop Arduino IDE
  2. Install Adafruit SAMD board support package
  3. Install all the Arcada Libraries

Once that's all done, also install the TFLite Micro Speech library

Try loading the JSON demo version of the code

Select from the Tools menu

  • Board: Adafruit PyBadge M4 Express
  • CPU Speed: 200 MHz
  • Optimize: Fastest
  • USB Stack: TinyUSB
  • Port: Correct Serial/COM port

And compile + upload to the PyBadge

After its done uploading, you should see a new disk drive on your computer called CIRCUITPY (or similar) it will be 8 MB large

Unzip this folder and drag the tflite_config.json and yesno.tflite files to the disk drive

Eject the disk drive via the operating system (Eject or move it to the trash on MacOS)

Press Reset on the back of the board to restart

You'll get a boot screen telling you what model it loaded (thats the tflite file)

Press the A button to record up to 1.5 seconds of audio, the first neopixel will light up red to let you know

Try saying "yes"

Or "no"

You can also get a silence output if nothing is heard at all

This guide was first published on Jul 23, 2019. It was last updated on Jul 23, 2019.