I'm trying to wire my Raspbery Pi 1 Model A (hereafter RPi) to a simple 6VDC buzzer and here is my best attempt:
- So the 3.3V power pin from the RPi is connected to the breadboard's top-most rail via a red jumper (note this isn't actually used by the rest of the circuit but I don't believe it harms anything, right?)
- A GPIO output pin is connected to the breadboard via yellow jumper; which is then connected (same column) to the buzzer via the buzzer's red wire
- The buzzer's black (
GND
) wire is then connected to the 2nd rail on the breadboard, which in turn is connected to the RPi'sGND
pin
To begin with, if anything about the circuit looks incorrect, please begin by correcting me! However I don't think I need anything else (resistors, capacitors, etc.) in order for this to work. When my software (running on the RPi) fires a signal to the buzzer via GPIO output pin, the buzzer will sound, etc.
The only thing I'm currently on the fence about is whether or not I need to set the internal pin resistance (so, pull up resistor vs. pull down resistor at the software layer)
My question: when does one need to set the internal pin resistance (pull up vs pull down) when working with IO devices such as buzzers, LEDs, switches, etc.? And why?! I happen to be using pi4j which uses wiringPi under the hood, but this question is more about knowing & understanding when to set pin resistors at the software layer.