Close
0%
0%

RoboRaptor

Arduino Mascot Bot for VEX Robotics Team 7581H

Similar projects worth following
Hacked VEX platform with Arduino controller and found parts.

Started as a proposed entry for the VEX Mascot Robot Challenge but the kids would rather work on their competition bot, so I built it with all VEX parts and took it to the Detroit tournament in January. But the VEX controller was too big (and expensive), the LEDs too dim, and the pole too short. Redid it with Arduino Nano, superbright LEDs, custom flame waveguides, and hinged 8' pole. Took it to the State Championship in February, where the team won! Then on to Worlds in April in Louisville.

For hardware details, see COMPONENTS below.

Safety features:

- Doubled shaft collars

- Nylock nuts in stressed places

- Metal straps around pole ends in case holes crack (no cracks yet)

- Modified code so random flapping only if button pressed

- Modified flapping code for smoother parabolic motion

Arduino code:

// RoboRaptor by Claus Buchholz

#include <Servo.h> 
 
Servo lw, rw;  // left wing, right wing 
const int of = 40;    // offset to servo positions
const int le = 2, re = 3, r1 = 4, y1 = 5, r2 = 6, y2 = 7;  // 6 LEDs
const int vo = 8;  // voice
const int sw = 11;  // switch
int lr = LOW, ly = LOW, ct = 0;
 
void setup() 
{ 
  lw.attach(9, 700, 2300);  // VEX Servo motors - 1500 pulse width at center
  rw.attach(10, 700, 2300);
  pinMode(le, OUTPUT); digitalWrite(le, HIGH);
  pinMode(re, OUTPUT); digitalWrite(re, HIGH);
  pinMode(r1, OUTPUT); digitalWrite(r1, LOW);
  pinMode(y1, OUTPUT); digitalWrite(y1, LOW);
  pinMode(r2, OUTPUT); digitalWrite(r2, LOW);
  pinMode(y2, OUTPUT); digitalWrite(y2, LOW);
  pinMode(sw, INPUT_PULLUP);
  pinMode(13, OUTPUT); digitalWrite(13, LOW);
  lw.write(of+50);  // idle positions
  rw.write(180-of-50);
} 
 
void loop() 
{ 
  int bt = digitalRead(sw);
  if (bt==HIGH || (++ct>3 && random(100)<99)) {  // if switch not pressed,
    int ey = (random(100)<5) ? LOW : HIGH;  // blink eyes at random
    digitalWrite(le, ey);
    digitalWrite(re, ey);
    delay(100);
    if (bt==HIGH) ct = 0;
    return;
  }  // if switch pressed, flap wings and belch fire
  for (int i=48; i>=0; i-=2)
  {
    int p = i*i/50;
    lw.write(of+p);  // wings up
    rw.write(180-of-p);
    delay(20);
  } 
  digitalWrite(le, LOW);  // eyes off
  digitalWrite(re, LOW);
  for (int i=0; i<100; i++)
  {
    tone(vo, 3000-3*i, 18);  // screech
    int p = (i<50) ? i*i/50 : 100-(100-i)*(100-i)/50;
    lw.write(of+p);  // step wings down
    rw.write(180-of-p);
    if (i%5==0) {  // sequence red and yellow LEDs at random for fire
      digitalWrite(r2, lr);
      digitalWrite(y2, ly);
      lr = (random(100)<10) ? LOW : HIGH;
      ly = (random(100)<30) ? LOW : HIGH;
      digitalWrite(r1, lr);
      digitalWrite(y1, ly);
    }
    delay(20);
  } 
  lr = ly = LOW;
  digitalWrite(r1, lr);  // fire off
  digitalWrite(y1, ly);
  digitalWrite(le, HIGH);  // eyes on
  digitalWrite(re, HIGH);
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(r2, lr);  // fire off
  digitalWrite(y2, ly);
  digitalWrite(13, LOW);
  for (int i=98; i>=50; i-=2)
  {
    int p = 100-(100-i)*(100-i)/50;
    lw.write(of+p);  // wings to glide
    rw.write(180-of-p);
    delay(20);
  } 
} 

  • 25 × VEX metal Various pieces from our four teams' bins. Also 2 sprockets, 2 shafts, nuts and bolts, doubled-up collars, team plates, and 2 4' poles from last year's game, Toss-Up. Oh, and some zip-ties, of course.
  • 2 × VEX Servo Motors These work fine with Arduino Servo library. Programmed for about 100° wing motion.
  • 1 × Arduino Nano AVR '328 has plently of grunt for this. Sketch is less than 6K.
  • 6 × Joe Knows Superbright LEDs Green and white for the eyes (Go State) and red and yellow for the flames. Driven directly off Arduino DOs thru 100 ohms.
  • 1 × VEX 7.2V 3000 mAh NiMH battery One charge lasts all day!

View all 8 components

  • Final Season Update

    Claus Buchholz06/22/2016 at 14:07 0 comments

    The VEX Raptors team finished their final season with another State Championship and a last trip to Worlds. RoboRaptor accompanied them at all their tournaments and events, including Maker Faire Detroit. At their last tournament a wing servo gave out and had to be replaced. Otherwise she is in good health, heading for retirement.

  • End of Season Update

    Claus Buchholz06/27/2015 at 18:28 0 comments

    RoboRaptor has finished her first season. She has accompanied the Team to local Science Fairs, the VEX World Tournament, and the Kalamazoo Air Zoo.

    A few mods have been necessary. The flame waveguide mounting was too weak, and now a bolt and nuts secure them through drilled holes inside the mouth. The wing spars have rotated 90 degrees, for better aerodynamics. The sawtooth wing motion was too rough, and eventually loosened several bolts, so parabolic motion has been programmed (see listing).

    She is now ready for another year of service, as the Team enters their final season.

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates