Beruflich Dokumente
Kultur Dokumente
Proponents:
De Leon, Teddy M.
Medina, Janine Rae C.
Parreño, Christian Joseph M.
Purgatorio, Fernan I.
a large, sprawling annual plant with coarse, hairy pinnately-lobed leaves and white to
yellow flower. The fruit has a smooth hard rind, usually green with dark green stripes or
yellow spots, and a juicy, sweet interior flesh, usually deep red to pink, but sometimes
nutrient dense food, a food that provides a high amount of vitamins, minerals,
Sugar Baby watermelon was a small, round melon, called an icebox type
because it is petite enough to fit in the refrigerator. This widely adapted heirloom variety
is solid, dark green on the outside with a bright red, firm and fine-grained flesh that is
super sweet. Watermelon contains high levels of healthy antioxidants, making Sugar
Baby a great sweet way to pack in good nutrition. Recent studies have confirmed the
nutritional importance of allowing a watermelon to fully ripen. For example, research has
shown that the biggest jump in lycopene content occurs at the time when a
watermelon's flesh turns from white-pink to pink.Even when allowed to ripen to the
white-pink stage, a watermelon still contains very little of its eventual beta-carotene
content. But as it moves from white-pink to pink to red, the beta-carotene content of a
antioxidants in a watermelon also increase consistently during ripening, all the way up
until the appearance of fully red flesh. The bottom line: eating a fully ripe watermelon
way to determine maturity of an entire field is to randomly select melons from across the
field and use a hand refractometer to measure the sweetness of the melon. Soluble
sugars should be 10% or more near the center of the melon. Since most home
gardeners and consumers aren’t going to go so far as to acquire that equipment so the
researchers decided to make this problem as basis to their project – to create a device
that could determine the maturity of a watermelon. Aside from the refractometer, a more
reliable test for watermelon ripeness, and the one that most expert gardeners rely on is
The secret is that thumping a ripe watermelon will produce a rather hollow sound
that’s difficult to describe but once you get the feel for it choosing ripe watermelons will
become more routine than a matter of luck. The hollow sound can even be felt with your
fingertips, almost as if the fruit contained jello in its center. This method was widely used
in the Philippines and it was the main reason why it was being considered in this
project. It is about improving ripeness detection from manual method of thumping the
transducer and a receiving transducer that will be placed in both sides of watermelon. A
correlates this to the degree of ripeness of the watermelon. The audio frequency is
determine the degree of ripeness of the fruit and LCD will display if the fruit is ripe
unripe or overripe.
III. Objectives
The following statement are the goals of the proponents wants to achieve:
receives audio frequency from a transmitter and used MicroC Pro to program
the PIC16F1877A
b. to determine the battery voltage level of the device while using the watermelon
ripeness detector
This project was conducted to design a detector that could determine the
maturity of the Sugar Baby watermelon categorized based on weight of the watermelon
to whether it is small, medium, and large. And the state of ripeness can be determined
from the intensity of the sound or pressure waves received by the microphone unit
being produced by the speaker with a frequency of 100Hz in a Sugar Baby watermelon.
It also give a monitoring signal using LED to determine battery level of the device while
This project is only applicable with the Sugar Baby watermelon and has two
supplies for the preamplifier and the microcontroller units. The user must observed the
reading on the DC Voltmeter first before pressing the button , the reading must be read
Rectifier and
Signal Generator Preamplifier
PIC16F877A
Regulator LCD 1
(INPUT SCREEN)
BATTERY ADC
LED 1 - Ripe
LED 2 - Unripe
Button 2 (Medium)
LED 1
PIC16F877A
LED 2
LED 4
LED 5
Button 4 (Reset)
Microcontroller for
4 PIC16F877A input, evaluator, and
output processes
Input and Output
2 LCD
Display
to ensure a logic zero
voltage into the output
4 Pul-down Resistor Portd
when the button is
press
proponents. Signal generator is used to show the incoming signal that came from the
speaker, the signal has a frequency of 100Hz. The signal will be pass to first stage
which is the preamplifier. Sound waves are a very small signal that needs a preamplifier
so that the small signal can be usable at the same time noise would not affect the audio
signal.
The signal must also be rectified using a bridge type diode rectifier to convert the
alternating audio signal into a DC signal and a filter capacitor is also added to reduced
the ripple voltage of the rectified signal. In which the output voltage will vary depends on
the maturity of the Sugar Baby Watermelon. These signals will be converted into a
The circuit also composed of four buttons for reset, small (1.75 - 2.25 kg),
medium (2.26 – 3.95 kg), and large (3.96 – 5.45 kg). With different category it has
different output range for ripe, unripe, and over ripe watermelon. It also have 3 red LED
to signal a ripe watermelon and additional 5 LED to monitor the DC voltage of the
battery. LCD serves as the display screen for the input command and output display of
the device.
VI. A. Source Code
//PIC – LCD Welcome & Buttons {
// LCD module connections lcd_cmd(_LCD_Clear);
sbit LCD_RS at RB4_bit; if(i==0)
sbit LCD_EN at RB5_bit; {
sbit LCD_D4 at RB0_bit; lcd_cmd(_LCD_Clear);
sbit LCD_D5 at RB1_bit; Lcd_Out(2,7,txt2);
sbit LCD_D6 at RB2_bit; Lcd_Out(3,3,"(1.75kg - 2.25kg)");
sbit LCD_D7 at RB3_bit; }
{
PORTC = 0b00010000; Lcd_Out(3,3,txt6); // Write
text in second row
}
Delay_ms(300);
b:
if(button(&portd, 3, 1, 1)){goto a;}
Lcd_Cmd(_LCD_CURSOR_OFF);
} while(1); // Cursor off
a: Lcd_Cmd(_LCD_CLEAR); //
delay_ms(100); Clear display
} Lcd_Out(1,1,txt1); // Write
text in first row
Lcd_Out(2,6,txt2); {
Lcd_Out(3,6,txt3); PORTC = 0b00010000;
Lcd_Out(4,6,txt4); }
if (a>205&&a<=409.2) }
{
PORTC = 0b00000010;
}
if (a>409.2&&a<=614)
{
PORTC = 0b00000100;
}
if (a>614&&a<=818.4)
{
PORTC = 0b00001000;
}
if (a>818.4&&a<=1023)
//PIC - Small Watermelon adc=ADC_READ(0);
sbit LCD_RS at RB4_bit; adc2=((adc*0.49/100));
sbit LCD_EN at RB5_bit; FloatToStr(adc2,k);
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit; if(adc2>3.75){Lcd_Out(1,1,"Eat
Immediately!"); portc.b5=1;}
sbit LCD_D6 at RB2_bit;
else if(adc2>2.14 &&
sbit LCD_D7 at RB3_bit;
adc2<=3.75){Lcd_Out(1,3,"Not
Sweet.");portc.b4=1;}
int i; }
float adc,adc2;
if(i==2)
void pl() {
{ lcd_cmd(_LCD_Clear);
}
{ {
Lcd_Out(1,1,"INTIALIZING. . ."); }
delay_ms(500); a:
lcd_cmd(_LCD_Clear); delay_ms(100);
} if(button(&portd, 0, 1,
1)){i=0;pl();goto b;}
if(button(&portd, 1, 1,
1)){i=1;pl();goto b;}
void main()
if(button(&portd, 2, 1, 1)){i=2;pl();
{ goto b;}
}
ADCON1=0x80;
TRISA = 0xFF;
TRISB=0; }
PORTB=0;
PORTD=0;
portc=0;
trisc=0;
Lcd_Init(); // Initialize Lcd
Lcd_Cmd(_LCD_CLEAR); //
Clear display
Lcd_Cmd(_LCD_CURSOR_OFF);
// Cursor off
Lcd_Out(1,2,"by: Janine Rae");
// Write text in first row
Delay_ms(300);
b:
portc=0;
Lcd_Cmd(_LCD_CURSOR_OFF);
// Cursor off
Lcd_Cmd(_LCD_CLEAR); //
Clear display
Lcd_Out(1,1,"1.75kg - 2.25kg");
while(1) {
//PIC - Medium Size Watermelon
sbit LCD_RS at RB4_bit; if(i==1)
sbit LCD_EN at RB5_bit; { lcd_cmd(_LCD_Clear);
sbit LCD_D4 at RB0_bit; Lcd_Out(1,1,"INTIALIZING. . .");
sbit LCD_D5 at RB1_bit; delay_ms(500);
sbit LCD_D6 at RB2_bit; lcd_cmd(_LCD_Clear);
sbit LCD_D7 at RB3_bit; adc=ADC_READ(0);
adc2=((adc*0.49/100));
sbit LCD_RS_Direction at TRISB4_bit; FloatToStr(adc2,k);
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit; if(adc2>4.35){Lcd_Out(1,1,"Eat
Immediately!"); portc.b5=1;}
sbit LCD_D5_Direction at TRISB1_bit;
else if(adc2>2.5 &&
sbit LCD_D6_Direction at TRISB2_bit;
adc2<=4.35){Lcd_Out(1,3,"Not Sweet.");
sbit LCD_D7_Direction at TRISB3_bit; portc.b6=1;}
else if(adc2>0.86 &&
adc2<=2.5){Lcd_Out(1,3,"Do Not
char txt5[] = "WATERMELON"; Eat!");portc.b7=1;}
char txt6[] = "RIPENESS DETECTOR"; else if (adc2<0.86){Lcd_Out(1,3,"No
char k[20]; Signal!");}
int i; }
{ }
{ {
lcd_cmd(_LCD_Clear); if(button(&portd, 3, 1,
1)){PORTC=0x00;goto a;}
}
}
a: Lcd_Out(1,1,"2.26kg - 3.95kg");
delay_ms(100);
} while(1) {
if(button(&portd, 0, 1,
1)){i=0;pl();goto b;}
if(button(&portd, 1, 1,
void main()
1)){i=1;pl();goto b;}
{
if(button(&portd, 2, 1, 1)){i=2;pl();
goto b;}
ADCON1=0x80; }
TRISA = 0xFF;
TRISB=0;
PORTB=0; }
PORTD=0;
portc=0;
trisc=0;
Lcd_Init(); // Initialize Lcd
Lcd_Cmd(_LCD_CLEAR); //
Clear display
Lcd_Cmd(_LCD_CURSOR_OFF);
// Cursor off
Lcd_Out(1,1,"Christian Joseph");
// Write text in first row
Delay_ms(300);
b:
portc=0;
Lcd_Cmd(_LCD_CURSOR_OFF);
// Cursor off
Lcd_Cmd(_LCD_CLEAR); //
Clear display
//PIC – Large Size Watermelon
// LCD module connections if(i==1)
sbit LCD_RS at RB4_bit; {
sbit LCD_EN at RB5_bit; lcd_cmd(_LCD_Clear);
sbit LCD_D4 at RB0_bit; }
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit; if(i==2)
sbit LCD_D7 at RB3_bit; {
lcd_cmd(_LCD_Clear);
sbit LCD_RS_Direction at TRISB4_bit; Lcd_Out(1,1,"INTIALIZING. . .");
sbit LCD_EN_Direction at TRISB5_bit; delay_ms(500);
sbit LCD_D4_Direction at TRISB0_bit; lcd_cmd(_LCD_Clear);
sbit LCD_D5_Direction at TRISB1_bit; adc=ADC_READ(0);
sbit LCD_D6_Direction at TRISB2_bit; adc2=((adc*0.49/100));
sbit LCD_D7_Direction at TRISB3_bit; FloatToStr(adc2,k);
// End LCD module connections
if(adc2>3.87){Lcd_Out(1,1,"Eat
Immediately!"); portc.b5=1;}
char k[20];
else if(adc2>2.13 &&
int i;
adc2<=3.87){Lcd_Out(1,3,"Not
float adc,adc2; Sweet.");portc.b6=1;}
else if(adc2>0.76 &&
adc2<=2.13){Lcd_Out(1,3,"Do Not
void pl() Eat!");portc.b7=1;}
{ else if(adc2<0.76){Lcd_Out(1,3,"No
Signal!");}
if(i==0) }
{
lcd_cmd(_LCD_Clear); while (1)
} {
if(button(&portd, 3, 1,
1)){PORTC=0x00;goto a;}
Delay_ms(300);
}
b:
a:
portc=0;
delay_ms(100);
Lcd_Cmd(_LCD_CURSOR_OFF);
} // Cursor off
Lcd_Cmd(_LCD_CLEAR); //
Clear display
Lcd_Out(1,1,"3.96kg - 5.45kg");
void main()
{
while(1) {
if(button(&portd, 0, 1,
ADCON1=0x80;
1)){i=0;pl();goto b;}
TRISA = 0xFF;
if(button(&portd, 1, 1,
TRISB=0; 1)){i=1;pl();goto b;}
Start
LCD 1 LCD 2 LCD 3 LCD 4
X
LCD 1
LCD 2
Display the Display the
Buttons to be pressed Weight of Small Watermelon
LCD 3
Display the
Weight of Medium Watermelon
LCD 4
Display the
Weight of Large Watermelon
Display a Blank A
Screen LCD 4
A
End
End
End
If
Portd.b3=1 End
B If If If End
i=1 i=2 Portd.b3=1
C D X
Display that Large Read Analog Signal
D
Watermelon is pressed from portA.b0
N
Display a Blank N
Screen LCD 3
End
End
If
End
Portd.b3=1
X
Display that Medium Read Analog Signal
C
Watermelon is pressed from portA.b0
M
Display a Blank M
Screen LCD 4
End
End
End
If
End
Portd.b3=1
X
C. Discussion of the Flow of the Program
As the user turn on the device, the device will let the user choose whether the
watermelon, subjected to maturity test was under small, medium, or large category
which is based on the weight of the watermelon, 1.75 - 2.25 kg, 2.26 – 3.95 kg, and
3.96 – 5.45 kg respectively that was interface through the four LCD. But make it sure
that the reading on the DC Voltmeter on the regulator was already stable to get an
accurate result. If the user has already decided on the category of the watermelon being
subjected to the test and has pressed the correct option, the program will now get the
analog DC signal from the rectified and regulated signal and convert it to digital to be
able to read by the PIC16F877A through the first pin of the port A and compare the
converted signal into the set value for the range the user had pressed. After
comparison, the program embedded on the microcontroller will now evaluate if the
signal receive was ripe, unripe, or an over ripe watermelon and the output will be
Aside from the detecting the state of ripeness of a Sugar Baby watermelon, one
of the feature of the circuit it could also determine the battery operating voltage level
c. LCD1 will display the button the user had pressed, while PIC – SMALL, PIC –
MEDIUM, and PIC – LARGE will convert the analog signal into a digital signa
d. If small button is press LCD 3 and LCD 4 will display a blank screen, PIC - SMALL
will evaluate the signal and compare with the set value in accordance with the button
pressed. If medium button is press LCD 2 and LCD 4 will display a blank screen, PIC –
MEDIUM will evaluate the signal and compare with the set value in accordance with the
button pressed. And If large button is press LCD 2 and LCD 3 will display a blank
screen, PIC – LARGE will evaluate the signal and compare with the set value in
e. The corresponding LCD will display “Eat Immediately!”, “Not Sweet.”, and “Do Not
Eat” if the ripe, unripe, and over ripe indicated by the LED
f. Whenever the reset button is pressed, the program will go back to step b.
g. The device also monitors the battery voltage level through analog to digital converter
by the PIC1.The battery level is determined by the 5 output LED on the portC of the
PIC1. Each LED when turned on indicate battery level of the device determined by:
LED1 (0-20%), LED2 (21-40%), LED3 (41-60%), LED4 (61-80%), and LED5 (81-100%).
VIII. Sample Screen Shot
IX. Conclusion and Recommendation
microphone;
b. PIC16F1877A can be used to monitor the battery voltage level of the watermelon
ripeness detector;
b. the circuit does not considered background noise that could somehow affect
c. the principles used in this project can also be used to other fruits , given that
d. some of the pins of the PIC16F877A was not used, adding more features to the
e. the flexibility of the programs of each PIC has been limited because the software
for licensed software to be used in programming the PIC so that the functionality
Table 1.1 Experiment in 30 unripe sugar baby watermelon conducted by the students of
BPSU - Main Campus, Department of Electronics Engineering in 2011
Response on
Characteristic of
Sugar Baby Weights Frequencies of State of
Size
Watermelon (kgs.) Watermelon(Vdc) Ripeness
100Hz 150Hz 200Hz
1 Small 1.95 1.8 3.6 1.6 Ripe
2 Small 1.90 2.2 4.4 2.8 Ripe
3 Small 2.10 1.6 2.6 1.3 Ripe
4 Small 2.25 2.4 3.2 2.8 Ripe
5 Small 2.05 3.6 4.6 3.2 Ripe
6 Small 2.15 2.6 3.8 2.8 Ripe
7 Small 1.80 1.2 2.4 1.8 Ripe
8 Small 1.95 4.4 5.0 3.8 Ripe
9 Small 2.05 2.8 4.2 3.2 Ripe
10 Small 2.20 2.2 3.8 2.6 Ripe
11 Medium 3.65 3.0 4.6 2.6 Ripe
12 Medium 3.75 3.6 5.8 2.4 Ripe
13 Medium 3.60 3.1 4.8 2.6 Ripe
14 Medium 3.90 1.5 2.6 2.4 Ripe
15 Medium 3.55 1.8 3.6 2.0 Ripe
16 Medium 2.85 4.4 6.2 2.5 Ripe
17 Medium 2.55 1..6 2.6 1.4 Ripe
18 Medium 2.90 2.8 4.4 2.2 Ripe
19 Medium 2.95 2.4 4.2 3.0 Ripe
20 Medium 2.75 3.2 4.8 2.8 Ripe
21 Large 5.25 2.8 3.4 3.2 Ripe
22 Large 5.05 3.8 4.8 2.2 Ripe
23 Large 4.65 3.2 4.2 3.6 Ripe
24 Large 5.35 2.8 3.4 3.2 Ripe
25 Large 5.45 3.2 4.0 2.8 Ripe
26 Large 4.95 2.8 4.6 3.4 Ripe
27 Large 4.85 2.2 3.8 3.6 Ripe
28 Large 5.25 2.6 3.6 3.0 Ripe
29 Large 5.20 4.0 4.2 2.8 Ripe
30 Large 4.25 1.8 2.8 2.0 Ripe
Table 1.3 Experiment in 30 over ripe sugar baby watermelon conducted by the students
of BPSU – Main Campus, Department of Electronics Engineering in 2011.
4
3.5
2.5
Over Ripe
2
Unripe
1.5 Ripe
0.5
0
100 Hz 150 Hz 200 Hz
4.5
3.5
3
Over Ripe
2.5
Unripe
2
Ripe
1.5
0.5
0
100 Hz 150 Hz 200 Hz
3.5
0.5
0
100 Hz 150 Hz 200 Hz
References:
http://www.whfoods.com/genpage.php?tname=foodspice&dbid=31#purchasequalities
http://www.veggiegardeningtips.com/harvesting-ripe-watermelons/
Watermelon Ripeness Detector,(2012) Bataan Peninsula State University by Bartolome et. al.