Thursday 26 April 2012

Week 14

          This week, on 24 April 2012, there is demo presentation day at Gemilang hall UniKL BMI. Demo presentation day is a importance and as a bigday fot FYP student like me. For the Demo presentation, i will be asses by  Ass. Prof. Dr. Amir from Electrical Section and Mdm. Zabariah from Medical Section.
           All the prototype have been prepared and i make some study for this day as a preparation for me to answer any question from the assessor about my project. Below is my poster and prototype for the demo presentation day. 



               
                                           Poster




Prototype

















Saturday 21 April 2012

Week 13

It is only 1 week to go!. I am very worried. This week, i focused with the circuit and programming.For programming, i start to write a program to display the RPM and speed. Below is the coding for the programming: 


 /*
 
  The circuit:
 * LCD RS pin to digital pin 7
 * LCD Enable pin to digital pin 8
 * LCD D4 pin to digital pin 9
 * LCD D5 pin to digital pin 10
 * LCD D6 pin to digital pin 11
 * LCD D7 pin to digital pin 12
 * LCD R/W pin to ground
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)



 */

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

int ledPin = 13;               // choose pin for the LED
float start, finished;
float elapsed, time;
float circMetric=0.04; // wheel circumference relative to sensor position (in meters)
float circImperial; // using 1 kilometer = 0.621371192 miles
float speedk, speedm;    // holds calculated speed vales in metric and imperial

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
   pinMode(2,INPUT);
   pinMode(ledPin, OUTPUT);      // declare LED as output
  attachInterrupt(0, speedCalc, HIGH); // interrupt called when sensors sends digital 2 high (every wheel rotation)
  start=millis();
  circImperial=circMetric*.62137; // convert metric to imperial for MPH calculations
 // Print a message to the LCD.
  lcd.print("    Welcome   ");
  lcd.setCursor(0, 1);
  lcd.print("  Mc-Ergocycle  "); 
}

void speedCalc()
{
  elapsed=millis()-start;
  start=millis();
  speedk=(3600*circMetric)/elapsed; // km/h
  speedm=(3600*circImperial)/elapsed; // Miles per hour
}

void loop() {
  
   if ( digitalRead(2)== HIGH)             // == digunakan bagi declare condition
   {  digitalWrite(ledPin, HIGH);  // turn LED OFF
  } else {
    digitalWrite(ledPin, LOW); // turn LED ON
  }
 
 delay (1000);
  Serial.println(elapsed);
  Serial.println(speedk);
  Serial.println(speedm);
  Serial.println();
  lcd.setCursor(0,0);
  lcd.print(int(speedk));
  lcd.print(" km/h "); 
  lcd.print(int(speedm));
  lcd.print(" MPH   ");
  lcd.setCursor(0,1);
  lcd.print(int(elapsed));
  lcd.print(" ms/rev      "); 
  delay(1000); //
   }



Then, i uploading to Atmega328P-PU through Arduino board. At first, the LCD does not display anything and just light on. I troubleshoot the circuit and found that pin 7 on Atmega which is connect to 5Volt (VCC)  pin must be jumped straight to the Vout of Voltage Regulator. The result is as follow:


Display result


Then, i make some modification on the bicycle which is change the colour from red to yellow. I spray it by using the paint spray that i have bought at Careffour Wangsa maju. 


Paint Spray

Then, i attached the display circuit to the bicycle and Below is the Video of the finiched cycle ergometer. This video has showed the cycle ergometer operation:





The demo and presentation of Final Year Project is on 24 April 2012 (next week).I make some preparation for next week by design the poster and troubleshoot the circuit.







Saturday 14 April 2012

Week 12

         
       As i already sketch the PCB layout, i start to do PCB development for this week.There are some processes in PCB development part. The processes involved are PCB layout, PCB UV exposure, PCB developing, etching, drilling and soldering. Each step has needed to be careful to make sure all connection in good condition. Every process is very important because this is the first step to avoid error to occur in the future.The PCB development must be done according to its method as follows:



1. The part list is as follows:
       - Ultra Violet (UV) PCB board
       - Overhead Projector Paper (OHP paper)


2. First,  Print PCB Layout. 
The PCB layout for the project is drawing by using Diptrace software ( refer last week). After drawing the circuit, the layout must be print on a transparency sheets rather than any kind of paper so that the Ultra Violet (UV) can pass through the clear bits well enough to give a good exposure. Overhead Projector (OHP) paper is a transparency paper that suitable to be use as a print paper. Naturally it must ensure the printing is exactly 100% full-scale.

PCB layout on OHP paper


3.  Ultra Violet (UV) Exposure. 
  • This process have been done at PCB room at level 1 Unikl BMI.For the UV board,one of the sides is copper clad and this copper has a photosensitive coating. When the plastic film is peeled back this sensitive coating is revealed.After processing this will be the PCB.

Example 1 of how to peel off the plastic film on UV PCB board


  • The Ultra Violet (UV) box as an Ultra Violet (UV) exposure. Printed mask must dry else it will stick to the UV coating on the PCB and will ruin it. It must be careful to ensure that the PCB mask is the right way up, otherwise when the circuit is etched it will discover that the tracks are also the wrong way round.

Example 2 of how to stick the printed OHP paper to UV PCB board

  •  The Overhead Projector (OHP) paper transparency with the printed side has placed against the copper coating and the two faces has put down in the light box. Then, the cover has closed, switched on the UV box and allow 60 to 90 second exposure times. When the exposure time is end, and then switched off the UV box and PCB is remove from the box. It will not see any visible change in the coating at this point.



PCB board has been placed on UV box


4.  Printed Circuit Board (PCB) Developing

  • The developing solution is just sodium hydroxide crystals that dissolved in cold about 20 degrees Celsius and too much solution has just stripped everything from the board. Then as simply placed the UV exposed PCB in the developing solution and rocks the tray gentled for a few minutes. As a caution, the developing is avoided from direct bright sunlight. Within a few minutes the circuit has stand out dark and the exposed coating washed away. Before removing the PCB from the tray, the copper has been shiny against the dark track layout.

Sodium Hydroxide

Developing Solution


5. Printed Circuit Board (PCB) Etching
  • When the board is taken out of the developer it must be washed in clean water before transferring to the etching tank. Always use plastic tongs.The acid, Ferric Chloride (FeCl3) is used to etch away copper that is not protected by the remaining photo resist coating FeCl3 often comes in bags in its an hydrous from dried orange-brown colored crystals.



Etching machine

  •  The etchant is held in a ‘bubble etch tank’ and is heated. This solution slowly etches away the unwanted copper, leaving the tracks only. At this stage it is important to keep checking that the PCB is completed (time - 15 to 45 minutes). If it is left in the tank too long the copper tracks will also be removed or damaged. 

Example 3 of how the PCB board has been inserted to etching machine

6.  Cleaning
 The remaining UV coating has been cleaned off. Alternatively, has used the thinner to remove the dark line as in. When removed from the etching solution, the PCB is washed and a PCB eraser is used to remove any film from the tracks. This must be done carefully because the film will prevent good soldering of the components to the PCB. The tracks can be checked using a magnifying glass. If there are gaps in the tracks, sometimes they can be repaired using wire but usually a new PCB has to be etched.

Example 4 : PCB eraser

Cleaning process that i have done

7. Drilling and Soldering
Lastly, the PCB has been drilled according to the circuit. The components have been inserting on the board  and started soldering the component’s leg. 
Example 5 : Drilling Process


Component has been inserted and ready for soldering

8. Result 
The result of PCB development can be seen in figure below:


Finished PCB development

Friday 6 April 2012

Week 11

It's already week 11 now. I'm so worried and start to design the PCB layout because it have only 3 week to go before presentation.As  a result, by using Diptrace software, the PCB layout is as figure below:


PCB layout 
Then, i go to Jln. Pasar to buy  the PCB UV board for etching next week. I'm also already print the Layout on OH paper for next week.