With the mechanical end of things resolved I had some time to play with the electronics and software. The circuit is done and in the process of being transfered to a thinner prototyping board. A lot of careful planning is needed here because the 7-segment display takes up a lot of room. Other than that about the trickiest thing is the Red/Green LED. Maybe I'll post a schematic when it's all done.
As for the code, it does its job; it winds a watch as many times as you like. However, the current control structure for winding is imprecise. I'm not using one of the ATMEGA328 timers or even an external one. I simply use a for loop that decrements the winds and controls the servo per a delay calculated as the time it takes for the servo to complete one revolution. However, each cycle propagates a minute error when switching the servo from go (1400ms) to stop (1500ms). Not the end of the world but I'm going to synchronize the servo and display as well as the Arduino allows. Here's what it does so far:
High-pitched "PIZZAAAA" sound effect courtesy of Shane
Cost Update: $70.....
No comments:
Post a Comment