Hi everyone! I am new here and I find this site really fascinating. By the way, I am trying to figure out how to connect the output of my sound activated switch (Please see attached schematic below) to the digital input pin of my arduino.
Am I correct that this circuit acts like a push button switch except that this is sound activated. Also, attached is a simple code I made for this experiment.
int Button = 8; //Output of the Sound Activated Switch
int Led = 13;
void setup()
{
pinMode(Button, INPUT);
pinMode(Led, OUTPUT);
}
void loop()
{
if (digitalRead(Button) == HIGH)
{
digitalWrite(Led, HIGH);
}
else
{
digitalWrite(Led, LOW);
}
}
As long as output is no more than 5V, you can connect it directly to arduino. Just connect sensor's ground ( GND ) to arduino's gnd , OUTPUT to any of the digital or analog pins . You can power the sensor from Arduino's 5V output.
Lows, -0.5V to 1.5V
Highs 3V to 5.5V.
Too low, too high will damage the IO pins.
1.5V to 3V will produce indeterminate digital readings.
Don't forget GND to Gnd as indicated.
CrossRoads:
Lows, -0.5V to 1.5V
Highs 3V to 5.5V.
Too low, too high will damage the IO pins.
1.5V to 3V will produce indeterminate digital readings.
Don't forget GND to Gnd as indicated.
Thank you sir! I think I am having indeterminate digital readings.. still having trouble with this circuit.