Thursday, April 26, 2012

Week 14 : Sugar Detector Done

Ready for presentation day and also touch up at the switch. For the circuit,need to have body or box to make it more compatible and attractive to people.



Recommendation of the assessor about this product is :

· Find suitable sensor for the glucose for the effective and accurate.

· Have various drinks such as carrot juices, sugar cane juices, and many more because in Malaysia have many variety of drinks.

· Make more compact of the Sugar Detector circuit.

Week 13 : sugar detector and third experiment

Done with the sugar detector circuit and also arduino programming.


picture 1 : sugar detector circuit with arduino board.


Do third experiment, replace probe with copper electrode as the sensor.

picture 2 : third experiment


As the preparation for the presentation day, poster as the attraction and guideline for the project.


picture 3 : Poster for sugar detector in drinks

Week 12 : Arduino programming

Arduino programming based on the information for each fruits to determine glycemic index range.

Fruits

Range

Watermelon

72 (+-) 3

Orange

42 (+-) 3

Apple

38 (+-)2

Mango

56 (+-)2

Pepsi

55 (+-)3

LOW < 55 , MEDIUM 56-69 , HIGH > 70


ARDUINO PROGRAMMING :


// set pin numbers:

const int sw1 = 6; // the number of the pushbutton pin1

const int sw2 = 7; // the number of the pushbutton pin2

const int sw3 = 8; // the number of the pushbutton pin3

const int sw4 = 9; // the number of the pushbutton pin4

const int sw5 = 10; // the number of the pushbutton pin5

const int buzzer = 1; // the number of the Buzzer pin

int sensorPin = A0; // select the input pin for the potentiometer

int sensorValue = 0; // variable to store the value coming from the sensor


int mode = 0;

// include the library code:

#include

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void show_low()

{

lcd.setCursor(12,1);

lcd.print("Low ");

}

void show_med()

{

lcd.setCursor(12,1);

lcd.print("Med ");

}


void show_high()

{

lcd.setCursor(12,1);

lcd.print("High");

}

void setup() {

pinMode(sw1, INPUT);

pinMode(sw2, INPUT);

pinMode(sw3, INPUT);

pinMode(sw4, INPUT);

pinMode(sw5, INPUT);

pinMode(buzzer,OUTPUT);

// set up the LCD's number of columns and rows:

lcd.begin(16, 2);

// Print a message to the LCD.

lcd.print("Sugar Detector!");

digitalWrite(buzzer,HIGH);

delay(1000);

digitalWrite(buzzer,LOW);

}

void loop() {

if(digitalRead(sw1)==1)

{

lcd.clear();

lcd.setCursor(0,0);

lcd.print("WaterMelon");

mode=1;

}

if(digitalRead(sw2)==1)

{

lcd.clear();

lcd.setCursor(0,0);

lcd.print("Orange");

mode=2;

}

if(digitalRead(sw3)==1)

{

lcd.clear();

lcd.setCursor(0,0);

lcd.print("Apple");

mode=3;

}

if(digitalRead(sw4)==1)

{

lcd.clear();

lcd.setCursor(0,0);

lcd.print("Mango");

mode=4;

}

if(digitalRead(sw5)==1)

{

lcd.clear();

lcd.setCursor(0,0);

lcd.print("Carbonate Drink");

mode=5;

}

sensorValue = analogRead(sensorPin);

sensorValue = sensorValue/6.5;

lcd.setCursor(0,1);

lcd.print("Value: ");

lcd.setCursor(6,1);

lcd.print(sensorValue,DEC);

if(mode==1)

{

if(sensorValue<55)

show_low();

else if(sensorValue>=55 && sensorValue<70)

show_med();

else

show_high();

}

else if(mode==2)

{

if(sensorValue<45)

show_low();

else if(sensorValue>=45 && sensorValue<70)

show_med();

else

show_high();

}

else if(mode==3)

{

if(sensorValue<40)

show_low();

else if(sensorValue>=40 && sensorValue<70)

show_med();

else

show_high();

}

else if(mode==4)

{

if(sensorValue<58)

show_low();

else if(sensorValue>=58 && sensorValue<70)

show_med();

else

show_high();

}

else if(mode==5)

{

if(sensorValue<53)

show_low();

else if(sensorValue>=53 && sensorValue<62)

show_med();

else

show_high();

}

delay(100);

}



Week 11 : construct sugar detector


From the experiment 1 and 2, I construct circuit by using eagle 6.0 software to do schematic and run the simulation to make sure the components value are suitable to make sugar detector circuit. After the construct using the schematic are suitable and function based on the result from the experiment. From the schematic circuit, I continue to construct PCB circuit using eagle 6.0.


picture 1 : sugar detector schematic circuit



picture 2: PCB circuit




picture 3 : etching the PCB board from picture 2


The circuit already etching using etching powder, then by using multimeter to troubleshoot each wiring connection because sometimes after etching,the connection are not properly connected. Lastly,apply the component and soldering . after finished soldering,test the circuit for the functioning.

Wednesday, April 25, 2012

week 10: Measure Resistance and Voltage of Sugar in Apple,watermelon,orange,mango juices and pepsi


Objective: to measure and observe resistance and voltage of sugar in certain drinks.

Apparatus:
  • 5 cup (Mango juice,Watermelon juice, Apple juice, Orange juice and Pepsi)
  • 1 cup of sugar
  • 9v battery
  • multimeter
Steps:
  1. pour juices in the each cup with the same level.
  2. put 1 teaspoon of sugar in the cup and stir it well then measure the resistance and voltage.
  3. repeat step 2 until 5 teaspoon of sugar been measure.

Result: the resistance and voltage value increase when each spoon of sugar been pour in the mineral water.


Spoon

Pepsi

Watermelon

Orange

Apple

Mango

1

4k = 1.438v

7.5k = 2.14v

5k = 1.67v

5k = 1.67v

6k = 1.87v

2

6k = 1.87v

9k = 2.37v

5k = 1.67v

6k = 1.87v

7k = 2.05v

3

6k = 1.87v

11k = 2.62v

5k = 1.67v

8k = 2.22v

9k = 2.37v

4

8k = 2.22v

12k = 2.73v

8k = 2.22v

8k = 2.22v

8k = 2.22v

5

12k = 2.73

14k = 2.92v

9k = 2.37v

10k=2.5v

11k = 2.63v






Conclusion: When sugar mixed can produce a different resistance and voltage because fruits. Each of the fruit contain different amount of glucose known as natural sugar. From the glycemic index, watermelon has a high level of sugar because it has high carbohydrate. Apple has low level of sugar and it suitable for diabetic patient.