Stufin
Home Quick Cart Profile

Official Raspberry Pi AI Kit

Buy Now

Google Coral Accelerator Module

+ Tensor Processing Unit (TPU)128x128 matrix multiplication engine
+ Memory256MB of LPDDR4
Raspberry Pi Camera v2
+ SensorSony IMX219
+ Resolution8 megapixels
+ Lens6mm, f/2.35

MicroSD Card

+ Capacity16GB
+ Operating SystemAI-enabled Linux distribution

Target Audience

The Official Raspberry Pi AI Kit is designed for

  • Developers and Engineers: Professionals seeking to integrate AI capabilities into IoT projects and develop innovative solutions.
  • Makers and Hobbyists: Enthusiasts interested in exploring AI and ML concepts, building prototypes, and creating interactive projects.
  • Educators and Researchers: Academics and researchers looking to teach AI and ML principles, develop curricula, and conduct research projects.

By providing a comprehensive platform for AI and ML development, the Official Raspberry Pi AI Kit empowers users to create innovative projects, accelerate prototyping, and drive the adoption of AI technologies in various industries.

Pin Configuration

  • Official Raspberry Pi AI Kit Pinout Documentation
  • The Official Raspberry Pi AI Kit is a powerful single-board computer designed for artificial intelligence and machine learning applications. The kit is built around the Raspberry Pi microcomputer and features a range of peripherals and interfaces for development and deployment of AI applications. This documentation provides a comprehensive guide to the pinout of the Official Raspberry Pi AI Kit, explaining each pin's function and providing connection guidelines.
  • Raspberry Pi AI Kit Pinout Structure:
  • The Official Raspberry Pi AI Kit has a 40-pin GPIO (General Purpose Input/Output) header, similar to the Raspberry Pi 4. The pins are arranged in two rows of 20 pins each. The pins are numbered from 1 to 40, with the numbers increasing from left to right.
  • Pinout Diagram:
  • Here is the pinout diagram of the Official Raspberry Pi AI Kit:
  • ```
  • +---------------+
  • | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
  • +---------------+
  • | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
  • +---------------+
  • ```
  • Pin-by-Pin Explanation:
  • Here is a detailed explanation of each pin on the Official Raspberry Pi AI Kit:
  • Pin 1: 3.3V Power
  • Function: Provides a 3.3V power supply for external devices.
  • Connection: Connect to a 3.3V-compatible device or module.
  • Pin 2: 5V Power
  • Function: Provides a 5V power supply for external devices.
  • Connection: Connect to a 5V-compatible device or module.
  • Pin 3: SDA (I2C Data)
  • Function: I2C (Inter-Integrated Circuit) data line for communication with I2C devices.
  • Connection: Connect to the SDA pin of an I2C device.
  • Pin 4: 5V Power
  • Function: Provides a 5V power supply for external devices.
  • Connection: Connect to a 5V-compatible device or module.
  • Pin 5: SCL (I2C Clock)
  • Function: I2C clock line for communication with I2C devices.
  • Connection: Connect to the SCL pin of an I2C device.
  • Pin 6: GND (Ground)
  • Function: Provides a ground connection for external devices.
  • Connection: Connect to the GND pin of an external device or module.
  • Pin 7: UART TX (Transmit)
  • Function: UART (Universal Asynchronous Receiver-Transmitter) transmit line for serial communication.
  • Connection: Connect to the RX pin of a UART device or module.
  • Pin 8: UART RX (Receive)
  • Function: UART receive line for serial communication.
  • Connection: Connect to the TX pin of a UART device or module.
  • Pin 9: GND (Ground)
  • Function: Provides a ground connection for external devices.
  • Connection: Connect to the GND pin of an external device or module.
  • Pin 10: GPIO 15
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 11: GPIO 17
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 12: GPIO 18
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 13: GPIO 21
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 14: GND (Ground)
  • Function: Provides a ground connection for external devices.
  • Connection: Connect to the GND pin of an external device or module.
  • Pin 15: GPIO 22
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 16: GPIO 23
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 17: 3.3V Power
  • Function: Provides a 3.3V power supply for external devices.
  • Connection: Connect to a 3.3V-compatible device or module.
  • Pin 18: GPIO 24
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 19: GPIO 10
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 20: GND (Ground)
  • Function: Provides a ground connection for external devices.
  • Connection: Connect to the GND pin of an external device or module.
  • Pin 21: GPIO 9
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 22: GPIO 25
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 23: GPIO 11
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 24: GPIO 8
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 25: GND (Ground)
  • Function: Provides a ground connection for external devices.
  • Connection: Connect to the GND pin of an external device or module.
  • Pin 26: GPIO 7
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 27: ID_SD (I2C ID)
  • Function: I2C ID pin for device identification.
  • Connection: Connect to an I2C device or module.
  • Pin 28: ID_SC (I2C Clock)
  • Function: I2C clock pin for device identification.
  • Connection: Connect to an I2C device or module.
  • Pin 29: GPIO 5
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 30: GND (Ground)
  • Function: Provides a ground connection for external devices.
  • Connection: Connect to the GND pin of an external device or module.
  • Pin 31: GPIO 6
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 32: GPIO 12
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 33: GPIO 13
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 34: GND (Ground)
  • Function: Provides a ground connection for external devices.
  • Connection: Connect to the GND pin of an external device or module.
  • Pin 35: GPIO 19
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 36: GPIO 16
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 37: GPIO 26
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 38: GPIO 20
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Pin 39: GND (Ground)
  • Function: Provides a ground connection for external devices.
  • Connection: Connect to the GND pin of an external device or module.
  • Pin 40: GPIO 21
  • Function: General-purpose input/output pin.
  • Connection: Can be used as an input or output for various applications.
  • Connection Guidelines:
  • When connecting external devices or modules, ensure that the voltage and current ratings are compatible with the Raspberry Pi AI Kit.
  • Use suitable connectors, cables, and wiring to connect devices and modules.
  • Follow proper safety precautions when working with electrical connections.
  • Refer to the datasheets and documentation of external devices and modules for specific connection requirements.
  • By following this pinout documentation and connection guidelines, you can effectively connect and utilize the various peripherals and interfaces of the Official Raspberry Pi AI Kit for your AI and machine learning projects.

Code Examples

Official Raspberry Pi AI Kit Documentation
Overview
The Official Raspberry Pi AI Kit is a powerful single-board computer designed for machine learning and artificial intelligence applications. This kit combines the Raspberry Pi 4 Model B with the Google Coral Accelerator, a compact, low-power System-on-Module (SoM) that provides high-performance machine learning inference capabilities.
Hardware Components
Raspberry Pi 4 Model B
 Google Coral Accelerator (SoM)
 MicroSD card slot
 Gigabit Ethernet port
 2x USB 3.0 ports
 2x USB 2.0 ports
 HDMI port
 3.5mm audio jack
 Power button
Software Compatibility
The Official Raspberry Pi AI Kit supports the following operating systems:
Raspberry Pi OS
 Ubuntu Core
 Google's Mendel Linux
Code Examples
### Example 1: Image Classification using TensorFlow Lite
In this example, we'll use the Official Raspberry Pi AI Kit to classify images using TensorFlow Lite and the Coral Accelerator.
Hardware Requirements:
Official Raspberry Pi AI Kit
 USB camera (e.g., Raspberry Pi Camera v2)
 MicroSD card with Raspberry Pi OS or Ubuntu Core
Software Requirements:
TensorFlow Lite runtime (pre-installed on Raspberry Pi OS)
 Python 3.x
Code:
```python
import os
import numpy as np
from PIL import Image
import tensorflow as tf
# Load the image classification model
model_path = '/usr/share/tflite-python/examples/models/mobilenet_v1_1.0_224.tflite'
interpreter = tf.lite.Interpreter(model_path)
interpreter.allocate_tensors()
# Get the input and output tensors
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()
# Capture an image from the camera
camera = cv2.VideoCapture(0)
ret, frame = camera.read()
camera.release()
cv2.destroyAllWindows()
# Pre-process the image
img = Image.fromarray(frame)
img = img.resize((224, 224), Image.ANTIALIAS)
input_data = np.array(img)
# Run the inference
interpreter.set_tensor(input_details[0]['index'], input_data)
interpreter.invoke()
# Get the output
output_data = interpreter.get_tensor(output_details[0]['index'])
print('Image classification result:', np.argmax(output_data))
```
### Example 2: Speech Recognition using Google's TensorFlow Lite Models
In this example, we'll use the Official Raspberry Pi AI Kit to recognize spoken words using Google's TensorFlow Lite models and the Coral Accelerator.
Hardware Requirements:
Official Raspberry Pi AI Kit
 USB microphone (e.g., USB Microphone UAC-1)
 MicroSD card with Raspberry Pi OS or Ubuntu Core
Software Requirements:
TensorFlow Lite runtime (pre-installed on Raspberry Pi OS)
 Python 3.x
Code:
```python
import os
import numpy as np
import tensorflow as tf
import pyaudio
# Load the speech recognition model
model_path = '/usr/share/tflite-python/examples/models/speech_recognition.tflite'
interpreter = tf.lite.Interpreter(model_path)
interpreter.allocate_tensors()
# Get the input and output tensors
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()
# Initialize the PyAudio stream
p = pyaudio.PyAudio()
stream = p.open(format=pyaudio.paInt16, channels=1, rate=16000, input=True, frames_per_buffer=1024)
# Record audio data
audio_data = np.empty((16000, 1), dtype=np.int16)
while True:
    frame = stream.read(1024)
    audio_data = np.concatenate((audio_data, frame), axis=0)
    if len(audio_data) >= 16000:
        break
# Pre-process the audio data
audio_data = audio_data[:16000]
input_data = np.array(audio_data, dtype=np.float32)
input_data = input_data / 32768.0
# Run the inference
interpreter.set_tensor(input_details[0]['index'], input_data)
interpreter.invoke()
# Get the output
output_data = interpreter.get_tensor(output_details[0]['index'])
print('Recognized speech:', np.argmax(output_data))
stream.stop_stream()
stream.close()
p.terminate()
```
These examples demonstrate the capabilities of the Official Raspberry Pi AI Kit for machine learning and AI applications. By leveraging the Coral Accelerator and TensorFlow Lite, you can build efficient and accurate AI models that run directly on the device.