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 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

DFR 0034

- 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.
Motor servo
Servo mini yang mempunyai 3 pin
yaitu power, kontrol dan ground.
Sudah
termasuk
3
buah
mounting.

Micro Serve 9g SG90

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
Power
Supply

Kabel

Buzzer /
speaker

Baterai

LED

Miniatur
kereta api
Diagram Skematik

Arduino Uno & Sensor
Suara
Arduino Uno & Motor
Servo
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 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
http://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!

Projek arduino uno with sound sensor

  • 2.
    Alat ini bertujuanuntuk melakukan penghematan energi pada terowongan dengan menggunakan sound sensor, alat ini berfungsi ketika kereta mentransfer suara kepada sensor yang kemudian dilanjutkan ke lampu LED.
  • 4.
    Arduino Uno Arduino Unomerupakan 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.
  • 5.
    Sensor suara DFR 0034 -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.
  • 6.
    Motor servo Servo miniyang mempunyai 3 pin yaitu power, kontrol dan ground. Sudah termasuk 3 buah mounting. Micro Serve 9g SG90 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
  • 7.
  • 8.
  • 9.
    Arduino Uno &Motor Servo
  • 10.
    Servo myservo; // createservo 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); */
  • 11.
    if(volume>=500) { digitalWrite(led, LOW); //TurnON 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); } }
  • 12.
    Sensor suara akanmendeteksi 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
  • 13.
  • 14.