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

How to Use Bi-Color 24-Bar Bargraph w I2C Backpack: Examples, Pinouts, and Specs

Image of Bi-Color 24-Bar Bargraph w I2C Backpack
Cirkit Designer LogoDesign with Bi-Color 24-Bar Bargraph w I2C Backpack in Cirkit Designer

Introduction

The Adafruit Bi-Color 24-Bar Bargraph w I2C Backpack (Part ID: 1721) is a versatile visual display component featuring 24 individual LED segments. Each segment is capable of displaying two colors (red and green), which can be combined to produce yellow. This bargraph is equipped with an I2C backpack, enabling simplified communication with microcontrollers via the I2C protocol. The compact design and ease of use make it ideal for applications requiring visual feedback, such as progress indicators, level meters, or status displays.

Explore Projects Built with Bi-Color 24-Bar Bargraph w I2C Backpack

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Nano-Based GPS and Barometric Sensor with Seven Segment Display and Battery Power
Image of gps_speedometer: A project utilizing Bi-Color 24-Bar Bargraph w I2C Backpack in a practical application
This circuit is a sensor and display system powered by an Arduino Nano, which reads data from a GPS module and a BMP390 sensor, and displays information on a seven-segment display and a bar graph. The system is powered by a 5V battery through a Mini Lipo charger, and includes a toggle switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Weather Station with BME280 and DS18B20 Sensors, Battery-Powered and Wi-Fi Enabled
Image of Copy of Circuit Diagram Proto: A project utilizing Bi-Color 24-Bar Bargraph w I2C Backpack in a practical application
This circuit is a weather monitoring system that uses an ESP32 microcontroller to read temperature data from a DS18B20 sensor and pressure data from a BME280 sensor. The data is displayed on a 20x4 I2C LCD panel, and the system can communicate via a SIM800L module. A piezo buzzer is included for audible alerts, and the entire system is powered by a 5V battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Health Monitoring System with Nucleo WB55RG and OLED Display
Image of Pulsefex: A project utilizing Bi-Color 24-Bar Bargraph w I2C Backpack in a practical application
This circuit is a multi-sensor data acquisition system that uses a Nucleo WB55RG microcontroller to interface with a digital temperature sensor (TMP102), a pulse oximeter and heart-rate sensor (MAX30102), and a 0.96" OLED display via I2C. Additionally, it includes a Sim800l module for GSM communication, powered by a 3.7V LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino 101 Based Color Sensing Display with Buzzer Notification
Image of ADC Lab 10: A project utilizing Bi-Color 24-Bar Bargraph w I2C Backpack in a practical application
This circuit features an Arduino 101 microcontroller connected to a TCS3200 color sensor and a 16x2 I2C LCD display for output. The Arduino is configured to communicate with the LCD via I2C (using A4/SDA and A5/SCL pins for data exchange) and to receive color frequency signals from the TCS3200 on its D6 PWM pin. Additionally, a buzzer is connected to the D8 pin of the Arduino, potentially for audio signaling based on color detection or other programmed conditions.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Bi-Color 24-Bar Bargraph w I2C Backpack

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 gps_speedometer: A project utilizing Bi-Color 24-Bar Bargraph w I2C Backpack in a practical application
Arduino Nano-Based GPS and Barometric Sensor with Seven Segment Display and Battery Power
This circuit is a sensor and display system powered by an Arduino Nano, which reads data from a GPS module and a BMP390 sensor, and displays information on a seven-segment display and a bar graph. The system is powered by a 5V battery through a Mini Lipo charger, and includes a toggle switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of Circuit Diagram Proto: A project utilizing Bi-Color 24-Bar Bargraph w I2C Backpack in a practical application
ESP32-Based Weather Station with BME280 and DS18B20 Sensors, Battery-Powered and Wi-Fi Enabled
This circuit is a weather monitoring system that uses an ESP32 microcontroller to read temperature data from a DS18B20 sensor and pressure data from a BME280 sensor. The data is displayed on a 20x4 I2C LCD panel, and the system can communicate via a SIM800L module. A piezo buzzer is included for audible alerts, and the entire system is powered by a 5V battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Pulsefex: A project utilizing Bi-Color 24-Bar Bargraph w I2C Backpack in a practical application
Battery-Powered Health Monitoring System with Nucleo WB55RG and OLED Display
This circuit is a multi-sensor data acquisition system that uses a Nucleo WB55RG microcontroller to interface with a digital temperature sensor (TMP102), a pulse oximeter and heart-rate sensor (MAX30102), and a 0.96" OLED display via I2C. Additionally, it includes a Sim800l module for GSM communication, powered by a 3.7V LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ADC Lab 10: A project utilizing Bi-Color 24-Bar Bargraph w I2C Backpack in a practical application
Arduino 101 Based Color Sensing Display with Buzzer Notification
This circuit features an Arduino 101 microcontroller connected to a TCS3200 color sensor and a 16x2 I2C LCD display for output. The Arduino is configured to communicate with the LCD via I2C (using A4/SDA and A5/SCL pins for data exchange) and to receive color frequency signals from the TCS3200 on its D6 PWM pin. Additionally, a buzzer is connected to the D8 pin of the Arduino, potentially for audio signaling based on color detection or other programmed conditions.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Audio level meters
  • Battery charge indicators
  • Sensor data visualization
  • Industrial control panels
  • Educational and hobbyist projects

Technical Specifications

The following table outlines the key technical details of the Bi-Color 24-Bar Bargraph w I2C Backpack:

Parameter Value
Manufacturer Adafruit
Part ID 1721
LED Colors Red, Green (Yellow via combination)
Number of Segments 24
Communication Protocol I2C
Operating Voltage 5V DC
Operating Current ~20mA per lit segment (max)
Dimensions 50mm x 25mm x 8mm
Mounting PCB soldering or breadboard

Pin Configuration

The I2C backpack simplifies wiring by reducing the number of connections required. Below is the pin configuration for the I2C backpack:

Pin Label Description
1 VIN Power supply input (3.3V to 5V)
2 GND Ground
3 SDA I2C data line
4 SCL I2C clock line

Usage Instructions

Connecting the Bargraph

  1. Power Supply: Connect the VIN pin to a 5V power source and the GND pin to ground.
  2. I2C Communication: Connect the SDA pin to the I2C data line and the SCL pin to the I2C clock line of your microcontroller.
  3. Address Configuration: The default I2C address is 0x70. If you need to use multiple bargraphs, you can change the address by soldering the address jumpers on the back of the PCB.

Using with Arduino UNO

The Adafruit Bi-Color 24-Bar Bargraph is compatible with the Adafruit LED Backpack library, which simplifies control. Follow these steps to get started:

  1. Install the Library:

    • Open the Arduino IDE.
    • Go to Sketch > Include Library > Manage Libraries.
    • Search for "Adafruit LED Backpack" and install it.
  2. Example Code: Below is an example sketch to light up the bargraph:

    #include <Wire.h>
    #include <Adafruit_GFX.h>
    #include <Adafruit_LEDBackpack.h>
    
    // Create an instance of the bargraph object
    Adafruit_24bargraph bar = Adafruit_24bargraph();
    
    void setup() {
      // Initialize the bargraph with the default I2C address (0x70)
      bar.begin(0x70);
    }
    
    void loop() {
      // Light up the bargraph one segment at a time
      for (uint8_t i = 0; i < 24; i++) {
        bar.setBar(i, LED_GREEN); // Set segment to green
        bar.writeDisplay();      // Update the display
        delay(100);              // Wait 100ms
      }
    
      // Turn off all segments
      bar.clear();
      bar.writeDisplay();
      delay(500);
    }
    

    Code Notes:

    • setBar(index, color): Lights up a specific segment (index) with the specified color (LED_RED, LED_GREEN, or LED_YELLOW).
    • clear(): Turns off all segments.
    • writeDisplay(): Updates the display to reflect changes.

Best Practices

  • Use a current-limited power supply to avoid overloading the LEDs.
  • Keep I2C lines as short as possible to minimize noise.
  • If using multiple I2C devices, ensure each has a unique address.

Troubleshooting and FAQs

Common Issues

  1. Bargraph Not Lighting Up:

    • Verify that the VIN and GND pins are correctly connected.
    • Ensure the I2C address matches the one specified in your code.
    • Check for loose or incorrect wiring.
  2. Incorrect Colors Displayed:

    • Ensure the library is correctly installed and updated.
    • Verify that the setBar() function is called with the correct color parameter.
  3. I2C Communication Errors:

    • Confirm that the SDA and SCL lines are properly connected.
    • Check for address conflicts with other I2C devices.

FAQs

Q: Can I use this bargraph with a 3.3V microcontroller?
A: Yes, the I2C backpack is compatible with 3.3V logic levels, but ensure the VIN pin receives at least 3.3V.

Q: How do I change the I2C address?
A: Solder the address jumpers on the back of the PCB to set a new address. Refer to the Adafruit documentation for the address mapping.

Q: Can I control individual LEDs in a segment?
A: No, each segment is controlled as a whole and cannot be subdivided.

By following this documentation, you can effectively integrate the Adafruit Bi-Color 24-Bar Bargraph w I2C Backpack into your projects for vibrant and dynamic visual displays.