element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog Google's Alexa-like Pi AIY Kit, mini teardown
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Raspberry Pi requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 4 May 2017 6:30 PM Date Created
  • Views 1380 views
  • Likes 20 likes
  • Comments 66 comments
  • aiy google
  • google aiy
  • google sdk
  • google_aiy
  • aiy
  • raspberry_pi
  • raspberry pi
  • amazon alexa
  • aiyproject
  • raspberry pi 3
  • aiy project
  • google embedded sdk
  • raspberry_pi_3
Related
Recommended

Google's Alexa-like Pi AIY Kit, mini teardown

shabaz
shabaz
4 May 2017

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.

UK

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:

Anonymous

Top Comments

  • nicklansley
    nicklansley over 5 years ago +5

    I managed to get hold of a copy of MagPi magazine and get it working with a Raspberry Pi 3:

    …
  • ipv1
    ipv1 over 5 years ago +4

    I have a suspicion that that is not a code but rather an I2S amplifier - MAX98357A

    I just googled it and sure enough...

    I have one of those in stock from an unfinished project and just recalled it as I was…

  • ipv1
    ipv1 over 5 years ago in reply to shabaz +4

    If I remember correctly, shabaz sir, you did a stereo i2s sound card circuit for the BBB some time back. Theoretically, that can be used here as well. I think I need to read more about that

Parents
  • writerbenjamin
    writerbenjamin over 5 years ago

    I want to add the second speaker channel.  Where can I find another blue terminal block that would fit?  Is it a standard part or something proprietary.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • shabaz
    shabaz over 5 years ago in reply to writerbenjamin

    Hi Benjamin,

     

    The connector on its own won't provide a second channel, because the on-board DAC/Audio amp is mono.

    There is the possibility of adding a second circuit board on top, but I don't know if anyone has tried it.

    It could work out easier to buy a stereo sound card, if you're looking for stereo sound for music.

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • ipv1
    ipv1 over 5 years ago in reply to shabaz

    If I remember correctly, shabaz sir, you did a stereo i2s sound card circuit for the BBB some time back. Theoretically, that can be used here as well. I think I need to read more about that

    • Cancel
    • Up +4 Down
    • Reply
    • More
    • Cancel
Comment
  • ipv1
    ipv1 over 5 years ago in reply to shabaz

    If I remember correctly, shabaz sir, you did a stereo i2s sound card circuit for the BBB some time back. Theoretically, that can be used here as well. I think I need to read more about that

    • Cancel
    • Up +4 Down
    • Reply
    • More
    • Cancel
Children
No Data
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube