HackSpace magazine

The QT Py is a tiny microcontroller board from Adafruit. It packs an impressive amount of connection options into a small footprint. There is SPI, I2C, UART, I2S, eleven digital I/O, nine analogue inputs, one true analogue output, nine PWM outputs, six capacitive touch inputs, and one on-board NeoPixel. Given the name, it should come as no surprise that there’s also an I2C connection in a STEMMA QT adapter, so you can plug any STEMMA QT or Qwiic devices straight in. In other words, this can communicate with almost anything.

Other than the connectivity, there’s very little on the board other than a USB port and associated gubbins, so the features of the QT Py are basically the features of the SAMD21 microcontroller that drives it. There’s an ARM Cortex-M0+ processor running at 48MHz, 256kB of flash, and 32kB of RAM. You can program it using either CircuitPython or Arduino. Using CircuitPython, the biggest limitation is the flash memory. CircuitPython itself takes up over 200 of the 256kB of flash, leaving you 48kB for your code, data, and any modules you want to import. Simple modules that just communicate with a sensor or drive an actuator are typically only 1kB or 2kB, so this isn’t too bad. However, anything that requires fonts, sounds, or images may struggle without the extra flash memory chip.

One thing it’s missing is any form of mounting hole. The flat bottom may be easy to stick down with glue, and you could also solder it down to a PCB. However, it’s no longer a flat bottom if you add a flash chip to it. A blob of hot glue should do the job if you need to keep it stationary.

The SAMD21 is kind of a transitional chip. If you are working in the Arduino environment, it’s got buckets of power and – unless you’re really trying to push the limits with things like machine learning – you’re unlikely to be limited by either storage or processing speed. CircuitPython, on the other hand, is a different story. The SAMD21 is basically the entry-level CircuitPython microcontroller. It can run CircuitPython reliably, but it is limited by both speed and storage. Provided your code doesn’t need to handle lots of data quickly, you should be OK. However, unless your code is very simple and needs very few libraries, you will probably want to add the extra 2MB flash.

The extra flash memory chip is very useful when running CircuitPython

There are a surprising number of projects that don’t require a huge amount from a microcontroller – either in terms of power or number of pins. Maybe you’re connecting a sensor with an actuator so that when a certain event happens, it triggers a particular movement. Perhaps it’s just because the USB port takes up a large proportion of this board, but we can see the QT Py being useful for connecting peripherals to a computer. This could mean getting data from a sensor into your computer through USB serial, or using the USB serial connection to trigger something to happen. The Qwiic-compatible STEMMA QT connector means that developing the hardware side of things can be really easy.

At the current price of $6, this makes these little devices a much more attractive proposition for those little projects that you might not want to dedicate a £20 board to. Do you want an LED that lights up red when your software test fails, and green when it passes? It’s yours for $6 (plus a bit of time coding). Do you want a big tinfoil hand that you can high-five to send a magazine to the printers? Yours for $6 (plus a bit of time coding). OK, that last one might just be us, but hopefully you get the idea.

The QT Py is a microcontroller stripped down and squeezed into a tiny package. It’s not going to set any performance records, but it does open up some possibilities for projects that either don’t have the space for a larger microcontroller board, or need to be done on a tight budget. We’ve seen small microcontrollers before. We’ve seen cheap microcontrollers before. We’ve seen microcontrollers with a wide range of communication options before. However, the QT Py is the first we’ve seen to marry all these things together in an easy-to-use package.  

VERDICT

A huge potential in a small package.

9/10


https://hsmag.cc

From HackSpace magazine store

Subscribe