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

74 reviews
Write a review
85%
(63)
5%
(4)
3%
(2)
3%
(2)
4%
(3)
68
21
J
ProtoBot
Justin Tzitzis

greatest flexible pcb robot out there

G
ProtoBot
Gennadii

Got a Pro version, it's very easy to put together, and it works great.
Would be great to have brushless motors and more GPIO access through the plastic shell in ProtoBot v2

A
ProtoBot
Armand

It is a compact, very well designed RC-like robotic car with endless possibilities for those with active imaginations. Inspirational and creative in a small form factor. Innovate and enjoy!

User picture
J
ProtoBot
Javier

I Recieved yesterday my ProtoBot and the quality and details are awesome!

User picture
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

123