I was wondering, how can I use voltage to trigger something? I want to add something to an alarm clock, that goes off whenever the piezo buzzes. How would I accomplish this?
I basically just want the arduino to "see" that the buzzer should be on, and have a variable assigned to that
Use voltage as input?
Yes, you can probably wire the piezo circuit to the Arduino. You need to know the piezo voltage, and if the clock plugs-into wall-power it's really important that the internal circuitry in the alarm clock is totally isolated from the AC line voltage.QuoteUse voltage as input?That's exactly how digital electronics works! With the Arduino's 5V logic, 5V is read as 'HIGH" or "1", and zero volts is read as "LOW" or "0". (It doesn't have to be exactly 5V and zero volts... You can check the chip specs if you want the details.)Besides the signal connection, you'll need a common ground between the clock and the Arduino. And, you can't put more than 5V into the Arduino without (potentially) damaging it. So, if there is more than 5V on the piezo, you'll need a voltage divider (two resistors).And/or since you may not know what you are connecting to it, you might want to add a resistor and a couple of protection diodes to block any negative voltages, or voltages greater than 5V from hitting the Arduino. The signal to the piezo won't be constant DC. It will be a pulse, but that's OK. You just need to detect something that's not zero. Hopefully, it's near zero volts when off.