Thursday, 29 March 2012

Week 10

FYP briefing has been held at TTL1 by Dr. Khairil. The briefing is all about the Demo Presentation Day that will be carried out on 24th April.  We also get some explanation on how the distribution of marks for the fyp as per attach below;

Demo                - 20%
Report               - 20%
Blog                  - 15%
Technical Paper -  5%

Other than that, I made some simple program on Arduino by referring to the Arduino tutorial to make the buzzer sound non-stop. It does work and the program as follow;

The simple program on Arduino
--> The program is not clearly seen so you can refer to below;

int sensorPin = A0;                    // select the input pin for the potentiometer
int buzzerPin = 9;                     // select the pin for the buzzer
int sensorValue = 0;                   // variable to store the value coming from the sensor

void setup() {

  pinMode(buzzerPin, OUTPUT);          // declare the buzzerPin as an OUTPUT:
}

void loop() {
  
  sensorValue = analogRead(sensorPin); // read the value from the sensor:   

  digitalWrite(buzzerPin, HIGH);       // turn the buzzerPin on
  
  delay(sensorValue);                  // delay the program       
       
  digitalWrite(buzzerPin, LOW);        // turn the buzzerPin off:   
                 
}





Sunday, 25 March 2012

Week 9

As for this week, i construct a button circuit that will control my circuit ( on and off my circuit ). This button is a lock type so it will hold the switching condition, let say if I click the button, the circuit will be short circuit and supply will go through the circuit and it keep goes until I unlocked it back. So in this situation, the LED will light up when i switch on and otherwise.

Next, I combined the circuits all together. The buzzer, LCD, LED and switch circuit is combined to make a full circuit. Once i switch on, the buzzer will buzz and vise versa.

Tuesday, 20 March 2012

LCD display

I wanted to add other features to my project which is LCD display therefore I tried the Arduino LCD display tutorial. My target is to print out text message “kid, can you hear?” on the first row and Y=node or N=shook on the second row to ask the kid whether she/he can hear the sound produce by the buzzer.

LCD display is great way to display output from your arduino when it not connected to your computer. The common display used in arduino projects is 16×2 parallel LCD display which compatible with the Hitachi HD44780 driver. It can easily recognize with it 16 pin interface.
The parts list required;
1) 1x 16×2 parallel LCD display (compatible with Hitachi HD44780 driver)
2) 1x Arduino
3) 1x 10kΩ potentiometer
4) Jumper wire

Instruction of connecting the LCD to Arduino;

1) Connect all jumper wire as shown in diagram.(above)
2) Plug in 10kΩ potentiometer on breadboard. This potentiometer use for adjusting the contrast of the LCD character.
3) Plug in LCD display on breadboard
:: Below is the picture of my LCD circuit displaying  “kid, can you hear?” and Y=node or N=shook and also the program i've wrote.


# i might need to use bigger size of LCD since i need to display more texts.

Monday, 19 March 2012

Arduino Workshop

Last weekend I have attending an Arduino Wokshop which has been conducted by Medical Section Committee. This workshop has been held at training room at level 6 and relayed by Sir Zulkifli. The main target of attending this workshop is to gain extra knowledge about Arduino since Sir Zulkifli is well known to be a hardcore in Arduino field. Since this workshop is conducted for the beginners ; we had been teach from scratch ;from Introduction to Arduio, installing the software, write and run simple program such as running LED and button and also the most important command that are required inArduino language. Indeed, we have been guided line-by-line by Sir Zulkifli.

Even though I have done some of the circuit using Arduino for my project earlier before the workshop, I admit that I did gained some more extra knowlegde throughout the workshop. If before I just write the program without knowing its function, now I can even understand more. Sir Zulkifli did remind us not to attach Arduino board straight on our final project as it could be questioned by the accessor. So, the solution is stand alone Arduino. Arduino can be made stand alone.all we need is a simple circuit which consists of two capacitors, and oscillator which then connected  to Atmega 328P and 5V supply. 



Thursday, 15 March 2012

Week 8

I've construct a simple circuit consists of  buzzer, potentiometer, LED and Arduino. The program is pretty simple and workable. As i run the program, my buzzer will produce a sound and as i turn the potentiometer's knob to the right, the sound of the buzzer will get higher and vise versa, in the other hand, the LED also will change their rate of blinking. The resistance of the potentiometer does affect the sound output from buzzer and LED blinking. Below is the attachment of the picture of my circuit and the program that I've used.

A potentiometer is a simple knob that provides a variable resistance, which we can read into the Arduino board as an analog value. In this example, that value controls the rate at which an LED blinks and sounds of buzzer.
We connect three wires to the Arduino board. The first goes to ground from one of the outer pins of the potentiometer. The second goes from 5 volts to the other outer pin of the potentiometer. The third goes from analog input (A2) to the middle pin of the potentiometer. By turning the shaft of the potentiometer, we change the amount of resistence on either side of the wiper which is connected to the center pin of the potentiometer. This changes the relative "closeness" of that pin to 5 volts and ground, giving us a different analog input. When the shaft is turned all the way in one direction, there are 0 volts going to the pin, and we read 0. When the shaft is turned all the way in the other direction, there are 5 volts going to the pin and we read 1023. In between, analogRead() returns a number between 0 and 1023 that is proportional to the amount of voltage being applied to the pin. 

Thursday, 8 March 2012

Why do I choose Arduino?

herewith is some of the reasons of me choosing an Arduino;-
Open Source Physical Computing Platform
  • “open source hardware”
  • open source: free to inspect & modify
  • physical computing. er, what? ubiquitous computing, pervasive computing,ambient intelligence, calm computing, everyware, spimes, blogjects, smart objects.
 Community-built
  • Examples wiki (the “playground”) editable by anyone
  • Forums with lots of helpful people
Similar to Basic Stamp (if you know of it)
  • but cheaper, faster, & open
 Uses AVR ATmega microcontroller chip
  • chip was designed to be used with C language

Sunday, 4 March 2012

Week 7

Week 7 has been pretty tough for me as it is a phase test's week. I did not get the chance to have a discussion with Mdm. Naza as the time is quite limited but I do get to go to Jalan Pasar to buy Arduino kit. I bought Arduino UNO kit for RM105 at Nixie Electronics with some other componets.  


Specification of Arduino:

  •        Microcontroller: ATmega328
  •        Operating Voltage: 5V
  •        Input Voltage (recommended): 7-12V
  •        Input Voltage (limits): 6-20V
  •        Digital I/O Pins: 14 (of which 6 provide PWM output)
  •        Analog Input Pins: 6
  •        DC Current per I/O Pin: 40 mA
  •        DC Current for 3.3V Pin: 50 mA
  •        Flash Memory: 32 KB (ATmega328) of which 0.5 KB used by bootloader
  •        SRAM: 2 KB (ATmega328)
  •        EEPROM: 1 KB (ATmega328)
  •        Clock Speed: 16 MHz
Runs on: Windows, Mac OS X, Linux
Languages: Wiring/Arduino, C/C++
Getting Started guides: Clear step-by-step instructions, from download to blinking LED.
Knowledge base:
• Many simple examples included with download
• Good reference guide to the commands
• Large knowledge base on Arduino site and elsewhere
Advantage:
• Can be run as I/O board, using Firmata firmware
• Very large knowledge base
• Simple language, but expandable using C/C++
• Multiple models, for shields, breadboards, wearable, extra I/O pins
• Many shield modules
• Large number of open source derivative boards
Disadvantage:
• C language constructs (semicolons, brackets, case sensitivity) are confusing