Menu
Microbots
0
  • Learn
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • Modules & Parts
    • Tools & Gears
    • Robots & Displays
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Sign in
  • English
  • Your Cart is Empty
Microbots
  • Learn
    • Getting Started
    • Maker Builds
    • Education
  • Shop
    • Modules & Parts
    • Tools & Gears
    • Robots & Displays
  • 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

50 reviews
Write a review
84%
(42)
4%
(2)
2%
(1)
4%
(2)
6%
(3)
21
46
B
CodeCell C6 Drive
Brandon

Awesome product with great tutorials and example code

G
MotorCell
Gerald Kendrick

Very happy with my MotorCell. I'm incorporating it into a prototype project that will hopefully result in me needing a few more!

User picture
A
CodeCell C6 Drive
Anonymous

Great product! Having the IMU, motor driver, and battery management directly on the board is incredibly handy for quick prototyping. Love it!

Improvement ideas:
- using an ESP32 other than the C6 to get more cores. On a single-core chip, WiFi tasks often interfere with real-time applications.
- adding two more motor drivers (with a slightly higher current rating) would be awesome for drone projects!
- I know the compactness of the board is a huge selling point and really optimised, but exposing a few more pins would be great. With the motor drivers already occupying 4 pins, having only 4 GPIOs left can be tight for complex projects (though I’m nitpicking, I’m really pushing this board to its limits!).

A
CodeCell C6
Anonymous

I use CodeCell C6, like all the Features, and compactness. The remote Link to the iPhone with some Controls for 2 Motors is just perfect for the job.

O
CodeCell C6 Drive
Odd_Jayy

This is one of my Favorite finds, this board has everything you need to make a quick and small robot, easy to set up and install. Perfect for beginners or a person who needs to save room in their build.

User picture
123