0

PAM8302 powered by RPi?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

PAM8302 powered by RPi?

by dried on Sun Dec 17, 2017 12:06 am

Hi all,

I'm trying to run a contact exciter from a Raspberry Pi 3 via the PAM8302 amplifier, but I've been having no luck. I'm trying to power the PAM from the GPIO 5v and ground -- should I expect that to work? My circuitry knowledge is definitely limited, but from what I understand the RPi gives 5V at up to 1.5A, which should be plenty. The exciter is 4ohm / 3W, which I believe should work fine with the PAM.

Thanks!

dried
 
Posts: 4
Joined: Sat Dec 16, 2017 11:55 pm

Re: PAM8302 powered by RPi?

by adafruit_support_mike on Tue Dec 19, 2017 4:46 am

It should be possible, but in general it's better to use an external connection for the power.

All class-D amplifiers are electrically noisy, and can cause problems for a RasPi's logic if you connect one directly to the 5v GPIO pins.

Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually work best.

adafruit_support_mike
 
Posts: 51313
Joined: Thu Feb 11, 2010 2:51 pm

Re: PAM8302 powered by RPi?

by dried on Sun Jan 07, 2018 9:18 pm

Hi Mike,

Thanks for the reply and help, and sorry for the delay while I was out of the province.

Good to know about the electrical noisiness – don't want that affecting the DSP running on the pi. I suppose I'll need to find another power source then, but if this should work and it isn't maybe my circuit is incorrect somewhere else.

I've uploaded some images to imgur (https://imgur.com/a/ZDrde) and attached the overview here. The red line is running to the 5v GPIO and the black to the ground. The audio signal is coming from one channel of half of a 3.5mm splitter. I've tried with another headphone as well with no luck.

The connections are all temporary while I'm testing this thing; eventually they will be soldered.
Attachments
IMG_20180107_164502435.jpg
circuit overview
IMG_20180107_164502435.jpg (176.61 KiB) Viewed 308 times

dried
 
Posts: 4
Joined: Sat Dec 16, 2017 11:55 pm

Re: PAM8302 powered by RPi?

by dried on Tue Jan 16, 2018 8:42 pm

Mike, do you think powering the whole setup via one of the Adafruit PowerBoost 1000 / 1000C units and LiPo battery would be a better approach (as in the PiGrrl tutorial here: https://learn.adafruit.com/pocket-pigrrl/circuit-diagram)? I am trying to keep the number of components & total cost down as I'll eventually need to make about 5 of these, but having the battery for portability would be useful.

Also, you mentioned that while my setup wasn't ideal it should still be possible. Should I be worried that I've damaged my PAM8302 or my exciters? (The pi seems to be working fine.) (EDIT: I just noticed that another tutorial circuit diagram has the PAM 8302 connected to a pi's 3V and GND pins, so I'll give that a try -- https://learn.adafruit.com/10-raspberry-pi-desktop/circuit-diagram)

Thanks!

dried
 
Posts: 4
Joined: Sat Dec 16, 2017 11:55 pm

Re: PAM8302 powered by RPi?

by dried on Thu Jan 18, 2018 1:44 am

I just tried connecting directly to the audio terminals on the bottom of the pi, below the jack, and that works fine with either of the 3v3 and 5v GPIO pins, so there must have been a bad connection somewhere.

How serious of a problem is the electrical noise interference with the pi logic? How does it manifest?

dried
 
Posts: 4
Joined: Sat Dec 16, 2017 11:55 pm

Please be positive and constructive with your questions and comments.