Translate

Membuat Alat Monitoring Polusi via Internet Menggunakan Ethernet Webserver dan Arduino

Membuat Alat Monitoring Polusi via Internet Menggunakan Ethernet Webserver dan Arduino


               Pada kesempatan yang berbahagia kali ini saya akan menjelaskan mengenai bagaimana cara membuat sebuah alat yang digunakan untuk monitoring polusi udara menggunakan internet webserver. alat ini hanya digunakan untuk monitoring jarak jauh tanpa bisa kendali jarak jauh, jadi terdapat dua buah arduino yang mana arduino 1 untuk mengolah menjadi data ppm kemudian arduino 2 digunakan untuk mengirim data ke server, sebenarnya menggunakan 1 arduino saja bisa namun dikarenakan pinout-nya tidak cukup maka digunakanlah 2 arduino. sensor yang digunakan bisa dimodifikasi sesuai keinginan, untuk lebih jelasnya berikut skema dan programnya.




a. Arduino Uno + Ethernet Shield





b. Router + Modem GSM





c. Cara Konfigurasi Web Hosting





d. Program Arduino IDE

#include <SPI.h>
#include <Ethernet.h>

String txData2="";

byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
  char server[] = "www.polusigasku.hol.es";
IPAddress ip(192,168,0,99);

EthernetClient client;

double s_humidity=0;
double s_temperature=0;
double s_windspeed=0;
double s_direction=1;
double s_dust=0;
double s_ppm_CO=0;
double s_ppm_O3=0;
double s_ppm_NH3=0;
double s_ppm_CO2=0;

int value1=0;           
int value2=0;  
int value3=0;  
int value4=0;  
int value5=0;  
int value6=0;  
int value7=0;  
int value8=0;  
int value9=0;  

void setup()
{
    Serial.begin(9600);
    while (!Serial) {
    ;
  }

  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    Ethernet.begin(mac, ip);
  }

    delay(1000);
    Serial.println("connecting...");
    kirim ();
   
}

void loop()
{
  kirim ();
}

void kirim (){
 
   while(Serial.available()>0)
    {
        value1 = Serial.parseInt();           
        value2 = Serial.parseInt();         
        value3 = Serial.parseInt();
        value4 = Serial.parseInt();           
        value5 = Serial.parseInt();         
        value6 = Serial.parseInt();
        value7 = Serial.parseInt();           
        value8 = Serial.parseInt();         
        value9 = Serial.parseInt();
       
        s_windspeed=value1;
        s_direction=value2;
        s_humidity=value3;
        s_temperature=value4;
        s_dust=value5;
        s_ppm_CO=value6;
        s_ppm_O3=value7;
        s_ppm_NH3=value8;
        s_ppm_CO2=value9;
       
        if(Serial.read()=='\n')
        {
                     
            Serial.print("windspeed=");
            Serial.print(s_windspeed);
            Serial.print("  ");
           
            Serial.print("direction=");
            Serial.print(s_direction);
            Serial.print("  ");
           
            Serial.print("humidity=");
            Serial.print(s_humidity);
            Serial.print("  ");
           
            Serial.print("temp=");
            Serial.print(s_temperature);
            Serial.print("  ");
           
            Serial.print("dust=");
            Serial.print(s_dust);
            Serial.print("  ");
           
            Serial.print("ppm CO=");
            Serial.print(s_ppm_CO);
            Serial.print("  ");
           
            Serial.print("ppm O3=");
            Serial.print(s_ppm_O3);
            Serial.print("  ");
           
            Serial.print("ppm NH3=");
            Serial.print(s_ppm_NH3);
            Serial.print("  ");
           
            Serial.print("ppm CO2=");
            Serial.print(s_ppm_CO2);
            Serial.print("\n");

  EthernetClient client;

if (client.connect(server, 80)){
    txData2 = "value1="+ (String (value1)) + "&value2="+ (String (value2)) + "&value3="+ (String (value3)) + "&value4="+ (String (value4)) + "&value5="+ (String (value5)) + "&value6="+ (String (value6)) + "&value7="+ (String (value7)) + "&value8="+ (String (value8)) + "&value9="+ (String (value9));           
    Serial.println("connected");
    Serial.print(txData2);
    client.println("POST /insert.php HTTP/1.1");
    client.println("Host: www.polusigasku.hol.es");
    client.println("Connection: close");
    client.print("Content-Type: application/x-www-form-urlencoded\n");
    client.print("Content-Length: ");
    client.print(txData2.length());
    client.print("\n\n");
    client.print(txData2);
    Serial.println(txData2);    
    delay (10000);
        
  }  
  else{
    Serial.println("Connection Failed.");
    Serial.println();
    delay (1500);
  }
 
          }
    }
   }





e. Program PHP / HTML

1. index.php

<html>

<head>
<meta http-equiv="refresh" content="3">
<style>
.bordered { border-style:solid; }
</style>
<link rel="stylesheet" type="text/css" href="latweb.css" />
<title >MONITORING POLUSI GAS</title>

</head>


<body>

<CENTER>
<p><h2> MONITORING POLUSI UDARA</h2></p>


<script type='text/javascript'>
<!--
var months = ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'];
var myDays = ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jum&#39;at', 'Sabtu'];
var date = new Date();
var day = date.getDate();
var month = date.getMonth();
var thisDay = date.getDay(),
    thisDay = myDays[thisDay];
var yy = date.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;
document.write(thisDay + ', ' + day + ' ' + months[month] + ' ' + year);
//-->
</script>

<br>


<script type="text/javascript">
<!--
var a_p = "";
var d = new Date();
var curr_hour = d.getHours();
if (curr_hour < 12) {
    a_p = "AM";
} else {
    a_p = "PM";
}
if (curr_hour == 0) {
    curr_hour = 12;
}
if (curr_hour > 12) {
    curr_hour = curr_hour - 12;
}

var curr_min = d.getMinutes();
curr_min = curr_min + "";
if (curr_min.length == 1) {
    curr_min = "0" + curr_min;
}
document.write(curr_hour + " : " + curr_min + " " + a_p);
//-->
</script>

<br><br>
<input type="button" onclick="location.href='http://polusigas.hol.es/dbshow.php';" value="Lihat Database" />
<br>
</CENTER>

<CENTER>
<p><h3>

WIND SPEED =
<?php
$a=100;
include "config.php";
$tampil = @mysql_query("SELECT * FROM tbgas WHERE no IN (SELECT MAX(no) FROM tbgas)");
        
    while ($r=mysql_fetch_array($tampil)){
       echo $r[value1]/$a;
   }
?>
&nbsp M/S

<br>
WIND DIRECTION =
<?php
include "config.php";
$tampil = @mysql_query("SELECT * FROM tbgas WHERE no IN (SELECT MAX(no) FROM tbgas)");
        
    while ($r=mysql_fetch_array($tampil)){

       $b = $r[value2];

if ($r[value2] == 1) {
    echo "NORTH";
}
elseif ($r[value2] == 2) {
    echo "NORTH EAST";
}
elseif ($r[value2] == 3) {
    echo "EAST";
}
elseif ($r[value2] == 4) {
    echo "SOUTH EAST";
}
elseif ($r[value2] == 5) {
    echo "SOUTH";
}
elseif ($r[value2] == 6) {
    echo "SOUTH WEST";
}
elseif ($r[value2] == 7) {
    echo "WEST";
}
elseif ($r[value2] == 8) {
    echo "NORTH WEST";
}


   }
?>



<br>
HUMIDITY =
<?php
$c=10;
include "config.php";
$tampil = @mysql_query("SELECT * FROM tbgas WHERE no IN (SELECT MAX(no) FROM tbgas)");
        
    while ($r=mysql_fetch_array($tampil)){
       echo $r[value3]/$c;
   }
?>
&nbsp %


<br>
TEMPERATURE =
<?php
$d=10;
include "config.php";
$tampil = @mysql_query("SELECT * FROM tbgas WHERE no IN (SELECT MAX(no) FROM tbgas)");
        
    while ($r=mysql_fetch_array($tampil)){
       echo $r[value4]/$d;
   }
?>
&nbsp C


<br>
PM =
<?php
$e=100;
include "config.php";
$tampil = @mysql_query("SELECT * FROM tbgas WHERE no IN (SELECT MAX(no) FROM tbgas)");
        
    while ($r=mysql_fetch_array($tampil)){
       echo $r[value5]/$e;
   }
?>
&nbsp MG/M3

<br>
GAS CO =
<?php
$f=100;
include "config.php";
$tampil = @mysql_query("SELECT * FROM tbgas WHERE no IN (SELECT MAX(no) FROM tbgas)");
        
    while ($r=mysql_fetch_array($tampil)){
       echo $r[value6]/$f;
   }
?>
&nbsp PPM


<br>
GAS O3 =
<?php
$g=100;
include "config.php";
$tampil = @mysql_query("SELECT * FROM tbgas WHERE no IN (SELECT MAX(no) FROM tbgas)");
        
    while ($r=mysql_fetch_array($tampil)){
       echo $r[value7]/$g;
   }
?>
&nbsp PPM

<br>
GAS NH3 =
<?php
$h=100;
include "config.php";
$tampil = @mysql_query("SELECT * FROM tbgas WHERE no IN (SELECT MAX(no) FROM tbgas)");
        
    while ($r=mysql_fetch_array($tampil)){
       echo $r[value8]/$h;
   }
?>
&nbsp PPM

<br>
GAS CO2 =
<?php
$i=100;
include "config.php";
$tampil = @mysql_query("SELECT * FROM tbgas WHERE no IN (SELECT MAX(no) FROM tbgas)");
        
    while ($r=mysql_fetch_array($tampil)){
       echo $r[value9]/$i;
   }
?>
&nbsp PPM


</CENTER>

</body>

</html>





2. dbshow.php

<html>
<head>
<meta http-equiv="refresh" content="3">
<style>
.bordered { border-style:solid; }
</style>
<title >DATABASE</title>
</head>
<body bgcolor = #ffaaff>

<CENTER>
<p><h2> DATABASE MONITORING POLUSI GAS</h2></p>

<br>
<input type="button" onclick="location.href='http://polusigas.hol.es/index.php';" value=" HOME " />
<br>
<br>
<br>

<?php
include "config.php";

$a=100;
$b=10;

$tampil = mysql_query("SELECT * FROM tbgas");

 echo "<table border = '1'>
          <tr><th bgcolor = #FFFFFF>WIND SPEED</th>
          <th bgcolor = #FFFFFF>WIND DIRECTION</th>
          <th bgcolor = #FFFFFF>TEMPERATURE</th>
          <th bgcolor = #FFFFFF>HUMIDITY</th>
          <th bgcolor = #FFFFFF>PM</th>
          <th bgcolor = #FFFFFF>GAS CO</th>
          <th bgcolor = #FFFFFF>GAS O3</th>
          <th bgcolor = #FFFFFF>GAS NH3</th>
          <th bgcolor = #FFFFFF>GAS CO2</th>

          </tr>";
 
    while ($r=mysql_fetch_array($tampil)){
       $x1 = $r[value1]/$a;
       $x2 = $r[value3]/$b;
       $x3 = $r[value4]/$b;
       $x4 = $r[value5]/$a;
       $x5 = $r[value6]/$a;
       $x6 = $r[value7]/$a;
       $x7 = $r[value8]/$a;
       $x8 = $r[value9]/$a;

if ($r[value2] == 1) {
    $z = "NORTH";
}
elseif ($r[value2] == 2) {
    $z = "NORTH EAST";
}
elseif ($r[value2] == 3) {
    $z = "EAST";
}
elseif ($r[value2] == 4) {
    $z = "SOUTH EAST";
}
elseif ($r[value2] == 5) {
    $z = "SOUTH";
}
elseif ($r[value2] == 6) {
    $z = "SOUTH WEST";
}
elseif ($r[value2] == 7) {
    $z = "WEST";
}
elseif ($r[value2] == 8) {
    $z = "NORTH WEST";
}

       echo "<tr>
             <td bgcolor = #FFC848>$x1</td>
             <td bgcolor = #FFC848>$z</td>
             <td bgcolor = #FFC848>$x2</td>
             <td bgcolor = #FFC848>$x3</td>
             <td bgcolor = #FFC848>$x4</td>
             <td bgcolor = #FFC848>$x5</td>
             <td bgcolor = #FFC848>$x6</td>
             <td bgcolor = #FFC848>$x7</td>
             <td bgcolor = #FFC848>$x8</td>

       </tr>";
    }
    echo "</table>";

@mysql_close($con);

?>

</CENTER>

</body>
</html>





3. insert.php

<?php
require("config.php");

$query = "INSERT INTO tbgas (value1, value2, value3, value4, value5, value6, value7, value8, value9) VALUES('$_POST[value1]','$_POST[value2]','$_POST[value3]','$_POST[value4]','$_POST[value5]','$_POST[value6]','$_POST[value7]','$_POST[value8]','$_POST[value9]')";

if(!@mysql_query($query))
{
    echo "&Answer; SQL Error - ".mysql_error();
    return;
}

?>




4. config.php

<?php

$dbhost = 'mysql.idhostinger.com';
$dbuser = 'u820xxxxxxxxccc';
$dbpass = '1235xxxxxxxxxxx';  
$dbname = 'u82042xxxxxxxx';

$conn = @mysql_connect($dbhost,$dbuser,$dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname);
if(!$conn){
        echo "database gak konek";
    }else{

    }
?>





f. Gambar Hasilnya














Membuat alat simulasi traffic light untuk palang pintu kereta api menggunakan sensor jarak Ultrasonik SRF04

Membuat alat simulasi traffic light untuk palang pintu kereta api menggunakan sensor jarak Ultrasonik SRF04


             Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat alat untuk kendali lampu traffic light palang pintu kereta api, jadi sistem kerjanya yaitu terdapat 3 buah sensor jarak yang mana sensor 1 digunakan untuk medeteksi arah datangnya kereta, sensor 2 untuk medeteksi arah datang kereta dari arah sebaliknya kemudian sensor 3 digunakan untuk mendeteksi selesainya kereta. alat ini menggunakan penampil lcd dan led sebagai lampunya. untuk lebih jelasnya berikut adalah skema dan programnya.



a. Minimum System





b. Sensor Jarak Ultrasonik SRF04





c. LED 





d. Program Bascom AVR

$regfile = "m16def.dat"
$crystal = 12000000

Config Lcdpin = Pin , Rs = Portd.4 , E = Portd.5 , Db4 = Portc.4
Config Lcdpin = Pin , Db5 = Portc.5 , Db6 = Portc.6 , Db7 = Portc.7
Config Lcd = 16 * 2


Config Timer0 = Timer , Prescale = 256

Cls
Cursor Off



Declare Sub Cek_jarak1
Declare Sub Cek_jarak2
Declare Sub Cek_jarak3

Dim Data_jarak1 As Word
Dim Data_jarak_olah1 As Word
Dim Data_jarak_fix1 As Word

Dim Data_jarak2 As Word
Dim Data_jarak_olah2 As Word
Dim Data_jarak_fix2 As Word

Dim Data_jarak3 As Word
Dim Data_jarak_olah3 As Word
Dim Data_jarak_fix3 As Word

Config Porta.1 = Output
Config Pinb.1 = Input

Triger1 Alias Porta.1
Pecho1 Alias Pinb.1

Config Porta.0 = Output
Config Pinb.0 = Input

Triger2 Alias Porta.0
Pecho2 Alias Pinb.0

Config Portd.2 = Output
Config Pind.3 = Input

Triger3 Alias Portd.2
Pecho3 Alias Pind.3

Dim A As Integer

'TL1
Ddrb.2 = 1
Ddrb.3 = 1
Ddrb.4 = 1

'TL2
Ddrb.5 = 1
Ddrb.6 = 1
Ddrb.7 = 1


'TL3
Ddrc.0 = 1
Ddrc.1 = 1
Ddrc.2 = 1

Portb.2 = 0
Portb.3 = 0
Portb.4 = 0

Portb.5 = 0
Portb.6 = 0
Portb.7 = 0

Portc.0 = 0
Portc.1 = 0
Portc.2 = 0


Utama:
A = 0
Do


Call Cek_jarak1
  Data_jarak1 = Data_jarak1
  Data_jarak_olah1 = Data_jarak1 * 100
  Data_jarak_fix1 = Data_jarak_olah1 / 256

Call Cek_jarak2
  Data_jarak2 = Data_jarak2
  Data_jarak_olah2 = Data_jarak2 * 100
  Data_jarak_fix2 = Data_jarak_olah2 / 256

Call Cek_jarak3
  Data_jarak3 = Data_jarak3
  Data_jarak_olah3 = Data_jarak3 * 100
  Data_jarak_fix3 = Data_jarak_olah3 / 256

Upperline
Lcd Data_jarak_fix1 ; "  " ; Data_jarak_fix2 ; "  " ; Data_jarak_fix3

Waitms 200
Cls


If Data_jarak_fix1 < 10 And A = 0 Then

A = 1

End If

If Data_jarak_fix2 < 10 And A = 0 Then

A = 1

End If

If A = 1 Then

Portb.2 = 0
Portb.3 = 1
Portb.4 = 0

Portb.5 = 0
Portb.6 = 1
Portb.7 = 0

Portc.0 = 0
Portc.1 = 0
Portc.2 = 1

Wait 3

Portb.2 = 1
Portb.3 = 0
Portb.4 = 0

Portb.5 = 1
Portb.6 = 0
Portb.7 = 0

Portc.0 = 0
Portc.1 = 0
Portc.2 = 1

A = 2

End If



If A = 2 Then
Portb.2 = 1
Portb.3 = 0
Portb.4 = 0

Portb.5 = 1
Portb.6 = 0
Portb.7 = 0

Portc.0 = 0
Portc.1 = 0
Portc.2 = 1

If Data_jarak_fix3 < 10 And A = 2 Then
Goto Tengah
End If

End If


If A = 0 Then

Portb.2 = 0
Portb.3 = 0
Portb.4 = 1

Portb.5 = 0
Portb.6 = 0
Portb.7 = 1

Portc.0 = 1
Portc.1 = 0
Portc.2 = 0

End If

Loop






Sub Cek_jarak1:
Reset Triger1
Waitus 10
Set Triger1
Waitus 20
Reset Triger1

Tcnt0 = 0
Bitwait Pecho1 , Set
Start Timer0

Do
If Pecho1 = 0 Then
Data_jarak1 = Tcnt0
Stop Timer0
Exit Do
End If

If Tifr.0 = 1 Then
Stop Timer0
Tifr.0 = 1
Data_jarak1 = &HFF
Exit Do
End If
Loop
Stop Timer0
Waitms 15
End Sub



Sub Cek_jarak2:
Reset Triger2
Waitus 10
Set Triger2
Waitus 20
Reset Triger2

Tcnt0 = 0
Bitwait Pecho2 , Set
Start Timer0

Do
If Pecho2 = 0 Then
Data_jarak2 = Tcnt0
Stop Timer0
Exit Do
End If

If Tifr.0 = 1 Then
Stop Timer0
Tifr.0 = 1
Data_jarak2 = &HFF
Exit Do
End If
Loop
Stop Timer0
Waitms 15
End Sub




Sub Cek_jarak3:
Reset Triger3
Waitus 10
Set Triger3
Waitus 20
Reset Triger3

Tcnt0 = 0
Bitwait Pecho3 , Set
Start Timer0

Do
If Pecho3 = 0 Then
Data_jarak3 = Tcnt0
Stop Timer0
Exit Do
End If

If Tifr.0 = 1 Then
Stop Timer0
Tifr.0 = 1
Data_jarak3 = &HFF
Exit Do
End If
Loop
Stop Timer0
Waitms 15
End Sub




Tengah:
Do

Portb.2 = 1
Portb.3 = 0
Portb.4 = 0

Portb.5 = 1
Portb.6 = 0
Portb.7 = 0

Portc.0 = 0
Portc.1 = 0
Portc.2 = 1

Call Cek_jarak1
  Data_jarak1 = Data_jarak1
  Data_jarak_olah1 = Data_jarak1 * 100
  Data_jarak_fix1 = Data_jarak_olah1 / 256

Call Cek_jarak2
  Data_jarak2 = Data_jarak2
  Data_jarak_olah2 = Data_jarak2 * 100
  Data_jarak_fix2 = Data_jarak_olah2 / 256

Call Cek_jarak3
  Data_jarak3 = Data_jarak3
  Data_jarak_olah3 = Data_jarak3 * 100
  Data_jarak_fix3 = Data_jarak_olah3 / 256

Upperline
Lcd Data_jarak_fix1 ; "  " ; Data_jarak_fix2 ; "  " ; Data_jarak_fix3


Waitms 200
Cls

If Data_jarak_fix3 > 10 Then
Goto Utama
End If


Loop






 e. VIDEO HASILNYA











Membuat TENSI Meter Digital menggunakan Mikrokontroller dan bahasa CV AVR (Code Vision AVR)

Membuat TENSI Meter Digital menggunakan Mikrokontroller dan bahasa CV AVR (Code Vision AVR)


            Pada kesempatan kali ini saya akan membahas mengenai bagaimana cara membuat tensi meter digital dengan menggunakan mikrokontroller dan bahasa C atau CV AVR. alat ini digunakan untuk mengukur tekanan darah dalam satuan mmHg. sensor yang digunakan adalah sensor tekanan MPX2010. dengan beracuan dengan datasheet maka satuan Kpa diubah kedalam mmHg. berikut adalah grafik dan rumusnya.


       v =(float)(Dataadc*5.0)/1023.0      
       kpa = (float)((v / 5)-0.04)/0.018
       mmhg = (float)(kpa * 7.5)


 
 a. Minimum System




b. Sensor Tekanan / Pressure MPX2010





c. Program CV AVR ( Code Vision AVR )

 /*****************************************************
This program was produced by the
CodeWizardAVR V2.05.3 Standard
Automatic Program Generator
© Copyright 1998-2011 Pavel Haiduc, HP InfoTech s.r.l.
http://www.hpinfotech.com

Project :
Version :
Date    : 7/18/2016
Author  : anak jalanan mencari cinta
Company : embeeminded.blogspot.com
Comments: lebay abizz


Chip type               : ATmega8
Program type            : Application
AVR Core Clock frequency: 11.059200 MHz
Memory model            : Small
External RAM size       : 0
Data Stack size         : 256
*****************************************************/

#include <mega8.h>
#include <stdlib.h>
#include <delay.h>

// Alphanumeric LCD functions
#include <alcd.h>

#define ADC_VREF_TYPE 0x40

// Read the AD conversion result
unsigned int read_adc(unsigned char adc_input)
{
ADMUX=adc_input | (ADC_VREF_TYPE & 0xff);
// Delay needed for the stabilization of the ADC input voltage
delay_us(10);
// Start the AD conversion
ADCSRA|=0x40;
// Wait for the AD conversion to complete
while ((ADCSRA & 0x10)==0);
ADCSRA|=0x10;
return ADCW;
}

// Declare your global variables here
int Dataadc;
char temp[10];
float kpa;
float v;
char tempx[10];
float mmhg;

void main(void)
{
// Declare your local variables here

// Input/Output Ports initialization
// Port B initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=Out Func0=Out
// State7=P State6=P State5=P State4=P State3=P State2=P State1=0 State0=0
PORTB=0xFC;
DDRB=0x03;

// Port C initialization
// Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State6=P State5=P State4=P State3=P State2=P State1=P State0=P
PORTC=0x7F;
DDRC=0x00;

// Port D initialization
// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out
// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0
PORTD=0x00;
DDRD=0xFF;

// Timer/Counter 0 initialization
// Clock source: System Clock
// Clock value: Timer 0 Stopped
TCCR0=0x00;
TCNT0=0x00;

// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: Timer1 Stopped
// Mode: Normal top=0xFFFF
// OC1A output: Discon.
// OC1B output: Discon.
// Noise Canceler: Off
// Input Capture on Falling Edge
// Timer1 Overflow Interrupt: Off
// Input Capture Interrupt: Off
// Compare A Match Interrupt: Off
// Compare B Match Interrupt: Off
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
ICR1H=0x00;
ICR1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;

// Timer/Counter 2 initialization
// Clock source: System Clock
// Clock value: Timer2 Stopped
// Mode: Normal top=0xFF
// OC2 output: Disconnected
ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;

// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
MCUCR=0x00;

// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x00;

// USART initialization
// USART disabled
UCSRB=0x00;

// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
ACSR=0x80;
SFIOR=0x00;

// ADC initialization
// ADC Clock frequency: 691.200 kHz
// ADC Voltage Reference: AVCC pin
ADMUX=ADC_VREF_TYPE & 0xff;
ADCSRA=0x84;

// SPI initialization
// SPI disabled
SPCR=0x00;

// TWI initialization
// TWI disabled
TWCR=0x00;

// Alphanumeric LCD initialization
// Connections are specified in the
// Project|Configure|C Compiler|Libraries|Alphanumeric LCD menu:
// RS - PORTD Bit 0
// RD - PORTD Bit 1
// EN - PORTD Bit 2
// D4 - PORTD Bit 3
// D5 - PORTD Bit 4
// D6 - PORTD Bit 5
// D7 - PORTD Bit 6
// Characters/line: 16
lcd_init(16);

while (1)
      {
    
      PORTB.0 = 1;
      PORTB.1 = 1;
    
      delay_ms(10);
    
      // Place your code here
       Dataadc = read_adc(0);
     
       v =(float)(Dataadc*5.0)/1023.0;
     
       kpa = (float)((v / 5)-0.04)/0.018;
       mmhg = (float)(kpa * 7.5);
     
       ftoa(mmhg,3,temp);
       lcd_gotoxy(0,0);
       lcd_putsf("mmhg = ");
       lcd_puts(temp);
     
       ftoa(v,3,tempx);
       lcd_gotoxy(0,1);
       lcd_putsf("V = ");
       lcd_puts(tempx);
     
             
       delay_ms(200);
     
      }
}





d. Cara Menggunakan Alat

              Pertama berikan supply 12v ke alat kemudian akan tampil pada layar LCD mengenai tekanan yang dihasilkan, kemudian pasangkan perekat pada lengan tangan dan mulailah aktifkan pompa agar udara masuk ke perekat di lengan. jika sudah, maka akan tampil nilai tekanannya dalam satuan mmHg. jika ingin dirubah kesatuan yang lain bisa saja, yang penting terdapat rumus acuan untuk merubahnya dan bisa bersumber dari datasheet.









    

Membuat Frequency dan Duty Cycle PWM Adjustable 0 - 40KHz Menggunakan Code Vision AVR (CV AVR)

Membuat Frequency dan Duty Cycle PWM Generator Adjustable 0 - 40KHz Menggunakan Code Vision AVR (CV AVR)


            Pada kesempatan yang berbahagia kali ini saya akan menjelaskan mengenai bagaimana cara membuat alat yang mana alat tersebut bisa menghasilkan frequency dan duty cycle yang dapat diatur sesuai keinginan, pada alat ini tersetting frequemcy 40KHz dengan Duty Cycle bisa diatur menggunakan Potensiometer. alat ini diaplikasikan untuk rangkaian buck dan boost converter yang mana membutuhkan frequency sinyal kotak tertentu dan duty cycle tertenu juga. untuk lebih jelasnya berikut adalah skema dan programnya.



a. Minimum System ATMega16





b. Potensiometer





c. Program CV AVR (Code Vision AVR)

/*****************************************************
This program was produced by the
CodeWizardAVR V2.05.3 Standard
Automatic Program Generator
© Copyright 1998-2011 Pavel Haiduc, HP InfoTech s.r.l.
http://www.hpinfotech.com

Project :
Version :
Date    : 7/20/2016
Author  : tyery08
Company : embeeminded.blogspot.com
Comments:


Chip type               : ATmega8535
Program type            : Application
AVR Core Clock frequency: 16.000000 MHz
Memory model            : Small
External RAM size       : 0
Data Stack size         : 128
*****************************************************/

#include <mega16.h>
#include <stdlib.h>
#include <delay.h>
#include <math.h>
// Standard Input/Output functions
#include <stdio.h>

// Alphanumeric LCD functions
#include <alcd.h>

#define ADC_VREF_TYPE 0x40

// Read the AD conversion result
unsigned int read_adc(unsigned char adc_input)
{
ADMUX=adc_input | (ADC_VREF_TYPE & 0xff);
// Delay needed for the stabilization of the ADC input voltage
delay_us(10);
// Start the AD conversion
ADCSRA|=0x40;
// Wait for the AD conversion to complete
while ((ADCSRA & 0x10)==0);
ADCSRA|=0x10;
return ADCW;
}

// Declare your global variables here
// Declare your global variables here
unsigned char buffer[32];
unsigned int inADC17, inADC24, outADC, arusout;
unsigned int dutyc;
float ainx, aoutx, voutx, vin, ain, arusin, aout, vin1, dayain, dayain1, slope;
float dc17, dc24, ft17, ft24, ftOut;  

float dayain;
 
char temp[10];
char temp1[10];
char temp2[10];
char temp3[10];
char temp4[10];



void main(void)
{

// Declare your local variables here
unsigned char i;
// Input/Output Ports initialization
// Port A initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTA=0x00;
DDRA=0x00;

// Port B initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTB=0x00;
DDRB=0x00;

// Port C initialization
// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out
// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0
PORTC=0x00;
DDRC=0xFF;

// Port D initialization
// Func7=In Func6=In Func5=Out Func4=Out Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=0 State4=0 State3=T State2=T State1=T State0=T
PORTD=0x00;
DDRD=0x30;

// Timer/Counter 0 initialization
// Clock source: System Clock
// Clock value: Timer 0 Stopped
// Mode: Normal top=0xFF
// OC0 output: Disconnected
TCCR0=0x00;
TCNT0=0x00;
OCR0=0x00;

// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: 16000.000 kHz
// Mode: Fast PWM top=ICR1
// OC1A output: Inverted
// OC1B output: Inverted
// Noise Canceler: Off
// Input Capture on Falling Edge
// Timer1 Overflow Interrupt: Off
// Input Capture Interrupt: Off
// Compare A Match Interrupt: Off
// Compare B Match Interrupt: Off
TCCR1A=0xA2;
TCCR1B=0x19;
TCNT1H=0x00;
TCNT1L=0x00;
ICR1H=0x01;
ICR1L=0x90;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;

// Timer/Counter 2 initialization
// Clock source: System Clock
// Clock value: Timer2 Stopped
// Mode: Normal top=0xFF
// OC2 output: Disconnected
ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;

// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
// INT2: Off
MCUCR=0x00;
MCUCSR=0x00;

// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x00;

// USART initialization
// USART disabled
UCSRB=0x00;

// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
ACSR=0x80;
SFIOR=0x00;

// ADC initialization
// ADC Clock frequency: 125.000 kHz
// ADC Voltage Reference: AVCC pin
// ADC High Speed Mode: Off
// ADC Auto Trigger Source: Free Running
ADMUX=ADC_VREF_TYPE & 0xff;
ADCSRA=0xA7;
SFIOR&=0x0F;

// SPI initialization
// SPI disabled
SPCR=0x00;

// TWI initialization
// TWI disabled
TWCR=0x00;

// Alphanumeric LCD initialization
// Connections are specified in the
// Project|Configure|C Compiler|Libraries|Alphanumeric LCD menu:
// RS - PORTC Bit 7
// RD - PORTC Bit 6
// EN - PORTC Bit 5
// D4 - PORTC Bit 3
// D5 - PORTC Bit 2
// D6 - PORTC Bit 1
// D7 - PORTC Bit 0
// Characters/line: 16
lcd_init(16);

while (1)
      {
  
      // (optional) 400 adalah nilai maksimal pwm==100%
     
//    OCR1A=in17;
      OCR1B=inADC17;
//    OCR1B=dutyc;         
      delay_ms(200);
      OCR1A=0;
      OCR1B=0;
      delay_ms(1);     
    
    
      inADC17=read_adc(7);
      vin = (inADC17 * 5.0)/1023.0; 
                   
      ftoa(vin,1,temp);    
      lcd_gotoxy (0,0);
      lcd_putsf("V= ");
      lcd_puts(temp);

      arusin=read_adc(4);
     
      ain = (arusin * 5.0)/1023.0;
      ainx = (ain - 2.5)/0.1;
     
      ftoa(ainx,1,temp1);    
      lcd_gotoxy (0,1);
      lcd_putsf("Ai=");
      lcd_puts(temp1);

      arusout=read_adc(6);
     
      aout = (arusout * 5.0)/1023.0;
      aoutx = (aout -2.5)/0.1;
 
//      ftoa(aoutx,1,temp2);    
//      lcd_gotoxy (8,1);
//      lcd_putsf("A0=");
//      lcd_puts(temp2);
     
      ftoa(dayain,1,temp3);    
      lcd_gotoxy (8,1);
      lcd_putsf("P=");
      lcd_puts(temp3);
 
      ftoa(slope,1,temp4);    
      lcd_gotoxy (8,0);
      lcd_putsf("S=");
      lcd_puts(temp4);
 
      dayain = ainx * vin;
    
      slope = (dayain - dayain1) / (vin - vin1);
     
      if (slope > 0) {
       //dutyc = dutyc + 5;
      }
      if (slope < 0) {
       //dutyc = dutyc - 5;
      }
     
      dayain1 = dayain;
      vin1 = vin;
    
      }
}




d. Gambar Hasilnya










Mengakses Keypad Matrix Sebagai Input Waktu Arduino

Mengakses Keypad Matrix Sebagai Input Waktu Arduino


             Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara mengakses sebuah device yaitu keypad matrix 4x4 menggunakan kontroller Arduino. Alat ini difungsikan sebagai input waktu atau pengatur waktu, jadi prinsip kerjanya seperti berikut. terdapat dua buah input waktu yaitu waktu pertama dan waktu kedua, waktu pertama terdapat dua buah parameter yaitu jam dan menit, begitu pula dengan waktu kedua. terdapat LCD yang berfungsi sebagai tampilan input yang di set. untuk lebih jelasnya berikut adalah program dan skemanya.



a. Arduino Mega





b. Keypad Matrix 4x4





c. LCD Display 16x2





d. Program Arduino IDE

#include <Keypad.h>
#include <Wire.h>
#include <LiquidCrystal.h>

LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

long first = 0;
long firstx = 0;

long second = 0;
long menit1 = 0;
int jamon1x = 0;
int menon1x = 0;

long second2 = 0;
long menit2 = 0;
int jamon2x = 0;
int menon2x = 0;


char customKey;
const byte ROWS = 4;
const byte COLS = 4;

char keys[ROWS][COLS] = {
{'D', 'C', 'B', 'A'},
{'#', '9', '6', '3'},
{'0', '8', '5', '2'},
{'*', '7', '4', '1'}
};
byte rowPins[ROWS] = {A0,A1,A2,A3}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {A4,A5,A6,A7}; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS);

void setup()
{
  lcd.begin(16, 2);
  lcd.clear();
  lcd.noCursor();
   
}


void loop()
{
  customKey = customKeypad.getKey();
 
  lcd.setCursor(0,1);
   lcd.print(jamon1x);
   lcd.print(" ");
   lcd.print(menon1x);
   lcd.print(" "); 
   lcd.print(jamon2x);
   lcd.print(" ");
   lcd.print(menon2x);
  
  
  
  switch(customKey)
  {
  case '0' ... '9': // This keeps collecting the first value until a operator is pressed "+-*/"
    lcd.setCursor(0,0);
    first = first * 10 + (customKey - '0');
    lcd.print(first);
    
    if(first == 13){
      first = 0;
      delay(1000);
      lcd.clear();
   
     jamon1();
    
    }
   
    if(first == 12){
     delay(1000);
     lcd.clear();
    
     jamon2();

   
    }
   
    break;

  case '#':
   
   
 
    break;

  case '*':
    lcd.clear();
    first = 0;
    break;
  case 'C':
    break;
  case 'D':
    break;


  }
}


void jamon1(){
    while( 1 )
  {
customKey = customKeypad.getKey();
 lcd.setCursor(0,1);
 lcd.print("jam on1");
    if(customKey >= '0' && customKey <= '9')
    {
      second = second * 10 + (customKey - '0');
      lcd.setCursor(0,0);
      lcd.print(second);
    }
   
    if(customKey == 'B'){
      jamon1x = second;
      lcd.clear();
      delay(1000);
      menon1();
    }
    if(customKey == 'A'){
      return;
    }
   
  }
 

 
 }



void menon1(){
  while( 1 )
  {
customKey = customKeypad.getKey();
 lcd.setCursor(0,1);
 lcd.print("menit on1");
    if(customKey >= '0' && customKey <= '9')
    {
      menit1 = menit1 * 10 + (customKey - '0');
      lcd.setCursor(0,0);
      lcd.print(menit1);
     
    }
   
    if(customKey == 'A'){
      menon1x = menit1;
      lcd.clear();
      delay(1000);
      return;
    }
       
   
  }
   
}



void jamon2(){
    while( 1 )
  {
customKey = customKeypad.getKey();
 lcd.setCursor(0,1);
 lcd.print("jam on2");
    if(customKey >= '0' && customKey <= '9')
    {
      second2 = second2 * 10 + (customKey - '0');
      lcd.setCursor(0,0);
      lcd.print(second2);
    }
   
    if(customKey == 'B'){
      jamon2x = second2;
      lcd.clear();
      delay(1000);
      menon2();
    }
    if(customKey == 'A'){
      return;
    }
   
  }
 

 
 }



void menon2(){
  while( 1 )
  {
customKey = customKeypad.getKey();
 lcd.setCursor(0,1);
 lcd.print("menit on2");
    if(customKey >= '0' && customKey <= '9')
    {
      menit2 = menit2 * 10 + (customKey - '0');
      lcd.setCursor(0,0);
      lcd.print(menit2);
     
    }
   
    if(customKey == 'A'){
      menon2x = menit2;
      lcd.clear();
      delay(1000);
      return;
    }
       
  }
   
}





e. VIDEO HASILNYA










Mengakses Solenoid Valve dan Water Flow Meter Sensor untuk Water Mixer Vending Machine menggunakan Arduino

Mengakses Solenoid Valve dan Water Flow Meter Sensor untuk Water Mixer Vending Machine menggunakan Arduino


             Pada kesempatan kali ini saya aka menjelaskan mengenai bagaimana cara membuat sebuah alat yang lumayan canggih yaitu water mixer vending machine menggunakan arduino, alat ini di similasikan seperti minuman yang bisa dipilih oleh user, misalkan ingin membeli susu bermacam-macam rasa misal rasa strawberry atau coklat atau vanila, terdapat 3 buah tombol yaitu tombol untuk susu coklat, susu strawberry dan susu vanila. jika susu coklat maka akan terjadi campuran dari susu putih ditambah coklat cair, jika rasa strawberry maka akan terjadi campuran antara susu putih dengan strawberry cair. alat ini menggunakan water flowmwter untuk melihat debit aliran air dari sumber menuju ke gelas agar diketahui jika tangki sudah habis atau tinggal sedikit, untuk kendali aliran air digunakan solenoid valve untuk buka tutup valve air. untuk mengetahui program dan skemanya, berikut penjelasannya.


LINK Referensi
https://arduino-info.wikispaces.com/MegaQuickRef



a. Arduino Mega





b. Water Flow Sensor





c. Solenoid Valve 1/2 DIM





d. Motor DC Pengaduk





e. Tombol Pilih





f. Buck Converter Pengatur Kecepatan Motor





g. Program Arduino IDE

#include "Wire.h"
#include <LiquidCrystal.h>
LiquidCrystal lcd(A0, A1, A2, A3, A4, A5);

const int buttonPin1 = 31;
const int buttonPin2 = 33;
const int buttonPin3 = 35;

const int relay1 = 22;
const int relay2 = 23;
const int relay3 = 26;
const int relay4 = 28;

int buttonState1 = 0;
int buttonState2 = 0;
int buttonState3 = 0;

int putaran = 0;

byte sensorInterrupt = 0;  // 0 = digital pin 2
byte sensorPin       = 2;

float calibrationFactor = 4.5;

volatile byte pulseCount; 

unsigned int frac;
float flowRate;
unsigned int flowMilliLitres;
float totalMilliLitres;

unsigned long oldTime;



byte sensorInterrupt1 = 1;  // 1 = digital pin 3
byte sensorPin1       = 2;

float calibrationFactor1 = 4.5;

volatile byte pulseCount1; 

unsigned int frac1;
float flowRate1;
unsigned int flowMilliLitres1;
float totalMilliLitres1;

unsigned long oldTime1;



byte sensorInterrupt2 = 5;  // 5 = digital pin 18
byte sensorPin2       = 2;

float calibrationFactor2 = 4.5;

volatile byte pulseCount2; 

unsigned int frac2;
float flowRate2;
unsigned int flowMilliLitres2;
float totalMilliLitres2;

unsigned long oldTime2;


byte sensorInterrupt3 = 4;  // 3 = digital pin 19
byte sensorPin3       = 2;

float calibrationFactor3 = 4.5;

volatile byte pulseCount3; 

unsigned int frac3;
float flowRate3;
unsigned int flowMilliLitres3;
float totalMilliLitres3;

unsigned long oldTime3;




void setup() {
 
  pinMode(sensorPin, INPUT);
  digitalWrite(sensorPin, HIGH);

  pulseCount        = 0;
  flowRate          = 0.0;
  flowMilliLitres   = 0;
  totalMilliLitres  = 0;
  oldTime           = 0;

  attachInterrupt(sensorInterrupt, pulseCounter, FALLING);


  pinMode(sensorPin1, INPUT);
  digitalWrite(sensorPin1, HIGH);

  pulseCount1        = 0;
  flowRate1          = 0.0;
  flowMilliLitres1   = 0;
  totalMilliLitres1  = 0;
  oldTime1           = 0;

  attachInterrupt(sensorInterrupt1, pulseCounter1, FALLING);
 
   
  pinMode(sensorPin2, INPUT);
  digitalWrite(sensorPin2, HIGH);

  pulseCount2        = 0;
  flowRate2          = 0.0;
  flowMilliLitres2   = 0;
  totalMilliLitres2  = 0;
  oldTime2           = 0;

  attachInterrupt(sensorInterrupt2, pulseCounter2, FALLING);
 
 
 
  pinMode(sensorPin3, INPUT);
  digitalWrite(sensorPin3, HIGH);

  pulseCount3        = 0;
  flowRate3         = 0.0;
  flowMilliLitres3   = 0;
  totalMilliLitres3  = 0;
  oldTime3           = 0;

  attachInterrupt(sensorInterrupt3, pulseCounter3, FALLING);
 
 

  Serial.begin(9600);
  
  lcd.begin(16, 2);
  lcd.clear();
  lcd.noCursor();
 
  pinMode(buttonPin1, INPUT);
  pinMode(buttonPin2, INPUT);
  pinMode(buttonPin3, INPUT);
 
  pinMode(relay1, OUTPUT);
  pinMode(relay2, OUTPUT);
  pinMode(relay3, OUTPUT);
  pinMode(relay4, OUTPUT);
 
  digitalWrite(buttonPin1, HIGH);
  digitalWrite(buttonPin2, HIGH);
  digitalWrite(buttonPin3, HIGH);
 
  digitalWrite(relay1, HIGH);
  digitalWrite(relay2, HIGH);
  digitalWrite(relay3, HIGH);
  digitalWrite(relay4, HIGH);
}

void loop() {
 
  putaran = 0;

    buttonState1 = digitalRead(buttonPin1);
    buttonState2 = digitalRead(buttonPin2);
    buttonState3 = digitalRead(buttonPin3);
           
  if (buttonState1 == LOW) {
    delay(500);
      putaran = 0;
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("MENU DIPILIH");  
      lcd.setCursor(0, 1);
      lcd.print("LEMON TEA");
     
      digitalWrite(relay1, LOW);
      digitalWrite(relay2, LOW);
      digitalWrite(relay3, LOW);
      digitalWrite(relay4, HIGH);
 
      delay(3000);
      lcd.clear();
      lemontea();
     
  }
  else if (buttonState2 == LOW) {
     delay(500);  
      putaran = 0; 
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("MENU DIPILIH");  
      lcd.setCursor(0, 1);
      lcd.print("MILK TEA");
     
      digitalWrite(relay1, LOW);
      digitalWrite(relay2, LOW);
      digitalWrite(relay3, HIGH);
      digitalWrite(relay4, LOW);

      delay(3000);
      lcd.clear();
      milktea();
     
  }
  else if (buttonState3 == LOW) { 
      delay(500);
      putaran = 0;   
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("MENU DIPILIH");  
      lcd.setCursor(0, 1);
      lcd.print("MILK LEMON TEA");
     
      digitalWrite(relay1, LOW);
      digitalWrite(relay2, LOW);
      digitalWrite(relay3, LOW);
      digitalWrite(relay4, LOW);
     
      delay(3000);
      lcd.clear();
      milklemontea();
     
  } 
  
  else {
   
      lcd.setCursor(0, 0);
      lcd.print("PILIH MENU 1 2 3");
      lcd.setCursor(0, 1);
      lcd.print("1.MT 2.MLT 3.LT");
     
      digitalWrite(relay1, HIGH);
      digitalWrite(relay2, HIGH);
      digitalWrite(relay3, HIGH);
      digitalWrite(relay4, HIGH);
 
  }
 
 
 

}




void pulseCounter()
{
  pulseCount++;
}

void pulseCounter1()
{
  pulseCount1++;
}

void pulseCounter2()
{
  pulseCount2++;
}

void pulseCounter3()
{
  pulseCount3++;
}





void lemontea(){
 
putaran++;

delay(100);
 
if((millis() - oldTime) > 1000)    // Only process counters once per second
  {

    detachInterrupt(sensorInterrupt);
    flowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / calibrationFactor;
    oldTime = millis();
    flowMilliLitres = (flowRate / 60) * 1000;
    totalMilliLitres += flowMilliLitres;
      
   
    // Print the flow rate for this second in litres / minute
    Serial.print("Flow rate: ");
    Serial.print(int(flowRate));  // Print the integer part of the variable
    Serial.print(".");             // Print the decimal point
    // Determine the fractional part. The 10 multiplier gives us 1 decimal place.
    frac = (flowRate - int(flowRate)) * 10;
    Serial.print(frac, DEC) ;      // Print the fractional part of the variable
    Serial.print("L/min");
    // Print the number of litres flowed in this second
    Serial.print("  Current Liquid Flowing: ");             // Output separator
    Serial.print(flowMilliLitres);
    Serial.print("mL/Sec");

    // Print the cumulative total of litres flowed since starting
    Serial.print("  Output Liquid Quantity: ");             // Output separator
    Serial.print(totalMilliLitres);
    Serial.println("mL");

    // Reset the pulse counter so we can start incrementing again
    pulseCount = 0;
   
    // Enable the interrupt again now that we've finished sending output
    attachInterrupt(sensorInterrupt, pulseCounter, FALLING);
  }
 
 
 
  if((millis() - oldTime1) > 1000)    // Only process counters once per second
  {

    detachInterrupt(sensorInterrupt1);
    flowRate1 = ((1000.0 / (millis() - oldTime1)) * pulseCount1) / calibrationFactor1;
    oldTime1 = millis();
    flowMilliLitres1 = (flowRate1 / 60) * 1000;
    totalMilliLitres1 += flowMilliLitres1;
      
   
    // Print the flow rate for this second in litres / minute
    Serial.print("Flow rate1: ");
    Serial.print(int(flowRate1));  // Print the integer part of the variable
    Serial.print(".");             // Print the decimal point
    // Determine the fractional part. The 10 multiplier gives us 1 decimal place.
    frac1 = (flowRate1 - int(flowRate1)) * 10;
    Serial.print(frac1, DEC) ;      // Print the fractional part of the variable
    Serial.print("L/min");
    // Print the number of litres flowed in this second
    Serial.print("  Current Liquid Flowing1: ");             // Output separator
    Serial.print(flowMilliLitres1);
    Serial.print("mL/Sec");

    // Print the cumulative total of litres flowed since starting
    Serial.print("  Output Liquid Quantity: ");             // Output separator
    Serial.print(totalMilliLitres1);
    Serial.println("mL");

    // Reset the pulse counter so we can start incrementing again
    pulseCount1 = 0;
   
    // Enable the interrupt again now that we've finished sending output
    attachInterrupt(sensorInterrupt1, pulseCounter1, FALLING);
  }
 
 
 
  if((millis() - oldTime2) > 1000)    // Only process counters once per second
  {

    detachInterrupt(sensorInterrupt2);
    flowRate2 = ((1000.0 / (millis() - oldTime2)) * pulseCount2) / calibrationFactor2;
    oldTime2 = millis();
    flowMilliLitres2 = (flowRate2 / 60) * 1000;
    totalMilliLitres2 += flowMilliLitres2;
      
   
    // Print the flow rate for this second in litres / minute
    Serial.print("Flow rate2: ");
    Serial.print(int(flowRate2));  // Print the integer part of the variable
    Serial.print(".");             // Print the decimal point
    // Determine the fractional part. The 10 multiplier gives us 1 decimal place.
    frac2 = (flowRate2 - int(flowRate2)) * 10;
    Serial.print(frac2, DEC) ;      // Print the fractional part of the variable
    Serial.print("L/min");
    // Print the number of litres flowed in this second
    Serial.print("  Current Liquid Flowing2: ");             // Output separator
    Serial.print(flowMilliLitres2);
    Serial.print("mL/Sec");

    // Print the cumulative total of litres flowed since starting
    Serial.print("  Output Liquid Quantity2: ");             // Output separator
    Serial.print(totalMilliLitres2);
    Serial.println("mL");

    // Reset the pulse counter so we can start incrementing again
    pulseCount2 = 0;
   
    // Enable the interrupt again now that we've finished sending output
    attachInterrupt(sensorInterrupt2, pulseCounter2, FALLING);
  }
 

    if(putaran >= 10){
    return;
    }
    else{
    lemontea();
    }
   

}







void milktea(){
 
putaran++;

delay(100);
 
if((millis() - oldTime) > 1000)    // Only process counters once per second
  {

    detachInterrupt(sensorInterrupt);
    flowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / calibrationFactor;
    oldTime = millis();
    flowMilliLitres = (flowRate / 60) * 1000;
    totalMilliLitres += flowMilliLitres;
      
   
    // Print the flow rate for this second in litres / minute
    Serial.print("Flow rate: ");
    Serial.print(int(flowRate));  // Print the integer part of the variable
    Serial.print(".");             // Print the decimal point
    // Determine the fractional part. The 10 multiplier gives us 1 decimal place.
    frac = (flowRate - int(flowRate)) * 10;
    Serial.print(frac, DEC) ;      // Print the fractional part of the variable
    Serial.print("L/min");
    // Print the number of litres flowed in this second
    Serial.print("  Current Liquid Flowing: ");             // Output separator
    Serial.print(flowMilliLitres);
    Serial.print("mL/Sec");

    // Print the cumulative total of litres flowed since starting
    Serial.print("  Output Liquid Quantity: ");             // Output separator
    Serial.print(totalMilliLitres);
    Serial.println("mL");

    // Reset the pulse counter so we can start incrementing again
    pulseCount = 0;
   
    // Enable the interrupt again now that we've finished sending output
    attachInterrupt(sensorInterrupt, pulseCounter, FALLING);
  }
 
 
 
  if((millis() - oldTime1) > 1000)    // Only process counters once per second
  {

    detachInterrupt(sensorInterrupt1);
    flowRate1 = ((1000.0 / (millis() - oldTime1)) * pulseCount1) / calibrationFactor1;
    oldTime1 = millis();
    flowMilliLitres1 = (flowRate1 / 60) * 1000;
    totalMilliLitres1 += flowMilliLitres1;
      
   
    // Print the flow rate for this second in litres / minute
    Serial.print("Flow rate1: ");
    Serial.print(int(flowRate1));  // Print the integer part of the variable
    Serial.print(".");             // Print the decimal point
    // Determine the fractional part. The 10 multiplier gives us 1 decimal place.
    frac1 = (flowRate1 - int(flowRate1)) * 10;
    Serial.print(frac1, DEC) ;      // Print the fractional part of the variable
    Serial.print("L/min");
    // Print the number of litres flowed in this second
    Serial.print("  Current Liquid Flowing1: ");             // Output separator
    Serial.print(flowMilliLitres1);
    Serial.print("mL/Sec");

    // Print the cumulative total of litres flowed since starting
    Serial.print("  Output Liquid Quantity: ");             // Output separator
    Serial.print(totalMilliLitres1);
    Serial.println("mL");

    // Reset the pulse counter so we can start incrementing again
    pulseCount1 = 0;
   
    // Enable the interrupt again now that we've finished sending output
    attachInterrupt(sensorInterrupt1, pulseCounter1, FALLING);
  }
 
 
 
  if((millis() - oldTime3) > 1000)    // Only process counters once per second
  {

    detachInterrupt(sensorInterrupt3);
    flowRate3 = ((1000.0 / (millis() - oldTime3)) * pulseCount3) / calibrationFactor3;
    oldTime3 = millis();
    flowMilliLitres3 = (flowRate3 / 60) * 1000;
    totalMilliLitres3 += flowMilliLitres3;
      
   
    // Print the flow rate for this second in litres / minute
    Serial.print("Flow rate3: ");
    Serial.print(int(flowRate3));  // Print the integer part of the variable
    Serial.print(".");             // Print the decimal point
    // Determine the fractional part. The 10 multiplier gives us 1 decimal place.
    frac3 = (flowRate3 - int(flowRate3)) * 10;
    Serial.print(frac3, DEC) ;      // Print the fractional part of the variable
    Serial.print("L/min");
    // Print the number of litres flowed in this second
    Serial.print("  Current Liquid Flowing3: ");             // Output separator
    Serial.print(flowMilliLitres3);
    Serial.print("mL/Sec");

    // Print the cumulative total of litres flowed since starting
    Serial.print("  Output Liquid Quantity3: ");             // Output separator
    Serial.print(totalMilliLitres3);
    Serial.println("mL");

    // Reset the pulse counter so we can start incrementing again
    pulseCount3 = 0;
   
    // Enable the interrupt again now that we've finished sending output
    attachInterrupt(sensorInterrupt3, pulseCounter3, FALLING);
  }
 

    if(putaran >= 10){
    return;
    }
    else{
    milktea();
    }
   

}





void milklemontea(){
 
putaran++;

delay(100);
 
if((millis() - oldTime) > 1000)    // Only process counters once per second
  {

    detachInterrupt(sensorInterrupt);
    flowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / calibrationFactor;
    oldTime = millis();
    flowMilliLitres = (flowRate / 60) * 1000;
    totalMilliLitres += flowMilliLitres;
      
   
    // Print the flow rate for this second in litres / minute
    Serial.print("Flow rate: ");
    Serial.print(int(flowRate));  // Print the integer part of the variable
    Serial.print(".");             // Print the decimal point
    // Determine the fractional part. The 10 multiplier gives us 1 decimal place.
    frac = (flowRate - int(flowRate)) * 10;
    Serial.print(frac, DEC) ;      // Print the fractional part of the variable
    Serial.print("L/min");
    // Print the number of litres flowed in this second
    Serial.print("  Current Liquid Flowing: ");             // Output separator
    Serial.print(flowMilliLitres);
    Serial.print("mL/Sec");

    // Print the cumulative total of litres flowed since starting
    Serial.print("  Output Liquid Quantity: ");             // Output separator
    Serial.print(totalMilliLitres);
    Serial.println("mL");

    // Reset the pulse counter so we can start incrementing again
    pulseCount = 0;
   
    // Enable the interrupt again now that we've finished sending output
    attachInterrupt(sensorInterrupt, pulseCounter, FALLING);
  }
 
 
 
  if((millis() - oldTime1) > 1000)    // Only process counters once per second
  {

    detachInterrupt(sensorInterrupt1);
    flowRate1 = ((1000.0 / (millis() - oldTime1)) * pulseCount1) / calibrationFactor1;
    oldTime1 = millis();
    flowMilliLitres1 = (flowRate1 / 60) * 1000;
    totalMilliLitres1 += flowMilliLitres1;
      
   
    // Print the flow rate for this second in litres / minute
    Serial.print("Flow rate1: ");
    Serial.print(int(flowRate1));  // Print the integer part of the variable
    Serial.print(".");             // Print the decimal point
    // Determine the fractional part. The 10 multiplier gives us 1 decimal place.
    frac1 = (flowRate1 - int(flowRate1)) * 10;
    Serial.print(frac1, DEC) ;      // Print the fractional part of the variable
    Serial.print("L/min");
    // Print the number of litres flowed in this second
    Serial.print("  Current Liquid Flowing1: ");             // Output separator
    Serial.print(flowMilliLitres1);
    Serial.print("mL/Sec");

    // Print the cumulative total of litres flowed since starting
    Serial.print("  Output Liquid Quantity: ");             // Output separator
    Serial.print(totalMilliLitres1);
    Serial.println("mL");

    // Reset the pulse counter so we can start incrementing again
    pulseCount1 = 0;
   
    // Enable the interrupt again now that we've finished sending output
    attachInterrupt(sensorInterrupt1, pulseCounter1, FALLING);
  }
 
 
 
  if((millis() - oldTime2) > 1000)    // Only process counters once per second
  {

    detachInterrupt(sensorInterrupt2);
    flowRate2 = ((1000.0 / (millis() - oldTime2)) * pulseCount2) / calibrationFactor2;
    oldTime2 = millis();
    flowMilliLitres2 = (flowRate2 / 60) * 1000;
    totalMilliLitres2 += flowMilliLitres2;
      
   
    // Print the flow rate for this second in litres / minute
    Serial.print("Flow rate2: ");
    Serial.print(int(flowRate2));  // Print the integer part of the variable
    Serial.print(".");             // Print the decimal point
    // Determine the fractional part. The 10 multiplier gives us 1 decimal place.
    frac2 = (flowRate2 - int(flowRate2)) * 10;
    Serial.print(frac2, DEC) ;      // Print the fractional part of the variable
    Serial.print("L/min");
    // Print the number of litres flowed in this second
    Serial.print("  Current Liquid Flowing2: ");             // Output separator
    Serial.print(flowMilliLitres2);
    Serial.print("mL/Sec");

    // Print the cumulative total of litres flowed since starting
    Serial.print("  Output Liquid Quantity2: ");             // Output separator
    Serial.print(totalMilliLitres2);
    Serial.println("mL");

    // Reset the pulse counter so we can start incrementing again
    pulseCount2 = 0;
   
    // Enable the interrupt again now that we've finished sending output
    attachInterrupt(sensorInterrupt2, pulseCounter2, FALLING);
  }
 
 
 
   
  if((millis() - oldTime3) > 1000)    // Only process counters once per second
  {

    detachInterrupt(sensorInterrupt3);
    flowRate3 = ((1000.0 / (millis() - oldTime3)) * pulseCount3) / calibrationFactor3;
    oldTime3 = millis();
    flowMilliLitres3 = (flowRate3 / 60) * 1000;
    totalMilliLitres3 += flowMilliLitres3;
      
   
    // Print the flow rate for this second in litres / minute
    Serial.print("Flow rate3: ");
    Serial.print(int(flowRate3));  // Print the integer part of the variable
    Serial.print(".");             // Print the decimal point
    // Determine the fractional part. The 10 multiplier gives us 1 decimal place.
    frac3 = (flowRate3 - int(flowRate3)) * 10;
    Serial.print(frac3, DEC) ;      // Print the fractional part of the variable
    Serial.print("L/min");
    // Print the number of litres flowed in this second
    Serial.print("  Current Liquid Flowing3: ");             // Output separator
    Serial.print(flowMilliLitres3);
    Serial.print("mL/Sec");

    // Print the cumulative total of litres flowed since starting
    Serial.print("  Output Liquid Quantity3: ");             // Output separator
    Serial.print(totalMilliLitres3);
    Serial.println("mL");

    // Reset the pulse counter so we can start incrementing again
    pulseCount3 = 0;
   
    // Enable the interrupt again now that we've finished sending output
    attachInterrupt(sensorInterrupt3, pulseCounter3, FALLING);
  }

 

    if(putaran >= 10){
    return;
    }
    else{
    milklemontea();
    }
   

}




h. Hasil Pengujian Flow Sensor

Penuh
Flow rate: 0.9L/min  Current Liquid Flowing: 16mL/Sec  Output Liquid Quantity: 16.00mL
Flow rate1: 0.7L/min  Current Liquid Flowing1: 12mL/Sec  Output Liquid Quantity: 12.00mL
Flow rate2: 1.1L/min  Current Liquid Flowing2: 19mL/Sec  Output Liquid Quantity2: 19.00mL
Flow rate3: 1.5L/min  Current Liquid Flowing3: 25mL/Sec  Output Liquid Quantity3: 25.00mL
Flow rate: 2.2L/min  Current Liquid Flowing: 36mL/Sec  Output Liquid Quantity: 52.00mL
Flow rate1: 1.7L/min  Current Liquid Flowing1: 29mL/Sec  Output Liquid Quantity: 41.00mL
Flow rate2: 2.4L/min  Current Liquid Flowing2: 40mL/Sec  Output Liquid Quantity2: 59.00mL
Flow rate3: 1.9L/min  Current Liquid Flowing3: 33mL/Sec  Output Liquid Quantity3: 58.00mL


4 / 5
Flow rate: 1.7L/min  Current Liquid Flowing: 28mL/Sec  Output Liquid Quantity: 28.00mL
Flow rate1: 1.3L/min  Current Liquid Flowing1: 21mL/Sec  Output Liquid Quantity: 21.00mL
Flow rate2: 1.7L/min  Current Liquid Flowing2: 29mL/Sec  Output Liquid Quantity2: 29.00mL
Flow rate3: 2.4L/min  Current Liquid Flowing3: 40mL/Sec  Output Liquid Quantity3: 40.00mL
Flow rate: 1.9L/min  Current Liquid Flowing: 33mL/Sec  Output Liquid Quantity: 61.00mL
Flow rate1: 1.5L/min  Current Liquid Flowing1: 25mL/Sec  Output Liquid Quantity: 46.00mL
Flow rate2: 2.2L/min  Current Liquid Flowing2: 36mL/Sec  Output Liquid Quantity2: 65.00mL
Flow rate3: 1.9L/min  Current Liquid Flowing3: 33mL/Sec  Output Liquid Quantity3: 73.00mL

3 / 5
Flow rate: 0.5L/min  Current Liquid Flowing: 9mL/Sec  Output Liquid Quantity: 9.00mL
Flow rate1: 0.6L/min  Current Liquid Flowing1: 10mL/Sec  Output Liquid Quantity: 10.00mL
Flow rate2: 0.7L/min  Current Liquid Flowing2: 13mL/Sec  Output Liquid Quantity2: 13.00mL
Flow rate3: 0.9L/min  Current Liquid Flowing3: 16mL/Sec  Output Liquid Quantity3: 16.00mL
Flow rate: 1.9L/min  Current Liquid Flowing: 33mL/Sec  Output Liquid Quantity: 42.00mL
Flow rate1: 1.5L/min  Current Liquid Flowing1: 25mL/Sec  Output Liquid Quantity: 35.00mL
Flow rate2: 1.9L/min  Current Liquid Flowing2: 33mL/Sec  Output Liquid Quantity2: 46.00mL
Flow rate3: 1.9L/min  Current Liquid Flowing3: 33mL/Sec  Output Liquid Quantity3: 49.00mL


1/2
Flow rate: 1.0L/min  Current Liquid Flowing: 18mL/Sec  Output Liquid Quantity: 18.00mL
Flow rate1: 0.7L/min  Current Liquid Flowing1: 12mL/Sec  Output Liquid Quantity: 12.00mL
Flow rate2: 1.2L/min  Current Liquid Flowing2: 20mL/Sec  Output Liquid Quantity2: 20.00mL
Flow rate3: 1.5L/min  Current Liquid Flowing3: 26mL/Sec  Output Liquid Quantity3: 26.00mL
Flow rate: 1.7L/min  Current Liquid Flowing: 29mL/Sec  Output Liquid Quantity: 47.00mL
Flow rate1: 1.5L/min  Current Liquid Flowing1: 25mL/Sec  Output Liquid Quantity: 37.00mL
Flow rate2: 1.9L/min  Current Liquid Flowing2: 33mL/Sec  Output Liquid Quantity2: 53.00mL
Flow rate3: 1.9L/min  Current Liquid Flowing3: 33mL/Sec  Output Liquid Quantity3: 59.00mL



1/2
Flow rate: 0.6L/min  Current Liquid Flowing: 11mL/Sec  Output Liquid Quantity: 11.00mL
Flow rate1: 0.6L/min  Current Liquid Flowing1: 10mL/Sec  Output Liquid Quantity: 10.00mL
Flow rate2: 0.9L/min  Current Liquid Flowing2: 15mL/Sec  Output Liquid Quantity2: 15.00mL
Flow rate3: 1.1L/min  Current Liquid Flowing3: 19mL/Sec  Output Liquid Quantity3: 19.00mL
Flow rate: 1.5L/min  Current Liquid Flowing: 25mL/Sec  Output Liquid Quantity: 36.00mL
Flow rate1: 1.3L/min  Current Liquid Flowing1: 22mL/Sec  Output Liquid Quantity: 32.00mL
Flow rate2: 1.9L/min  Current Liquid Flowing2: 33mL/Sec  Output Liquid Quantity2: 48.00mL
Flow rate3: 1.7L/min  Current Liquid Flowing3: 29mL/Sec  Output Liquid Quantity3: 48.00mL



1/2
Flow rate: 1.1L/min  Current Liquid Flowing: 19mL/Sec  Output Liquid Quantity: 19.00mL
Flow rate1: 0.8L/min  Current Liquid Flowing1: 14mL/Sec  Output Liquid Quantity: 14.00mL
Flow rate2: 1.4L/min  Current Liquid Flowing2: 24mL/Sec  Output Liquid Quantity2: 24.00mL
Flow rate3: 1.8L/min  Current Liquid Flowing3: 30mL/Sec  Output Liquid Quantity3: 30.00mL
Flow rate: 1.5L/min  Current Liquid Flowing: 25mL/Sec  Output Liquid Quantity: 44.00mL
Flow rate1: 1.3L/min  Current Liquid Flowing1: 22mL/Sec  Output Liquid Quantity: 36.00mL
Flow rate2: 1.7L/min  Current Liquid Flowing2: 29mL/Sec  Output Liquid Quantity2: 53.00mL
Flow rate3: 1.5L/min  Current Liquid Flowing3: 25mL/Sec  Output Liquid Quantity3: 55.00mL


1/2
Flow rate: 0.7L/min  Current Liquid Flowing: 12mL/Sec  Output Liquid Quantity: 12.00mL
Flow rate1: 0.8L/min  Current Liquid Flowing1: 14mL/Sec  Output Liquid Quantity: 14.00mL
Flow rate2: 1.3L/min  Current Liquid Flowing2: 23mL/Sec  Output Liquid Quantity2: 23.00mL
Flow rate3: 1.6L/min  Current Liquid Flowing3: 28mL/Sec  Output Liquid Quantity3: 28.00mL
Flow rate: 1.1L/min  Current Liquid Flowing: 18mL/Sec  Output Liquid Quantity: 30.00mL
Flow rate1: 1.1L/min  Current Liquid Flowing1: 18mL/Sec  Output Liquid Quantity: 32.00mL
Flow rate2: 1.5L/min  Current Liquid Flowing2: 25mL/Sec  Output Liquid Quantity2: 48.00mL
Flow rate3: 1.5L/min  Current Liquid Flowing3: 25mL/Sec  Output Liquid Quantity3: 53.00mL


1/2
Flow rate: 0.5L/min  Current Liquid Flowing: 9mL/Sec  Output Liquid Quantity: 9.00mL
Flow rate1: 1.0L/min  Current Liquid Flowing1: 17mL/Sec  Output Liquid Quantity: 17.00mL
Flow rate2: 1.3L/min  Current Liquid Flowing2: 23mL/Sec  Output Liquid Quantity2: 23.00mL
Flow rate3: 1.9L/min  Current Liquid Flowing3: 32mL/Sec  Output Liquid Quantity3: 32.00mL
Flow rate: 1.1L/min  Current Liquid Flowing: 18mL/Sec  Output Liquid Quantity: 27.00mL
Flow rate1: 0.8L/min  Current Liquid Flowing1: 14mL/Sec  Output Liquid Quantity: 31.00mL
Flow rate2: 1.5L/min  Current Liquid Flowing2: 25mL/Sec  Output Liquid Quantity2: 48.00mL
Flow rate3: 1.5L/min  Current Liquid Flowing3: 25mL/Sec  Output Liquid Quantity3: 57.00mL


1/2
Flow rate: 0.8L/min  Current Liquid Flowing: 13mL/Sec  Output Liquid Quantity: 13.00mL
Flow rate1: 0.7L/min  Current Liquid Flowing1: 12mL/Sec  Output Liquid Quantity: 12.00mL
Flow rate2: 1.3L/min  Current Liquid Flowing2: 22mL/Sec  Output Liquid Quantity2: 22.00mL
Flow rate3: 1.5L/min  Current Liquid Flowing3: 25mL/Sec  Output Liquid Quantity3: 25.00mL
Flow rate: 0.8L/min  Current Liquid Flowing: 14mL/Sec  Output Liquid Quantity: 27.00mL
Flow rate1: 0.8L/min  Current Liquid Flowing1: 14mL/Sec  Output Liquid Quantity: 26.00mL
Flow rate2: 1.5L/min  Current Liquid Flowing2: 25mL/Sec  Output Liquid Quantity2: 47.00mL
Flow rate3: 1.1L/min  Current Liquid Flowing3: 18mL/Sec  Output Liquid Quantity3: 43.00mL



1/2
Flow rate: 0.3L/min  Current Liquid Flowing: 5mL/Sec  Output Liquid Quantity: 5.00mL
Flow rate1: 0.3L/min  Current Liquid Flowing1: 5mL/Sec  Output Liquid Quantity: 5.00mL
Flow rate2: 0.9L/min  Current Liquid Flowing2: 16mL/Sec  Output Liquid Quantity2: 16.00mL
Flow rate3: 1.2L/min  Current Liquid Flowing3: 20mL/Sec  Output Liquid Quantity3: 20.00mL
Flow rate: 0.8L/min  Current Liquid Flowing: 14mL/Sec  Output Liquid Quantity: 19.00mL
Flow rate1: 0.8L/min  Current Liquid Flowing1: 14mL/Sec  Output Liquid Quantity: 19.00mL
Flow rate2: 1.1L/min  Current Liquid Flowing2: 18mL/Sec  Output Liquid Quantity2: 34.00mL
Flow rate3: 1.1L/min  Current Liquid Flowing3: 18mL/Sec  Output Liquid Quantity3: 38.00mL


1/2
Flow rate: 0.2L/min  Current Liquid Flowing: 4mL/Sec  Output Liquid Quantity: 4.00mL
Flow rate1: 0.6L/min  Current Liquid Flowing1: 11mL/Sec  Output Liquid Quantity: 11.00mL
Flow rate2: 0.9L/min  Current Liquid Flowing2: 15mL/Sec  Output Liquid Quantity2: 15.00mL
Flow rate3: 1.1L/min  Current Liquid Flowing3: 18mL/Sec  Output Liquid Quantity3: 18.00mL
Flow rate: 0.4L/min  Current Liquid Flowing: 7mL/Sec  Output Liquid Quantity: 11.00mL
Flow rate1: 0.4L/min  Current Liquid Flowing1: 7mL/Sec  Output Liquid Quantity: 18.00mL
Flow rate2: 1.3L/min  Current Liquid Flowing2: 22mL/Sec  Output Liquid Quantity2: 37.00mL
Flow rate3: 1.1L/min  Current Liquid Flowing3: 18mL/Sec  Output Liquid Quantity3: 36.00mL


1/2
Flow rate: 0.2L/min  Current Liquid Flowing: 4mL/Sec  Output Liquid Quantity: 4.00mL
Flow rate1: 0.1L/min  Current Liquid Flowing1: 2mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate2: 0.9L/min  Current Liquid Flowing2: 15mL/Sec  Output Liquid Quantity2: 15.00mL
Flow rate3: 1.0L/min  Current Liquid Flowing3: 16mL/Sec  Output Liquid Quantity3: 16.00mL
Flow rate: 0.0L/min  Current Liquid Flowing: 0mL/Sec  Output Liquid Quantity: 4.00mL
Flow rate1: 0.0L/min  Current Liquid Flowing1: 0mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate2: 1.1L/min  Current Liquid Flowing2: 18mL/Sec  Output Liquid Quantity2: 33.00mL
Flow rate3: 1.1L/min  Current Liquid Flowing3: 18mL/Sec  Output Liquid Quantity3: 34.00mL


1/2
Flow rate: 0.0L/min  Current Liquid Flowing: 1mL/Sec  Output Liquid Quantity: 1.00mL
Flow rate1: 0.0L/min  Current Liquid Flowing1: 0mL/Sec  Output Liquid Quantity: 0.00mL
Flow rate2: 0.1L/min  Current Liquid Flowing2: 1mL/Sec  Output Liquid Quantity2: 1.00mL
Flow rate3: 0.1L/min  Current Liquid Flowing3: 3mL/Sec  Output Liquid Quantity3: 3.00mL
Flow rate: 0.0L/min  Current Liquid Flowing: 0mL/Sec  Output Liquid Quantity: 1.00mL
Flow rate1: 0.0L/min  Current Liquid Flowing1: 0mL/Sec  Output Liquid Quantity: 0.00mL
Flow rate2: 0.0L/min  Current Liquid Flowing2: 0mL/Sec  Output Liquid Quantity2: 1.00mL
Flow rate3: 1.0L/min  Current Liquid Flowing3: 16mL/Sec  Output Liquid Quantity3: 19.00mL



1/2
Flow rate: 0.1L/min  Current Liquid Flowing: 2mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate1: 0.2L/min  Current Liquid Flowing1: 3mL/Sec  Output Liquid Quantity: 3.00mL
Flow rate2: 0.2L/min  Current Liquid Flowing2: 4mL/Sec  Output Liquid Quantity2: 4.00mL
Flow rate3: 0.7L/min  Current Liquid Flowing3: 12mL/Sec  Output Liquid Quantity3: 12.00mL
Flow rate: 0.0L/min  Current Liquid Flowing: 0mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate1: 0.0L/min  Current Liquid Flowing1: 0mL/Sec  Output Liquid Quantity: 3.00mL
Flow rate2: 0.0L/min  Current Liquid Flowing2: 0mL/Sec  Output Liquid Quantity2: 4.00mL
Flow rate3: 0.8L/min  Current Liquid Flowing3: 13mL/Sec  Output Liquid Quantity3: 25.00mL


Habis

Flow rate: 0.1L/min  Current Liquid Flowing: 2mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate1: 0.2L/min  Current Liquid Flowing1: 3mL/Sec  Output Liquid Quantity: 3.00mL
Flow rate2: 0.2L/min  Current Liquid Flowing2: 4mL/Sec  Output Liquid Quantity2: 4.00mL
Flow rate3: 0.7L/min  Current Liquid Flowing3: 12mL/Sec  Output Liquid Quantity3: 12.00mL
Flow rate: 0.0L/min  Current Liquid Flowing: 0mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate1: 0.0L/min  Current Liquid Flowing1: 0mL/Sec  Output Liquid Quantity: 3.00mL
Flow rate2: 0.0L/min  Current Liquid Flowing2: 0mL/Sec  Output Liquid Quantity2: 4.00mL
Flow rate3: 0.8L/min  Current Liquid Flowing3: 13mL/Sec  Output Liquid Quantity3: 25.00mL
Flow rate: 0.0L/min  Current Liquid Flowing: 0mL/Sec  Output Liquid Quantity: 0.00mL
Flow rate1: 0.0L/min  Current Liquid Flowing1: 0mL/Sec  Output Liquid Quantity: 0.00mL
Flow rate2: 0.0L/min  Current Liquid Flowing2: 0mL/Sec  Output Liquid Quantity2: 0.00mL
Flow rate3: 0.0L/min  Current Liquid Flowing3: 0mL/Sec  Output Liquid Quantity3: 0.00mL
Flow rate: 0.0L/min  Current Liquid Flowing: 0mL/Sec  Output Liquid Quantity: 0.00mL
Flow rate1: 0.0L/min  Current Liquid Flowing1: 0mL/Sec  Output Liquid Quantity: 0.00mL
Flow rate2: 0.0L/min  Current Liquid Flowing2: 0mL/Sec  Output Liquid Quantity2: 0.00mL
Flow rate3: 0.0L/min  Current Liquid Flowing3: 0mL/Sec  Output Liquid Quantity3: 0.00mL
Flow rate: 0.1L/min  Current Liquid Flowing: 2mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate1: 0.1L/min  Current Liquid Flowing1: 2mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate2: 0.2L/min  Current Liquid Flowing2: 4mL/Sec  Output Liquid Quantity2: 4.00mL
Flow rate3: 0.2L/min  Current Liquid Flowing3: 4mL/Sec  Output Liquid Quantity3: 4.00mL
Flow rate: 0.0L/min  Current Liquid Flowing: 0mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate1: 0.0L/min  Current Liquid Flowing1: 0mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate2: 0.0L/min  Current Liquid Flowing2: 0mL/Sec  Output Liquid Quantity2: 4.00mL
Flow rate3: 0.0L/min  Current Liquid Flowing3: 0mL/Sec  Output Liquid Quantity3: 4.00mL
Flow rate: 0.0L/min  Current Liquid Flowing: 0mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate1: 0.0L/min  Current Liquid Flowing1: 0mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate2: 0.0L/min  Current Liquid Flowing2: 0mL/Sec  Output Liquid Quantity2: 4.00mL
Flow rate3: 0.0L/min  Current Liquid Flowing3: 0mL/Sec  Output Liquid Quantity3: 4.00mL
Flow rate: 0.0L/min  Current Liquid Flowing: 0mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate1: 0.0L/min  Current Liquid Flowing1: 0mL/Sec  Output Liquid Quantity: 2.00mL
Flow rate2: 0.0L/min  Current Liquid Flowing2: 0mL/Sec  Output Liquid Quantity2: 4.00mL
Flow rate3: 0.0L/min  Current Liquid Flowing3: 0mL/Sec  Output Liquid Quantity3: 4.00mL





i. VIDEO HASILNYA