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

How to Use Adafruit Trinket 5V: Examples, Pinouts, and Specs

Image of Adafruit Trinket 5V
Cirkit Designer LogoDesign with Adafruit Trinket 5V in Cirkit Designer

Introduction

The Adafruit Trinket 5V is a versatile and compact microcontroller board that serves as a perfect solution for small projects where space is at a premium. Based on the ATtiny85 microcontroller, the Trinket offers a robust platform for hobbyists and professionals alike to create wearable electronics, tiny robots, or even to add intelligence to everyday objects. Its compatibility with the Arduino IDE allows for a familiar programming environment, making it accessible to a wide range of users.

Explore Projects Built with Adafruit Trinket 5V

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered Gas Sensor and Servo Control with Adafruit Trinket M0
Image of Canary: A project utilizing Adafruit Trinket 5V in a practical application
This circuit is a sensor-based system that uses an Adafruit Trinket M0 microcontroller to read data from a MiCS-5524 gas sensor and control a Tower Pro SG90 servo motor. Additionally, it includes an Adafruit Audio FX Mini Sound Board connected to a STEMMA speaker for audio output, all powered by a 4xAA battery pack.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Smart Light with Proximity Sensor and OLED Display using Adafruit QT Py RP2040
Image of lab: A project utilizing Adafruit Trinket 5V in a practical application
This circuit is a portable, battery-powered system featuring an Adafruit QT Py RP2040 microcontroller that interfaces with an OLED display, a proximity sensor, an accelerometer, and an RGB LED strip. The system is powered by a lithium-ion battery with a step-up boost converter to provide 5V for the LED strip, and it includes a toggle switch for power control. The microcontroller communicates with the sensors and display via I2C.
Cirkit Designer LogoOpen Project in Cirkit Designer
ATmega328P-Based Sensor Hub with OLED Display and LIDAR
Image of TILTPCB: A project utilizing Adafruit Trinket 5V in a practical application
This circuit features an Mtiny Uno ATmega328P microcontroller as its central processing unit, interfacing with a variety of sensors and peripherals. It includes a 0.96" OLED display and an MPU6050 accelerometer/gyroscope for user interface and motion sensing, respectively. The circuit also integrates a TF LUNA LIDAR for distance measurement, a DHT11 sensor for temperature and humidity readings, and uses a 9V battery with a 7805 voltage regulator for power management. Communication with a computer for programming and data exchange is facilitated by an Adafruit FTDI Friend module.
Cirkit Designer LogoOpen Project in Cirkit Designer
ATtiny85 and OLED Display Based Interactive Game with Buzzer and LED
Image of FIRST CIRCUIT: A project utilizing Adafruit Trinket 5V in a practical application
This circuit is a simple interactive game system powered by a 5V battery, featuring an ATtiny85 microcontroller, an OLED display, a buzzer, an LED, and multiple pushbuttons. The OLED displays a menu with options to start a game, which is controlled by the ATtiny85. The buzzer and LED provide audio-visual feedback, and the pushbuttons are used for user input to navigate the menu and play the game.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit Trinket 5V

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 Canary: A project utilizing Adafruit Trinket 5V in a practical application
Battery-Powered Gas Sensor and Servo Control with Adafruit Trinket M0
This circuit is a sensor-based system that uses an Adafruit Trinket M0 microcontroller to read data from a MiCS-5524 gas sensor and control a Tower Pro SG90 servo motor. Additionally, it includes an Adafruit Audio FX Mini Sound Board connected to a STEMMA speaker for audio output, all powered by a 4xAA battery pack.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of lab: A project utilizing Adafruit Trinket 5V in a practical application
Battery-Powered Smart Light with Proximity Sensor and OLED Display using Adafruit QT Py RP2040
This circuit is a portable, battery-powered system featuring an Adafruit QT Py RP2040 microcontroller that interfaces with an OLED display, a proximity sensor, an accelerometer, and an RGB LED strip. The system is powered by a lithium-ion battery with a step-up boost converter to provide 5V for the LED strip, and it includes a toggle switch for power control. The microcontroller communicates with the sensors and display via I2C.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of TILTPCB: A project utilizing Adafruit Trinket 5V in a practical application
ATmega328P-Based Sensor Hub with OLED Display and LIDAR
This circuit features an Mtiny Uno ATmega328P microcontroller as its central processing unit, interfacing with a variety of sensors and peripherals. It includes a 0.96" OLED display and an MPU6050 accelerometer/gyroscope for user interface and motion sensing, respectively. The circuit also integrates a TF LUNA LIDAR for distance measurement, a DHT11 sensor for temperature and humidity readings, and uses a 9V battery with a 7805 voltage regulator for power management. Communication with a computer for programming and data exchange is facilitated by an Adafruit FTDI Friend module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of FIRST CIRCUIT: A project utilizing Adafruit Trinket 5V in a practical application
ATtiny85 and OLED Display Based Interactive Game with Buzzer and LED
This circuit is a simple interactive game system powered by a 5V battery, featuring an ATtiny85 microcontroller, an OLED display, a buzzer, an LED, and multiple pushbuttons. The OLED displays a menu with options to start a game, which is controlled by the ATtiny85. The buzzer and LED provide audio-visual feedback, and the pushbuttons are used for user input to navigate the menu and play the game.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Wearable electronics
  • Small robotics projects
  • USB peripheral development
  • Prototyping IoT devices
  • Educational purposes for learning electronics and programming

Technical Specifications

Key Technical Details

  • Microcontroller: ATtiny85
  • Operating Voltage: 5V
  • Input Voltage: 7-16V (via battery port)
  • Digital I/O Pins: 5 (of which 2 are used for USB if the Trinket is programming)
  • PWM Channels: 3
  • Analog Input Channels: 3 (multiplexed with digital I/O pins)
  • Flash Memory: 8 KB (ATtiny85) with 2.75 KB used by bootloader
  • SRAM: 512 bytes
  • EEPROM: 512 bytes
  • Clock Speed: 8 MHz
  • Dimensions: 15.5mm x 31mm x 5mm

Pin Configuration and Descriptions

Pin Number Name Description
1 BAT+ Battery input for an external power source (7-16V DC)
2 GND Ground pin
3 5V Regulated 5V output from the onboard regulator
4 #0 GPIO pin, also used for USB data- if the Trinket is programming
5 #1 GPIO pin, can be used for PWM output
6 #2 GPIO pin, can be used for analog input
7 #3 GPIO pin, also used for USB data+ if the Trinket is programming
8 #4 GPIO pin, can be used for PWM output or analog input
9 RST Reset pin, can be used to restart the microcontroller

Usage Instructions

How to Use the Component in a Circuit

  1. Powering the Trinket: Connect a 7-16V DC power source to the BAT+ and GND pins, or use the USB port for power and programming.
  2. Connecting I/O Pins: Use the GPIO pins (#0-#4) to connect sensors, actuators, or other components. Remember that pins #0 and #3 are used for USB communication during programming.
  3. Programming the Trinket: Connect the Trinket to a computer using a USB cable and select the appropriate board and port in the Arduino IDE.

Important Considerations and Best Practices

  • Ensure that the input voltage does not exceed 16V to prevent damage to the board.
  • When using PWM or analog features, consult the ATtiny85 datasheet for detailed information on pin capabilities.
  • The Trinket does not have a serial port, so serial debugging is not possible in the traditional sense.
  • To reduce power consumption, use the LOW power modes of the ATtiny85 when possible.

Troubleshooting and FAQs

Common Issues Users Might Face

  • Trinket not recognized by the computer: Ensure that the USB cable is properly connected and that the Trinket is selected in the Arduino IDE.
  • Incorrect behavior of I/O pins: Verify that the pin configurations in your code match the physical connections in your circuit.
  • Power issues: If the Trinket is unresponsive, check the power supply for proper voltage and connections.

Solutions and Tips for Troubleshooting

  • Use a different USB cable or port if the Trinket is not recognized.
  • Double-check your code for any pin misconfigurations.
  • If you encounter power issues, measure the voltage at the BAT+ and GND pins to ensure it falls within the specified range.

Example Code for Arduino UNO

// Blink an LED connected to pin #1 on the Adafruit Trinket 5V

void setup() {
  pinMode(1, OUTPUT); // Set pin #1 as an output
}

void loop() {
  digitalWrite(1, HIGH); // Turn the LED on
  delay(1000);           // Wait for a second
  digitalWrite(1, LOW);  // Turn the LED off
  delay(1000);           // Wait for a second
}

Note: The above code is a simple example to get you started with the Trinket. The actual implementation may vary based on the specific requirements of your project. Always refer to the official Adafruit documentation and the ATtiny85 datasheet for more detailed information.