We finally put together the acrylic prototype. There are a couple photos below, and one of the glue being dried.
Assembly for this one was a lot tougher than the cardboard one. It all started with the models being laser cut out of acrylic. Mentioned on one of the posts below, a piece of acrylic cracked during assembly. Ended up using a makeshift soldering iron (Pliers and a nail) and a lighter to fix the problem. After that, it was discovered the sides did not snap together as nicely as with the cardboard. One side worked perfectly, but the other side needed something to hold it. The solution in this case was to use glue to hold the tab in place. One of the pictures below shows a hairdryer being used to speed up the process. Once the sides were put together, the servo had to be put in place. Since we couldn't mount it under the platform as we did for the cardboard, it was mounted on top. There was no good way to mount it, and it ended up being taped into place. It's a little ugly, but works. The rubber band was fed through the hole cut out in the front corners and tied into place. The band is held by multiple knots on each side, to prevent it form slipping back through. The band is stretched back around the bottom of the servo. When triggered by the code, the servo will turn forward, releasing the band and shooting a projectile.
During testing, it was found that the best projectile, that we could find at least, was a guitar pick. It offered the best consistency and distance, while not being large enough to potentially harm the sleeping person. Among other objects tested were rubber band balls, cardboard tubes, pens, bottle caps, and a few others. Overall, the design worked well enough.
Below is the final code used. It operates the servo and the LCD. It's the same servo code as before, but modified in order to show the time for the cycle. In all our testing we used fifteen seconds, but as an actual alarm clock it would be much longer. You can change the display with the " lcd.print("Fifteen Second"); // Fifteen Charachter Max" under the void setup. Note: The display can only do up to fifteen characters.
#include <Servo.h>
#include <LiquidCrystal.h>
Servo servo1; // servo control object
int led = 9;
int fiveseconds = 5000;
int fifteenseconds = 15000;
int thirtyseconds = 30000;
int oneminute = 60000;
int tenminutes = 600000;
int thirtyminutes = 1800000;
int onehour = 3600000;
int onehourthirtyminutes = 5400000;
int twohour = 7200000;
int twohourthirtyminutes = 9000000;
int threehours = 1800000000;
int threehourthirtyminutes = 36000000;
int fourhours = 54000000;
int fourhourthirtyminutes = 72000000;
int fivehours = 90000000;
LiquidCrystal lcd(12,11,5,4,3,2);
void setup ()
{
servo1.attach(9);
lcd.begin(16, 2);
lcd.clear();
lcd.print("Fifteen Second"); // Fifteen Charachter Max
}
void loop() {
lcd.setCursor(0,1);
lcd.print(millis()/1000);
pinMode(led, LOW);
delay(fifteenseconds);
pinMode(led, HIGH);
servo1.write(180); // Tell servo to go to 90 degrees
delay(1000); // Pause to get it time to move
servo1.write(90); // Tell servo to go to 180 degrees
delay(1000); // Pause to get it time to move
}