Download - Project arduino uno with sound sensor
Saving Energy for Railway Lamp System
Ana HadijahBernaz Bullah D M
M. RezaM. Syukur Alwan
Kelas 2AD3 Teknik Refrigerasi dan Tata Udara
Deskripsi singkat
Alat ini bertujuan untuk melakukan penghematan energi pada terowongan dengan menggunakan sound sensor, alat ini berfungsi ketika kereta mentransfer suara kepada sensor yang kemudian dilanjutkan ke lampu LED.
Alat dan Bahan
Arduino Uno
Arduino Uno merupakan mikrokontroler berbasis
ATmega328, mempunyai 14 digital input serta otput pin
(enam diantaranya bisa digunakan sebagai output
PWM), 6 analog input 16 MHz osilator kristal, koneksi ke
USB, koneksi ke power supply, dan tombol reset.
Sensor suara- Dimensi : 17(l) x 34(p)- Catu daya : 5VDC- Chip LM393- Menggunakan sensor electret microphone.- Terintegrasi dengan op-amp untuk menguatkan sinyal suara sampai dengan 100x- Memiliki output data berupa tegangan analog, sehingga dapat dengan mudah terhubung ke ADC ataupun mikrokontroler yang memiliki internal ADC.
DFR 0034
Motor servoServo mini yang mempunyai 3 pin yaitu power, kontrol dan ground. Sudah termasuk 3 buah mounting.
Spesifikasi:- Motor type : 3 pole- Nylon gear- Top ball bearing- Operating Voltage: 4.8V~6.0V- Operating speed: 0.10sec/60- Output torque: 1.6kg/cm 4.8V- Rotational range : 180- Dimensi : 23.1 x 12.2 x 29.0mm- Berat: 9g
Micro Serve 9g SG90
LED
Kabel
Buzzer / speaker
Power Supply
Miniatur kereta apiBatera
i
Diagram Skematik
Arduino Uno & Sensor Suara
Arduino Uno & Motor Servo
ProgramServo myservo; // create servo object to control a servo // a maximum of eight servo objects can be created int pos ; // variable to store the servo position int led = 13;int volume; void setup() { // Serial.begin(9600); For debugging pinMode(led, OUTPUT); myservo.attach(9); // attaches the servo on pin 9 to the servo object } void loop() {volume = analogRead(A4); // Reads the value from the Analog PIN A0/*//Debug modeSerial.println(volume);delay(10);*/
if(volume>=500){digitalWrite(led, LOW); //Turn ON Led//delay(500); /*for(pos = 90; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees { */ // in steps of 1 degree myservo.write(90); // tell servo to go to position in variable 'pos' delay(15); // goes from 0 degrees to 180 degrees // waits 15ms for the servo to reach the position } else{digitalWrite(led, HIGH);for(pos = 90; pos < 180; pos+=1) // goes from 180 degrees to 0 degrees { myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position // waits 15ms for the servo to reach the position } myservo.write(180); delay(10000); } }
Prinsip Kerja
Sensor suara akan mendeteksi suara kereta api yang masuk ke terowongan yang dihasilkan oleh buzzer sehingga LED di dalam terowongan menyala dan motor servo pun akan menggerakkan palang pintu
Sourcehttp://arduino.cc http://arduinobasics.blogspot.com http://www.dfrobot.com http://www.emartee.com http://jogjarobotika.com http://www.servodatabase.com
Thank you for
your attention!