element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Halloween - Projects and Videos
  • Challenges & Projects
  • More
Halloween - Projects and Videos
Blog Flying Gamera Hat w/ flame jets & screech using Arduino for turntable & audio control
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Halloween - Projects and Videos requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: robogary
  • Date Created: 10 Oct 2021 3:53 PM Date Created
  • Views 595 views
  • Likes 1 like
  • Comments 4 comments
  • nightmareone14street
Related
Recommended

Flying Gamera Hat w/ flame jets & screech using Arduino for turntable & audio control

robogary
robogary
10 Oct 2021

the demo video:

https://youtu.be/MbkvrJ_av2w

 

We all know Gamera, kaiju guardian of the universe and protector of children.

This Halloween inspired hat emulates Gamera flying, spinning on a turntable, radioactive flame jets firing from the shell's arm and leg holes.

 

A magnet inside Gamera is read by a Hall effect sensor.

As the magnet passes the sensor, the Arduino is counting rotations.

On a random # of rotations, Gamera will pause spinning with his head facing forward (home position) and roar.

After the roar, it will return to the spinning condition.

 

 

  • Gamera's head is 3D printed.

  • The body sides are cardboard with a foam covering, mounted on a plastic sheet. The sheet has holes in the center for bolting down Gamera's body to the gearmotor coupling.
  • The hat has separate power switches for the turntable, and another for Gamera's flames.
  • The turntable also has a hidden but easily accessible N.O. pushbutton to start/stop turntable rotation.
  • Gamera's roar is saved to a ISD1820PY board. The 1820 has a speaker output, so I used a hi bandwith balun as an audio isolation transformer to the LM386 audio amp since the amplifier module is expecting a DAC input grounded on one side.
  • Since the turntable doesnt reverse direction, rather than connect an H bridge to the Arduino, a single MOSFET is used,

which still can provide PWM speed control if desired.

  • Code and schematics attached

 

 

 

 

/*

  GameraArduinoTurntable.ino

debugging code is left in, but commented out

*/

 

 

int HomeSwitch=LOW;

int HomeSwitchOS = LOW;

int HomeSwitchLastScan=LOW; 

int TurntableMotorON = LOW;

int TurntablePausePB = HIGH;

int TurntablePausePBLastScan = HIGH; 

int HomeSwitchCnts =0;

int HomeSwitchCntsTarget =0; // # of counts to accumulate before autopause the turntable

int AutoPause= LOW;

 

 

void setup() {

  //start serial connection

// Serial.begin(9600);

  //configure pin 2 as an input and enable the internal pull-up resistor

  pinMode(2, INPUT_PULLUP); //Pause spin pushbutton

  pinMode(4, INPUT); //Home position hall ellect switch

  pinMode(8, OUTPUT); // play audio output

  pinMode(11, OUTPUT); // turntable motor ON

  pinMode(13, OUTPUT);

  randomSeed(analogRead(0));

 

 

}

 

 

void loop() {

  //read the pushbutton value into a variable

  TurntablePausePB = digitalRead(2);  // HIGH is PB not pressed

  HomeSwitch = digitalRead(4); // HIGH is home switch active

 

 

 

 

//  THIS IS THE TURNTABLE AUTOPAUSE CODE BASED ON A RANDOM number of spins  

 

  if ((HomeSwitch == HIGH) && (HomeSwitchLastScan== LOW))

    {

      HomeSwitchOS == HIGH;

      HomeSwitchCnts = HomeSwitchCnts + 1;

     }

    else

    {

      (HomeSwitchOS == LOW);    

    }

 

 

   // if (HomeSwitchOS==HIGH)

   //  { HomeSwitchCnts = HomeSwitchCnts + 1;} // counting Homeswitch passes

   delay (10); // catch up

  // Serial.print(" HomeSwitch == ");

  // Serial.print(HomeSwitch);

//  Serial.println ();   

  // Serial.print(" HomeSwitchLastScan ");

//   Serial.print(HomeSwitchLastScan);

//  Serial.println ();   

//  Serial.print(" HomeSwitchCnts = ");

//  Serial.print(HomeSwitchCnts);

//   Serial.println ();

 

 

   HomeSwitchCntsTarget=random(5,40);

   if (HomeSwitchCntsTarget<HomeSwitchCnts)

    {  AutoPause=HIGH; }

    else { AutoPause=LOW;}

//   Serial.print(" HomeSwitchCntsTarget = ");

//  Serial.print(HomeSwitchCntsTarget);

//   Serial.println ();

  delay (10);

//  DONT FORGET TO ADD CODE TO RESET HOMESWITCH CONTER , add code to stop on counts

 

 

// TURNTABLE CONTROL CODE ///

           

            if ((TurntablePausePB == HIGH) && (TurntablePausePBLastScan==LOW)&& (TurntableMotorON == LOW)) //means PB was pressed, run the turntable motor

              { TurntableMotorON = HIGH;

                TurntablePausePBLastScan=TurntablePausePB;

                delay (100);     // debounce

              }

         

            if ((TurntablePausePB == HIGH) && (TurntablePausePBLastScan==LOW)&& (TurntableMotorON == HIGH)) //means PB was pressed while running, stop the turntable motor

              { TurntableMotorON = LOW;

             // TurntablePausePBLastScan=TurntablePausePB;

                delay (100);     //debounce

              }

 

 

            digitalWrite(8,AutoPause); // turn on output to trigger soundplayer

            digitalWrite (13,AutoPause);

             

            if ((TurntableMotorON == HIGH)&&(AutoPause==LOW))

              {

              digitalWrite(11, HIGH);

               }

            else {  digitalWrite(11, LOW); // pause turntable for 10 secs, play audio , zero home switch counts

                   if (AutoPause==HIGH)

                    { delay (7000);

                    HomeSwitchCnts=0;

                    AutoPause=LOW; }

                }

 

              //Serial.print(" TurntablePausePB = ");

   //Serial.print(TurntablePausePB);

  // Serial.println ();

             //Serial.print(" TurntablePausePBLastScan = ");

  // Serial.print(TurntablePausePBLastScan);

  // Serial.println ();

//        Serial.print(" TurntableMotorON = ");

   //Serial.print(TurntableMotorON);

  // Serial.println ();

//      Serial.print("AutoPause = ");

//  Serial.print(AutoPause);

//  Serial.println ();

 

   // digitalWrite (13,TurntableMotorON);

  TurntablePausePBLastScan=TurntablePausePB;

  HomeSwitchLastScan=HomeSwitch; // update last scan status

 

}

 

  

Here are some of the progress pix while building the Gamera hat and testing HW & SW.

I really really appreciated using the nice test equipment won in previous E14 project competitions.  

 

Anonymous
  • javagoza
    javagoza 8 months ago

    Great project! You always make me smile! Thanks

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • robogary
    robogary 8 months ago in reply to ralphjy

    Shhhh...a secret. the base is a bicycle helmet with chin straps buckled. It will stay on the head. Gamera does have enough bolts to stay on the motor coupling if turned sideways or upside down, but its really intended to rotate and rest on the lazy susan bearings.

    PS The only rain we get in space is a meteor shower. :-)

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • kmikemoo
    kmikemoo 8 months ago

    Awesome project!  Impressive choice in bumping up to mains voltage for the lights.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • ralphjy
    ralphjy 8 months ago

    Pretty cool!   I'm surprised you can walk around with that on your head.  Don't get caught out in the rain .

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube