The Music Clock Project: Five Problems & Some Solutions
In my Medium article, Music Clock: Making Melody Through Time, I went over how the clock worked and how I built it. Here are the problems I encountered during the process that I was not able to fit into that article.
Problems Encountered and (Some) Overcome
- When the quartz clock movement is open it is very hard to find a way to put it down with everything spilling out.
The gears inside the movement are held inside by the back of the case. Since the bar that goes through the clock face sticks out the front, if the movement is open, there is no good way to put it down without the bar pushing all the gears out.
Luckily, someone online suggested using a shot glass for this purpose and it worked great!
2. When I was trying to detect a signal from the clock I had a lot of issues.
For using the clock as input to the Arduino, I was going to connect the wires to the digital pins. Andy Muehlhausen recommended using analog pins since I was not sure what amount of output I would get out of the mechanism. If the signal was too low to trigger the digital pins, it would be harder to debug than having a value to work with.
So I used the analog pins with a 10K ohm resistor, but did not get any signal. I kept decreasing the amount of ohms, until I was not using one at all, and I still got nothing! Eventually I realized I had a 1 second delay in the code which was making it not catch the signal from the clock movement. So I took out the delay and then made it only output values higher than zero (when an analog pin is not getting input it can spit out crazy values). And it worked! The signals were pretty low, in the 1–3 range, which is low for an analog range of 1–1023.! But since sniffing AC was somewhat unpredictable, I was happy it worked at all!
3. My first attempt at decoupage was not great.
Decoupage is a craft activity that involved gluing paper to a material such as wood. It turns out it is important to paint the wood first so that you will not see the wood through the paper. Also, for decoupage paper with continuity to its pattern, using the method of tearing up the decoupage paper first does not look great. I am very glad I tried again!
4. You don’t need a voltage regulator to use a battery with an Arduino.
At some point in my research process, I learned about voltage regulators from an Arduino tutorial video. I got it into my head that I must use one in order to use a 9-volt battery with the Arduino.
Wrong. It turns out you can connect a 9V battery directly to the Arduino by connecting the red wire from the battery to Vin, and the black wire to GND (ground) on the board. Easy peasy! Vin can handle 7–12 volts as input because it uses an internal regulator on the board to properly supply the voltage the board needs. If only I had known this going in…
I made my own voltage regulator setup at first, using a 7805 TO-220 linear regulator and two capacitors. I kept getting 4.95 volts instead of 5 volts.
In fear of under-powering the board I looked online for answers and voila, it was simple all along. Now I know an easier way to use voltage other than 3.3V or 5V on Arduino! Though I still don’t know why I couldn’t get 5 volts on my regulator. If anyone knows, leave a note in the comments!
For a deep dive on powering Arduino boards, check out this ultimate power guide.
5. The clock hands get stuck sometimes.
Not sure if it is because of the angle of the display, but if I leave the clock alone for a while, I usually come back to it with the minute and hour hands caught on each other. The second hand keeps on truckin’ though! When I have some time I will look into a better way to display the clock.
BONUS: Numbers or no numbers? The ultimate showdown!
While making the clock, I asked my Facebook friends if I should add numbers to the clock or not.
The debate got heated! Names were called! Friends became enemies!
What do you think?