Pages: [1]   Go Down
Author Topic: Use voltage as input?  (Read 312 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 0
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17259
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Well a piezo buzzing creates a audio sound output not a voltage output. So is your question how to have a audio sound turn something on or off?

Lefty
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I basically just want the arduino to "see" that the buzzer should be on, and have a variable assigned to that
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17259
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I basically just want the arduino to "see" that the buzzer should be on, and have a variable assigned to that

"See' implies light input? If you need to detect that the buzzer is sounding off it would most likely require a microphone used as a sound detector and suitable circuitry to convert it to a on/off signal for the arduino. Should be lots of example around if you search.

Lefty
Logged

Offline Offline
Edison Member
*
Karma: 32
Posts: 1282
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Quote
Use 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.
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Quote
Use 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.

That's exactly what I want to do, I was wondering how I can do this without a common ground though, I'm going to use a 7805 right after the transformer to drop whatever voltageit is putting out to 5 volts, and power the arduino with that (well, really an attiny85 but same thing basically), or would it still be common ground all the way at the piezo?
Logged

BCC AZ USA
Offline Offline
Edison Member
*
Karma: 32
Posts: 1129
It gets hot so it must be working
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you could use an optoisolator with the led wired accross the piezo and the transistor to the arduino.  You need a separate power supply for the arduino but it will be totally isolated from 110.
Logged

Pages: [1]   Go Up
Jump to: