Menu
Microbots
0
  • Learn
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • ProtoBot
    • Modules & Parts
    • Tools & Gears
    • Coming Soon
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Sign in
  • English
  • Your Cart is Empty
Microbots
  • Learn
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • ProtoBot
    • Modules & Parts
    • Tools & Gears
    • Coming Soon
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Language

  • 0 0

Using DriveCell to Control High-Power LEDs

High-power LEDs are widely used in lighting projects, from flashlights to light strips and signal indicators. Typically, a single transistor is used to switch or dim high-power LEDs, but DriveCell, a tiny H-Bridge module which is packaged into the smallest module, can provide an alternative while handling up to 1.8A of continuous current.

In this guide, we’ll explore how DriveCell can be used to control high-power LEDs or single-color LED strips, discuss wiring configurations, and demonstrate a fading effect using its library.

Why Use DriveCell for High-Power LEDs?

DriveCell is built around the DRV8837 H-Bridge which has four transistors in the shape of an 'H' to allow bi-directional current. You only require one transistor to dim the brightness of high-power LEDs - But if you're looking for a tiny solution DriveCell can handles up to 1.8A continuous current with an easy integration with microcontrollers.

DriveCell Specifications for High-Power LED Control

Before connecting your LED, it's essential to understand DriveCell’s electrical limitations:

  • Operating Voltage: 1.8V to 5V (suitable for LED applications)
  • Maximum Continuous Current: 1.8A (sufficient for most high-power LEDs or small LED strips)
  • Built-in Protections: Overcurrent, undervoltage lockout, and thermal shutdown

Note: When it comes to lighting, DriveCell is only ideal for controlling the brightness of single-color LED strips or individual high-power LEDs.

Wiring a High-Power LED to DriveCell

Basic Connection for One LED

Here’s how to wire a single LED or LED strip to DriveCell:

  1. Connect DriveCell Output Pins to the LED:
    • LED Positive (+) → OUT1
    • LED Negative (-) → Connect to Ground or OUT2 (while forcing it to ground with the input pin)
  2. Connect DriveCell Input Pins to the Microcontroller:
    • IN1 → Connect to your Microcontroller (any digital PWM-capable pin)
    • IN2 → Connect to your Microcontroller (any digital PWM-capable pin)
  3. Power Connections:
    • VCC → LED Voltage (e.g. 5V)
    • GND → Common ground with the Microcontroller

Controlling LED Brightness with DriveCell

To adjust LED brightness dynamically, DriveCell provides a software library. Below is an example of a fading effect.

1. Installing the Library

  1. Open Arduino IDE
  2. Go to Library Manager
  3. Search for DriveCell and install it

2. Code Example for LED Brightness Control

The following example demonstrates how to fade an LED in and out using DriveCell:

#include <DriveCell.h>

#define IN1_pin1 2
#define IN1_pin2 3

DriveCell LED(IN1_pin1, IN1_pin2); /* Pin2 will output the PWM signal, and Pin3 will be connected to 0V */

uint16_t led_brightness = 0;
bool led_brightness_flag = 1;

void setup() {
  LED.Init(); /* Initialize the LED */
}

void loop() {
  delay(10); /* Adjust this delay to change the fading speed */
  
  if (led_brightness_flag == 1) {
    if (led_brightness < 100U) {
      led_brightness++;
    } else {
      led_brightness_flag = 0;
    }
  } else {
    if (led_brightness > 1U) {
      led_brightness--;
    } else {
      led_brightness_flag = 1;
    }
  }
  
  LED.Drive(0, led_brightness); /* Output the new brightness level */
}

3. Understanding the Code

  • Init() → Initializes DriveCell and sets up the input pins
  • Drive(direction, brightness) → Controls LED brightness:
    • direction → 0 (fixed polarity for LEDs)
    • brightness → Dimming level (0 to 100%)

This code gradually increases and decreases the brightness of the LED, creating a smooth fading effect.

⚠ Note: The Drive() function is only compatible with ESP32 and CodeCell, as it uses a high-speed PWM timer.

Below is another example that can be used with other microcontrollers like the Arduino Uno:

#include <DriveCell.h>

#define IN1_pin1 2
#define IN1_pin2 3

DriveCell myLED(IN1_pin1, IN1_pin2);

void setup() {
  myLED.Init();
}

void loop() {
    myLED.Run(1000); // Blink LED on and off every 1 second
}

This example simply turns the LED on and off every second.

Conclusion

The tiny DriveCell module makes high-power LED control simple and easy to use! Check out the DriveCell GitHub Repository for more code examples and technical documentation!

  • Share:

Follow

Github

  • About
  • Software
  • Education
  • Contact
  • FAQs
  • Terms
  • Refund Policy
  • Privacy Policy

Join our Community ~ Be the first to know about new products and get exciting deals!

© 2026 Microbots.

★ Reviews

Let customers speak for us

68 reviews
Write a review
84%
(57)
6%
(4)
3%
(2)
3%
(2)
4%
(3)
63
21
C
CodeCell C3
Cloke74

Great piece of kit, had just what i needed to complete the project i had in mind. Shame shipping to the UK is so expensive, but appreciate this isn’t necessarily in the hands of MicroBots

A
CodeCell C6
Anonymous

I had an issue, got a red light, I used too much flux. Support said clean it, then the one sensor worked fine. I got the help and answer same day I provided a foto.

A
CodeCell C6 Drive
Anonymous

I think this is the best of the ESP offered, most versatile.

User picture
P
CodeCell C6
Prudhvi tej Chinimilli

Been testing the Microbots CodeCell C6 and honestly impressed with how much functionality they packed into such a tiny module. Great form factor for rapid prototyping wearable/embedded sensing applications. ESP32-C6 + IMU integration makes development much easier compared to building everything from scratch.

Still exploring battery optimization and compact LiPo options for our use case, but overall the platform is promising for low-cost real-time sensing systems. Excited to keep building with it.

F
CodeCell C6
Francisco Estivallet

Amazing hardware, my go to for compact projects.

User picture
123