Tart Robotics
Published © GPL3+

A DIY Flapping-wing Robotic Bat

Make a DIY robotic bat that flaps its wings whenever someone walks by out of Arduino, off-the-shelf DC motor, Lego, and 3D printed parts.

BeginnerFull instructions provided2 hours7,357

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
PIR Sensor, 7 m
PIR Sensor, 7 m
×1
5 mm LED: Red
5 mm LED: Red
×1
TT DC 1:120 gear-motor
×1
SparkFun Solder-able Breadboard - Mini
SparkFun Solder-able Breadboard - Mini
×1
Darlington High Power Transistor
Darlington High Power Transistor
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Motion sensitive flapping-wing

Code

Motion sensitive flapping-wing

C/C++
/*
Robotic bat
The idea:
In this project, we will show you how to make a  Robotic bat out of Lego Technic pieces,
Arduino boards, off-the-shelf DC motors, and PIR motion sensor.
The current project uses an Arduino Nano boards as the main controller of the
robot.
The circuit:
- In this circuit, an Arduino Nano is used. Any other types of Arduino
can be used of course but do not forget to change the pin configurations
if you want to change the circuit on your preference.
Visit the Tart Robotics blog for more information:
https://www.tartrobotics.com/blog
*/
#define PIR 2        // PIR motion sensor
#define EYES A1   // LEDs
#define WINGS 3 // DC motor
void setup() {
pinMode(PIR, INPUT);
}
void loop() {
if (digitalRead(PIR)) {
analogWrite(EYES, 255);
analogWrite(WINGS, 180);
} else {
digitalWrite(EYES, 0);
digitalWrite(WINGS, LOW);
}
}
void blink() {
digitalWrite(EYES, HIGH);
delay(100);
digitalWrite(EYES, LOW);
delay(100);
}

Code snippet #2

Plain text
/*
  Robotic bat
    The idea:
    In this project, we will show you how to make a  Robotic bat out of Lego Technic pieces,
    Arduino boards, off-the-shelf DC motors, and PIR motion sensor.
    The current project uses an Arduino Nano boards as the main controller of the
    robot.
    The circuit:
    - In this circuit, an Arduino Nano is used. Any other types of Arduino
    can be used of course but do not forget to change the pin configurations
    if you want to change the circuit on your preference.
    Visit the Tart Robotics blog for more information:
    https://www.tartrobotics.com/blog
*/

#define PIR 2        // PIR motion sensor
#define EYES A1   // LEDs
#define WINGS 3 // DC motor

void setup() {
  pinMode(PIR, INPUT);
}

void loop() {
  if (digitalRead(PIR)) {
    analogWrite(EYES, 255);
    analogWrite(WINGS, 180);
  } else {
    digitalWrite(EYES, 0);
    digitalWrite(WINGS, LOW);
  }
}

void blink() {
  digitalWrite(EYES, HIGH);
  delay(100);
  digitalWrite(EYES, LOW);
  delay(100);
}

Credits

Tart Robotics
15 projects • 54 followers
Our mission is to provide children with novel robotic tools, to inspire them to become future innovators.
Contact

Comments

Please log in or sign up to comment.