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

How to Use Grove-LED Button: Examples, Pinouts, and Specs

Image of Grove-LED Button
Cirkit Designer LogoDesign with Grove-LED Button in Cirkit Designer

Introduction

The Grove-LED Button is a versatile module that combines an LED and a push button into a single, compact unit. This module allows users to control the LED's state (on/off) with the press of a button, making it ideal for interactive projects. It is part of the Grove ecosystem, which simplifies prototyping and development by using standardized connectors and plug-and-play functionality.

Explore Projects Built with Grove-LED Button

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Pushbutton-Controlled Dual-Color LED Circuit with TA6568
Image of polarity detector: A project utilizing Grove-LED Button in a practical application
This is a pushbutton-controlled LED circuit with a TA6568 chip that likely drives two LEDs (red and green). Each LED is connected to a pushbutton through the TA6568, allowing the user to toggle the state of the LEDs. The circuit is powered by a 3V battery and includes a JST connector for external interfacing.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Bluetooth-Controlled Joystick LED System
Image of salahdine2: A project utilizing Grove-LED Button in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an analog joystick, an HC-05 Bluetooth module, a pushbutton, and a green LED. The joystick provides analog input to the Arduino, which can be used to control the LED or send data via Bluetooth. The pushbutton is used to trigger actions, and the LED provides visual feedback.
Cirkit Designer LogoOpen Project in Cirkit Designer
USB-Powered Pushbutton Controlled LED Circuit
Image of oppgv. 10: A project utilizing Grove-LED Button in a practical application
This circuit consists of a USB power converter supplying power to three pushbuttons, each connected to a corresponding red LED. When a button is pressed, it closes the circuit for its associated LED, causing the LED to light up. The common ground for the circuit is provided through a 40-pin connector, which also serves as an interface for the pushbuttons' inputs and the LEDs' cathodes.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Controlled LED with Pushbutton
Image of one green led & pull down: A project utilizing Grove-LED Button in a practical application
This circuit features an Arduino UNO configured to control a green LED using a pushbutton. The LED is connected to digital pin D13 through a 330 Ohm resistor, and the pushbutton is connected to digital pin D2 with a pull-down resistor to ground. When the button is pressed, the Arduino turns on the LED; when released, the LED turns off.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Grove-LED Button

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 polarity detector: A project utilizing Grove-LED Button in a practical application
Pushbutton-Controlled Dual-Color LED Circuit with TA6568
This is a pushbutton-controlled LED circuit with a TA6568 chip that likely drives two LEDs (red and green). Each LED is connected to a pushbutton through the TA6568, allowing the user to toggle the state of the LEDs. The circuit is powered by a 3V battery and includes a JST connector for external interfacing.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of salahdine2: A project utilizing Grove-LED Button in a practical application
Arduino UNO Bluetooth-Controlled Joystick LED System
This circuit features an Arduino UNO microcontroller interfaced with an analog joystick, an HC-05 Bluetooth module, a pushbutton, and a green LED. The joystick provides analog input to the Arduino, which can be used to control the LED or send data via Bluetooth. The pushbutton is used to trigger actions, and the LED provides visual feedback.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of oppgv. 10: A project utilizing Grove-LED Button in a practical application
USB-Powered Pushbutton Controlled LED Circuit
This circuit consists of a USB power converter supplying power to three pushbuttons, each connected to a corresponding red LED. When a button is pressed, it closes the circuit for its associated LED, causing the LED to light up. The common ground for the circuit is provided through a 40-pin connector, which also serves as an interface for the pushbuttons' inputs and the LEDs' cathodes.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of one green led & pull down: A project utilizing Grove-LED Button in a practical application
Arduino UNO Controlled LED with Pushbutton
This circuit features an Arduino UNO configured to control a green LED using a pushbutton. The LED is connected to digital pin D13 through a 330 Ohm resistor, and the pushbutton is connected to digital pin D2 with a pull-down resistor to ground. When the button is pressed, the Arduino turns on the LED; when released, the LED turns off.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Interactive projects and prototypes
  • User input interfaces
  • Visual feedback systems
  • Educational projects for learning electronics
  • DIY projects requiring simple button and LED integration

Technical Specifications

The Grove-LED Button is designed for ease of use and compatibility with microcontrollers like Arduino, Raspberry Pi, and others. Below are its key technical details:

Key Technical Details

Parameter Value
Operating Voltage 3.3V / 5V
Operating Current ≤ 20mA
LED Color Red
Button Type Momentary Push Button
Connector Type Grove 4-pin Interface
Dimensions 20mm x 20mm
Weight 3g

Pin Configuration and Descriptions

The Grove-LED Button uses a 4-pin Grove connector. The pinout is as follows:

Pin Number Pin Name Description
1 VCC Power supply (3.3V or 5V)
2 GND Ground
3 SIG_LED Signal pin to control the LED
4 SIG_BTN Signal pin to read the button's state

Usage Instructions

The Grove-LED Button is straightforward to use in a circuit. Follow the steps below to integrate it into your project:

Connecting the Grove-LED Button

  1. Hardware Setup:

    • Connect the Grove-LED Button to a Grove Base Shield or directly to your microcontroller using a Grove cable.
    • Ensure the module is connected to a digital I/O port (e.g., D2 or D3 on an Arduino UNO).
  2. Circuit Diagram:

    • The SIG_LED pin is connected to a digital output pin on the microcontroller to control the LED.
    • The SIG_BTN pin is connected to a digital input pin to read the button's state.

Example Code for Arduino UNO

Below is an example Arduino sketch to demonstrate how to use the Grove-LED Button. The code toggles the LED state each time the button is pressed.

// Define the pin numbers for the LED and button
const int ledPin = 2;  // Connect SIG_LED to digital pin 2
const int buttonPin = 3;  // Connect SIG_BTN to digital pin 3

// Variable to store the button state
int buttonState = 0;  
// Variable to track the LED state
bool ledState = false;  

void setup() {
  // Initialize the LED pin as an output
  pinMode(ledPin, OUTPUT);
  // Initialize the button pin as an input
  pinMode(buttonPin, INPUT);
  // Start the serial monitor for debugging
  Serial.begin(9600);
}

void loop() {
  // Read the current state of the button
  buttonState = digitalRead(buttonPin);

  // Check if the button is pressed
  if (buttonState == HIGH) {
    // Toggle the LED state
    ledState = !ledState;
    // Update the LED output
    digitalWrite(ledPin, ledState ? HIGH : LOW);
    // Print the LED state to the serial monitor
    Serial.print("LED is now: ");
    Serial.println(ledState ? "ON" : "OFF");

    // Debounce delay to avoid multiple toggles
    delay(200);
  }
}

Important Considerations and Best Practices

  • Debouncing: The button may produce multiple signals due to mechanical bouncing. Use a small delay (e.g., 200ms) to debounce the button.
  • Voltage Compatibility: Ensure the module is powered with the correct voltage (3.3V or 5V) to avoid damage.
  • Signal Pins: Avoid connecting the SIG_LED or SIG_BTN pins directly to VCC or GND without proper current-limiting resistors or microcontroller control.

Troubleshooting and FAQs

Common Issues and Solutions

  1. The LED does not light up:

    • Verify that the SIG_LED pin is connected to a digital output pin on the microcontroller.
    • Check the power supply voltage (3.3V or 5V) and ensure proper connections.
  2. The button press is not detected:

    • Ensure the SIG_BTN pin is connected to a digital input pin on the microcontroller.
    • Check for loose or incorrect connections in the Grove cable.
  3. The LED flickers or behaves erratically:

    • This may be caused by button debounce issues. Add a small delay (e.g., 200ms) in the code after detecting a button press.
  4. The module does not work at all:

    • Confirm that the Grove Base Shield or Grove cable is properly connected.
    • Test the module with a different digital I/O port on the microcontroller.

FAQs

Q: Can I use the Grove-LED Button with a Raspberry Pi?
A: Yes, the module can be used with a Raspberry Pi. Use the GPIO pins to control the LED and read the button state. You may need a Grove Pi+ or Grove HAT for easier integration.

Q: Can I change the LED color?
A: The module comes with a fixed red LED. To use a different color, you would need to modify the hardware by replacing the LED.

Q: Is the button latching or momentary?
A: The button is momentary, meaning it only stays pressed while you hold it down.

Q: Can I use this module with 3.3V systems?
A: Yes, the Grove-LED Button is compatible with both 3.3V and 5V systems.

By following this documentation, you can easily integrate the Grove-LED Button into your projects and troubleshoot any issues that arise. Happy prototyping!