Make BIG LED Water Level Indicator

Ebook : Make BIG LED Water Level Indicator
By : www.rokhmad.com

www.rokhmad.com

Ide pembuatan alat ini, ketika saya akan mandi, tiba-tiba ketika saya mernyalakan Kran air, air tidak keluar.
Padahal tandon air saya menggunakan otomatis berupa pelampung bandul merk ͞Radar͟, dimana pompa
air otomatis mengisi tandon kalau air tinggal separoh.
Langsung saya naik ke tower tempat tandon air, ternyata tali bandul pelampung putus, sehingga switch
otomatis tidak tertarik, akibatnya pompa air tidak mennyala.
Timbulah ide saya untuk membuat indikator level air, sehingga jika terjadi hal diatas, akan segera di
ketahui dan dapat diatasi.
JADI ALAT INI HANYA UNTUK MENGETAHUI LEVEL/KETINGGIAN AIR SAJA, BUKAN KONTROL KETINGGIAN
AIR !!

www.rokhmad.com

Foto Proses Pembuatan
PCB lobang, dan Frame untuk cover dari acrelic

www.rokhmad.com


PCB saya cat agar berwarna hitam

Pemasangan komponen pada PCB lobang

www.rokhmad.com

www.rokhmad.com

Siap diuji coba ;

www.rokhmad.com

Uji coba dulu di ember :

www.rokhmad.com

www.rokhmad.com

Pemasangan kabel pita untuk menyambung display dan sensor ultrasonic


Rangkaian sudah terpasang di dinding :

www.rokhmad.com

www.rokhmad.com

PETUNJUK ;
1. Rakit rangkaian sesuai dengan skema, untuk IC Atmega 328 gunakan soket
IC 28 Pin.
2. masukkan sketch tandon air.ino
3. Buka dengan software ARDUINO IDE.
4. Masukkan sketch dengan Board Arduino UNO.
5. Cabut IC atmega 328 dari board Arduino UNO, kemudian pasang pada
rangkaian anda.
6. Jika ukuran tinggi tandon tidak seperti sketch, modifikasilah sketch sesuai
kebutuhan.

www.rokhmad.com


Coding / sketch arduino IDE :
//Coded by MATHEW VARGHESE
//edited by : www.rokhmad.com WA : 08157712604
//Perhatian !! Penomoran IC sebenarnya ini berbeda dengan PIN pada Board
arduino

int trig = 11; // Attach Trig of ultrasonic sensor to pin 11
int echo = 10; // Attach Echo of ultrasonic sensor to pin 10

int pin9 = 2; //Lower level
int pin8 = 3;
int pin7 = 4;
int pin6 = 5;
int pin5 = 6;
int pin4 = 7;
int pin3 = 8;
int pin2 = 9;//highest level

void setup() {
pinMode (pin2, OUTPUT);// Set pins to output for controlling I/O

pinMode (pin3, OUTPUT);
pinMode (pin4, OUTPUT);
pinMode (pin5, OUTPUT);
pinMode (pin6, OUTPUT);
pinMode (pin7, OUTPUT);
pinMode (pin8, OUTPUT);
pinMode (pin9, OUTPUT);
}

www.rokhmad.com

void loop()
{

// Establish variables for duration of the ping,
// and the distance result in inches and centimeters:
long duration, in, cm;

//'in' is inches and 'cm' is centimeter


// The PING is triggered by a HIGH pulse of 2 or more microseconds.
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
pinMode(trig, OUTPUT);
digitalWrite(trig, LOW);
delayMicroseconds(2);
digitalWrite(trig, HIGH);
delayMicroseconds(5);
digitalWrite(trig, LOW);

// The same pin is used to read the signal from the PING: a HIGH
// pulse whose duration is the time (in microseconds) from the sending
// of the ping to the reception of its echo off of an object.
pinMode(echo, INPUT);
duration = pulseIn(echo, HIGH);

// Convert the time into a distance
in = microsecondsToInches(duration);
cm = microsecondsToCentimeters(duration);

delay(1);

if (in < 50) //
Ketinggian Tandon air 50 CM, ganti sesuai dengan
ketinggian tandon anda dan kalibrasilah !!
digitalWrite(pin2, HIGH);//Low Level
www.rokhmad.com

digitalWrite(pin3, LOW);
digitalWrite(pin4, LOW);
digitalWrite(pin5, LOW);
digitalWrite(pin6, LOW);
digitalWrite(pin7, LOW);
digitalWrite(pin8, LOW);
digitalWrite(pin9, LOW);
if (in < 40)
digitalWrite(pin3, HIGH);

if (in < 30)
digitalWrite(pin4, HIGH);

if (in < 25)

digitalWrite(pin5, HIGH);

if (in < 20)
digitalWrite(pin6, HIGH);;

if (in < 16)
digitalWrite(pin7, HIGH);
if (in < 15)
digitalWrite(pin8, HIGH);
if (in < 10)
digitalWrite(pin9, HIGH); //Full Level

}

www.rokhmad.com

long microsecondsToInches(long microseconds)
{
// According to Parallax's datasheet for the PING, there are
// 73.746 microseconds per inch (i.e. sound travels at 1130 feet per

// second). This gives the distance travelled by the ping, outbound
// and return, so we divide by 2 to get the distance of the obstacle.
// See: http://www.parallax.com/dl/docs/prod/acc/28015-PI...
return microseconds / 74 / 2;
}

long microsecondsToCentimeters(long microseconds)
{
// The speed of sound is 340 m/s or 29 microseconds per centimeter.
// The ping travels out and back, so to find the distance of the
// object we take half of the distance travelled.
return microseconds / 29 / 2;
}

salam e-dukasi
www.rokhmad.com
WA : 08157712604

www.rokhmad.com