1

I have a Raspberry Pi 2 B+ and I would like to confirm that the 3.5mm jack isn't tied to a GPIO pin. I could not find any information on this and thought this may be the case but I wanted to double check here. Some microcontrollers share onboard features with I/O pins and I want to make sure there aren't any conflicts.

My application is using the 3.5mm audio jack, a realtime clock (pin 1-6), a 16x2 LCD display, and several other GPIO pins to drive MOFSET power relays for lights and I want to ensure that I don't have any conflicting pins.

  • I do use Rpi GPIO to drive 30A power MOSFET switches (not actually conventional relays). I do play with real time clock DS3231 and 16x2 LCD. I also know Rpi's 3.5mm jack can output audio signals. But what you are trying to do is unthinkable. Is it a DJ app? :) – tlfong01 Jul 31 at 9:48
  • it's for an art installation with sound output, time regulated lighting, and the LCD is for internal diagnostic. I just wanted to make sure that I'm not crossing up any GPIO pins – tshimkus Jul 31 at 10:01
  • I think you are over worrying. I am 90% sure that GPIO would not interfere with audio output, and vice versa. And you can use USB sound card with microphone and speakers, instead of using the Rpi on board speaker only 3.5mm jack. Then you can have some interaction between human and machine. And have you considered neopixel? : youtube.com/watch?v=seG5tip6wBw – tlfong01 Jul 31 at 12:42
  • @tlfong01, there will be a very simple interactive component powered by a button that prompts the audio playback. I have used NeoPixel for other projects but decided to go with 4 wire RGB for this application. – tshimkus Aug 1 at 2:39
  • Hi @tshmkus, Ah yes, if your work is outdoor, then RGB flood light or similar might be more appropriate: (1) DC12V 10W 4 Wire PWM LED RGB Flood Light US$12 fr.aliexpress.com/item/2037336497.html, (2) A couple of months ago I also played with a musical fountain project for my rooftop garden: Relay Boards: raspberrypi.org/forums/viewtopic.php?f=91&t=229789, (3) Musical Fountain: raspberrypi.org/forums/viewtopic.php?f=37&t=231795#p1419354 – tlfong01 Aug 1 at 3:10
2

It depends on what you mean.

The on-board PWM peripheral is used to provide audio to the 3.5 mm audio jack.

See schematics.

GPIO 12/13/18/19 can be configured to mirror the PWM output channels, but they are not connected to the audio jack.

  • Thanks, that what I was wondering. I wasn't sure if the 3.5mm jack is independent of GPIO or tied into certain pins – tshimkus Jul 31 at 9:59
2

The analog audio output is indeed connected to GPIO pins, but not those on the expansion header.

The SoC has 54 general-purpose I/O (GPIO) lines split into two banks, but only a subset of one bank are brought out to the expansion header. Many of the others are used for dedicated purposes e.g sdio interface to the SD card and analog audio.

The analog audio uses both of the 2 PWM channels available so this prevents the use of PWM on the other GPIO pins but all the pins on the expansion header can be used for normal I/O functions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.