Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Adafruit Crickit HAT for Raspberry Pi: Examples, Pinouts, and Specs

Image of Adafruit Crickit HAT for Raspberry Pi
Cirkit Designer LogoDesign with Adafruit Crickit HAT for Raspberry Pi in Cirkit Designer

Introduction

The Adafruit Crickit HAT for Raspberry Pi (Manufacturer Part ID: 3957) is a versatile add-on board designed to expand the capabilities of the Raspberry Pi for robotics and physical computing projects. It integrates a wide range of features, including motor control, capacitive touch inputs, servo control, sensor inputs, and LED outputs, making it an ideal choice for building interactive and creative projects.

This HAT (Hardware Attached on Top) is powered by the ATSAMD21 co-processor running CircuitPython, which handles real-time tasks, allowing the Raspberry Pi to focus on higher-level processing. The Crickit HAT is perfect for beginners and advanced users alike, offering a plug-and-play experience for robotics, animatronics, and IoT applications.

Explore Projects Built with Adafruit Crickit HAT for Raspberry Pi

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Raspberry Pi 5 Smart Weather Station with GPS and AI Integration
Image of Senior Design: A project utilizing Adafruit Crickit HAT for Raspberry Pi in a practical application
This circuit integrates a Raspberry Pi 5 with various peripherals including an 8MP 3D stereo camera, an AI Hat, a BMP388 sensor, a 16x2 I2C LCD, and an Adafruit Ultimate GPS module. The Raspberry Pi serves as the central processing unit, interfacing with the camera for image capture, the AI Hat for AI processing, the BMP388 for environmental sensing, the LCD for display, and the GPS module for location tracking, with a USB Serial TTL for serial communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 4B-Based Multi-Sensor Interface Hub with GPS and GSM
Image of Rocket: A project utilizing Adafruit Crickit HAT for Raspberry Pi in a practical application
This circuit features a Raspberry Pi 4B interfaced with an IMX296 color global shutter camera, a Neo 6M GPS module, an Adafruit BMP388 barometric pressure sensor, an MPU-6050 accelerometer/gyroscope, and a Sim800l GSM module for cellular connectivity. Power management is handled by an MT3608 boost converter, which steps up the voltage from a Lipo battery, with a resettable fuse PTC and a 1N4007 diode for protection. The Adafruit Perma-Proto HAT is used for organizing connections and interfacing the sensors and modules with the Raspberry Pi via I2C and GPIO pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Adafruit Circuit Playground Bluefruit and Crickit-Based Smart RGB LED and Temperature Monitoring System
Image of Example: A project utilizing Adafruit Crickit HAT for Raspberry Pi in a practical application
This circuit integrates an Adafruit Circuit Playground Bluefruit with an Adafruit Crickit for Circuit Playground Express to control a temperature sensor, a loudspeaker, and a series of WS2812 RGB LED strips. The Crickit board reads temperature data, drives the loudspeaker, and controls the LED strips to create visual effects based on the sensor input.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 4B-Based Current Monitoring System with I2C OLED Display
Image of Virtual Energy Monitoring Circuit: A project utilizing Adafruit Crickit HAT for Raspberry Pi in a practical application
This circuit features a Raspberry Pi 4B as the central processing unit, interfaced with an Adafruit ADS1115 16-bit I2C ADC for analog-to-digital conversion and a 0.96" OLED display for visual output. The ADS1115 is connected to a current sensor for measuring electrical current, with the sensor's output and burden pins connected to the ADC's analog input channels. The Raspberry Pi communicates with both the ADC and the OLED display over the I2C bus, using its GPIO2 and GPIO3 pins for data (SDA) and clock (SCL) lines, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit Crickit HAT for Raspberry Pi

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Senior Design: A project utilizing Adafruit Crickit HAT for Raspberry Pi in a practical application
Raspberry Pi 5 Smart Weather Station with GPS and AI Integration
This circuit integrates a Raspberry Pi 5 with various peripherals including an 8MP 3D stereo camera, an AI Hat, a BMP388 sensor, a 16x2 I2C LCD, and an Adafruit Ultimate GPS module. The Raspberry Pi serves as the central processing unit, interfacing with the camera for image capture, the AI Hat for AI processing, the BMP388 for environmental sensing, the LCD for display, and the GPS module for location tracking, with a USB Serial TTL for serial communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Rocket: A project utilizing Adafruit Crickit HAT for Raspberry Pi in a practical application
Raspberry Pi 4B-Based Multi-Sensor Interface Hub with GPS and GSM
This circuit features a Raspberry Pi 4B interfaced with an IMX296 color global shutter camera, a Neo 6M GPS module, an Adafruit BMP388 barometric pressure sensor, an MPU-6050 accelerometer/gyroscope, and a Sim800l GSM module for cellular connectivity. Power management is handled by an MT3608 boost converter, which steps up the voltage from a Lipo battery, with a resettable fuse PTC and a 1N4007 diode for protection. The Adafruit Perma-Proto HAT is used for organizing connections and interfacing the sensors and modules with the Raspberry Pi via I2C and GPIO pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Example: A project utilizing Adafruit Crickit HAT for Raspberry Pi in a practical application
Adafruit Circuit Playground Bluefruit and Crickit-Based Smart RGB LED and Temperature Monitoring System
This circuit integrates an Adafruit Circuit Playground Bluefruit with an Adafruit Crickit for Circuit Playground Express to control a temperature sensor, a loudspeaker, and a series of WS2812 RGB LED strips. The Crickit board reads temperature data, drives the loudspeaker, and controls the LED strips to create visual effects based on the sensor input.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Virtual Energy Monitoring Circuit: A project utilizing Adafruit Crickit HAT for Raspberry Pi in a practical application
Raspberry Pi 4B-Based Current Monitoring System with I2C OLED Display
This circuit features a Raspberry Pi 4B as the central processing unit, interfaced with an Adafruit ADS1115 16-bit I2C ADC for analog-to-digital conversion and a 0.96" OLED display for visual output. The ADS1115 is connected to a current sensor for measuring electrical current, with the sensor's output and burden pins connected to the ADC's analog input channels. The Raspberry Pi communicates with both the ADC and the OLED display over the I2C bus, using its GPIO2 and GPIO3 pins for data (SDA) and clock (SCL) lines, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Robotics: Control DC motors, stepper motors, and servos.
  • Animatronics: Create interactive and moving displays.
  • Physical Computing: Interface with sensors, LEDs, and capacitive touch inputs.
  • IoT Projects: Build smart devices with motorized or interactive components.

Technical Specifications

Key Technical Details

  • Power Supply: 5V DC (via Raspberry Pi or external power source)
  • Motor Control:
    • 4 x DC motor outputs (up to 1.2A per channel)
    • 2 x Stepper motor outputs
  • Servo Control: 4 x PWM servo outputs
  • Capacitive Touch Inputs: 8 x capacitive touch pads
  • Sensor Inputs: 4 x analog/digital input pins
  • LED Outputs: 4 x high-current drive outputs
  • Communication: I2C interface with Raspberry Pi
  • Co-Processor: ATSAMD21 running CircuitPython
  • Dimensions: 65mm x 56mm x 20mm (fits standard Raspberry Pi HAT form factor)

Pin Configuration and Descriptions

The Crickit HAT connects to the Raspberry Pi via the GPIO header and provides additional terminals for external connections. Below is a summary of the key pin configurations:

GPIO Header (Connected to Raspberry Pi)

Pin Number Pin Name Description
3 SDA I2C Data Line
5 SCL I2C Clock Line
2, 4 5V Power Supply
6 GND Ground

External Terminals

Terminal Group Description
DC Motor Outputs 4 terminals for connecting up to 2 DC motors
Stepper Motor Outputs 4 terminals for connecting 2 stepper motors
Servo Outputs 4 terminals for PWM-controlled servos
Capacitive Touch Pads 8 touch-sensitive inputs
Sensor Inputs 4 analog/digital input pins
LED Outputs 4 high-current drive outputs for LEDs

Usage Instructions

How to Use the Crickit HAT in a Circuit

  1. Attach the HAT: Securely mount the Crickit HAT onto the Raspberry Pi's GPIO header.
  2. Power the HAT:
    • For low-power applications, the HAT can draw power directly from the Raspberry Pi.
    • For high-power applications (e.g., motors), connect an external 5V DC power supply to the Crickit HAT's power terminal.
  3. Connect Components:
    • Attach motors, servos, sensors, or LEDs to the appropriate terminals.
    • Use the capacitive touch pads for touch-sensitive inputs.
  4. Install Software:
    • Install the Adafruit Blinka library and the Adafruit_CircuitPython_Crickit library on your Raspberry Pi.
    • Use Python to control the HAT's features.

Example Code for Controlling a Servo

Below is an example Python script to control a servo motor connected to the Crickit HAT:


Import necessary libraries

import time from adafruit_crickit import crickit

Initialize the servo on Servo 1 terminal

servo = crickit.servo_1

Set the servo angle to 0 degrees

servo.angle = 0 print("Servo set to 0 degrees") time.sleep(1)

Sweep the servo from 0 to 180 degrees

for angle in range(0, 181, 10): # Increment by 10 degrees servo.angle = angle print(f"Servo angle: {angle} degrees") time.sleep(0.1)

Sweep the servo back to 0 degrees

for angle in range(180, -1, -10): # Decrement by 10 degrees servo.angle = angle print(f"Servo angle: {angle} degrees") time.sleep(0.1)

print("Servo control complete")


Important Considerations and Best Practices

  • Power Supply: Use an external power supply for high-power components like motors to avoid overloading the Raspberry Pi.
  • I2C Address: The Crickit HAT uses the default I2C address 0x49. Ensure no other devices on the I2C bus conflict with this address.
  • Library Installation: Always use the latest version of the Adafruit Blinka and CircuitPython libraries for compatibility.
  • Component Ratings: Ensure connected components (e.g., motors, LEDs) do not exceed the HAT's current and voltage ratings.

Troubleshooting and FAQs

Common Issues and Solutions

  1. HAT Not Detected by Raspberry Pi:

    • Ensure the HAT is securely connected to the GPIO header.
    • Verify that the I2C interface is enabled on the Raspberry Pi (sudo raspi-config > Interface Options > I2C).
  2. Motors Not Running:

    • Check the power supply. Motors require sufficient current to operate.
    • Verify the motor connections and ensure they are properly secured to the terminals.
  3. Servo Not Moving:

    • Confirm the servo is connected to the correct terminal.
    • Ensure the servo's voltage and current requirements are within the HAT's specifications.
  4. Capacitive Touch Inputs Not Responding:

    • Ensure nothing conductive is interfering with the touch pads.
    • Verify the touch pads are properly configured in your code.
  5. LEDs Not Lighting Up:

    • Check the LED connections and polarity.
    • Ensure the LEDs do not exceed the HAT's current rating.

FAQs

Q: Can I use the Crickit HAT with other Raspberry Pi models?
A: Yes, the Crickit HAT is compatible with all 40-pin Raspberry Pi models, including the Raspberry Pi 4, 3, and Zero.

Q: Do I need to solder anything to use the Crickit HAT?
A: No soldering is required. The HAT is designed for plug-and-play use.

Q: Can I use the Crickit HAT without a Raspberry Pi?
A: No, the Crickit HAT is specifically designed to work with the Raspberry Pi. For standalone use, consider the Adafruit Crickit for Circuit Playground.

Q: What is the maximum current the HAT can handle?
A: Each motor output can handle up to 1.2A, and the total current should not exceed the limits of your power supply.


This documentation provides a comprehensive guide to using the Adafruit Crickit HAT for Raspberry Pi. With its wide range of features and ease of use, the Crickit HAT is an excellent tool for bringing your robotics and physical computing projects to life!