Reduce voltage to read buzzer with GPIO

gpiomosfet

Using the GPIO on a BBB I'm attempting to detect a change in voltage coming from a DC source that drives a buzzer when the machines cycle is complete. I've located the DC connections from the machines control board to the buzzer. When testing + to ground I get 13.2V. When testing + to the buzzer I get 6v/6ma. When the buzzer activates it spikes up and down 5 times from 6v/6ma to 10v/20ma. So my question is how do I build a circuit using these two contacts that is reduced to approx 2.5v & < 5ma as to not blow out the GPIO?

I'm very new to this but based on searching the web my initial thought was a voltage divider, since it seems like a simple circuit to create that I can easily calculate the resistor sizes for……BUT I'm concerned about the spikes as the buzzer operates. In my testing of these contacts with my multimeter several times the meter indicated an overload.

I've also read about Triacs and thought that might isolate the spike but the problem is even when the machine is idle/sleeping the voltage between the + and buzzer lead is still 6v so the triac will never reset.

Thank you

Scott

Best Answer

Use a resistor from the buzzer, maybe 1kohm to 10kohm and feed it to a zener diode. The zener will limit the voltage seen by your chip. If your circuit runs from 3.3 volts choose a 2.7 volt zener diode. If it runs from 5volts choose a 4.7volt zener.

Try googling zener voltage regulator.