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

FlatFlap - Creating Pulsing Motion

FlatFlap is a compact actuator that can generates organic flappy movements. However this guide focuses on creating a short pulse - a single flap lasting only a few milliseconds before stopping. This method is useful for quick actuation, and applications where brief motion is required.

How It Works

To generate motion, FlatFlap relies on an electric current passing through its coil, creating a magnetic field. By applying a short pulse, we induce a rapid magnetic field that repels the magnet instantaneously. 

Generating a Pulse in Arduino

To manually generate a pulse you can use basic digitalWrite commands:

#define FLAP_PIN1 2
#define FLAP_PIN2 3

void setup() {
  pinMode(FLAP_PIN1, OUTPUT);
  pinMode(FLAP_PIN2, OUTPUT);
}

void loop() {
  digitalWrite(FLAP_PIN1, HIGH);
  digitalWrite(FLAP_PIN2, LOW);
  delay(500); // Pulse duration in milliseconds
  
  digitalWrite(FLAP_PIN1, LOW);
  digitalWrite(FLAP_PIN2, LOW); // Stop motion
  delay(3000); // Stop for 3 sec
}

This simple code sends a 500-millisecond pulse to FlatFlap, causing a brief movement before stopping.

Optimizing Pulse Control with PWM

Instead of an abrupt ON/OFF pulse, PWM (Pulse Width Modulation) can gradually control the intensity, reducing mechanical stress and improving performance. This is automatically handled in DriveCell:

#include <drivecell.h>

#define IN1_pin1 2
#define IN1_pin2 3
DriveCell FlatFlap1(IN1_pin1, IN1_pin2);

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

void loop() {
  FlatFlap1.Pulse(true, 10); // Pulse forward for 10ms
  delay(500); // Wait before the next pulse
}

If you are using our DriveCell library you can directly use the Pulse function to implement this:

#include <drivecell.h>

#define IN1_pin1 2
#define IN1_pin2 3
DriveCell FlatFlap1(IN1_pin1, IN1_pin2);

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

void loop() {
  FlatFlap1.Pulse(true, 100); // Pulse for 100ms
  delay(3000); // Wait before the next pulse
  FlatFlap1.Pulse(true, 1000); // Pulse for 1000ms
  delay(3000); // Wait before the next pulse
  FlatFlap1.Pulse(true, 500); // Pulse for 500ms
  delay(3000); // Wait before the next pulse
}

Understanding the Function:

  • Pulse(bool direction, uint8_t ms_duration)

    • direction: true (north) / false (south)

    • ms_duration: Duration of the pulse in milliseconds

Conclusion

Using short pulses, you can control FlatFlap for quick actuation applications. 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

67 reviews
Write a review
85%
(57)
6%
(4)
1%
(1)
3%
(2)
4%
(3)
62
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