Sunday 24 February 2013

FYP 2 Week 5

For this week, I was researching what fan should I use for my project. I plan to use DC Fan that is small and portable so that it won't be cumbersome to present on the presentation day. DC fan also easier to be programmed with Arduino compared to AC fan. I decided to use 12V DC Fan. I will be using 9V battery as the power supply and the transistor I use will amplify the power and can make the fan move even the power supply is not 12V.

Saturday 16 February 2013

Mid semester break

Although it is semester break, I still attempting to test the pulse-width modulation (PWM) function of Arduino. This part is needed to move the fan with a variable speed in my project. After I search the internet, I found the simple code to test PWM with a DC motor. The DC motor speed can be manipulated with the variable resistor. This is the code:


int motor = 9;
int potenciometer = 5;

void setup(){
  pinMode(9,OUTPUT);
  pinMode(5,INPUT);

  Serial.begin(9600);
}

void loop(){
  int value = analogRead(potenciometer);
                     //read input value: range between (0,1023)
  int motor_speed = value/4;
                    //PWM can only ouput 255 different values

  analogWrite(motor,motor_speed);

  Serial.println(motor_speed);//for testing purposes
}


This is the connection I use to construct on breadboard.

Fortunately, the code works when I tested on breadboard and the results were true as what was expected.
This is before I tune the variable resistor. As you can see, the motor doesn't move.

In this picture, the motor move after I tune the variable resistor. If I tune it all the way, the motor will move to its maximum speed.

For this testing, I used the components DC motor 3V, Variable Resistor 10kΩ, Transistor TIP120, Diode 1N4001, resistor 330Ω and the Arduino microcontroller.

Sunday 10 February 2013

FYP 2 Week 4

Now that I learned about the temperature sensor LM 35, it's time to test it on breadboard.  Since I use Arduino microcontroller, I learn how to use LM 35 with Arduino from the internet so that I can understand how does it function. To test it, we also need LCD display to show the temperature values. Below is the connection of Arduino and temperature sensor and the code I used to test the temperature sensor


This is on my own breadboard. It seems the temperature sensor functions as supposed to be.


Saturday 2 February 2013

FYP 2 Week 3

LM 35 Temperature Sensor



The LM35 is an integrated circuit sensor that can be used to measure temperature with an electrical output proportional to the temperature (in oC)


  • Why Use LM35s To Measure Temperature?
    • You can measure temperature more accurately than a using a thermistor.
    • The sensor circuitry is sealed and not subject to oxidation, etc.
    • The LM35 generates a higher output voltage than thermocouples and may not require that the output voltage be amplified.
Below is the typical performance characteristics of LM35 Temperature Sensor:


So based on the performance characteristic of this temperature sensor, I am confident to choose it since it has good sensitivity and it is also very affordable.