Thursday, December 11, 2014

Final Assembly Time!

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




}

Tuesday, December 2, 2014

The parts were first made of cardboard and used to test the idea/mechanics of the launcher. Launched candy using elastics which are held to the cardboard by pins through a hole.


Below is a test code used for this project. Int led is used to tell the program to use pin 9 on the board. I chose led for the pin because it's what I've used in every other code. All the other int are time variables. The smaller ones, on the order of seconds is intended for testing and demonstration, while the longer time periods are used to set hours. The servo library is used for the servo variables. 

I looked at one of the sample codes in order to figure out how to set up the servo. In the void loop, it starts off with having the pin give a low signal for the "TIMEVARIABLE". In this place, you put in the int to determine how long until the servo turns. Then, the pinMode turns to high, providing power to the servo. The details after make the servo turn 180 degrees forward, then back to the original position. Since it is a loop, it can be set to fifteen or thirty seconds in order to show multiple shots for testing. However, each time, you still need to pull back the rubber band and load a projectile. 

#include <Servo.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;

void setup () {
  servo1.attach(9);
}

void loop() {

  pinMode(led, LOW);
  delay(TIMEVARIABLE);
  pinMode(led, HIGH);
  
  servo1.write(180);    

  delay(1000);         

  servo1.write(90);   

  delay(1000);         



}

Friday, November 28, 2014





Here are a couple screenshots of the model made. These are all 1/8" parts, meant to be cut out on the laser cutter. The plan is for them to interlock together, and possibly glue if needed. There is a tab on the middle piece intended to fit into a groove on the side part. 

The original idea was to mount the servo beneath the middle plate, and is like that on the cardboard prototype. But, due to a lack of acrylic, we had to make the final design smaller. This meant the servo won't fit. Instead, it will be mounted on the side, and on top of everything. The board will mount on the side opposite to it, making it a complete unit. 

Tuesday, November 11, 2014

A way to be able to make an alarm would be to take advantage of the "TimeAlarms Library" that was linked from the Arduino site.

http://www.pjrc.com/teensy/td_libs_TimeAlarms.html

Friday, November 7, 2014

Brainstorm

We had a meeting tonight to try and figure out where to go with our project. After a bit of discussion we have a rough idea of how to set everything going. 

The first thing we discussed was the alarm clock portion of the prototype. As far as that goes, we found a shield that could do the job well enough. It is the newer version of the first shield posted before. 

This would make it much easier if we would be able to get it. Currently, we are concerned if it is in stock and still available for purchase. If we are unable to get the shield, we are going to have to go with the time libraries. 
  
That would work, although it would make it more difficult. We could try and hook up the time to a LCD panel that comes with our kit to display the time, but may have to resort to hanging the code in order to set the alarm time. 

For the projectile portion of the prototype, we have decided upon two ideas. One would be to use a NERF gun that we already own to shoot a projectile at the sleeping target. The issue with that is reloading the gun and the trigger pull. Our concern is the force needed to pull both the cocking mechanism and trigger. We are still working on that idea. 

If the NERF gun fails to work, we decided that we could build a small catapult.

We would try and make it nicer, more accurate, and more reliable. This would be a less accurate alternative, but likely easier to set up if the NERF gun fails. 

We plan to run a few tests to see how strong our motors are and if they will work in our current plans for the NERF gun. 

Wednesday, November 5, 2014

First Post

Team No Sleep


Our rough idea for the project is some type of new and improved alarm clock. With being late for classes being an issue, we decided to find a way to get to class on time.


We are also considering trying to incorporate some sort of catapult element, just in case the noise doesn't wake you up. Also, it is a great alternative if you aren't trying to wake up everybody in the room. Other ideas are using some other type of silent device to wake you up, such as shooting a squirt gun at your head.