Project showcase
Super Mario Odyssey IRL

Super Mario Odyssey IRL © GPL3+

Isn't it cool when Mario throws Cappy in Odyssey? Well, I made it in real life.

  • 3 views
  • 0 comments
  • 0 respects

Components and supplies

Ard nano
Arduino Nano R3
Any arduino is good
×1
Tens70
9V battery (generic)
Better if rechargeable
×1
61vhxtmzbyl
AA Batteries
Better if rechargeables
×2
52y4441 40
DC Motor, 12 V
×1
Keystone 233 image 75px
9V Battery Clip
×1
16f1092 40
Battery Holder, AA x 2
×1
11769 06
SparkFun RedBot Sensor - Line Follower
×1
L298n Motor Driver
It's a very common component
×1
E switch eg1218 image 75px
Slide Switch
×1
Wheels for the motors
If you dont have them, you can probably find a replacement.
×1

Necessary tools and machines

3d pen (optional)
This is my method for adding stuff, but you can use wathever you want

Apps and online services

About this project

First of all, sorry for possible texting errors (Im not a native english speaker)

How it strarted

In this project, I proposed myself to create Cappy, from Super Mario Odyssey. I thought it would be a simple and fun first individual project. My principle was that if I attached a string to a motor and at the other end to a cap, when I strarted the motor the cap would spin around it. So, if I managed to put a contraption like that at the top of my head, the cap would spin around me, just like in the game.

After various tests, this is the end result (For more videos be sure to check out my Instagram as @alguienmuyrobotico):

How it works

It ended up having two motors, one responsible for the spinning part and the other one for the pulley. In conjunction, this two allow me to do both the sipinning attack and the normal attack. To detect when the cap is on my head and when not, I used an IR light sensor with a white superface in the bottom of the cap (this aproach would later pressent some issues). I started prototyping with an Arduino UNO board, but then changed it for an Arduino Nano. I also initially used a 9v battery, that I ended up upgrading later too. To mount it all on my head I purchased a helmet and snapped off the inner part from the plastic shell (That part would also turn out to be very usefull).

The spinning attack

In this attack the cap starts spinning around you, then the pulley extends so the cap gets further away from you, then it retracts and finally the other motor stops spinning. This was the principal feature of this contraption, and ended up being also the most complicated. My first problem emerged as soon as I attached the cap to the string; the motor, probably too small for this task, couldn't spinn a real cap or even a paper one, so I added two more batteries (AA, 1.2v each), this time really pushing the 6v limit of the motors. I also replaced the Arduino UNO for an Arduino Nano to reduce the weight a little bit and to make space for the extra batteries. After all of that and tons of testing it finally worked, and I moved on to the next feature.

The normal attack

This attack starts with the pulley fully extended, after a delay it moves one motor a litte bit as a signal for you to throw the cap, and then it retracts it at maximum speed. This part was considerably easier than the previous one, an went with almost no cassualties. The principal thing was to get the timings just right, but nothing else. I also by this point made a nicer looking cap with diary paper and glue, using the shell of the helmet as a mold and replaced the whool cord for a sintetic one.

The final program

To finish up this project, I programed sequence whit both attacks triggered by the IR light sensor (a simple 4 state state machine). So the sequence goes like this:

  • Extends pulley
  • Waits until you put the cap in your head
  • Waits until you take off the cap
  • Does normal attack
  • Waits until you put the cap in your head
  • Waits until you take off the cap
  • Does spinning attack
  • Starts all over again

There is an issue with the sensor and it´s that it detects different values depending on the light level of the ambient, so the program and the bottom of the cap must be changed depending if you are indoors or outdoors. I didn´t solve this problem, by this point I just wanted to finish it.

Hope that you finded this instresting, thanks for reading.

Code

Main codeC/C++
This is the entire code, if you want to make this project by yourself.
//Defines the pin variables for the motors
int posSpinn = 6;
int negSpinn = 5;
int negPulley = 10;
int posPulley = 9;

//Spinn expansion and retraction speed parameters
int expSpeed = 20;
int retSpeed = 110;

//Defines state machine variable
int flag = 0;

//Defines the light sensor variable
int sensor;

void setup() {
  //Motor pin variables in OUTPUT mode
  pinMode(negSpinn,OUTPUT);
  pinMode(posSpinn,OUTPUT);
  pinMode(negPulley,OUTPUT);
  pinMode(posPulley,OUTPUT);

  //Initial pulley extenction
      delay(1500);
      analogWrite(negPulley,60);
      delay(3800);
      analogWrite(negPulley,0);
}

void loop() {
  //Reads the sensor value and stores it in the "sensor" variable
  sensor = analogRead(A0);

  //First state
  if (flag == 0){
    if (sensor > 500){
      //Next state
      flag = 1;
    }
  }

  //Second state
  else if (flag == 1){
    if (sensor < 500){
      //Throwing signal
      delay(3000);
      analogWrite(posPulley,150);
      delay(100);
      analogWrite(posPulley,0);

      //Pulley retraction
      delay(400);
      digitalWrite(posPulley,1);
      delay(1500);
      digitalWrite(posPulley,0);

      //Next state
      flag = 2;
    }
  }

  //Third state
  else if (flag == 2){
    if (sensor > 500){

      //Next state
      flag = 3;
      }
    }
    
  //Fourth state
  else if (flag == 3){
    if (sensor < 500){
      //Starts spinning
      delay(2000);
       digitalWrite(posSpinn,0);
      analogWrite(negSpinn, 220);
      delay(1000);
      digitalWrite(negSpinn,1);
      delay(1000);

      //Spinn expansion
      digitalWrite(posPulley,0);
      analogWrite(negPulley,60);
      delay(100);
      analogWrite(negPulley,expSpeed);
      delay(3000);
      digitalWrite(negPulley,0);
      delay(1600);

      //Spinn retraction
      analogWrite(posPulley,retSpeed);
      delay(2000);

      //Spinn finalization
      digitalWrite(posPulley, 0);
      digitalWrite(negSpinn,0);

      //pulley extenction
      delay(1500);
      analogWrite(negPulley,60);
      delay(3800);
      analogWrite(negPulley,0);
      
      //Next state
      flag = 0;
    }   
  }
  delay(4000);

}

Schematics

Circuit layout
This is the entire circuit. If you have the specified driver you wont have to do all the mess with two drivers. You might have to make some changes if you use 1.5v batteries instead of 1.2v, couse the driver only supports up to 12v before you have to power it with aditional 5v for the inner circuitry, but you can probably figure that out.
Super mario odyssey irl circuit layout hhgywdpure

Comments

Similar projects you might like

How to Make Arduino Sumo Robot

Project tutorial by AhmedAzouz

  • 14,394 views
  • 1 comment
  • 24 respects

Super simple Remote Control

Project showcase by Ruben Zilzer

  • 2,561 views
  • 0 comments
  • 5 respects

Thirst Alert Plant Alarm

Project tutorial by Patchr

  • 5,595 views
  • 3 comments
  • 42 respects

Hack Skateboard for Virtual Reality with Arduino

Project showcase by Matthew Hallberg

  • 5,186 views
  • 2 comments
  • 26 respects

The Cheapest ESP8266 Programmer!

Project tutorial by Gustavo Reynaga

  • 4,636 views
  • 0 comments
  • 15 respects
Add projectSign up / Login