Skip to main content

Halloween with Arduino


Arduino Halloween from Duxbury Free Library on Vimeo.


It wasn't easy but we were able to accomplish our 2 Halloween projects: an LED pumpkin and a talking motion sensor skull.  I'll go over each and things that we learned (aka what they sometimes to forget to tell you in the directions). Special thanks to Kevin Osborn for coming down to provide his expertise for the skull.  Also worth noting, Lynda.com also has great tutorials for beginner Arduino. This subscription is offered free of charge in our library and also if you are a librarian through the MBLC.

We started with the hardest one first, THE TALKING SKULL (Advanced)
*If you are just starting out I suggest doing the entire SIK CODE GUIDE book (comes with the Sparkfun Inventor's Kit) and if you're not ready to throw it out the window then try the Pumpkin*

Items required:
PIR Motion Sensor   $9.95
Sparkfun Inventors Kit  $99.95
Sparkfun MP3 Shield  $39.95
microsd card and micro SD reader (to put mp3s on it from computer) $18.99
Soldering gun
skull  $8.99
9v battery and 9V Barrel Jack Adapter (to run the program without the computer) $2.95
speakers or headphones
mp3 sound
PATIENCE
GOOD GLASSES/MAGNIFYING GLASS

MP3 SHIELD


VIEW OF MP3 SHIELD. THIS SITS DIRECTLY ON TOP OF THE ARDUINO (with 9V Jack of Arduino and speaker jack of the shield aligned)


Wire Connections:
BLUE WIRE-5V ON SHIELD TO + POSITIVE ON BREADBOARD

LIGHT BLUE (some might call it green)-GROUND ON SHIELD TO -GROUND ON BREADBOARD

PR SENSOR WHITE TO ANALOG 0 ON SHIELD  (All analog outputs are free)

PR SENSOR BLACK TO GROUND ON BREADBOARD

PR SENSOR RED TO + POSITIVE ON BREADBOARD




AV SERVO WHITE TO DIGITAL PIN 10 ON SHIELD (This pin isn't being used by the MP3 shield but some are so you have to see the Sparkfun online tutorial if you want to hook up a button or LED)

AV SERVO RED TO + ON BREADBOARD

AV SERVO BLACK TO GROUND ON BREADBOARD

PR SENSOR WIRE HOOKUP
Here's a dropbox link to our code: Hallowscream with 2 mp3s to try. Kevin O. wrote this using a modified code of his INSTANT PARTY.

It also comes with a button and LED coding that we didn't use. This way you would have to press the button before you activated the motion sensor.

If you hook this up the same way we did, and use the code. It will work. Make sure to name your mp3 tracks track001.mp3, track002.mp3 and so on.

I recorded my Happy Halloween in Garageband for MAC (use Audacity for PC) but there are plenty of free sites to download spooky sounds.


Things we learned:

You have to solder the header pins onto the mp3 shield. This is a one time thing but it is a must for the connections to work properly. Be careful when putting the headers in because a pin could get bent easily.

The PR Sensor's wires don't match standard protocol. red= positive White=ground, black= input. We changed the wire colors during hookup so it matched standard red= +, black= ground, white=input.

It is really hard to program multiple outputs (ie: servo motor, motion sensor, LEDs) and getting them all to work in relation to each other without a solid knowledge of arduino coding. It's like a deep rabbit hole where many things can go wrong.  Also not every code is equal, some people write great side notes in their code so it's easy to change things up, some don't.



LED PUMPKIN (EASIER)

Items required:
Sparkfun inventor's kit $99.95
SIK Code Guide Project 4 (included in kit)
Pumpkin $1.00
drill
large LEDs
9v battery and 9V Barrel Jack Adapter (to run the program without the computer) $2.95
 extra wire
electrical tape

Rather than hooking up the LEDs directly to the breadboard (see traditional instructions below where yellow circles indicate the LED placement)
ORIGINAL DIAGRAM


I cut some wires and stripped the rubber off inserting one end of the positive (RED) and negative (BLACK) wire to match the yellow positive and negative circles indicated {ONE WIRE C3 (+RED), C4(-BLACK) to PUMPKIN LED, NEXT WIRE C5 (+) C6 (-) to PUMPKIN LED and so on} . The other side of the wire was brought to the pumpkin and connected to the the positive and negative leads of the LEDs (remember the positive lead on the LED is longer than the negative) Think of it like an extension cord so the LEDs could be moved to the pumpkin and still powered by the breadboard.

INSIDE THE PUMPKIN


This project will allow up to 8 LEDs. I didn't need to put all the resistors and wires in place since I only used 5 LEDs but it was nice to have the option to pick and choose where to put the extension wires on the breadboard. It tended to get hairy in there. If there is no wire, nothing lights and no code needs to be changed. (The less code changing THE BETTER).

Just remember where you put your extension wires affects the order of the lights. C3's Wire being first LED in the order to blink.

Highlighted Yellow was wire connections rather than LEDs. White circles indicated placement on breadboard. 





BOARD HOOKUPS

The Arduino has been the hardest thing we have done yet in STEM. It's important to truly understand the projects in the book that comes with the Sparkfun Inventor's Kit (SIK CODE GUIDE) and experiment with code that gives copious notes on each part before trying an off book project. 

Comments

  1. You are the BOMB.
    I hope you reailze how empowering this is....!

    ReplyDelete

Post a Comment

Thanks for commenting!

Popular posts from this blog

Makey Makey Floor Piano

If you are looking for a short, low cost project to do with your Makey Makeys, this one is sure to be a big hit. It's a great small group project as well as an eye catching interactive display in some noisy area of the library (as long as you can keep library staff sane). This was made as part of our Tinkering Tuesdays lab. We had low tech cardboard construction, 3D printing, and the Makey floor piano going on simultaneously. It took us about 1.5 hours with 3 teens helping. Materials List: Aluminum Tape $12 Duct Tape (any color) $2 Makey Makey $50 CAT cable (there's one lying around your library trust me) or just use regular wire Wire strippers 12 x 12 x 1.5 in puzzle piece exercise mat $12 white 6 x 8 tarp (but could be smaller) $12 Computer with internet running Scratch This video shows a demonstration with step by step picture instructions and a more detailed video explanation. I got the idea from two sites that I used for consult: Ed Tech Junkies & Mak...

Our most popular makerspace/STEM/Library of Things

As of April 2018, we did a kit circulation report.  We had 106 kits which have circulated 1,047 times since it's inception in 2015.  Here is the top 10 list of most circulated. These include hobby kits, puzzles, cake pans, instruments, science robots/STEM, and American Girl dolls. The ukulele kits (we have one soprano and one concert kit) have been around the longest and have circulated 106 times total.  Just remember someone should change the strings yearly and definitely include a tuner (we like the snark) as new strings on a uke take a while to break in. Surprisingly our meditation toolbox comes in second with 51 checkouts.  It is just some CDs and a DVD.  This one has also been around since the inception of our kits. Next up is our virtual reality headset toolbox.  It is a Homido Virtual Reality headset. If that is too pricey, I recommend Google Cardboard.  Our sewing machine comes in 5th.  Knitting is a great idea fo...

3D Printing Signs for the Library Collection

Last weekend, I went to the annual Tee-Off mini golf event at the Brookline Public Library.  As a first time visitor, I was mini-golfing with my phone at the ready. Special thanks to the AMAZING librarian rockstar Robin Brenner for so many great ideas. It truly is worth a visit just to see her teen room. Here are a few 3D printing/marketing ideas to takeaway: Having a  3D printer filtration cart would be wonderful in our library.  Look at the price if you dare.  Right now I have to go downstairs to retrieve prints because we are concerned about the fumes and little hands touching anything while the printer is on.  I have a video camera set up downstairs using an iPad 2 and the free app called Presence  for monitoring but sometimes I do forget to keep checking the presence website while I'm on the desk especially since it makes this annoying beeping sound to say, "Are you still watching?!"..As the sign reveals on the cart, the propensity to want to lean or...