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
Arduino
  • Products
  • More
Arduino
Blog Peter the Pumpkin - pt4 (ready to Share the Scare)
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Arduino 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: 14rhb
Date Created: 28 Oct 2018 7:36 PM
Views: 463
Likes: 10
Comments: 15
  • halloween 2018
  • stepper_motor
  • peterthepumpkin
  • arduino_project
  • scare
  • arduino_uno
  • sharethescare
  • animatronicsch
  • servo_motor
  • arduino
  • halloween_project
  • share the scare
Related
Recommended

Peter the Pumpkin - pt4 (ready to Share the Scare)

14rhb
14rhb
28 Oct 2018

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Welcome to the final part of my sharethescare which follows on from my previous blogs, listed below. I hope you enjoy reading about the journey I've taken to make my animatronic pumpkin head and I'll be testing it it really has the ability to Share The Scare!

  • Peter the Pumpkin
  • Peter the Pumpkin - pt2
  • Peter the Pumpkin pt3
  • Peter the Pumpkin (part 5 - final thoughts)

 

You don't have permission to edit metadata of this video.
Edit media
x
Upload Preview

[To mask the servo noise it was intended to have an audio track play as well. Currently that hasn't worked and so the cackling sounds were manually played whilst the video was recorded.]

 

The Eyes

I managed to fix the servo eyes into Peter's paper mache head. I knew straight away that it wouldn't be an easy task as nothing was symmetrical and all orientations were different. I knew that if I just glued them in there would be every chance that the eyes would not align with the holes so I made some adjustment mechanisms.

{gallery} Eyes - mounting

Movement Sensor

The PIR sensor was very easy to incorporate into my Arduino Uno sketch and uses the digitalRead function to test for one of the Uno's pins going high to start the sequence off. I used hot melt glue to fix the sensor to a plastic bracket and then fixed that to the baseboard. This allows me to adjust the azimuth that it detects my next victim trick-or-treater.

 

Lighting

I've used the WS2812 in the head to

  • (1) flash a start up sequence so I know the program is running
  • (2) to flash briefly when movement is detected
  • (3) to glow as the head moves
  • (4) to flash as the eyes move around

 

Head Movement

This was quite awkward and I didn't do any calculations on loading or early testing. When it came to combining the various parts I found that, due to Peter's weight, there was a significant angular momentum. If I moved the head rapidly as I intended this would make the drive belt jump at the end of the sequence. Although that wouldn't be an issue for a few cycles, in time it would mean that Peter's head would wind itself up with the cabling. I really need to add a microswitch to detect and wind back from a set position but didn't take that route. It I tightened the drive belt mechanism (but wedging between the NEMA motor and the bearing block) the extra tension would cause the motor to stall. Instead I opted to slow the whole sequence down somewhat to mitigate these issues.

 

I don't think there is any issue with the axial force due to Peter's mass. The bearing and low friction plate I made seem to be holding up well.

{gallery} Turntable Photos

 

Software

The software is quite scrappy at the moment and I've kept in much of the irrelevant code from testing out the various component parts. You can find my code on Github HERE should you wish to copy or branch from this code.

 

Audio

I spent all of the weekend trying to add some audio to Peter. This took many different approaches but they all seemed to fail at some point along the way . I started out my downloading some of the fantastic sound tracks from www.freesounds.org

 

Cabling

I made braided cables from each sensor or peripheral back to my Arduino Uno and breadboard. This keeps everything easier to understand and helps reduce errors when setting up.

WTV020 Module

A very long time ago I purchased three of these modules but never managed to get them to work. At the time I thought it was the non-standard file format. I used the conversion utility to adapt the files I had downloaded to a small format 4 bit used by the MTV020 module and saved them to my SD card. Even with the basic setup and using wires to trigger the module I was unable to get any of my sounds to play. Internet searches hinted strongly that the culprit is the finicky SD card - some said 2GB was OK and others limited the module's capability at 1GB......I scourered the house for an old 1GB microSD card, looking in old phones and cameras but found nothing.

 

Raspberry Pi

I was able to play an audio file (mp3) using the command line of my Raspberry Pi and the mpg123 music player - taking the audio from the RPi to my desktop speaker system. A loud and evil laughter filled the house (and that wasn't me). I then wrote a Python script that ran the mpg123 when required with my audio file....that too worked well. My next step was to trigger the Python script, which I planned to be running continuously, from the Arduino. I decided to use the serial interface between the boards. When the Arduino was ready for sound it would send an 'x' character across the serial interface. The Python script would detect this and trigger mpg123 to play my audio track.

 

That was the idea but after many attempts I was finding issues with my Arduino not accepting code uploads and eventually the RPi crashed a few too many times......with only a few nights left I have decided to stop this idea as I'm risking ruining what I've achieved so far (e.g. damaging my Uno board).

 

Usual Disaster Strikes (when nearly finished)

Just before filming Peter in action I thought I'd be clever and run the Arduino from the 5v supply on my breadboard. I'm still not sure what went wriong but the breadboard's LED illuminated to show there was 5v and after a few seconds all LEDs went out . I need to check what actually broke but luckily after 30 minutes of swapping parts and a new supply I was back in business and the Arduino was luckily still working.....phew

 

To Do By 31st October

  • Tidy the cables and power from a 12v Sealed Lead Acid Battery - this will allow portability and safety to any inquisitive youngsters.
  • Take my last photos (in case weather or over-excitement damages Peter)
  • Share the Scare (e.g. place Peter outside and let him do his stuff )

 

To Do by 3rd November

  • Make a Fritzing diagram in my final blog
  • Tidy code and reload to my Github page

 

Some Thoughts

  • The stepper motor is noisy - sounds like a steam boat
  • It would be good to be able to know the absolute head position
  • Making an animatronic from the outside-to-in is not an easy task
  • Microsoft seem to have replaced the simple Movie Maker with Photos (but it doesn't do what I want). I therefore installed Animotica from the Microsoft Store and it appears to work really well.

 

[Amended to repair the broken links, added in the final part, tagged for animatronics and sharethescare scare - this is an old project from 2018 ]

Anonymous

Top Comments

  • 14rhb
    14rhb over 3 years ago in reply to shabaz +4

    I found another use for screw terminal blocks whilst getting Peter ready to run off a Sealed Lead Acid battery...one of the sizes takes a 4mm banana plug very well. Actually so well that they don't need…

  • three-phase
    three-phase over 3 years ago +3

    Good update on your project. Good luck with getting it finalised.

     

    Kind regards.

  • 14rhb
    14rhb over 3 years ago +3

    Many thanks for the kind words three-phase genebren and fmilburn

     

    It might be reckless with just two days to go, but I'm going to add a microswitch after all. Currently if the power fails mid cycle the head…

Parents
  • shabaz
    shabaz over 3 years ago

    Hi Rod,

     

    This is looking really nice!!

    It's also interesting to see how you designed it for fine-trimming the eye positions, and the bearing for the scary head movement!! Steppers are awesome for halloween with the stop-start motions : )

    It is great how it all looks and functions!!

    • Cancel
    • Up +3 Down
    • Reply
    • More
    • Cancel
  • 14rhb
    14rhb over 3 years ago in reply to shabaz

    Thanks for your kind words Shabaz.

     

    I really wanted to make each eye mechanism on a ball joint (the clamp around which could be tightened) but I didn't think about it until the weekend and then found I didn't have anything suitable. A plastic marble was the kind of size I was looking for and I planned to drill it and glue in some M6 threaded-rod. The side plates would have been from thin aluminium.

     

    Something like this:

    It would have given me even more adjustment to ensure each eye aligned, didn't foul the head structure and rotated in the desired plane.

     

    Rod

    • Cancel
    • Up +3 Down
    • Reply
    • More
    • Cancel
Comment
  • 14rhb
    14rhb over 3 years ago in reply to shabaz

    Thanks for your kind words Shabaz.

     

    I really wanted to make each eye mechanism on a ball joint (the clamp around which could be tightened) but I didn't think about it until the weekend and then found I didn't have anything suitable. A plastic marble was the kind of size I was looking for and I planned to drill it and glue in some M6 threaded-rod. The side plates would have been from thin aluminium.

     

    Something like this:

    It would have given me even more adjustment to ensure each eye aligned, didn't foul the head structure and rotated in the desired plane.

     

    Rod

    • Cancel
    • Up +3 Down
    • Reply
    • More
    • Cancel
Children
  • shabaz
    shabaz over 3 years ago in reply to 14rhb

    Ah, I see. These ball joints could be hard to find, especially in a small size maybe... I think the method you used (the inside of screw terminal blocks) and steel rod/wire is better.

    I wonder how toy RC car/plane modelers do it nowadays.. since they need adjustment on linkages too.

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • 14rhb
    14rhb over 3 years ago in reply to shabaz

    I found another use for screw terminal blocks whilst getting Peter ready to run off a Sealed Lead Acid battery...one of the sizes takes a 4mm banana plug very well. Actually so well that they don't need the screw. The other side can be taken off to a wire. There is little information on the 3-way piece I managed to find in my toolbox apart from the number 6 but they look meatier than 6A. Measuring the hole diameter I get 3.7mm which is an area of 10.7mm2. The 16 A terminal states it has a capacity of 10mm2....so this must be 16A terminal block.

     

    Admittedly, not to be used with high voltages (>50v) or where there is a serious risk of high current shorting/damage to expensive components.

    [Darkness is now decending here on Halloween and all is ready and primed to go ! ]

     

    Rod

    • Cancel
    • Up +4 Down
    • Reply
    • More
    • Cancel
  • shabaz
    shabaz over 3 years ago in reply to 14rhb

    That's very cool.. could be handy when doing car audio troubleshooting too, where an exposed alligator clip may accidentally short. Screw terminal blocks are very handy! : )

    I recall trying to make a radio with them once.. some book suggested using them for all the junctions (a lot easier with the old germanium transistors which had 2-inch long wires).

    • Cancel
    • Up +3 Down
    • Reply
    • More
    • Cancel
  • mp2100
    mp2100 over 3 years ago in reply to 14rhb

    Nice. I have a couple of those terminals. I never thought to try them with banana plugs. This could be very handy for quick connections when I’m brainstorming a project. I need to make a note of this.  .  .

    • Cancel
    • Up +2 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