Forum > Linux PDAs
Buzzer to raspberry pi 2
mig-31:
You should use a buzzer with voltage supplied by Rasberry Pi. Default is 3.3V. Connected +3.3V and GND pins to your buzzer.
Thaddy:
--- Quote from: mig-31 on May 02, 2016, 10:36:31 am ---You should use a buzzer with voltage supplied by Rasberry Pi. Default is 3.3V. Connected +3.3V and GND pins to your buzzer.
--- End quote ---
Yup, but that's not all:
Given is:
Yellow: in // this controls buzzing or not (hi or low), choose any suitable pin from the GPIO
Red: vcc // is the 3.3V pin, use a hot pin, there are at least two depending on your Pi
Black: gnd// is ground.
Some buzzers just require red and black, though, as suggested. Yellow should bring down vcc as well.
If the buzzer itself is dumb, you can use a pull-up resistor for that between the yellow pin and vcc. See: http://www.seattlerobotics.org/encoder/mar97/basics.html
xinyiman:
Thanks for the suggestions. I did a little test but does not work. I attach the test source and the photos of how I connected the buzzer to 2 pi raspberry.
Strangely me error:
Error mapping gpio registry
Thans
xinyiman:
My connection
SymbolicFrank:
Do you have a multimeter? First, find two pins with 3.3V and one with 0V. Connect the black cable to 0V and the red to 3.3V. You should hear silence. Now connect the yellow to 3.3 as well, and you should hear a buzz.
No? Ok, some more explanation.
You want to power something. That requires that those pins can deliver that power. Power supply pins can do that, processor pins cannot. So, you want the red cable connected to a power supply pin.
The easy way to test this, is that the power on the red and yellow pins has to stay above 3.3V when connected. If it drops, it was a processor pin and not a power supply pin.
When you found the right pins and the buzzer makes noise, it is time to program a pin. Write and execute your program and measure if the voltage on the pin switches between 0 and 3.3V. If it did, use that for the yellow cable.
If it still doesn't work, you need a pull-up resistor, like Thaddy posted. Start with 10k, if that doesn't work, try 4.7k.
If it still doesn't work, post specs.
Navigation
[0] Message Index
[#] Next page
[*] Previous page