1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Welcome to Lake Valor!
    Catch, train, and evolve Pokémon while you explore our community. Make friends, and grow your collection.

    Login or Sign Up

DIY Legend of Zelda Treasure Box

Discussion in 'The Lounge' started by ID Zeta, Dec 12, 2017.

  1. ID Zeta

    ID Zeta Resident Physicist

    Solaire
    (Larvesta)
    Level 18
    Joined:
    Jan 11, 2013
    Posts:
    769
    PokéPoints:
    ₽3,937.7
    It's apparent that Lake Valor is home to a fair amount of Legend of Zelda fans. With that in mind, I figured I'd make a post about a prop I built as the final project for my electronics class. I posted several brief updates about this over the past month or so, but for those of you who haven't seen them, I chose to make a treasure box inspired by the Legend of Zelda. More specifically, I built a light-sensitive circuit that plays the iconic jingle that you hear when Link opens a treasure chest.

    This post assumes you have some basic knowledge of electronics and circuitry. If you do, this post is a guide of sorts on how to build this circuit. Without further ado, let's get into it!

    You're going to need a few things to build this treasure box, with the box itself being the most obvious thing to start with. I put my circuit behind a false panel on the lid, but you could put it under a false panel on the bottom of the box. If you put int in the lid, you'll need the lid of the box to be deep enough to conceal most of the circuit behind the false panel.

    For the circuit itself, you'll need the following things:
    -WTV020-SD sound module: the heart of the circuit
    -1GB micro-SD card: holds the sound file that plays. Some sources say a 2GB card works, but mine works with a 1GB card
    -Light-dependent resistor (LDR): cadmium sulfide LDRs are pretty common and cheap
    -5.1kΩ resistor: I'll explain why you need this later on
    -LEDs: you only need 1, but I used 2 in mine
    -8 watt speaker: you want to actually hear the sound, right?
    -3 AAA (1.5V) batteries with battery pack: provides the juice
    -Soldering board: a convenient platform to arrange the components on
    -Solder and soldering iron: to connect everything together in the circuit
    The diagram for this circuit looks like this. If you understand electronics and circuit diagrams, this should be pretty straight-forward.
    [​IMG]
    The sound module has 16 pins on it, each of which has a specific function (except the ones labeled "NC", which have no function). Of these pins, we only need the ones for the power source, the ground, the speaker, the Play pin, and the BUSY pin. The module needs 3.3V, but can function with as little as 2.6V. During testing, I found that using 4.5V was fine, even though that's over the stated maximum voltage rating. You could add a resistor before the LED to lower the voltage down closer to 3.3V if you wanted.

    The BUSY pin (pin 15 on the diagram) acts like a non-audio output: when the module is playing something, the output of that pin is high. You can power an LED or 2 off of that output, which is what I chose to do. The first LED is necessary; when I tested the circuit without it, it don't work. It seems like the BUSY pin needs some amount of current going into it. If wired correctly, the second LED won't be lit when the circuit isn't playing anything. When the sound plays, the first LED turns off and the second turns on.

    One thing the datasheet for the sound module doesn't say is that you need to solder together a pair of contacts on the top of the module to allow it to draw any current at all. The picture below shows where those contacts are and how it should look after soldering. (Apologies for the potato-quality picture on the left)
    [​IMG]
    The sound module can only read files in .AD4 format. The datasheet for the module (and several other sources) claim it can read .WAV files, but during testing, mine couldn't. This handy tutorial can show you how to convert .MP3 or .WAV files into .AD4 format. You'll need to name the file "0000.ad4" for it to be read.

    This circuit is light-sensitive because of the LDR. When light shines on it, its resistance drops. During testing, I found that the module played sound when the resistance between pin 9 (the Play pin) and ground was below around 8kΩ. The LDR alone has too low of a resistance (when the box is closed, it should have around 6.5kΩ of resistance), so I needed to add another resistor in series with it to boost the total resistance above that 8kΩ mark. A 5.1kΩ resistor was just the thing I needed.

    To test this circuit out, I highly suggest using a solderless breadboard. It allows you to essentially plug-and-play without having to worry about poor contacts from bad soldering. After soldering the circuit together, mine looked something like this:
    upload_2017-12-12_19-10-21.jpg
    The speaker is upside-down because that's how its leads were oriented. After testing to make sure it still works, you can move onto putting it into the box. I used scrap cardboard for the false panel on the lid. The lid on the box I used as deep enough that 2 layers of cardboard (one behind and one in front of the circuit) was perfect. You'll need to cut holes in the cardboard for the speaker, the LDR, and the power switch for the battery pack. I cut the hole for the speaker at an angle so it could sit more-or-less flush with the cardboard. I taped the back of the speaker to the cardboard, and I also taped the battery pack to the back layer of cardboard so it wouldn't move around. I cut my cardboard pieces so they fit snugly into the lid without the need for anything else to hold them in place.

    I will mention one imperfection with the circuit: once it starts playing, it won't stop unless you switch the battery pack off. I have an idea why this is, but I don't really know how to stop it.
    And voila! That's the project. I don't have a picture of the circuit in the box at the moment, but when I get one, I'll add it in. Adding a video of the box working might be tricky.
    If you have any questions at all, feel free to ask them. I'll be happy to answer them as best I can!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. VictoryStar34

    SS Egg #1
    (Lugia Egg)
    Level 22
    Joined:
    Mar 11, 2017
    Posts:
    577
    PokéPoints:
    ₽1,103.5
    Mewnium Z  ★★★★★Choice Specs ★★★★★Legendary Triforce ★★Deep Sea Scale ★★★Rage Candy Bar ★★★
    Oh damn, that's pretty impressive. I applaud you! :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page