Arduino Egg Timer

The dynamic duo is back again, with another eerie device guaranteed to deeply disturb. With Hallow's Eve past us, that time of the year is fast-approaching. Gone are the fake skeletons and pumpkins, replaced by a much more harrowing experience: being forced to spend time with family members during Thanksgiving. But fear not, you will not have to suffer through that story your uncle has told for the eighteenth time or uninstall the million toolbars off of your grandmothers computer again. Instead, they will all be petrified by the raw display of coding and electronic skill when you unveil the Arduino Egg Timer. The room will become increasingly tense as the timer counts down, a macabre reminder that all of our clocks are slowly ticking down. The anxiety will continue to grow until the timer reaches zero, climaxing with a song. Watch them recoil in shock, and then settle into a sense of relief as they realize how ridiculous they were to think something bad would happen. But wait, after the song finishes, they notice something. The timer has reset. It continues to count down. At first, they will seem at ease, but as they watch the timer tick down, the anxiety will come back. The timer shows 30. "What if this time is different?" they think. The timer now shows 20. "What if something bad happens this time?" 10. "Oh god, it is going to do something different this time, isn't it?" But once the timer reaches zero, it will play the song again. This endless cycle of anxiety and relief will continue until the device is powered off, ensuring that you will not have to deal with any of your extend family's problems.

Step 1: Parts List

Before you can commit the most primeval sin that is constructing this device, you must acquire the proper accouterments. All you require is listed below, but I will warn you not to lose yourself in gathering the tools.

1) An Arduino Uno

2) 2 7-Segment LED Displays (link:https://www.digikey.com/product-detail/en/inolux/INND-TS40YGCB/1830-1154-ND/7604991)

3) 2 LED Driver CD4543BE(link:https://www.digikey.com/product-detail/en/texas-instruments/CD4543BE/296-2079-5-ND/67373)

4) A buzzer (Specifically the Piezo buzzer)

5) Wires (You will honestly need a lot of wires for this. Get a mountain of wires. You might think we might be joking at this point but seriously get a ton of wires)

6) A single, low resistance resistor (We used a 560 Ohm resistor specifically)

Step 2: Setting Up the Timer and Buzzer

Circuit:

After carefully fetching the sacred tools, your next task would be to affix them to the Arduino. I would advise a great deal of care, because this task is not for the faint of heart. Primarily, the idea is to reserve eight of the digital pins for the veritable doomsday clock and one more pin for the buzzer. Normally you would need to use 8 digital pins for just one of the 7-segment LEDS. That is why we instead included 2 LED Driver CD4543BE. This takes just 4 digital pins output from the Arduino and then will create through the LED Driver CD4543BE outputs the 8 necessary inputs for the 7-segment LEDs to create the numbers for the timer. This can be seen in the schematic attached to this section. The linked parts schematic in section 1 for the LED Driver CD4543BE will show what high and low inputs for the LED Driver CD4543BE will create the necessary outputs for the different numbers displayed on the 7-segment LEDs. The last digital pin for the buzzer will create a jingle at the end by producing different frequency square waves to produce different notes and at different duration to create the necessary beats for the jingle. If you notice the 7-segment LEDs at pin 6 are attached to a resistor and then to ground. This is because without it the 7-segment LEDs will draw too much current to power and the Arduino will shut itself out so as not to fry the chip. The setup of the circuit with its many wires is probably the hardest part, and it will almost certainly drive you a little closer to insanity. However, it's only fair that there is some cost to creating the ultimate anxiety inducing device.

Step 3: Coding the Timer and the Buzzer

You have toiled through the gauntlet that is assembling the circuit, but your efforts will be entirely in vain should you reject the most devious arcane procedure imaginable, programming the Arduino. We include our methods of creating creating the system, and we have attached the code below.

Timer

In order to make the timer count down, we forced it to display each number from 60 to 00 with a one second delay between each number. This was done manually, forcing certain pins to have a high or low voltage. This will ensure that it will work precisely how we want and makes coding much easier, albeit extremely tedious.

Buzzer

For this portion, we followed the guide present in the Arduino guidebook, particularly, circuit 06. The base code is available from http://oomlout.com/a/products/ardx/circ-06/. The base melody from this is "Twinkle Twinkle Little Star." We changed this melody to play the chorus of "Jingle Bells." If you wished to change the song to another one of your choosing, you must first determine the notes and the beats of the song, then change the notes[] and beats [] portion of the code to your chosen song. Depending on the song, you may also have to adjust the tempo of the song.

The Code

Due to the length of the code, we have attached the code as a downloadable file.

Step 4: Operating and Possible Modifications

You are nearly finished with this debacle. After downloading the code and uploading it to the Arduino, all that is left is to wait. The Arduino Egg Timer will begin to count down without any further assistance. Now all you can do is wait. Wait and question your own mortality as you see the timer get closer and closer to zero. Then flinch as Jingle Bells begins to play. This song and dance will continue, looping forever, much like Ouroboros, continuing to infinity so long as it is attached to its power source, your computer. Perhaps you want a shorter or a longer countdown. Both of these can be accomplished by changing the LED part of the code. We have an indicator every 10 seconds in the code, but you could also refer to the CD4534B data sheet to see how to get a specific number displayed. Perhaps you do not appreciate Jingle Bells before Thanksgiving, you could change the song by inputting the proper notes, beats, and tempo. I would advise referencing Circuit 06 in your Arduino Uno guidebook. Whether you wish to use this device to escape the dull Thanksgiving conversations with family, to determine the proper amount of time to put something in the oven, or to remind yourself or others that we are all marching towards oblivion, this device is guaranteed to accomplish all of your time keeping/distracting needs.

Share

    Recommendations

    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Plastics Contest

      Plastics Contest
    • Optics Contest

      Optics Contest

    Discussions