mccoy
Posts: 15
Joined: Tue Mar 07, 2017 11:41 pm

Audio jack output voltage

Mon Apr 24, 2017 1:41 am

Hey, this seems like it shouldn't be that complex of a problem.
Basic question is how much voltage does the audio output give?

I'm trying to check how long it takes to execute

Code: Select all

pygame.mixer.play()


I started with a usb sound card but I feel like that won't give me true latency as it complicates the issue.(?)
So I hooked up an audio cable to go from the 3.5 audio output to a ground and GPIO pin.
I was trying to use:

Code: Select all

pygame.mixer.music.play(1,0.0)
while True:
    print("Waiting...")
    GPIO.wait_for_edge(17, GPIO.RISING)
    print("Detected") 
after calling the sound but I'm not sure how much voltage the 3.5 mm jack gives and so I'm hesitant to actually run it. I don't want to fry my pi and I'm not sure the audio even reaches the 2 volts necessary to trigger it.
Thanks

klricks
Posts: 7154
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Audio jack output voltage

Mon Apr 24, 2017 3:32 am

The voltage is industry standard line level. https://en.wikipedia.org/wiki/Line_level
It is an analog signal not digital.
Do not connect audio out to a GPIO. You may fry your RPi if you haven't already.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

Return to “Beginners”