Google has been busy getting stuff attached to MagPi magazines.. I spotted a box containing an 'AIY' kit at the local magazine retailer. Basically it is a card box with some electrical parts and the MagPi magazine.

It is like a cut-down DIY version of Amazon Alexa from what I can tell.


They had plenty at closing time, so I suspect there will be lots for people to buy tomorrow too, but from examination it is an audio card and a few peripherals. USB sound cards are cheap these days so that is another option for those who don't/can't purchase the magazine.

Below are photos of the contents of the box (just the electronic bits are shown, there is also a cardboard self-assembly enclosure and the MagPi magazine itself; I might take photos of that later), like a mini-teardown where the teardown is already done.


I think it's fair to say the kit component-wise is a little boring, but at least it's cheap. The stereo mic is good to see though. And maybe more projects will be available in future.

Also there are other ways to achieve Alexa-like capability (from both a hardware and PaaS vendor perspective).

For higher quality there are multi-microphone options for Pi, although of course they are more expensive.


Where the fun will come in is with the software - it will be a lot of fun to create voice-enabled projects.

Although it is intended to use Google PaaS, not everyone likes sending audio to a cloud, but it is usable for standalone non-Internet-connected audio projects too, e.g. music player. No need to plug in the microphone wires.


In summary, it is nice to see traction with voice-enabled natural language assistant projects for hobbyists, and the hardware here is very basic, but at least it keeps interest up and lots of opportunities for those learning programming to have fun and create some cool projects.


Some photos and notes follow, as well as any reverse-engineered schematics. Also see the comments section.




Connections Overview

According to google's page, these are the connections (see diagram below). Handily the Pi's I2C, SPI and UART connections are broken out to pads all ready for soldering to the supplied SIL header pins.

There are also some output pins, probably MOSFET driven (can see what looks like SOT-23 sized MOSFETs marked G31 D5 (they are most likely N-channel MOSFETS part code Diodes Inc DMG3420U) on the right of the image along with SMD fuse and diode per output).

See further below for reverse-engineered schematic for that.


On the left of the board, there is space for soldering SIL pins for attaching hobby servo motors.


Output Drivers

The four drivers (shown on the right side of the diagram above) have most likely the following circuit - I think it is accurate but please let me know in the comments if it isn't:


The four MOSFETs are used in an open drain configuration, so the pins marked 'DRIVER' will be switched to ground (0V) whenever the corresponding GPIO pin goes high. If the desired load is 5V powered then the 5V pin can be used to provide power (there is a 500mA resettable fuse). The open drain configuration also allows a lower voltage source to be used to supply the load, and the MOSFET will switch the other end of the load to ground.

The diagram below shows how to connect a relay with a 5V coil. It is inadvisable to use the Driver outputs with a higher voltage despite it being an open drain configuration because current can flow through the diode in the schematic above and the fuse, causing damage.

Also, it is strongly advised not to use this for connecting mains operated equipment, because there are regulations governing what enclosure is used and how the cable is secured and so on. To control mains equipment it is good to use home automation methods such as wireless (there are radio transmitters available for the Pi).



A suitable relay could be Finder 5V coil SPDT 6A contacts changeover relayFinder 5V coil SPDT 6A contacts changeover relay or Finder SPST 6A relaySPST 6A relay . Both of these relays are very compact (20x10x10mm) and have pins that will fit a breadboard or stripboard so are easy to prototype with. The comments section further below has a photo of how to wire it up and some example Python code to test it by turning the relay on and off. Although these relays can be used with mains, it would be extremely inadvisable to do so without a decent PCB layout (not stripboard!) and other precautions (see here for some reasons). So, the relay control is best used for lower-voltage tasks.


Mains Control

One solution is to use wireless control. This can be country or region specific.


I've used an Energenie wireless module before, it is a very small transmitter board that connects to the Pi and wirelessly controls mains sockets. The Energenie kitEnergenie kit comes with the wireless transmitter board and two sockets. It's good value, and meets the relevant electrical standards for the UK. It could be wired to the connections on the left side of the google voice HAT board allocated for Servos for example (by default it needs six GPIO although that number can optionally be reduced if needed).


Audio Output

The centre of the board contains the integrated circuit (IC) with the audio digital-to-analog converter and mono audio amplifier inside it, it is Maxim MAX98357A - thanks Inderpreet! (the 16-pin QFN sized IC says AKK BDK on it) and an EEPROM marked 24C32F.



Power Connections

There is also space for a DC power jack but none is fitted. A DC power jack with thin pins would fit. There is a SOT23-6 part near it, marked K4S DD and a SOT-23 part marked 23X D1 is close too. These two parts have a Q identifier, so are likely some type of transistors.


Microphone Board

The microphones are marked 432 QDF21G and are Knowles SPH0645LM4H (thanks again Inderpreet) MEMS digital microphones. They directly output an I2S bitstream.



The microphone input ports are on the underside:



This is the schematic of the microphone board, using the information from Inderpreet in the comments below. There may be some minor mistakes (please let me know in the comments section and I'll correct it). In theory the microphone board could be used standalone with the Pi, no need for the main Voice HAT board. It is a convenient breakout board for the surface-mount mics.


It could be suitable for small projects, e.g. with the 'Zero or with other boards with an I2S interface. It would be advisable to have a small resistance (e.g. 51 ohms) in series with the LRCLK and BCLK pins if it is connected directly.

There is nothing to stop a voice assistant from working without a speaker (you just won't hear the result, unless the on-board headphone socket on the Pi 3 is used perhaps).

Not all projects would require an audio response. Also, for some projects one may prefer a discreet response in an earphone (e.g. check your calendar by requesting it, but not announcing your plans to everyone).



Safety Leaflet

This is enclosed in the box: