Monday, November 25, 2013

Progress

The solid models have all been, for the most part, finalized.  We just need to create etching on the parts as identifiers.  The parts that were needed to make out fan work were received and testing was conducted on them.  The parts that were ordered were a piezo element, a stronger DC motor and female jumper wires to enable us to to parts away from the breadboard.  All of the parts will be held together with some sort of glue either hot glue or super glue but mostly likely a combination of both.  The DC motor will be controlled using the piezo knock sensor by using the PWM library to change the speed of the fan based upon how many knocks are sensed.  LEDs will be indication of the speed of the fan.  Also and LCD will read out the ambient temperature of the area around the fan.  The motor will be attached to the fan head with a wooden dowel or perhaps another 3D printed part pending the final volume of the parts (need to find out the support material volume). The model itself will be fairly light due to its primarily plastic and acrylic composition.

Also, there were two meeting during the past week.  One was during the lab time and the solid models were worked on during that time period.  Then another meeting of about 2 hours was arranged on friday to work on the code.  And various other hours were spent individually working on both parts of the project, the code and the solid models, outside of the meeting times.

Friday, November 15, 2013

The following is what we have so far for our projects code.  We attempted to post the code through github but were having issues:

//LCD display
#include  <LiquidCrystal.h>         // Include the library to use a LCD display
#define          sensor           0        // Define the A0 pin as “sensor”
int  Vin;           //  Variable to read the value from the Arduino’s pin
float  Temperature; //  Variable that receives the converted voltage value to temperature
float     TF; // Variable to receive the converted value from  ºC to ºF
LiquidCrystal  lcd    (12, 11, 5, 4, 3, 2);
/* The function above declares which Arduino’s pins will be used for controlling the LCD */
  //knock Sensor
int ledPin = 13;
int knockSensor = 0;              
byte val = 0;
int statePin = LOW;
int THRESHOLD = 100;
void  setup()
{
  lcd.begin(16, 2);                            //  It tells the Arduino that the display is a 16x2 type
  lcd.print("Temperature: ");           //  Send the text to the screen of the display.
 pinMode(ledPin, OUTPUT);
 Serial.begin(9600);
}
void  loop()
{{
  Vin = analogRead (sensor);  /*   Tells the Arduino to read the pin and stores the value in “Vin” */
  Temperature=(500*Vin)/1023;  /* Converts the voltage value into temperature and stores it into the “Temperature”  variable  (in  ºC)*/
TF = ((9*Temperature)/5)+32; // Converts  ºC to ºF
  lcd.setCursor(0, 1);           // Moves  the cursor of the display to the next line
  lcd.print(TF);    // Exhibits the value of the temperature on the display
  lcd.print(" F");         // Writes “F” to indicate that it is in Fahrenheit scale.
   delay(1000);  //  Waits for a second to read the pin again
}
  val = analogRead(knockSensor);    
  if (val >= THRESHOLD) {
    statePin = !statePin;
    digitalWrite(ledPin, statePin);
    Serial.println("Knock!");
  }
  delay(100);  // we have to make a delay to avoid overloading the serial port
}

Below is an attached image of our tenative assembly, some dimensions will be updated peninding the dimensions of our DC motor as well as the LCD screen, LEDs, etc.  Our project will be made entirely of 3D printed material and acrylic that has been lasor cut.  All the parts were made on solidworks.

For our Arduino project we have decided to create a three speed fan powered by a DC motor.  The current design is such that a Piezo element will turn the fan on and then any consecutive knocks will cycle through the fans 3 speeds and then finally turn the fan off.  To distinguish which setting the fan is on  a single led light will turn on and an additional light will turn on for each consecutive speed.  Additionally, a heat sensor will be incorporated such that the temperature is displayed on an LCD.  A SolidWorks assembly of the various components we intend to have made by the 3d printer has been created.  Our two group meetings this week occurred on Tuesday 11-12-13 and Friday 11-15-13, during which both members attended.  The goal we set to accomplish was to update our blog with all of the appropriate information.