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.
Arduino Uno
Arduino Uno merupakanmikrokontroler berbasis
ATmega328, mempunyai 14 digital input serta otput pin
(enam diantaranya bisadigunakan 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 pinyaitu power, kontrol dan ground.Sudah termasuk 3 buahmounting.
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
Servo 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 mode
Serial.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);
}
}
Sensor suara akan mendeteksi suarakereta api yang masuk ke terowonganyang dihasilkan oleh buzzer sehingga LEDdi dalam terowongan menyala dan motorservo pun akan menggerakkan palangpintu
http://arduino.cc
http://arduinobasics.blogspot.com
http://www.dfrobot.com
http://www.emartee.com
http://jogjarobotika.com
http://www.servodatabase.com