erasti32
Posts: 2
Joined: Fri Jul 12, 2019 7:58 pm

Connecting an amplifier to Raspberry Pi GPIO's

Sat Jul 13, 2019 8:36 pm

I have a cheap speaker from dollar store. It has aux cable input and outputs to a speaker. Let's say I use that circucit, run the speaker output wires to the gpio, and I can plug in the mic through the aux cable. Either I use an electret mic or use the aux input for a headphone mic or whatever. Not too concerned about that part. Question is, does the speaker have an adc circuit integrated into it? Since it takes aux input and outputs to a speaker, can I unsolder the speaker wires and wire it into the gpio?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11850
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Connecting an amplifier to Raspberry Pi GPIO's

Sat Jul 13, 2019 11:17 pm

If you do this you will blow up your PI, as you apply both positive and negative voltages to the GPIO, and these voltages might be significantly greater than a GPIO input can withstand. Both negative voltages, and positive voltages greater than 4V, will damage a GPIO.
Question is, does the speaker have an adc circuit integrated into it?
NO! an ADC is an analog to digital converter, and no a speaker does not have an analog to digital converter built into it..... :shock:

even if you somehow would limit the speaker signal to a valid (safe) range. any audio you would be putting in would be unrecognisable distorted, as audio is analog, and all you do is clip it and make a digital signal by converting all positive voltages to ones, and all negative voltages to zero's that is NOT how audio sampling normally works.

P.S. split and renamed from unrelated hijacked ancient thread you "necromanced".

LTolledo
Posts: 1541
Joined: Sat Mar 17, 2018 7:29 am

Re: Connecting an amplifier to Raspberry Pi GPIO's

Sat Jul 13, 2019 11:40 pm

Oh, the dollar store amplified speakers! My bedside Pi-Top RPi3B has one connected to it.

however the connection are as follows:
Amplified speaker headphone plug ---> RPi audio jack
Amplified speaker USB plug ---> RPi USB port

its so simple!

if you insist in connecting the amplified speakers via RPi's GPIO, then you will need a DAC that plugs into the GPIO header.
the cheapest one (and currently using on another RPi model) is the Pimoroni pHAT DAC.

gives better audio (amplitude and clarity) than RPi's on-board audio jack.
just plug the amplified speaker headphone plug to pHAT DAC's headphone jack, and some very very easy configuration steps.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11850
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Connecting an amplifier to Raspberry Pi GPIO's

Sun Jul 14, 2019 1:32 pm

@LToledo the OP didn't want to use his amplifier in the normal way, he wanted to INPUT audio with it, not use it as a speaker driver.... :roll:

LTolledo
Posts: 1541
Joined: Sat Mar 17, 2018 7:29 am

Re: Connecting an amplifier to Raspberry Pi GPIO's

Sun Jul 14, 2019 2:09 pm

mahjongg wrote: @LToledo the OP didn't want to use his amplifier in the normal way, he wanted to INPUT audio with it, not use it as a speaker driver....
oh, is that so :shock: .... misunderstood it.... :? apologies

cant help anymore ...

....signing out from this topic....
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Return to “Beginners”